Documentation ¶
Index ¶
- func GetSolidityFunctionSig(in []byte) [4]byte
- func Simulate(c SimulateCaller, block *big.Int, txHash common.Hash, from common.Address) ([]byte, error)
- func SliceTo32Bytes(in []byte) [32]byte
- func ToCallArg(msg ethereum.CallMsg) map[string]interface{}
- func UserAmountToWei(amount string, decimal *big.Int) (*big.Int, error)
- func WeiAmountToUser(amount *big.Int, decimals *big.Int) (*big.Float, error)
- type ClientDispatcher
- type ContractCaller
- type ContractCallerDispatcher
- type ContractChecker
- type GasPricer
- type SimulateCaller
- type TxFabric
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSolidityFunctionSig ¶
func Simulate ¶
func Simulate(c SimulateCaller, block *big.Int, txHash common.Hash, from common.Address) ([]byte, error)
Simulate function gets transaction info by hash and then executes a message call transaction, which is directly executed in the VM of the node, but never mined into the blockchain. Execution happens against provided block.
func SliceTo32Bytes ¶
func ToCallArg ¶
func ToCallArg(msg ethereum.CallMsg) map[string]interface{}
ToCallArg is the function that converts ethereum.CallMsg into more abstract map This is done for matter of making EVMClient more abstract since some go-ethereum forks uses different messages types
func UserAmountToWei ¶
UserAmountToWei converts decimal user friendly representation of token amount to 'Wei' representation with provided amount of decimal places eg UserAmountToWei(1, 5) => 100000
Types ¶
type ClientDispatcher ¶
type ClientDispatcher interface { WaitAndReturnTxReceipt(h common.Hash) (*types.Receipt, error) SignAndSendTransaction(ctx context.Context, tx evmclient.CommonTransaction) (common.Hash, error) Sign(byteData []byte) ([]byte, error) GetTransactionByHash(h common.Hash) (tx *types.Transaction, isPending bool, err error) UnsafeNonce() (*big.Int, error) UpdateNonce() LockNonce() UnlockNonce() UnsafeIncreaseNonce() error From() common.Address PolygonGasStation() bool }
type ContractCaller ¶
type ContractCallerDispatcher ¶
type ContractCallerDispatcher interface { ContractCaller ClientDispatcher ContractChecker }
type ContractChecker ¶
type SimulateCaller ¶
type SimulateCaller interface { ContractCaller TransactionByHash(ctx context.Context, hash common.Hash) (tx *types.Transaction, isPending bool, err error) }
Directories ¶
Path | Synopsis |
---|---|
mock
Package mock_evmgaspricer is a generated GoMock package.
|
Package mock_evmgaspricer is a generated GoMock package. |
Package mock_calls is a generated GoMock package.
|
Package mock_calls is a generated GoMock package. |
itx/mock
Package mock_itx is a generated GoMock package.
|
Package mock_itx is a generated GoMock package. |
mock
Package mock_transactor is a generated GoMock package.
|
Package mock_transactor is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.