Documentation
¶
Index ¶
- func ApproveTokenForRouter(ctx context.Context, client *ethclient.Client, nonceCache map[string]uint64, ...) error
- func ConvertSignatureToVRSString(signature string) string
- func CreatePermit(config *CreatePermitConfig) (string, error)
- func CreatePermitParams(config *PermitParamsConfig) string
- func CreatePermitSignature(config *PermitSignatureConfig) (string, error)
- func ExecuteTransaction(ctx context.Context, txConfig TxConfig, ethClient *ethclient.Client, ...) error
- func GetDynamicFeeTx(client *ethclient.Client, nonce uint64, chainID *big.Int, to string, ...) (*types.Transaction, error)
- func GetLegacyTx(client *ethclient.Client, nonce uint64, to string, value *big.Int, data []byte) (*types.Transaction, error)
- func GetNonce(ethClient *ethclient.Client, key string, publicAddress common.Address, ...) (uint64, error)
- func GetPredicateCalldata(seriesNonceManager string, getTimestampBelowAndNonceEqualsCalldata []byte) ([]byte, error)
- func GetTimeSeriesManagerNonce(client *ethclient.Client, seriesNonceManager string, publicAddress string) (*big.Int, error)
- func GetTimestampBelowAndNonceEqualsCalldata(expiration int64, nonce *big.Int, publicAddress string) ([]byte, error)
- func GetTimestampBelowCalldata(expiration int64) ([]byte, error)
- func GetTx(client *ethclient.Client, nonce uint64, config TxConfig) (*types.Transaction, error)
- func GetTypeHash(client *ethclient.Client, addressAsString string) (string, error)
- func ReadContractAllowance(client *ethclient.Client, erc20Address common.Address, ...) (*big.Int, error)
- func ReadContractDecimals(client *ethclient.Client, contractAddress common.Address) (uint8, error)
- func ReadContractName(client *ethclient.Client, contractAddress common.Address) (string, error)
- func ReadContractNonce(client *ethclient.Client, publicAddress common.Address, ...) (int64, error)
- func ReadContractSymbol(client *ethclient.Client, contractAddress common.Address) (string, error)
- func ReadContractVersion(client *ethclient.Client, contractAddress common.Address) (string, error)
- func Remove0xPrefix(s string) string
- func RevokeApprovalForRouter(ctx context.Context, client *ethclient.Client, nonceCache map[string]uint64, ...) error
- func ShouldUsePermit(ethClient *ethclient.Client, chainId int, srcToken string) bool
- func WaitForTransaction(ctx context.Context, client *ethclient.Client, txHash common.Hash) (*types.Receipt, error)
- type ApprovalType
- type CreatePermitConfig
- type Erc20ApprovalConfig
- type Erc20RevokeConfig
- type PermitParamsConfig
- type PermitSignatureConfig
- type TxConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApproveTokenForRouter ¶
func ConvertSignatureToVRSString ¶
ConvertSignatureToVRSString converts a signature from rsv to padded vrs format
func CreatePermit ¶
func CreatePermit(config *CreatePermitConfig) (string, error)
func CreatePermitParams ¶
func CreatePermitParams(config *PermitParamsConfig) string
func CreatePermitSignature ¶
func CreatePermitSignature(config *PermitSignatureConfig) (string, error)
func ExecuteTransaction ¶
func GetDynamicFeeTx ¶
func GetLegacyTx ¶
func GetPredicateCalldata ¶
func GetTypeHash ¶
func ReadContractAllowance ¶
func ReadContractAllowance(client *ethclient.Client, erc20Address common.Address, publicAddress common.Address, spenderAddress common.Address) (*big.Int, error)
ReadContractAllowance reads the allowance a given contract has for a wallet.
func ReadContractDecimals ¶
ReadContractDecimals reads the 'decimals' public variable from a contract.
func ReadContractName ¶
ReadContractName reads the 'name' public variable from a contract.
func ReadContractNonce ¶
func ReadContractNonce(client *ethclient.Client, publicAddress common.Address, contractAddress common.Address) (int64, error)
ReadContractNonce reads the 'nonces' public variable from a contract.
func ReadContractSymbol ¶
ReadContractSymbol reads the 'symbol' public variable from a contract.
func ReadContractVersion ¶
func Remove0xPrefix ¶
func RevokeApprovalForRouter ¶
func ShouldUsePermit ¶
Types ¶
type ApprovalType ¶
type ApprovalType int
const ( PermitIfPossible ApprovalType = iota PermitAlways ApprovalAlways )
type CreatePermitConfig ¶
type Erc20ApprovalConfig ¶
type Erc20RevokeConfig ¶
type PermitParamsConfig ¶
type PermitSignatureConfig ¶
Click to show internal directories.
Click to hide internal directories.