testcontract

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package testcontract contains a contract used for testing event and transaction emission.

Code generated by synapse abigen DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var Contracts map[string]*compiler.Contract

Contracts are unmarshalled on start

View Source
var TestContractABI = TestContractMetaData.ABI

TestContractABI is the input ABI used to generate the binding from. Deprecated: Use TestContractMetaData.ABI instead.

View Source
var TestContractBin = TestContractMetaData.Bin

TestContractBin is the compiled bytecode used for deploying new contracts. Deprecated: Use TestContractMetaData.Bin instead.

View Source
var TestContractFuncSigs = TestContractMetaData.Sigs

Deprecated: Use TestContractMetaData.Sigs instead. TestContractFuncSigs maps the 4-byte function signature to its string representation.

View Source
var TestContractMetaData = &bind.MetaData{
	ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"valueA\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"valueB\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"valueC\",\"type\":\"uint256\"}],\"name\":\"EventA\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"valueA\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"valueB\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"valueC\",\"type\":\"uint256\"}],\"name\":\"EventB\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"valueA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valueB\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valueC\",\"type\":\"uint256\"}],\"name\":\"emitEventA\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"valueA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valueB\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valueC\",\"type\":\"uint256\"}],\"name\":\"emitEventAandB\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"valueA\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"valueB\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valueC\",\"type\":\"uint256\"}],\"name\":\"emitEventB\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
	Sigs: map[string]string{
		"c85b0523": "emitEventA(uint256,uint256,uint256)",
		"3b923fe7": "emitEventAandB(uint256,uint256,uint256)",
		"e11a4a7b": "emitEventB(bytes,uint256,uint256)",
	},
	Bin: "0x608060405234801561001057600080fd5b50610358806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80633b923fe714610046578063c85b05231461005b578063e11a4a7b1461006e575b600080fd5b61005961005436600461016b565b610081565b005b61005961006936600461016b565b6100bd565b61005961007c3660046101c6565b610114565b61008c8383836100bd565b6100b8836040516020016100a291815260200190565b6040516020818303038152906040528383610114565b505050565b81833373ffffffffffffffffffffffffffffffffffffffff167f78e0d9f6811a66c5911b332001cc074590fffcb18e1ddb700a8ad3fcd15309bf8460405161010791815260200190565b60405180910390a4505050565b3373ffffffffffffffffffffffffffffffffffffffff167f22ae8cb5dc04b38dfc6e961b7a3a7d218f8de6d069c4184f53df8ea966dd550484848460405161015e939291906102a8565b60405180910390a2505050565b60008060006060848603121561018057600080fd5b505081359360208301359350604090920135919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000606084860312156101db57600080fd5b833567ffffffffffffffff808211156101f357600080fd5b818601915086601f83011261020757600080fd5b81358181111561021957610219610197565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561025f5761025f610197565b8160405282815289602084870101111561027857600080fd5b82602086016020830137600060208483010152809750505050505060208401359150604084013590509250925092565b606081526000845180606084015260005b818110156102d657602081880181015160808684010152016102b9565b5060006080828501015260807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505083602083015282604083015294935050505056fea2646970667358221220ebf624893ab0de1f3ebfb6a0c3cbf168b713f5dd69ed76059fb4ce8e501e645864736f6c63430008110033",
}

TestContractMetaData contains all meta data concerning the TestContract contract.

Functions

This section is empty.

Types

type TestContract

type TestContract struct {
	TestContractCaller     // Read-only binding to the contract
	TestContractTransactor // Write-only binding to the contract
	TestContractFilterer   // Log filterer for contract events
}

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

func DeployTestContract

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

DeployTestContract deploys a new Ethereum contract, binding an instance of TestContract to it.

func NewTestContract

func NewTestContract(address common.Address, backend bind.ContractBackend) (*TestContract, error)

NewTestContract creates a new instance of TestContract, bound to a specific deployed contract.

type TestContractCaller

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

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

func NewTestContractCaller

func NewTestContractCaller(address common.Address, caller bind.ContractCaller) (*TestContractCaller, error)

NewTestContractCaller creates a new read-only instance of TestContract, bound to a specific deployed contract.

type TestContractCallerRaw

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

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

func (*TestContractCallerRaw) Call

func (_TestContract *TestContractCallerRaw) 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 TestContractCallerSession

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

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

type TestContractEventA

type TestContractEventA struct {
	Sender common.Address
	ValueA *big.Int
	ValueB *big.Int
	ValueC *big.Int
	Raw    types.Log // Blockchain specific contextual infos
}

TestContractEventA represents a EventA event raised by the TestContract contract.

type TestContractEventAIterator

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

TestContractEventAIterator is returned from FilterEventA and is used to iterate over the raw logs and unpacked data for EventA events raised by the TestContract contract.

func (*TestContractEventAIterator) Close

func (it *TestContractEventAIterator) Close() error

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

func (*TestContractEventAIterator) Error

func (it *TestContractEventAIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*TestContractEventAIterator) Next

func (it *TestContractEventAIterator) 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 TestContractEventB

type TestContractEventB struct {
	Sender common.Address
	ValueA []byte
	ValueB *big.Int
	ValueC *big.Int
	Raw    types.Log // Blockchain specific contextual infos
}

TestContractEventB represents a EventB event raised by the TestContract contract.

type TestContractEventBIterator

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

TestContractEventBIterator is returned from FilterEventB and is used to iterate over the raw logs and unpacked data for EventB events raised by the TestContract contract.

func (*TestContractEventBIterator) Close

func (it *TestContractEventBIterator) Close() error

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

func (*TestContractEventBIterator) Error

func (it *TestContractEventBIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*TestContractEventBIterator) Next

func (it *TestContractEventBIterator) 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 TestContractFilterer

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

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

func NewTestContractFilterer

func NewTestContractFilterer(address common.Address, filterer bind.ContractFilterer) (*TestContractFilterer, error)

NewTestContractFilterer creates a new log filterer instance of TestContract, bound to a specific deployed contract.

func (*TestContractFilterer) FilterEventA

func (_TestContract *TestContractFilterer) FilterEventA(opts *bind.FilterOpts, sender []common.Address, valueA []*big.Int, valueB []*big.Int) (*TestContractEventAIterator, error)

FilterEventA is a free log retrieval operation binding the contract event 0x78e0d9f6811a66c5911b332001cc074590fffcb18e1ddb700a8ad3fcd15309bf.

Solidity: event EventA(address indexed sender, uint256 indexed valueA, uint256 indexed valueB, uint256 valueC)

func (*TestContractFilterer) FilterEventB

func (_TestContract *TestContractFilterer) FilterEventB(opts *bind.FilterOpts, sender []common.Address) (*TestContractEventBIterator, error)

FilterEventB is a free log retrieval operation binding the contract event 0x22ae8cb5dc04b38dfc6e961b7a3a7d218f8de6d069c4184f53df8ea966dd5504.

Solidity: event EventB(address indexed sender, bytes valueA, uint256 valueB, uint256 valueC)

func (*TestContractFilterer) ParseEventA

func (_TestContract *TestContractFilterer) ParseEventA(log types.Log) (*TestContractEventA, error)

ParseEventA is a log parse operation binding the contract event 0x78e0d9f6811a66c5911b332001cc074590fffcb18e1ddb700a8ad3fcd15309bf.

Solidity: event EventA(address indexed sender, uint256 indexed valueA, uint256 indexed valueB, uint256 valueC)

func (*TestContractFilterer) ParseEventB

func (_TestContract *TestContractFilterer) ParseEventB(log types.Log) (*TestContractEventB, error)

ParseEventB is a log parse operation binding the contract event 0x22ae8cb5dc04b38dfc6e961b7a3a7d218f8de6d069c4184f53df8ea966dd5504.

Solidity: event EventB(address indexed sender, bytes valueA, uint256 valueB, uint256 valueC)

func (*TestContractFilterer) WatchEventA

func (_TestContract *TestContractFilterer) WatchEventA(opts *bind.WatchOpts, sink chan<- *TestContractEventA, sender []common.Address, valueA []*big.Int, valueB []*big.Int) (event.Subscription, error)

WatchEventA is a free log subscription operation binding the contract event 0x78e0d9f6811a66c5911b332001cc074590fffcb18e1ddb700a8ad3fcd15309bf.

Solidity: event EventA(address indexed sender, uint256 indexed valueA, uint256 indexed valueB, uint256 valueC)

func (*TestContractFilterer) WatchEventB

func (_TestContract *TestContractFilterer) WatchEventB(opts *bind.WatchOpts, sink chan<- *TestContractEventB, sender []common.Address) (event.Subscription, error)

WatchEventB is a free log subscription operation binding the contract event 0x22ae8cb5dc04b38dfc6e961b7a3a7d218f8de6d069c4184f53df8ea966dd5504.

Solidity: event EventB(address indexed sender, bytes valueA, uint256 valueB, uint256 valueC)

type TestContractRaw

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

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

func (*TestContractRaw) Call

func (_TestContract *TestContractRaw) 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 (*TestContractRaw) Transact

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

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

func (*TestContractRaw) Transfer

func (_TestContract *TestContractRaw) 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 TestContractRef

type TestContractRef struct {
	*TestContract
	// contains filtered or unexported fields
}

TestContractRef is a bound destination contract that returns the address of the destination contract.

func NewTestContractRef

func NewTestContractRef(address common.Address, backend bind.ContractBackend) (*TestContractRef, error)

NewTestContractRef creates an destination contract with a contract ref.

func (TestContractRef) Address

func (r TestContractRef) Address() common.Address

Address gets the address of the destination contract.

type TestContractSession

type TestContractSession struct {
	Contract     *TestContract     // 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
}

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

func (*TestContractSession) EmitEventA

func (_TestContract *TestContractSession) EmitEventA(valueA *big.Int, valueB *big.Int, valueC *big.Int) (*types.Transaction, error)

EmitEventA is a paid mutator transaction binding the contract method 0xc85b0523.

Solidity: function emitEventA(uint256 valueA, uint256 valueB, uint256 valueC) returns()

func (*TestContractSession) EmitEventAandB

func (_TestContract *TestContractSession) EmitEventAandB(valueA *big.Int, valueB *big.Int, valueC *big.Int) (*types.Transaction, error)

EmitEventAandB is a paid mutator transaction binding the contract method 0x3b923fe7.

Solidity: function emitEventAandB(uint256 valueA, uint256 valueB, uint256 valueC) returns()

func (*TestContractSession) EmitEventB

func (_TestContract *TestContractSession) EmitEventB(valueA []byte, valueB *big.Int, valueC *big.Int) (*types.Transaction, error)

EmitEventB is a paid mutator transaction binding the contract method 0xe11a4a7b.

Solidity: function emitEventB(bytes valueA, uint256 valueB, uint256 valueC) returns()

type TestContractTransactor

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

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

func NewTestContractTransactor

func NewTestContractTransactor(address common.Address, transactor bind.ContractTransactor) (*TestContractTransactor, error)

NewTestContractTransactor creates a new write-only instance of TestContract, bound to a specific deployed contract.

func (*TestContractTransactor) EmitEventA

func (_TestContract *TestContractTransactor) EmitEventA(opts *bind.TransactOpts, valueA *big.Int, valueB *big.Int, valueC *big.Int) (*types.Transaction, error)

EmitEventA is a paid mutator transaction binding the contract method 0xc85b0523.

Solidity: function emitEventA(uint256 valueA, uint256 valueB, uint256 valueC) returns()

func (*TestContractTransactor) EmitEventAandB

func (_TestContract *TestContractTransactor) EmitEventAandB(opts *bind.TransactOpts, valueA *big.Int, valueB *big.Int, valueC *big.Int) (*types.Transaction, error)

EmitEventAandB is a paid mutator transaction binding the contract method 0x3b923fe7.

Solidity: function emitEventAandB(uint256 valueA, uint256 valueB, uint256 valueC) returns()

func (*TestContractTransactor) EmitEventB

func (_TestContract *TestContractTransactor) EmitEventB(opts *bind.TransactOpts, valueA []byte, valueB *big.Int, valueC *big.Int) (*types.Transaction, error)

EmitEventB is a paid mutator transaction binding the contract method 0xe11a4a7b.

Solidity: function emitEventB(bytes valueA, uint256 valueB, uint256 valueC) returns()

type TestContractTransactorRaw

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

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

func (*TestContractTransactorRaw) Transact

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

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

func (*TestContractTransactorRaw) Transfer

func (_TestContract *TestContractTransactorRaw) 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 TestContractTransactorSession

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

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

func (*TestContractTransactorSession) EmitEventA

func (_TestContract *TestContractTransactorSession) EmitEventA(valueA *big.Int, valueB *big.Int, valueC *big.Int) (*types.Transaction, error)

EmitEventA is a paid mutator transaction binding the contract method 0xc85b0523.

Solidity: function emitEventA(uint256 valueA, uint256 valueB, uint256 valueC) returns()

func (*TestContractTransactorSession) EmitEventAandB

func (_TestContract *TestContractTransactorSession) EmitEventAandB(valueA *big.Int, valueB *big.Int, valueC *big.Int) (*types.Transaction, error)

EmitEventAandB is a paid mutator transaction binding the contract method 0x3b923fe7.

Solidity: function emitEventAandB(uint256 valueA, uint256 valueB, uint256 valueC) returns()

func (*TestContractTransactorSession) EmitEventB

func (_TestContract *TestContractTransactorSession) EmitEventB(valueA []byte, valueB *big.Int, valueC *big.Int) (*types.Transaction, error)

EmitEventB is a paid mutator transaction binding the contract method 0xe11a4a7b.

Solidity: function emitEventB(bytes valueA, uint256 valueB, uint256 valueC) returns()

Jump to

Keyboard shortcuts

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