mock

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: LGPL-3.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MockABI = MockMetaData.ABI

MockABI is the input ABI used to generate the binding from. Deprecated: Use MockMetaData.ABI instead.

View Source
var MockBin = MockMetaData.Bin

MockBin is the compiled bytecode used for deploying new contracts. Deprecated: Use MockMetaData.Bin instead.

View Source
var MockMetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"trustedForwarder\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"FallbackCalled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"forwarder\",\"type\":\"address\"}],\"name\":\"isTrustedForwarder\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]",
	Bin: "0x60a060405234801561001057600080fd5b5060405161080c38038061080c833981810160405281019061003291906100d1565b808073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff168152505050506100fe565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061009e82610073565b9050919050565b6100ae81610093565b81146100b957600080fd5b50565b6000815190506100cb816100a5565b92915050565b6000602082840312156100e7576100e661006e565b5b60006100f5848285016100bc565b91505092915050565b6080516106f3610119600039600061028c01526106f36000f3fe60806040526004361061002d5760003560e01c8063441a3e7014610062578063572b6c051461008b57610034565b3661003457005b7ff5c8b1061e6c4978efeae4105f6f09578e04098b17e6aeb3fde64b1be4989b1760405160405180910390a1005b34801561006e57600080fd5b5061008960048036038101906100849190610355565b6100c8565b005b34801561009757600080fd5b506100b260048036038101906100ad91906103f3565b610288565b6040516100bf919061043b565b60405180910390f35b6100d133610288565b610110576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610107906104d9565b60405180910390fd5b81471015610153576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161014a9061056b565b60405180910390fd5b818110610195576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161018c906105d7565b60405180910390fd5b3273ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156101db573d6000803e3d6000fd5b506101e46102e0565b73ffffffffffffffffffffffffffffffffffffffff166108fc82846102099190610626565b9081150290604051600060405180830381858888f19350505050158015610234573d6000803e3d6000fd5b507ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb56761025e6102e0565b32838561026b9190610626565b8460405161027c9493929190610678565b60405180910390a15050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16149050919050565b60006102eb33610288565b156102ff57601436033560601c905061030e565b610307610312565b905061030f565b5b90565b600033905090565b600080fd5b6000819050919050565b6103328161031f565b811461033d57600080fd5b50565b60008135905061034f81610329565b92915050565b6000806040838503121561036c5761036b61031a565b5b600061037a85828601610340565b925050602061038b85828601610340565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006103c082610395565b9050919050565b6103d0816103b5565b81146103db57600080fd5b50565b6000813590506103ed816103c7565b92915050565b6000602082840312156104095761040861031a565b5b6000610417848285016103de565b91505092915050565b60008115159050919050565b61043581610420565b82525050565b6000602082019050610450600083018461042c565b92915050565b600082825260208201905092915050565b7f66756e6374696f6e206d7573742062652063616c6c656420627920666f72776160008201527f7264657200000000000000000000000000000000000000000000000000000000602082015250565b60006104c3602483610456565b91506104ce82610467565b604082019050919050565b600060208201905081810360008301526104f2816104b6565b9050919050565b7f76616c756520746f207472616e7366657220697320686967686572207468616e60008201527f20636f6e74726163742062616c616e6365000000000000000000000000000000602082015250565b6000610555603183610456565b9150610560826104f9565b604082019050919050565b6000602082019050818103600083015261058481610548565b9050919050565b7f66656520697320686967686572207468616e2076616c75650000000000000000600082015250565b60006105c1601883610456565b91506105cc8261058b565b602082019050919050565b600060208201905081810360008301526105f0816105b4565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006106318261031f565b915061063c8361031f565b9250828203905081811115610654576106536105f7565b5b92915050565b610663816103b5565b82525050565b6106728161031f565b82525050565b600060808201905061068d600083018761065a565b61069a602083018661065a565b6106a76040830185610669565b6106b46060830184610669565b9594505050505056fea26469706673582212206ab121edecf2dd25b3e9ff34da9111d617d77368679d3ac9bccbb75793b4b92164736f6c63430008100033",
}

MockMetaData contains all meta data concerning the Mock contract.

Functions

This section is empty.

Types

type Mock

type Mock struct {
	MockCaller     // Read-only binding to the contract
	MockTransactor // Write-only binding to the contract
	MockFilterer   // Log filterer for contract events
}

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

func DeployMock

func DeployMock(auth *bind.TransactOpts, backend bind.ContractBackend, trustedForwarder common.Address) (common.Address, *types.Transaction, *Mock, error)

DeployMock deploys a new Ethereum contract, binding an instance of Mock to it.

func NewMock

func NewMock(address common.Address, backend bind.ContractBackend) (*Mock, error)

NewMock creates a new instance of Mock, bound to a specific deployed contract.

type MockCaller

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

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

func NewMockCaller

func NewMockCaller(address common.Address, caller bind.ContractCaller) (*MockCaller, error)

NewMockCaller creates a new read-only instance of Mock, bound to a specific deployed contract.

func (*MockCaller) IsTrustedForwarder

func (_Mock *MockCaller) IsTrustedForwarder(opts *bind.CallOpts, forwarder common.Address) (bool, error)

IsTrustedForwarder is a free data retrieval call binding the contract method 0x572b6c05.

Solidity: function isTrustedForwarder(address forwarder) view returns(bool)

type MockCallerRaw

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

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

func (*MockCallerRaw) Call

func (_Mock *MockCallerRaw) 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 MockCallerSession

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

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

func (*MockCallerSession) IsTrustedForwarder

func (_Mock *MockCallerSession) IsTrustedForwarder(forwarder common.Address) (bool, error)

IsTrustedForwarder is a free data retrieval call binding the contract method 0x572b6c05.

Solidity: function isTrustedForwarder(address forwarder) view returns(bool)

type MockFallbackCalled

type MockFallbackCalled struct {
	Raw types.Log // Blockchain specific contextual infos
}

MockFallbackCalled represents a FallbackCalled event raised by the Mock contract.

type MockFallbackCalledIterator

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

MockFallbackCalledIterator is returned from FilterFallbackCalled and is used to iterate over the raw logs and unpacked data for FallbackCalled events raised by the Mock contract.

func (*MockFallbackCalledIterator) Close

func (it *MockFallbackCalledIterator) Close() error

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

func (*MockFallbackCalledIterator) Error

func (it *MockFallbackCalledIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*MockFallbackCalledIterator) Next

func (it *MockFallbackCalledIterator) 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 MockFilterer

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

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

func NewMockFilterer

func NewMockFilterer(address common.Address, filterer bind.ContractFilterer) (*MockFilterer, error)

NewMockFilterer creates a new log filterer instance of Mock, bound to a specific deployed contract.

func (*MockFilterer) FilterFallbackCalled

func (_Mock *MockFilterer) FilterFallbackCalled(opts *bind.FilterOpts) (*MockFallbackCalledIterator, error)

FilterFallbackCalled is a free log retrieval operation binding the contract event 0xf5c8b1061e6c4978efeae4105f6f09578e04098b17e6aeb3fde64b1be4989b17.

Solidity: event FallbackCalled()

func (*MockFilterer) FilterWithdraw

func (_Mock *MockFilterer) FilterWithdraw(opts *bind.FilterOpts) (*MockWithdrawIterator, error)

FilterWithdraw is a free log retrieval operation binding the contract event 0xf341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb567.

Solidity: event Withdraw(address recipient, address relayer, uint256 value, uint256 fee)

func (*MockFilterer) ParseFallbackCalled

func (_Mock *MockFilterer) ParseFallbackCalled(log types.Log) (*MockFallbackCalled, error)

ParseFallbackCalled is a log parse operation binding the contract event 0xf5c8b1061e6c4978efeae4105f6f09578e04098b17e6aeb3fde64b1be4989b17.

Solidity: event FallbackCalled()

func (*MockFilterer) ParseWithdraw

func (_Mock *MockFilterer) ParseWithdraw(log types.Log) (*MockWithdraw, error)

ParseWithdraw is a log parse operation binding the contract event 0xf341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb567.

Solidity: event Withdraw(address recipient, address relayer, uint256 value, uint256 fee)

func (*MockFilterer) WatchFallbackCalled

func (_Mock *MockFilterer) WatchFallbackCalled(opts *bind.WatchOpts, sink chan<- *MockFallbackCalled) (event.Subscription, error)

WatchFallbackCalled is a free log subscription operation binding the contract event 0xf5c8b1061e6c4978efeae4105f6f09578e04098b17e6aeb3fde64b1be4989b17.

Solidity: event FallbackCalled()

func (*MockFilterer) WatchWithdraw

func (_Mock *MockFilterer) WatchWithdraw(opts *bind.WatchOpts, sink chan<- *MockWithdraw) (event.Subscription, error)

WatchWithdraw is a free log subscription operation binding the contract event 0xf341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb567.

Solidity: event Withdraw(address recipient, address relayer, uint256 value, uint256 fee)

type MockRaw

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

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

func (*MockRaw) Call

func (_Mock *MockRaw) 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 (*MockRaw) Transact

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

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

func (*MockRaw) Transfer

func (_Mock *MockRaw) 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 MockSession

type MockSession struct {
	Contract     *Mock             // 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
}

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

func (*MockSession) Fallback

func (_Mock *MockSession) Fallback(calldata []byte) (*types.Transaction, error)

Fallback is a paid mutator transaction binding the contract fallback function.

Solidity: fallback() payable returns()

func (*MockSession) IsTrustedForwarder

func (_Mock *MockSession) IsTrustedForwarder(forwarder common.Address) (bool, error)

IsTrustedForwarder is a free data retrieval call binding the contract method 0x572b6c05.

Solidity: function isTrustedForwarder(address forwarder) view returns(bool)

func (*MockSession) Receive

func (_Mock *MockSession) Receive() (*types.Transaction, error)

Receive is a paid mutator transaction binding the contract receive function.

Solidity: receive() payable returns()

func (*MockSession) Withdraw

func (_Mock *MockSession) Withdraw(value *big.Int, fee *big.Int) (*types.Transaction, error)

Withdraw is a paid mutator transaction binding the contract method 0x441a3e70.

Solidity: function withdraw(uint256 value, uint256 fee) returns()

type MockTransactor

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

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

func NewMockTransactor

func NewMockTransactor(address common.Address, transactor bind.ContractTransactor) (*MockTransactor, error)

NewMockTransactor creates a new write-only instance of Mock, bound to a specific deployed contract.

func (*MockTransactor) Fallback

func (_Mock *MockTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error)

Fallback is a paid mutator transaction binding the contract fallback function.

Solidity: fallback() payable returns()

func (*MockTransactor) Receive

func (_Mock *MockTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error)

Receive is a paid mutator transaction binding the contract receive function.

Solidity: receive() payable returns()

func (*MockTransactor) Withdraw

func (_Mock *MockTransactor) Withdraw(opts *bind.TransactOpts, value *big.Int, fee *big.Int) (*types.Transaction, error)

Withdraw is a paid mutator transaction binding the contract method 0x441a3e70.

Solidity: function withdraw(uint256 value, uint256 fee) returns()

type MockTransactorRaw

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

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

func (*MockTransactorRaw) Transact

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

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

func (*MockTransactorRaw) Transfer

func (_Mock *MockTransactorRaw) 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 MockTransactorSession

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

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

func (*MockTransactorSession) Fallback

func (_Mock *MockTransactorSession) Fallback(calldata []byte) (*types.Transaction, error)

Fallback is a paid mutator transaction binding the contract fallback function.

Solidity: fallback() payable returns()

func (*MockTransactorSession) Receive

func (_Mock *MockTransactorSession) Receive() (*types.Transaction, error)

Receive is a paid mutator transaction binding the contract receive function.

Solidity: receive() payable returns()

func (*MockTransactorSession) Withdraw

func (_Mock *MockTransactorSession) Withdraw(value *big.Int, fee *big.Int) (*types.Transaction, error)

Withdraw is a paid mutator transaction binding the contract method 0x441a3e70.

Solidity: function withdraw(uint256 value, uint256 fee) returns()

type MockWithdraw

type MockWithdraw struct {
	Recipient common.Address
	Relayer   common.Address
	Value     *big.Int
	Fee       *big.Int
	Raw       types.Log // Blockchain specific contextual infos
}

MockWithdraw represents a Withdraw event raised by the Mock contract.

type MockWithdrawIterator

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

MockWithdrawIterator is returned from FilterWithdraw and is used to iterate over the raw logs and unpacked data for Withdraw events raised by the Mock contract.

func (*MockWithdrawIterator) Close

func (it *MockWithdrawIterator) Close() error

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

func (*MockWithdrawIterator) Error

func (it *MockWithdrawIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*MockWithdrawIterator) Next

func (it *MockWithdrawIterator) 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.

Jump to

Keyboard shortcuts

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