MockERC20

package
v0.0.0-...-2cf1f94 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NativeTokenAddress = "0x0000000000000000000000000000000000000000"
)

Variables

View Source
var ErrNoRPCURL error = errors.New("no RPC URL provided -- please pass an RPC URL from the command line or set the MOCK_ERC_20_RPC_URL environment variable")
View Source
var MockERC20ABI = MockERC20MetaData.ABI

MockERC20ABI is the input ABI used to generate the binding from. Deprecated: Use MockERC20MetaData.ABI instead.

View Source
var MockERC20Bin = MockERC20MetaData.Bin

MockERC20Bin is the compiled bytecode used for deploying new contracts. Deprecated: Use MockERC20MetaData.Bin instead.

View Source
var MockERC20MetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
	Bin: "0x60806040523480156200001157600080fd5b506040518060400160405280600a81526020016904d6f636b2045524332360b41b8152506040518060400160405280600681526020016504d4f434b32360d41b815250816003908162000065919062000124565b50600462000074828262000124565b505050620001f0565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620000a857607f821691505b602082108103620000c957634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200011f576000816000526020600020601f850160051c81016020861015620000fa5750805b601f850160051c820191505b818110156200011b5782815560010162000106565b5050505b505050565b81516001600160401b038111156200014057620001406200007d565b620001588162000151845462000093565b84620000cf565b602080601f831160018114620001905760008415620001775750858301515b600019600386901b1c1916600185901b1785556200011b565b600085815260208120601f198616915b82811015620001c157888601518255948401946001909101908401620001a0565b5085821015620001e05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610a5780620002006000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c806340c10f19116100815780639dc29fac1161005b5780639dc29fac14610196578063a9059cbb146101a9578063dd62ed3e146101bc57600080fd5b806340c10f191461014357806370a082311461015857806395d89b411461018e57600080fd5b806318160ddd116100b257806318160ddd1461010f57806323b872dd14610121578063313ce5671461013457600080fd5b806306fdde03146100ce578063095ea7b3146100ec575b600080fd5b6100d6610202565b6040516100e39190610843565b60405180910390f35b6100ff6100fa3660046108d9565b610294565b60405190151581526020016100e3565b6002545b6040519081526020016100e3565b6100ff61012f366004610903565b6102ae565b604051601281526020016100e3565b6101566101513660046108d9565b6102d2565b005b61011361016636600461093f565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6100d66102e0565b6101566101a43660046108d9565b6102ef565b6100ff6101b73660046108d9565b6102f9565b6101136101ca366004610961565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b60606003805461021190610994565b80601f016020809104026020016040519081016040528092919081815260200182805461023d90610994565b801561028a5780601f1061025f5761010080835404028352916020019161028a565b820191906000526020600020905b81548152906001019060200180831161026d57829003601f168201915b5050505050905090565b6000336102a2818585610307565b60019150505b92915050565b6000336102bc858285610319565b6102c78585856103ed565b506001949350505050565b6102dc8282610498565b5050565b60606004805461021190610994565b6102dc82826104f4565b6000336102a28185856103ed565b6103148383836001610550565b505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146103e757818110156103d8576040517ffb8f41b200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015260248101829052604481018390526064015b60405180910390fd5b6103e784848484036000610550565b50505050565b73ffffffffffffffffffffffffffffffffffffffff831661043d576040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600060048201526024016103cf565b73ffffffffffffffffffffffffffffffffffffffff821661048d576040517fec442f05000000000000000000000000000000000000000000000000000000008152600060048201526024016103cf565b610314838383610698565b73ffffffffffffffffffffffffffffffffffffffff82166104e8576040517fec442f05000000000000000000000000000000000000000000000000000000008152600060048201526024016103cf565b6102dc60008383610698565b73ffffffffffffffffffffffffffffffffffffffff8216610544576040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600060048201526024016103cf565b6102dc82600083610698565b73ffffffffffffffffffffffffffffffffffffffff84166105a0576040517fe602df05000000000000000000000000000000000000000000000000000000008152600060048201526024016103cf565b73ffffffffffffffffffffffffffffffffffffffff83166105f0576040517f94280d62000000000000000000000000000000000000000000000000000000008152600060048201526024016103cf565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260016020908152604080832093871683529290522082905580156103e7578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161068a91815260200190565b60405180910390a350505050565b73ffffffffffffffffffffffffffffffffffffffff83166106d05780600260008282546106c591906109e7565b909155506107829050565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610756576040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516600482015260248101829052604481018390526064016103cf565b73ffffffffffffffffffffffffffffffffffffffff841660009081526020819052604090209082900390555b73ffffffffffffffffffffffffffffffffffffffff82166107ab576002805482900390556107d7565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090208054820190555b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161083691815260200190565b60405180910390a3505050565b60006020808352835180602085015260005b8181101561087157858101830151858201604001528201610855565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146108d457600080fd5b919050565b600080604083850312156108ec57600080fd5b6108f5836108b0565b946020939093013593505050565b60008060006060848603121561091857600080fd5b610921846108b0565b925061092f602085016108b0565b9150604084013590509250925092565b60006020828403121561095157600080fd5b61095a826108b0565b9392505050565b6000806040838503121561097457600080fd5b61097d836108b0565b915061098b602084016108b0565b90509250929050565b600181811c908216806109a857607f821691505b6020821081036109e1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b808201808211156102a8577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea26469706673582212200ad1f8323e46174d72a50d337ef35bc2d5e64f974ff40ad970d4d5756d947c6b64736f6c63430008180033",
}

Functions

func CalculateSafeTxHash

func CalculateSafeTxHash(safeAddress common.Address, txData SafeTransactionData, chainID *big.Int) (common.Hash, error)

func CreateAllowanceCommand

func CreateAllowanceCommand() *cobra.Command

func CreateApproveCommand

func CreateApproveCommand() *cobra.Command

func CreateBalanceOfCommand

func CreateBalanceOfCommand() *cobra.Command

func CreateBurnCommand

func CreateBurnCommand() *cobra.Command

func CreateDecimalsCommand

func CreateDecimalsCommand() *cobra.Command

func CreateMintCommand

func CreateMintCommand() *cobra.Command

func CreateMockERC20Command

func CreateMockERC20Command() *cobra.Command

func CreateMockERC20DeploymentCommand

func CreateMockERC20DeploymentCommand() *cobra.Command

func CreateNameCommand

func CreateNameCommand() *cobra.Command

func CreateSafeProposal

func CreateSafeProposal(client *ethclient.Client, key *keystore.Key, safeAddress common.Address, to common.Address, data []byte, value *big.Int, safeApi string, safeOperationType SafeOperationType, safeNonce *big.Int) error

func CreateSymbolCommand

func CreateSymbolCommand() *cobra.Command

func CreateTotalSupplyCommand

func CreateTotalSupplyCommand() *cobra.Command

func CreateTransferCommand

func CreateTransferCommand() *cobra.Command

func CreateTransferFromCommand

func CreateTransferFromCommand() *cobra.Command

func DeployWithSafe

func DeployWithSafe(client *ethclient.Client, key *keystore.Key, safeAddress common.Address, factoryAddress common.Address, value *big.Int, safeApi string, deployBytecode []byte, safeOperationType SafeOperationType, salt [32]byte, safeNonce *big.Int) error

func KeyFromFile

func KeyFromFile(keystoreFile string, password string) (*keystore.Key, error)

Loads a key from file, prompting the user for the password if it is not provided as a function argument.

func NewChainContext

func NewChainContext(timeout uint) (context.Context, context.CancelFunc)

Creates a new context to be used when interacting with the chain client.

func NewClient

func NewClient(rpcURL string) (*ethclient.Client, error)

Generates an Ethereum client to the JSONRPC API at the given URL. If rpcURL is empty, then it attempts to read the RPC URL from the MOCK_ERC_20_RPC_URL environment variable. If that is empty, too, then it returns an error.

func PredictDeploymentAddressSafe

func PredictDeploymentAddressSafe(from common.Address, salt [32]byte, deployBytecode []byte) (common.Address, error)

func SetCallParametersFromArgs

func SetCallParametersFromArgs(opts *bind.CallOpts, pending bool, fromAddress, blockNumber string)

This method is used to set the parameters on a view call from command line arguments (represented mostly as strings).

func SetTransactionParametersFromArgs

func SetTransactionParametersFromArgs(opts *bind.TransactOpts, nonce, value, gasPrice, maxFeePerGas, maxPriorityFeePerGas string, gasLimit uint64, noSend bool)

This method is used to set the parameters on a transaction from command line arguments (represented mostly as strings).

func UnlockKeystore

func UnlockKeystore(keystoreData []byte, password string) (*keystore.Key, error)

Unlocks a key from a keystore (byte contents of a keystore file) with the given password.

Types

type MockERC20

type MockERC20 struct {
	MockERC20Caller     // Read-only binding to the contract
	MockERC20Transactor // Write-only binding to the contract
	MockERC20Filterer   // Log filterer for contract events
}

MockERC20 is an auto generated Go binding around an Ethereum contract.

func DeployMockERC20

func DeployMockERC20(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *MockERC20, error)

DeployMockERC20 deploys a new Ethereum contract, binding an instance of MockERC20 to it.

func NewMockERC20

func NewMockERC20(address common.Address, backend bind.ContractBackend) (*MockERC20, error)

NewMockERC20 creates a new instance of MockERC20, bound to a specific deployed contract.

type MockERC20Approval

type MockERC20Approval struct {
	Owner   common.Address
	Spender common.Address
	Value   *big.Int
	Raw     types.Log // Blockchain specific contextual infos
}

MockERC20Approval represents a Approval event raised by the MockERC20 contract.

type MockERC20ApprovalIterator

type MockERC20ApprovalIterator struct {
	Event *MockERC20Approval // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

MockERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the MockERC20 contract.

func (*MockERC20ApprovalIterator) Close

func (it *MockERC20ApprovalIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*MockERC20ApprovalIterator) Error

func (it *MockERC20ApprovalIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*MockERC20ApprovalIterator) Next

func (it *MockERC20ApprovalIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type MockERC20Caller

type MockERC20Caller struct {
	// contains filtered or unexported fields
}

MockERC20Caller is an auto generated read-only Go binding around an Ethereum contract.

func NewMockERC20Caller

func NewMockERC20Caller(address common.Address, caller bind.ContractCaller) (*MockERC20Caller, error)

NewMockERC20Caller creates a new read-only instance of MockERC20, bound to a specific deployed contract.

func (*MockERC20Caller) Allowance

func (_MockERC20 *MockERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(address owner, address spender) view returns(uint256)

func (*MockERC20Caller) BalanceOf

func (_MockERC20 *MockERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(address account) view returns(uint256)

func (*MockERC20Caller) Decimals

func (_MockERC20 *MockERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() view returns(uint8)

func (*MockERC20Caller) Name

func (_MockERC20 *MockERC20Caller) Name(opts *bind.CallOpts) (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() view returns(string)

func (*MockERC20Caller) Symbol

func (_MockERC20 *MockERC20Caller) Symbol(opts *bind.CallOpts) (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() view returns(string)

func (*MockERC20Caller) TotalSupply

func (_MockERC20 *MockERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() view returns(uint256)

type MockERC20CallerRaw

type MockERC20CallerRaw struct {
	Contract *MockERC20Caller // Generic read-only contract binding to access the raw methods on
}

MockERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*MockERC20CallerRaw) Call

func (_MockERC20 *MockERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type MockERC20CallerSession

type MockERC20CallerSession struct {
	Contract *MockERC20Caller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts    // Call options to use throughout this session
}

MockERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*MockERC20CallerSession) Allowance

func (_MockERC20 *MockERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(address owner, address spender) view returns(uint256)

func (*MockERC20CallerSession) BalanceOf

func (_MockERC20 *MockERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(address account) view returns(uint256)

func (*MockERC20CallerSession) Decimals

func (_MockERC20 *MockERC20CallerSession) Decimals() (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() view returns(uint8)

func (*MockERC20CallerSession) Name

func (_MockERC20 *MockERC20CallerSession) Name() (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() view returns(string)

func (*MockERC20CallerSession) Symbol

func (_MockERC20 *MockERC20CallerSession) Symbol() (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() view returns(string)

func (*MockERC20CallerSession) TotalSupply

func (_MockERC20 *MockERC20CallerSession) TotalSupply() (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() view returns(uint256)

type MockERC20Filterer

type MockERC20Filterer struct {
	// contains filtered or unexported fields
}

MockERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewMockERC20Filterer

func NewMockERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*MockERC20Filterer, error)

NewMockERC20Filterer creates a new log filterer instance of MockERC20, bound to a specific deployed contract.

func (*MockERC20Filterer) FilterApproval

func (_MockERC20 *MockERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*MockERC20ApprovalIterator, error)

FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)

func (*MockERC20Filterer) FilterTransfer

func (_MockERC20 *MockERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*MockERC20TransferIterator, error)

FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: event Transfer(address indexed from, address indexed to, uint256 value)

func (*MockERC20Filterer) ParseApproval

func (_MockERC20 *MockERC20Filterer) ParseApproval(log types.Log) (*MockERC20Approval, error)

ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)

func (*MockERC20Filterer) ParseTransfer

func (_MockERC20 *MockERC20Filterer) ParseTransfer(log types.Log) (*MockERC20Transfer, error)

ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: event Transfer(address indexed from, address indexed to, uint256 value)

func (*MockERC20Filterer) WatchApproval

func (_MockERC20 *MockERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *MockERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error)

WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)

func (*MockERC20Filterer) WatchTransfer

func (_MockERC20 *MockERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *MockERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error)

WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: event Transfer(address indexed from, address indexed to, uint256 value)

type MockERC20Raw

type MockERC20Raw struct {
	Contract *MockERC20 // Generic contract binding to access the raw methods on
}

MockERC20Raw is an auto generated low-level Go binding around an Ethereum contract.

func (*MockERC20Raw) Call

func (_MockERC20 *MockERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*MockERC20Raw) Transact

func (_MockERC20 *MockERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*MockERC20Raw) Transfer

func (_MockERC20 *MockERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type MockERC20Session

type MockERC20Session struct {
	Contract     *MockERC20        // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

MockERC20Session is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*MockERC20Session) Allowance

func (_MockERC20 *MockERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(address owner, address spender) view returns(uint256)

func (*MockERC20Session) Approve

func (_MockERC20 *MockERC20Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(address spender, uint256 value) returns(bool)

func (*MockERC20Session) BalanceOf

func (_MockERC20 *MockERC20Session) BalanceOf(account common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(address account) view returns(uint256)

func (*MockERC20Session) Burn

func (_MockERC20 *MockERC20Session) Burn(account common.Address, amount *big.Int) (*types.Transaction, error)

Burn is a paid mutator transaction binding the contract method 0x9dc29fac.

Solidity: function burn(address account, uint256 amount) returns()

func (*MockERC20Session) Decimals

func (_MockERC20 *MockERC20Session) Decimals() (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() view returns(uint8)

func (*MockERC20Session) Mint

func (_MockERC20 *MockERC20Session) Mint(account common.Address, amount *big.Int) (*types.Transaction, error)

Mint is a paid mutator transaction binding the contract method 0x40c10f19.

Solidity: function mint(address account, uint256 amount) returns()

func (*MockERC20Session) Name

func (_MockERC20 *MockERC20Session) Name() (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() view returns(string)

func (*MockERC20Session) Symbol

func (_MockERC20 *MockERC20Session) Symbol() (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() view returns(string)

func (*MockERC20Session) TotalSupply

func (_MockERC20 *MockERC20Session) TotalSupply() (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() view returns(uint256)

func (*MockERC20Session) Transfer

func (_MockERC20 *MockERC20Session) Transfer(to common.Address, value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(address to, uint256 value) returns(bool)

func (*MockERC20Session) TransferFrom

func (_MockERC20 *MockERC20Session) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(address from, address to, uint256 value) returns(bool)

type MockERC20Transactor

type MockERC20Transactor struct {
	// contains filtered or unexported fields
}

MockERC20Transactor is an auto generated write-only Go binding around an Ethereum contract.

func NewMockERC20Transactor

func NewMockERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*MockERC20Transactor, error)

NewMockERC20Transactor creates a new write-only instance of MockERC20, bound to a specific deployed contract.

func (*MockERC20Transactor) Approve

func (_MockERC20 *MockERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(address spender, uint256 value) returns(bool)

func (*MockERC20Transactor) Burn

func (_MockERC20 *MockERC20Transactor) Burn(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error)

Burn is a paid mutator transaction binding the contract method 0x9dc29fac.

Solidity: function burn(address account, uint256 amount) returns()

func (*MockERC20Transactor) Mint

func (_MockERC20 *MockERC20Transactor) Mint(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error)

Mint is a paid mutator transaction binding the contract method 0x40c10f19.

Solidity: function mint(address account, uint256 amount) returns()

func (*MockERC20Transactor) Transfer

func (_MockERC20 *MockERC20Transactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(address to, uint256 value) returns(bool)

func (*MockERC20Transactor) TransferFrom

func (_MockERC20 *MockERC20Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(address from, address to, uint256 value) returns(bool)

type MockERC20TransactorRaw

type MockERC20TransactorRaw struct {
	Contract *MockERC20Transactor // Generic write-only contract binding to access the raw methods on
}

MockERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*MockERC20TransactorRaw) Transact

func (_MockERC20 *MockERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*MockERC20TransactorRaw) Transfer

func (_MockERC20 *MockERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type MockERC20TransactorSession

type MockERC20TransactorSession struct {
	Contract     *MockERC20Transactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts    // Transaction auth options to use throughout this session
}

MockERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*MockERC20TransactorSession) Approve

func (_MockERC20 *MockERC20TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(address spender, uint256 value) returns(bool)

func (*MockERC20TransactorSession) Burn

func (_MockERC20 *MockERC20TransactorSession) Burn(account common.Address, amount *big.Int) (*types.Transaction, error)

Burn is a paid mutator transaction binding the contract method 0x9dc29fac.

Solidity: function burn(address account, uint256 amount) returns()

func (*MockERC20TransactorSession) Mint

func (_MockERC20 *MockERC20TransactorSession) Mint(account common.Address, amount *big.Int) (*types.Transaction, error)

Mint is a paid mutator transaction binding the contract method 0x40c10f19.

Solidity: function mint(address account, uint256 amount) returns()

func (*MockERC20TransactorSession) Transfer

func (_MockERC20 *MockERC20TransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(address to, uint256 value) returns(bool)

func (*MockERC20TransactorSession) TransferFrom

func (_MockERC20 *MockERC20TransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(address from, address to, uint256 value) returns(bool)

type MockERC20Transfer

type MockERC20Transfer struct {
	From  common.Address
	To    common.Address
	Value *big.Int
	Raw   types.Log // Blockchain specific contextual infos
}

MockERC20Transfer represents a Transfer event raised by the MockERC20 contract.

type MockERC20TransferIterator

type MockERC20TransferIterator struct {
	Event *MockERC20Transfer // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

MockERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the MockERC20 contract.

func (*MockERC20TransferIterator) Close

func (it *MockERC20TransferIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*MockERC20TransferIterator) Error

func (it *MockERC20TransferIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*MockERC20TransferIterator) Next

func (it *MockERC20TransferIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type SafeOperationType

type SafeOperationType uint8

SafeOperationType represents the type of operation for a Safe transaction

const (
	Call         SafeOperationType = 0
	DelegateCall SafeOperationType = 1
)

func (SafeOperationType) String

func (o SafeOperationType) String() string

String returns the string representation of the SafeOperationType

type SafeTransactionData

type SafeTransactionData struct {
	To             string            `json:"to"`
	Value          string            `json:"value"`
	Data           string            `json:"data"`
	Operation      SafeOperationType `json:"operation"`
	SafeTxGas      uint64            `json:"safeTxGas"`
	BaseGas        uint64            `json:"baseGas"`
	GasPrice       string            `json:"gasPrice"`
	GasToken       string            `json:"gasToken"`
	RefundReceiver string            `json:"refundReceiver"`
	Nonce          *big.Int          `json:"nonce"`
	SafeTxHash     string            `json:"safeTxHash"`
	Sender         string            `json:"sender"`
	Signature      string            `json:"signature"`
	Origin         string            `json:"origin"`
}

SafeTransactionData represents the data for a Safe transaction

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL