CrossChainMessenger

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CrossChainMessengerABI = CrossChainMessengerMetaData.ABI

CrossChainMessengerABI is the input ABI used to generate the binding from. Deprecated: Use CrossChainMessengerMetaData.ABI instead.

View Source
var CrossChainMessengerBin = CrossChainMessengerMetaData.Bin

CrossChainMessengerBin is the compiled bytecode used for deploying new contracts. Deprecated: Use CrossChainMessengerMetaData.Bin instead.

View Source
var CrossChainMessengerMetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"error\",\"type\":\"bytes\"}],\"name\":\"CallFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"crossChainSender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"encodeCall\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"messageBusAddr\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageBus\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"relayMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
	Bin: "0x608060405234801561001057600080fd5b50610a86806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c80639b7cf1ee116100505780639b7cf1ee146100c0578063a1a227fa146100d5578063c4d66de8146100e657600080fd5b80635b76f28b1461006c57806363012de514610095575b600080fd5b61007f61007a3660046105ac565b6100f9565b60405161008c919061067f565b60405180910390f35b6001546100a8906001600160a01b031681565b6040516001600160a01b03909116815260200161008c565b6100d36100ce366004610699565b610179565b005b6000546001600160a01b03166100a8565b6100d36100f43660046106d4565b6102ab565b60606040518060600160405280856001600160a01b0316815260200184848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509385525050506020918201526040516101619291016106ef565b60405160208183030381529060405290509392505050565b61018281610413565b61018f60208201826106d4565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905560006101cb6080830183610734565b8101906101d8919061080b565b905060008082600001516001600160a01b03165a84602001516040516101fe91906108df565b60006040518083038160008787f1925050503d806000811461023c576040519150601f19603f3d011682016040523d82523d6000602084013e610241565b606091505b50915091508161028857806040517fa5fa8d2b00000000000000000000000000000000000000000000000000000000815260040161027f919061067f565b60405180910390fd5b50506001805473ffffffffffffffffffffffffffffffffffffffff191690555050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff166000811580156102f65750825b905060008267ffffffffffffffff1660011480156103135750303b155b905081158015610321575080155b15610358576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561038c57845468ff00000000000000001916680100000000000000001785555b600080546001600160a01b03881673ffffffffffffffffffffffffffffffffffffffff1991821617909155600180549091169055831561040b57845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050565b6000546040517f33a88c720000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906333a88c729061045c908490600401610949565b602060405180830381865afa158015610479573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049d9190610a2e565b6104e95760405162461bcd60e51b815260206004820152601f60248201527f4d657373616765206e6f7420666f756e64206f722066696e616c697a65642e00604482015260640161027f565b6000816040516020016104fc9190610949565b60408051601f1981840301815291815281516020928301206000818152600290935291205490915060ff16156105745760405162461bcd60e51b815260206004820152601960248201527f4d65737361676520616c726561647920636f6e73756d65642e00000000000000604482015260640161027f565b6000908152600260205260409020805460ff1916600117905550565b80356001600160a01b03811681146105a757600080fd5b919050565b6000806000604084860312156105c157600080fd5b6105ca84610590565b9250602084013567ffffffffffffffff808211156105e757600080fd5b818601915086601f8301126105fb57600080fd5b81358181111561060a57600080fd5b87602082850101111561061c57600080fd5b6020830194508093505050509250925092565b60005b8381101561064a578181015183820152602001610632565b50506000910152565b6000815180845261066b81602086016020860161062f565b601f01601f19169290920160200192915050565b6020815260006106926020830184610653565b9392505050565b6000602082840312156106ab57600080fd5b813567ffffffffffffffff8111156106c257600080fd5b820160c0818503121561069257600080fd5b6000602082840312156106e657600080fd5b61069282610590565b602081526001600160a01b038251166020820152600060208301516060604084015261071e6080840182610653565b9050604084015160608401528091505092915050565b6000808335601e1984360301811261074b57600080fd5b83018035915067ffffffffffffffff82111561076657600080fd5b60200191503681900382131561077b57600080fd5b9250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156107d4576107d4610782565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561080357610803610782565b604052919050565b6000602080838503121561081e57600080fd5b823567ffffffffffffffff8082111561083657600080fd5b908401906060828703121561084a57600080fd5b6108526107b1565b61085b83610590565b8152838301358281111561086e57600080fd5b8301601f8101881361087f57600080fd5b80358381111561089157610891610782565b6108a3601f8201601f191687016107da565b935080845288868284010111156108b957600080fd5b808683018786013760009084018601525092830152604090810135908201529392505050565b600082516108f181846020870161062f565b9190910192915050565b803563ffffffff811681146105a757600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff811681146105a757600080fd5b602081526001600160a01b0361095e83610590565b1660208201526000602083013567ffffffffffffffff80821680831461098357600080fd5b80604086015250610996604086016108fb565b915063ffffffff8083166060860152806109b2606088016108fb565b1660808601525060808501359150601e198536030182126109d257600080fd5b60209185019182019135818111156109e957600080fd5b8036038313156109f857600080fd5b60c060a0860152610a0d60e08601828561090f565b92505050610a1d60a08501610938565b60ff811660c0850152509392505050565b600060208284031215610a4057600080fd5b8151801515811461069257600080fdfea264697066735822122051f24d3bd6a99bbcc082d38b110a158a782916973718421b0d34241d45a0a90964736f6c63430008140033",
}

CrossChainMessengerMetaData contains all meta data concerning the CrossChainMessenger contract.

Functions

This section is empty.

Types

type CrossChainMessenger

type CrossChainMessenger struct {
	CrossChainMessengerCaller     // Read-only binding to the contract
	CrossChainMessengerTransactor // Write-only binding to the contract
	CrossChainMessengerFilterer   // Log filterer for contract events
}

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

func DeployCrossChainMessenger

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

DeployCrossChainMessenger deploys a new Ethereum contract, binding an instance of CrossChainMessenger to it.

func NewCrossChainMessenger

func NewCrossChainMessenger(address common.Address, backend bind.ContractBackend) (*CrossChainMessenger, error)

NewCrossChainMessenger creates a new instance of CrossChainMessenger, bound to a specific deployed contract.

type CrossChainMessengerCaller

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

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

func NewCrossChainMessengerCaller

func NewCrossChainMessengerCaller(address common.Address, caller bind.ContractCaller) (*CrossChainMessengerCaller, error)

NewCrossChainMessengerCaller creates a new read-only instance of CrossChainMessenger, bound to a specific deployed contract.

func (*CrossChainMessengerCaller) CrossChainSender

func (_CrossChainMessenger *CrossChainMessengerCaller) CrossChainSender(opts *bind.CallOpts) (common.Address, error)

CrossChainSender is a free data retrieval call binding the contract method 0x63012de5.

Solidity: function crossChainSender() view returns(address)

func (*CrossChainMessengerCaller) EncodeCall

func (_CrossChainMessenger *CrossChainMessengerCaller) EncodeCall(opts *bind.CallOpts, target common.Address, payload []byte) ([]byte, error)

EncodeCall is a free data retrieval call binding the contract method 0x5b76f28b.

Solidity: function encodeCall(address target, bytes payload) pure returns(bytes)

func (*CrossChainMessengerCaller) MessageBus

func (_CrossChainMessenger *CrossChainMessengerCaller) MessageBus(opts *bind.CallOpts) (common.Address, error)

MessageBus is a free data retrieval call binding the contract method 0xa1a227fa.

Solidity: function messageBus() view returns(address)

type CrossChainMessengerCallerRaw

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

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

func (*CrossChainMessengerCallerRaw) Call

func (_CrossChainMessenger *CrossChainMessengerCallerRaw) 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 CrossChainMessengerCallerSession

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

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

func (*CrossChainMessengerCallerSession) CrossChainSender

func (_CrossChainMessenger *CrossChainMessengerCallerSession) CrossChainSender() (common.Address, error)

CrossChainSender is a free data retrieval call binding the contract method 0x63012de5.

Solidity: function crossChainSender() view returns(address)

func (*CrossChainMessengerCallerSession) EncodeCall

func (_CrossChainMessenger *CrossChainMessengerCallerSession) EncodeCall(target common.Address, payload []byte) ([]byte, error)

EncodeCall is a free data retrieval call binding the contract method 0x5b76f28b.

Solidity: function encodeCall(address target, bytes payload) pure returns(bytes)

func (*CrossChainMessengerCallerSession) MessageBus

func (_CrossChainMessenger *CrossChainMessengerCallerSession) MessageBus() (common.Address, error)

MessageBus is a free data retrieval call binding the contract method 0xa1a227fa.

Solidity: function messageBus() view returns(address)

type CrossChainMessengerFilterer

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

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

func NewCrossChainMessengerFilterer

func NewCrossChainMessengerFilterer(address common.Address, filterer bind.ContractFilterer) (*CrossChainMessengerFilterer, error)

NewCrossChainMessengerFilterer creates a new log filterer instance of CrossChainMessenger, bound to a specific deployed contract.

func (*CrossChainMessengerFilterer) FilterInitialized added in v0.21.0

func (_CrossChainMessenger *CrossChainMessengerFilterer) FilterInitialized(opts *bind.FilterOpts) (*CrossChainMessengerInitializedIterator, error)

FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2.

Solidity: event Initialized(uint64 version)

func (*CrossChainMessengerFilterer) ParseInitialized added in v0.21.0

func (_CrossChainMessenger *CrossChainMessengerFilterer) ParseInitialized(log types.Log) (*CrossChainMessengerInitialized, error)

ParseInitialized is a log parse operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2.

Solidity: event Initialized(uint64 version)

func (*CrossChainMessengerFilterer) WatchInitialized added in v0.21.0

func (_CrossChainMessenger *CrossChainMessengerFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *CrossChainMessengerInitialized) (event.Subscription, error)

WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2.

Solidity: event Initialized(uint64 version)

type CrossChainMessengerInitialized added in v0.21.0

type CrossChainMessengerInitialized struct {
	Version uint64
	Raw     types.Log // Blockchain specific contextual infos
}

CrossChainMessengerInitialized represents a Initialized event raised by the CrossChainMessenger contract.

type CrossChainMessengerInitializedIterator added in v0.21.0

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

CrossChainMessengerInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the CrossChainMessenger contract.

func (*CrossChainMessengerInitializedIterator) Close added in v0.21.0

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

func (*CrossChainMessengerInitializedIterator) Error added in v0.21.0

Error returns any retrieval or parsing error occurred during filtering.

func (*CrossChainMessengerInitializedIterator) Next added in v0.21.0

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 CrossChainMessengerRaw

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

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

func (*CrossChainMessengerRaw) Call

func (_CrossChainMessenger *CrossChainMessengerRaw) 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 (*CrossChainMessengerRaw) Transact

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

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

func (*CrossChainMessengerRaw) Transfer

func (_CrossChainMessenger *CrossChainMessengerRaw) 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 CrossChainMessengerSession

type CrossChainMessengerSession struct {
	Contract     *CrossChainMessenger // 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
}

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

func (*CrossChainMessengerSession) CrossChainSender

func (_CrossChainMessenger *CrossChainMessengerSession) CrossChainSender() (common.Address, error)

CrossChainSender is a free data retrieval call binding the contract method 0x63012de5.

Solidity: function crossChainSender() view returns(address)

func (*CrossChainMessengerSession) EncodeCall

func (_CrossChainMessenger *CrossChainMessengerSession) EncodeCall(target common.Address, payload []byte) ([]byte, error)

EncodeCall is a free data retrieval call binding the contract method 0x5b76f28b.

Solidity: function encodeCall(address target, bytes payload) pure returns(bytes)

func (*CrossChainMessengerSession) Initialize

func (_CrossChainMessenger *CrossChainMessengerSession) Initialize(messageBusAddr common.Address) (*types.Transaction, error)

Initialize is a paid mutator transaction binding the contract method 0xc4d66de8.

Solidity: function initialize(address messageBusAddr) returns()

func (*CrossChainMessengerSession) MessageBus

func (_CrossChainMessenger *CrossChainMessengerSession) MessageBus() (common.Address, error)

MessageBus is a free data retrieval call binding the contract method 0xa1a227fa.

Solidity: function messageBus() view returns(address)

func (*CrossChainMessengerSession) RelayMessage

func (_CrossChainMessenger *CrossChainMessengerSession) RelayMessage(message StructsCrossChainMessage) (*types.Transaction, error)

RelayMessage is a paid mutator transaction binding the contract method 0x9b7cf1ee.

Solidity: function relayMessage((address,uint64,uint32,uint32,bytes,uint8) message) returns()

type CrossChainMessengerTransactor

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

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

func NewCrossChainMessengerTransactor

func NewCrossChainMessengerTransactor(address common.Address, transactor bind.ContractTransactor) (*CrossChainMessengerTransactor, error)

NewCrossChainMessengerTransactor creates a new write-only instance of CrossChainMessenger, bound to a specific deployed contract.

func (*CrossChainMessengerTransactor) Initialize

func (_CrossChainMessenger *CrossChainMessengerTransactor) Initialize(opts *bind.TransactOpts, messageBusAddr common.Address) (*types.Transaction, error)

Initialize is a paid mutator transaction binding the contract method 0xc4d66de8.

Solidity: function initialize(address messageBusAddr) returns()

func (*CrossChainMessengerTransactor) RelayMessage

func (_CrossChainMessenger *CrossChainMessengerTransactor) RelayMessage(opts *bind.TransactOpts, message StructsCrossChainMessage) (*types.Transaction, error)

RelayMessage is a paid mutator transaction binding the contract method 0x9b7cf1ee.

Solidity: function relayMessage((address,uint64,uint32,uint32,bytes,uint8) message) returns()

type CrossChainMessengerTransactorRaw

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

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

func (*CrossChainMessengerTransactorRaw) Transact

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

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

func (*CrossChainMessengerTransactorRaw) Transfer

func (_CrossChainMessenger *CrossChainMessengerTransactorRaw) 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 CrossChainMessengerTransactorSession

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

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

func (*CrossChainMessengerTransactorSession) Initialize

func (_CrossChainMessenger *CrossChainMessengerTransactorSession) Initialize(messageBusAddr common.Address) (*types.Transaction, error)

Initialize is a paid mutator transaction binding the contract method 0xc4d66de8.

Solidity: function initialize(address messageBusAddr) returns()

func (*CrossChainMessengerTransactorSession) RelayMessage

func (_CrossChainMessenger *CrossChainMessengerTransactorSession) RelayMessage(message StructsCrossChainMessage) (*types.Transaction, error)

RelayMessage is a paid mutator transaction binding the contract method 0x9b7cf1ee.

Solidity: function relayMessage((address,uint64,uint32,uint32,bytes,uint8) message) returns()

type StructsCrossChainMessage

type StructsCrossChainMessage struct {
	Sender           common.Address
	Sequence         uint64
	Nonce            uint32
	Topic            uint32
	Payload          []byte
	ConsistencyLevel uint8
}

StructsCrossChainMessage is an auto generated low-level Go binding around an user-defined struct.

Jump to

Keyboard shortcuts

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