examples

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 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: "0x60a060405234801561001057600080fd5b50604051610a45380380610a4583398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b6080516109976100ae6000396000818161016b01528181610388015281816104fb0152818161058d015281816105b9015261064c01526109976000f3fe6080604052600436106100435760003560e01c8063091d27881461004f5780634d4fc29314610082578063645953db146100a457806365aef3f4146100c457600080fd5b3661004a57005b600080fd5b34801561005b57600080fd5b50610066620186a081565b6040516001600160401b03909116815260200160405180910390f35b34801561008e57600080fd5b506100a261009d366004610706565b6100e4565b005b3480156100b057600080fd5b506100a26100bf366004610751565b610169565b3480156100d057600080fd5b506100a26100df366004610751565b610330565b6000816001600160401b0316116101425760405162461bcd60e51b815260206004820152601b60248201527f50696e67506f6e673a2074696d6573206d757374206265203e2030000000000060448201526064015b60405180910390fd5b61016483838360016101558260026107a0565b61015f91906107cb565b610494565b505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632f32700e6040518163ffffffff1660e01b81526004016040805180830381865afa1580156101c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101ea91906107f2565b8051600080546020909301516001600160a01b0316600160401b026001600160e01b03199093166001600160401b039092169190911791909117905561022e6104f7565b61027a5760405162461bcd60e51b815260206004820152601b60248201527f50696e67506f6e673a206e6f7420616e206f6d6e69207863616c6c00000000006044820152606401610139565b806001600160401b03166000036102ee57600054604080516001600160401b038084168252600160401b9093046001600160a01b03166020820152918416908201527fa73c132355e7f2c5ced079328c310d267f1e830c197c5579b6177218a777313e9060600160405180910390a161031c565b60005461031c906001600160401b03811690600160401b90046001600160a01b03168461015f6001866107cb565b5050600080546001600160e01b0319169055565b6103386104f7565b6103845760405162461bcd60e51b815260206004820152601b60248201527f50696e67506f6e673a206e6f7420616e206f6d6e69207863616c6c00000000006044820152606401610139565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632f32700e6040518163ffffffff1660e01b81526004016040805180830381865afa1580156103e3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040791906107f2565b9050816001600160401b031660000361047c578051602080830151604080516001600160401b0394851681526001600160a01b039092169282019290925291851682820152517fa73c132355e7f2c5ced079328c310d267f1e830c197c5579b6177218a777313e9181900360600190a1505050565b8051602082015161016491908561015f6001876107cb565b604080516001600160401b03848116602483015283166044808301919091528251808303909101815260649091019091526020810180516001600160e01b031663645953db60e01b1790526104f09085908590620186a06105b4565b5050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166355e2448e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610557573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057b919061085e565b80156105af5750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b905090565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638dd9523c8786866040518463ffffffff1660e01b8152600401610607939291906108cd565b602060405180830381865afa158015610624573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106489190610903565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370e8b56a82888888886040518663ffffffff1660e01b815260040161069d949392919061091c565b6000604051808303818588803b1580156106b657600080fd5b505af11580156106ca573d6000803e3d6000fd5b50939998505050505050505050565b6001600160401b03811681146106ee57600080fd5b50565b6001600160a01b03811681146106ee57600080fd5b60008060006060848603121561071b57600080fd5b8335610726816106d9565b92506020840135610736816106f1565b91506040840135610746816106d9565b809150509250925092565b6000806040838503121561076457600080fd5b823561076f816106d9565b9150602083013561077f816106d9565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b6001600160401b038181168382160280821691908281146107c3576107c361078a565b505092915050565b6001600160401b038281168282160390808211156107eb576107eb61078a565b5092915050565b60006040828403121561080457600080fd5b604051604081018181106001600160401b038211171561083457634e487b7160e01b600052604160045260246000fd5b6040528251610842816106d9565b81526020830151610852816106f1565b60208201529392505050565b60006020828403121561087057600080fd5b8151801515811461088057600080fd5b9392505050565b6000815180845260005b818110156108ad57602081850181015186830182015201610891565b506000602082860101526020601f19601f83011685010191505092915050565b60006001600160401b038086168352606060208401526108f06060840186610887565b9150808416604084015250949350505050565b60006020828403121561091557600080fd5b5051919050565b60006001600160401b03808716835260018060a01b03861660208401526080604084015261094d6080840186610887565b91508084166060840152509594505050505056fea2646970667358221220acc82a6ec84d2be561b9256501151a25dc93899f69c67801fbf6bcdaa896769964736f6c63430008170033",
}

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