You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

16 lines
396 B

package txselector
import (
"encoding/binary"
ethCommon "github.com/ethereum/go-ethereum/common"
)
func getAccountID(addr ethCommon.Address, tokenID uint32) [36]byte {
var tokenIDBytes [4]byte
binary.LittleEndian.PutUint32(tokenIDBytes[:], tokenID)
accountIDBytes := append(addr[:], tokenIDBytes[:]...)
var accountID [36]byte
copy(accountID[:], accountIDBytes[:36])
return accountID
}