examples

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PingPongABI = PingPongMetaData.ABI

PingPongABI is the input ABI used to generate the binding from. Deprecated: Use PingPongMetaData.ABI instead.

View Source
var PingPongBin = PingPongMetaData.Bin

PingPongBin is the compiled bytecode used for deploying new contracts. Deprecated: Use PingPongMetaData.Bin instead.

View Source
var PingPongMetaData = &bind.MetaData{
	ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"portal\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"GAS_LIMIT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pingpong\",\"inputs\":[{\"name\":\"times\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"n\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"pingpong_norecv\",\"inputs\":[{\"name\":\"times\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"n\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"start\",\"inputs\":[{\"name\":\"destChainID\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"times\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Done\",\"inputs\":[{\"name\":\"destChainID\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"times\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false}]",
	Bin: "0x60a060405234801561001057600080fd5b50604051610aa1380380610aa183398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b6080516109f36100ae6000396000818161016b01528181610388015281816104fb0152818161058d015281816105b901526106bc01526109f36000f3fe6080604052600436106100435760003560e01c8063091d27881461004f5780634d4fc29314610082578063645953db146100a457806365aef3f4146100c457600080fd5b3661004a57005b600080fd5b34801561005b57600080fd5b50610066620186a081565b6040516001600160401b03909116815260200160405180910390f35b34801561008e57600080fd5b506100a261009d366004610762565b6100e4565b005b3480156100b057600080fd5b506100a26100bf3660046107ad565b610169565b3480156100d057600080fd5b506100a26100df3660046107ad565b610330565b6000816001600160401b0316116101425760405162461bcd60e51b815260206004820152601b60248201527f50696e67506f6e673a2074696d6573206d757374206265203e2030000000000060448201526064015b60405180910390fd5b61016483838360016101558260026107fc565b61015f9190610827565b610494565b505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632f32700e6040518163ffffffff1660e01b81526004016040805180830381865afa1580156101c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101ea919061084e565b8051600080546020909301516001600160a01b0316600160401b026001600160e01b03199093166001600160401b039092169190911791909117905561022e6104f7565b61027a5760405162461bcd60e51b815260206004820152601b60248201527f50696e67506f6e673a206e6f7420616e206f6d6e69207863616c6c00000000006044820152606401610139565b806001600160401b03166000036102ee57600054604080516001600160401b038084168252600160401b9093046001600160a01b03166020820152918416908201527fa73c132355e7f2c5ced079328c310d267f1e830c197c5579b6177218a777313e9060600160405180910390a161031c565b60005461031c906001600160401b03811690600160401b90046001600160a01b03168461015f600186610827565b5050600080546001600160e01b0319169055565b6103386104f7565b6103845760405162461bcd60e51b815260206004820152601b60248201527f50696e67506f6e673a206e6f7420616e206f6d6e69207863616c6c00000000006044820152606401610139565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632f32700e6040518163ffffffff1660e01b81526004016040805180830381865afa1580156103e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610407919061084e565b9050816001600160401b031660000361047c578051602080830151604080516001600160401b0394851681526001600160a01b039092169282019290925291851682820152517fa73c132355e7f2c5ced079328c310d267f1e830c197c5579b6177218a777313e9181900360600190a1505050565b8051602082015161016491908561015f600187610827565b604080516001600160401b03848116602483015283166044808301919091528251808303909101815260649091019091526020810180516001600160e01b031663645953db60e01b1790526104f09085908590620186a06105b4565b5050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166355e2448e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610557573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057b91906108ba565b80156105af5750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b905090565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638dd9523c8786866040518463ffffffff1660e01b815260040161060793929190610929565b602060405180830381865afa158015610624573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610648919061095f565b905080471015806106595750803410155b6106a55760405162461bcd60e51b815260206004820152601860248201527f584170703a20696e73756666696369656e742066756e647300000000000000006044820152606401610139565b6040516338745ab560e11b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370e8b56a9083906106f9908a908a908a908a90600401610978565b6000604051808303818588803b15801561071257600080fd5b505af1158015610726573d6000803e3d6000fd5b50939998505050505050505050565b6001600160401b038116811461074a57600080fd5b50565b6001600160a01b038116811461074a57600080fd5b60008060006060848603121561077757600080fd5b833561078281610735565b925060208401356107928161074d565b915060408401356107a281610735565b809150509250925092565b600080604083850312156107c057600080fd5b82356107cb81610735565b915060208301356107db81610735565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b6001600160401b0381811683821602808216919082811461081f5761081f6107e6565b505092915050565b6001600160401b03828116828216039080821115610847576108476107e6565b5092915050565b60006040828403121561086057600080fd5b604051604081018181106001600160401b038211171561089057634e487b7160e01b600052604160045260246000fd5b604052825161089e81610735565b815260208301516108ae8161074d565b60208201529392505050565b6000602082840312156108cc57600080fd5b815180151581146108dc57600080fd5b9392505050565b6000815180845260005b81811015610909576020818501810151868301820152016108ed565b506000602082860101526020601f19601f83011685010191505092915050565b60006001600160401b0380861683526060602084015261094c60608401866108e3565b9150808416604084015250949350505050565b60006020828403121561097157600080fd5b5051919050565b60006001600160401b03808716835260018060a01b0386166020840152608060408401526109a960808401866108e3565b91508084166060840152509594505050505056fea2646970667358221220e2366274dcae076daf044225ae4a85386ebedcdbd319b608ecf58f06cfca72fe64736f6c63430008180033",
}

PingPongMetaData contains all meta data concerning the PingPong contract.

Functions

This section is empty.

Types

type PingPong

type PingPong struct {
	PingPongCaller     // Read-only binding to the contract
	PingPongTransactor // Write-only binding to the contract
	PingPongFilterer   // Log filterer for contract events
}

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

func DeployPingPong

func DeployPingPong(auth *bind.TransactOpts, backend bind.ContractBackend, portal common.Address) (common.Address, *types.Transaction, *PingPong, error)

DeployPingPong deploys a new Ethereum contract, binding an instance of PingPong to it.

func NewPingPong

func NewPingPong(address common.Address, backend bind.ContractBackend) (*PingPong, error)

NewPingPong creates a new instance of PingPong, bound to a specific deployed contract.

type PingPongCaller

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

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

func NewPingPongCaller

func NewPingPongCaller(address common.Address, caller bind.ContractCaller) (*PingPongCaller, error)

NewPingPongCaller creates a new read-only instance of PingPong, bound to a specific deployed contract.

func (*PingPongCaller) GASLIMIT

func (_PingPong *PingPongCaller) GASLIMIT(opts *bind.CallOpts) (uint64, error)

GASLIMIT is a free data retrieval call binding the contract method 0x091d2788.

Solidity: function GAS_LIMIT() view returns(uint64)

type PingPongCallerRaw

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

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

func (*PingPongCallerRaw) Call

func (_PingPong *PingPongCallerRaw) 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 PingPongCallerSession

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

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

func (*PingPongCallerSession) GASLIMIT

func (_PingPong *PingPongCallerSession) GASLIMIT() (uint64, error)

GASLIMIT is a free data retrieval call binding the contract method 0x091d2788.

Solidity: function GAS_LIMIT() view returns(uint64)

type PingPongDone

type PingPongDone struct {
	DestChainID uint64
	To          common.Address
	Times       uint64
	Raw         types.Log // Blockchain specific contextual infos
}

PingPongDone represents a Done event raised by the PingPong contract.

type PingPongDoneIterator

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

PingPongDoneIterator is returned from FilterDone and is used to iterate over the raw logs and unpacked data for Done events raised by the PingPong contract.

func (*PingPongDoneIterator) Close

func (it *PingPongDoneIterator) Close() error

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

func (*PingPongDoneIterator) Error

func (it *PingPongDoneIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*PingPongDoneIterator) Next

func (it *PingPongDoneIterator) 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 PingPongFilterer

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

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

func NewPingPongFilterer

func NewPingPongFilterer(address common.Address, filterer bind.ContractFilterer) (*PingPongFilterer, error)

NewPingPongFilterer creates a new log filterer instance of PingPong, bound to a specific deployed contract.

func (*PingPongFilterer) FilterDone

func (_PingPong *PingPongFilterer) FilterDone(opts *bind.FilterOpts) (*PingPongDoneIterator, error)

FilterDone is a free log retrieval operation binding the contract event 0xa73c132355e7f2c5ced079328c310d267f1e830c197c5579b6177218a777313e.

Solidity: event Done(uint64 destChainID, address to, uint64 times)

func (*PingPongFilterer) ParseDone

func (_PingPong *PingPongFilterer) ParseDone(log types.Log) (*PingPongDone, error)

ParseDone is a log parse operation binding the contract event 0xa73c132355e7f2c5ced079328c310d267f1e830c197c5579b6177218a777313e.

Solidity: event Done(uint64 destChainID, address to, uint64 times)

func (*PingPongFilterer) WatchDone

func (_PingPong *PingPongFilterer) WatchDone(opts *bind.WatchOpts, sink chan<- *PingPongDone) (event.Subscription, error)

WatchDone is a free log subscription operation binding the contract event 0xa73c132355e7f2c5ced079328c310d267f1e830c197c5579b6177218a777313e.

Solidity: event Done(uint64 destChainID, address to, uint64 times)

type PingPongRaw

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

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

func (*PingPongRaw) Call

func (_PingPong *PingPongRaw) 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 (*PingPongRaw) Transact

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

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

func (*PingPongRaw) Transfer

func (_PingPong *PingPongRaw) 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 PingPongSession

type PingPongSession struct {
	Contract     *PingPong         // 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
}

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

func (*PingPongSession) GASLIMIT

func (_PingPong *PingPongSession) GASLIMIT() (uint64, error)

GASLIMIT is a free data retrieval call binding the contract method 0x091d2788.

Solidity: function GAS_LIMIT() view returns(uint64)

func (*PingPongSession) Pingpong

func (_PingPong *PingPongSession) Pingpong(times uint64, n uint64) (*types.Transaction, error)

Pingpong is a paid mutator transaction binding the contract method 0x645953db.

Solidity: function pingpong(uint64 times, uint64 n) returns()

func (*PingPongSession) PingpongNorecv

func (_PingPong *PingPongSession) PingpongNorecv(times uint64, n uint64) (*types.Transaction, error)

PingpongNorecv is a paid mutator transaction binding the contract method 0x65aef3f4.

Solidity: function pingpong_norecv(uint64 times, uint64 n) returns()

func (*PingPongSession) Receive

func (_PingPong *PingPongSession) Receive() (*types.Transaction, error)

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

Solidity: receive() payable returns()

func (*PingPongSession) Start

func (_PingPong *PingPongSession) Start(destChainID uint64, to common.Address, times uint64) (*types.Transaction, error)

Start is a paid mutator transaction binding the contract method 0x4d4fc293.

Solidity: function start(uint64 destChainID, address to, uint64 times) returns()

type PingPongTransactor

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

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

func NewPingPongTransactor

func NewPingPongTransactor(address common.Address, transactor bind.ContractTransactor) (*PingPongTransactor, error)

NewPingPongTransactor creates a new write-only instance of PingPong, bound to a specific deployed contract.

func (*PingPongTransactor) Pingpong

func (_PingPong *PingPongTransactor) Pingpong(opts *bind.TransactOpts, times uint64, n uint64) (*types.Transaction, error)

Pingpong is a paid mutator transaction binding the contract method 0x645953db.

Solidity: function pingpong(uint64 times, uint64 n) returns()

func (*PingPongTransactor) PingpongNorecv

func (_PingPong *PingPongTransactor) PingpongNorecv(opts *bind.TransactOpts, times uint64, n uint64) (*types.Transaction, error)

PingpongNorecv is a paid mutator transaction binding the contract method 0x65aef3f4.

Solidity: function pingpong_norecv(uint64 times, uint64 n) returns()

func (*PingPongTransactor) Receive

func (_PingPong *PingPongTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error)

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

Solidity: receive() payable returns()

func (*PingPongTransactor) Start

func (_PingPong *PingPongTransactor) Start(opts *bind.TransactOpts, destChainID uint64, to common.Address, times uint64) (*types.Transaction, error)

Start is a paid mutator transaction binding the contract method 0x4d4fc293.

Solidity: function start(uint64 destChainID, address to, uint64 times) returns()

type PingPongTransactorRaw

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

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

func (*PingPongTransactorRaw) Transact

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

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

func (*PingPongTransactorRaw) Transfer

func (_PingPong *PingPongTransactorRaw) 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 PingPongTransactorSession

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

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

func (*PingPongTransactorSession) Pingpong

func (_PingPong *PingPongTransactorSession) Pingpong(times uint64, n uint64) (*types.Transaction, error)

Pingpong is a paid mutator transaction binding the contract method 0x645953db.

Solidity: function pingpong(uint64 times, uint64 n) returns()

func (*PingPongTransactorSession) PingpongNorecv

func (_PingPong *PingPongTransactorSession) PingpongNorecv(times uint64, n uint64) (*types.Transaction, error)

PingpongNorecv is a paid mutator transaction binding the contract method 0x65aef3f4.

Solidity: function pingpong_norecv(uint64 times, uint64 n) returns()

func (*PingPongTransactorSession) Receive

func (_PingPong *PingPongTransactorSession) Receive() (*types.Transaction, error)

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

Solidity: receive() payable returns()

func (*PingPongTransactorSession) Start

func (_PingPong *PingPongTransactorSession) Start(destChainID uint64, to common.Address, times uint64) (*types.Transaction, error)

Start is a paid mutator transaction binding the contract method 0x4d4fc293.

Solidity: function start(uint64 destChainID, address to, uint64 times) returns()

Jump to

Keyboard shortcuts

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