savm

package
v0.4.10 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AddressSAVMBridge = common.HexToAddress("0x1109F6221F684BCb9B2529b8803a7b8c3411d45f")
	AddressBTCBridge  = common.HexToAddress("0xF70Af817B07118CBF7ACCC38767899598e045408")
	AddressSAVMToken  = common.HexToAddress("0x0E02765992f946397E6d2e65642eABb9cc674928")
	AddressWBTCToken  = common.HexToAddress("0x5db252ead05C54B08A83414adCAbF46Eaa9E0337")

	EventHashBTCBridgeDeposit  = contract.EventHash("Deposit(bytes32,uint256,address)")
	EventHashBTCBridgeWithdraw = contract.EventHash("Withdraw(bytes32,uint256,address)")
	EventHashSAVMTransfer      = contract.EventHash("Transfer(address,address,uint256)")
)
View Source
var BTCBridgeABI = BTCBridgeMetaData.ABI

BTCBridgeABI is the input ABI used to generate the binding from. Deprecated: Use BTCBridgeMetaData.ABI instead.

View Source
var BTCBridgeMetaData = &bind.MetaData{
	ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"normalizedAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newDepositFee\",\"type\":\"uint256\"}],\"name\":\"SetDepositFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newFeeRecipient\",\"type\":\"address\"}],\"name\":\"SetFeeRecipient\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMinWithdrawAmount\",\"type\":\"uint256\"}],\"name\":\"SetMinWithdrawAmount\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newWithdrawFee\",\"type\":\"uint256\"}],\"name\":\"SetWithdrawFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"normalizedAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"depositFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeRecipient\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"getBridgeFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"bridgeFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"}],\"name\":\"getTotalWithdrawFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minWithdrawAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"newMinWithdrawAmount\",\"type\":\"uint128\"}],\"name\":\"setMinWithdrawAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"subSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"recipient\",\"type\":\"bytes\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
}

BTCBridgeMetaData contains all meta data concerning the BTCBridge contract.

View Source
var SAVMBridgeABI = SAVMBridgeMetaData.ABI

SAVMBridgeABI is the input ABI used to generate the binding from. Deprecated: Use SAVMBridgeMetaData.ABI instead.

View Source
var SAVMBridgeMetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"dstChainId\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"dstRecipient\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"customData\",\"type\":\"bytes\"}],\"name\":\"bridgeOut\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"txUniqueIdentification\",\"type\":\"bytes32\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"dstChainId\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"dstRecipient\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"customData\",\"type\":\"bytes\"}],\"name\":\"getBridgeFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
}

SAVMBridgeMetaData contains all meta data concerning the SAVMBridge contract.

Functions

This section is empty.

Types

type BTCBridge

type BTCBridge struct {
	BTCBridgeCaller     // Read-only binding to the contract
	BTCBridgeTransactor // Write-only binding to the contract
	BTCBridgeFilterer   // Log filterer for contract events
}

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

func NewBTCBridge

func NewBTCBridge(address common.Address, backend bind.ContractBackend) (*BTCBridge, error)

NewBTCBridge creates a new instance of BTCBridge, bound to a specific deployed contract.

type BTCBridgeCaller

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

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

func NewBTCBridgeCaller

func NewBTCBridgeCaller(address common.Address, caller bind.ContractCaller) (*BTCBridgeCaller, error)

NewBTCBridgeCaller creates a new read-only instance of BTCBridge, bound to a specific deployed contract.

func (*BTCBridgeCaller) DepositFee

func (_BTCBridge *BTCBridgeCaller) DepositFee(opts *bind.CallOpts) (*big.Int, error)

DepositFee is a free data retrieval call binding the contract method 0x67a52793.

Solidity: function depositFee() view returns(uint256)

func (*BTCBridgeCaller) FeeRecipient

func (_BTCBridge *BTCBridgeCaller) FeeRecipient(opts *bind.CallOpts) (common.Address, error)

FeeRecipient is a free data retrieval call binding the contract method 0x46904840.

Solidity: function feeRecipient() view returns(address)

func (*BTCBridgeCaller) GetBridgeFee

func (_BTCBridge *BTCBridgeCaller) GetBridgeFee(opts *bind.CallOpts, payload []byte) (*big.Int, error)

GetBridgeFee is a free data retrieval call binding the contract method 0x5c12ba59.

Solidity: function getBridgeFee(bytes payload) view returns(uint256 bridgeFee)

func (*BTCBridgeCaller) GetTotalWithdrawFee

func (_BTCBridge *BTCBridgeCaller) GetTotalWithdrawFee(opts *bind.CallOpts, amount *big.Int, recipient []byte) (*big.Int, error)

GetTotalWithdrawFee is a free data retrieval call binding the contract method 0xe33f61f0.

Solidity: function getTotalWithdrawFee(uint256 amount, bytes recipient) view returns(uint256 fee)

func (*BTCBridgeCaller) MinWithdrawAmount

func (_BTCBridge *BTCBridgeCaller) MinWithdrawAmount(opts *bind.CallOpts) (*big.Int, error)

MinWithdrawAmount is a free data retrieval call binding the contract method 0x457e1a49.

Solidity: function minWithdrawAmount() view returns(uint256)

func (*BTCBridgeCaller) SubSupply

func (_BTCBridge *BTCBridgeCaller) SubSupply(opts *bind.CallOpts) (*big.Int, error)

SubSupply is a free data retrieval call binding the contract method 0x5f8ead51.

Solidity: function subSupply() view returns(uint256)

func (*BTCBridgeCaller) WithdrawFee

func (_BTCBridge *BTCBridgeCaller) WithdrawFee(opts *bind.CallOpts) (*big.Int, error)

WithdrawFee is a free data retrieval call binding the contract method 0xe941fa78.

Solidity: function withdrawFee() view returns(uint256)

type BTCBridgeCallerRaw

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

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

func (*BTCBridgeCallerRaw) Call

func (_BTCBridge *BTCBridgeCallerRaw) 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 BTCBridgeCallerSession

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

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

func (*BTCBridgeCallerSession) DepositFee

func (_BTCBridge *BTCBridgeCallerSession) DepositFee() (*big.Int, error)

DepositFee is a free data retrieval call binding the contract method 0x67a52793.

Solidity: function depositFee() view returns(uint256)

func (*BTCBridgeCallerSession) FeeRecipient

func (_BTCBridge *BTCBridgeCallerSession) FeeRecipient() (common.Address, error)

FeeRecipient is a free data retrieval call binding the contract method 0x46904840.

Solidity: function feeRecipient() view returns(address)

func (*BTCBridgeCallerSession) GetBridgeFee

func (_BTCBridge *BTCBridgeCallerSession) GetBridgeFee(payload []byte) (*big.Int, error)

GetBridgeFee is a free data retrieval call binding the contract method 0x5c12ba59.

Solidity: function getBridgeFee(bytes payload) view returns(uint256 bridgeFee)

func (*BTCBridgeCallerSession) GetTotalWithdrawFee

func (_BTCBridge *BTCBridgeCallerSession) GetTotalWithdrawFee(amount *big.Int, recipient []byte) (*big.Int, error)

GetTotalWithdrawFee is a free data retrieval call binding the contract method 0xe33f61f0.

Solidity: function getTotalWithdrawFee(uint256 amount, bytes recipient) view returns(uint256 fee)

func (*BTCBridgeCallerSession) MinWithdrawAmount

func (_BTCBridge *BTCBridgeCallerSession) MinWithdrawAmount() (*big.Int, error)

MinWithdrawAmount is a free data retrieval call binding the contract method 0x457e1a49.

Solidity: function minWithdrawAmount() view returns(uint256)

func (*BTCBridgeCallerSession) SubSupply

func (_BTCBridge *BTCBridgeCallerSession) SubSupply() (*big.Int, error)

SubSupply is a free data retrieval call binding the contract method 0x5f8ead51.

Solidity: function subSupply() view returns(uint256)

func (*BTCBridgeCallerSession) WithdrawFee

func (_BTCBridge *BTCBridgeCallerSession) WithdrawFee() (*big.Int, error)

WithdrawFee is a free data retrieval call binding the contract method 0xe941fa78.

Solidity: function withdrawFee() view returns(uint256)

type BTCBridgeDeposit

type BTCBridgeDeposit struct {
	Id               [32]byte
	NormalizedAmount *big.Int
	Recipient        common.Address
	Raw              types.Log // Blockchain specific contextual infos
}

BTCBridgeDeposit represents a Deposit event raised by the BTCBridge contract.

type BTCBridgeDepositIterator

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

BTCBridgeDepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the BTCBridge contract.

func (*BTCBridgeDepositIterator) Close

func (it *BTCBridgeDepositIterator) Close() error

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

func (*BTCBridgeDepositIterator) Error

func (it *BTCBridgeDepositIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*BTCBridgeDepositIterator) Next

func (it *BTCBridgeDepositIterator) 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 BTCBridgeFilterer

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

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

func NewBTCBridgeFilterer

func NewBTCBridgeFilterer(address common.Address, filterer bind.ContractFilterer) (*BTCBridgeFilterer, error)

NewBTCBridgeFilterer creates a new log filterer instance of BTCBridge, bound to a specific deployed contract.

func (*BTCBridgeFilterer) FilterDeposit

func (_BTCBridge *BTCBridgeFilterer) FilterDeposit(opts *bind.FilterOpts) (*BTCBridgeDepositIterator, error)

FilterDeposit is a free log retrieval operation binding the contract event 0xdd6949a56c21c08b78f6a73eb8bebc859eff308638c0bc5eb78c017148dd0ee0.

Solidity: event Deposit(bytes32 id, uint256 normalizedAmount, address recipient)

func (*BTCBridgeFilterer) FilterSetDepositFee

func (_BTCBridge *BTCBridgeFilterer) FilterSetDepositFee(opts *bind.FilterOpts) (*BTCBridgeSetDepositFeeIterator, error)

FilterSetDepositFee is a free log retrieval operation binding the contract event 0x974fd3c1fcb4653dfc4fb740c4c692cd212d55c28f163f310128cb64d8300675.

Solidity: event SetDepositFee(uint256 newDepositFee)

func (*BTCBridgeFilterer) FilterSetFeeRecipient

func (_BTCBridge *BTCBridgeFilterer) FilterSetFeeRecipient(opts *bind.FilterOpts) (*BTCBridgeSetFeeRecipientIterator, error)

FilterSetFeeRecipient is a free log retrieval operation binding the contract event 0x2e979f80fe4d43055c584cf4a8467c55875ea36728fc37176c05acd784eb7a73.

Solidity: event SetFeeRecipient(address newFeeRecipient)

func (*BTCBridgeFilterer) FilterSetMinWithdrawAmount

func (_BTCBridge *BTCBridgeFilterer) FilterSetMinWithdrawAmount(opts *bind.FilterOpts) (*BTCBridgeSetMinWithdrawAmountIterator, error)

FilterSetMinWithdrawAmount is a free log retrieval operation binding the contract event 0x562d97cf82396452eea1987eacabb4af63827265ee67447bb8fe9d292f7a4508.

Solidity: event SetMinWithdrawAmount(uint256 newMinWithdrawAmount)

func (*BTCBridgeFilterer) FilterSetWithdrawFee

func (_BTCBridge *BTCBridgeFilterer) FilterSetWithdrawFee(opts *bind.FilterOpts) (*BTCBridgeSetWithdrawFeeIterator, error)

FilterSetWithdrawFee is a free log retrieval operation binding the contract event 0x7be0a744e4d6f887e4fd578978ae62cb2568d860f0f2eb0a54fd0de804b16440.

Solidity: event SetWithdrawFee(uint256 newWithdrawFee)

func (*BTCBridgeFilterer) FilterWithdraw

func (_BTCBridge *BTCBridgeFilterer) FilterWithdraw(opts *bind.FilterOpts) (*BTCBridgeWithdrawIterator, error)

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

Solidity: event Withdraw(bytes32 id, uint256 normalizedAmount, address sender)

func (*BTCBridgeFilterer) ParseDeposit

func (_BTCBridge *BTCBridgeFilterer) ParseDeposit(log types.Log) (*BTCBridgeDeposit, error)

ParseDeposit is a log parse operation binding the contract event 0xdd6949a56c21c08b78f6a73eb8bebc859eff308638c0bc5eb78c017148dd0ee0.

Solidity: event Deposit(bytes32 id, uint256 normalizedAmount, address recipient)

func (*BTCBridgeFilterer) ParseSetDepositFee

func (_BTCBridge *BTCBridgeFilterer) ParseSetDepositFee(log types.Log) (*BTCBridgeSetDepositFee, error)

ParseSetDepositFee is a log parse operation binding the contract event 0x974fd3c1fcb4653dfc4fb740c4c692cd212d55c28f163f310128cb64d8300675.

Solidity: event SetDepositFee(uint256 newDepositFee)

func (*BTCBridgeFilterer) ParseSetFeeRecipient

func (_BTCBridge *BTCBridgeFilterer) ParseSetFeeRecipient(log types.Log) (*BTCBridgeSetFeeRecipient, error)

ParseSetFeeRecipient is a log parse operation binding the contract event 0x2e979f80fe4d43055c584cf4a8467c55875ea36728fc37176c05acd784eb7a73.

Solidity: event SetFeeRecipient(address newFeeRecipient)

func (*BTCBridgeFilterer) ParseSetMinWithdrawAmount

func (_BTCBridge *BTCBridgeFilterer) ParseSetMinWithdrawAmount(log types.Log) (*BTCBridgeSetMinWithdrawAmount, error)

ParseSetMinWithdrawAmount is a log parse operation binding the contract event 0x562d97cf82396452eea1987eacabb4af63827265ee67447bb8fe9d292f7a4508.

Solidity: event SetMinWithdrawAmount(uint256 newMinWithdrawAmount)

func (*BTCBridgeFilterer) ParseSetWithdrawFee

func (_BTCBridge *BTCBridgeFilterer) ParseSetWithdrawFee(log types.Log) (*BTCBridgeSetWithdrawFee, error)

ParseSetWithdrawFee is a log parse operation binding the contract event 0x7be0a744e4d6f887e4fd578978ae62cb2568d860f0f2eb0a54fd0de804b16440.

Solidity: event SetWithdrawFee(uint256 newWithdrawFee)

func (*BTCBridgeFilterer) ParseWithdraw

func (_BTCBridge *BTCBridgeFilterer) ParseWithdraw(log types.Log) (*BTCBridgeWithdraw, error)

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

Solidity: event Withdraw(bytes32 id, uint256 normalizedAmount, address sender)

func (*BTCBridgeFilterer) WatchDeposit

func (_BTCBridge *BTCBridgeFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *BTCBridgeDeposit) (event.Subscription, error)

WatchDeposit is a free log subscription operation binding the contract event 0xdd6949a56c21c08b78f6a73eb8bebc859eff308638c0bc5eb78c017148dd0ee0.

Solidity: event Deposit(bytes32 id, uint256 normalizedAmount, address recipient)

func (*BTCBridgeFilterer) WatchSetDepositFee

func (_BTCBridge *BTCBridgeFilterer) WatchSetDepositFee(opts *bind.WatchOpts, sink chan<- *BTCBridgeSetDepositFee) (event.Subscription, error)

WatchSetDepositFee is a free log subscription operation binding the contract event 0x974fd3c1fcb4653dfc4fb740c4c692cd212d55c28f163f310128cb64d8300675.

Solidity: event SetDepositFee(uint256 newDepositFee)

func (*BTCBridgeFilterer) WatchSetFeeRecipient

func (_BTCBridge *BTCBridgeFilterer) WatchSetFeeRecipient(opts *bind.WatchOpts, sink chan<- *BTCBridgeSetFeeRecipient) (event.Subscription, error)

WatchSetFeeRecipient is a free log subscription operation binding the contract event 0x2e979f80fe4d43055c584cf4a8467c55875ea36728fc37176c05acd784eb7a73.

Solidity: event SetFeeRecipient(address newFeeRecipient)

func (*BTCBridgeFilterer) WatchSetMinWithdrawAmount

func (_BTCBridge *BTCBridgeFilterer) WatchSetMinWithdrawAmount(opts *bind.WatchOpts, sink chan<- *BTCBridgeSetMinWithdrawAmount) (event.Subscription, error)

WatchSetMinWithdrawAmount is a free log subscription operation binding the contract event 0x562d97cf82396452eea1987eacabb4af63827265ee67447bb8fe9d292f7a4508.

Solidity: event SetMinWithdrawAmount(uint256 newMinWithdrawAmount)

func (*BTCBridgeFilterer) WatchSetWithdrawFee

func (_BTCBridge *BTCBridgeFilterer) WatchSetWithdrawFee(opts *bind.WatchOpts, sink chan<- *BTCBridgeSetWithdrawFee) (event.Subscription, error)

WatchSetWithdrawFee is a free log subscription operation binding the contract event 0x7be0a744e4d6f887e4fd578978ae62cb2568d860f0f2eb0a54fd0de804b16440.

Solidity: event SetWithdrawFee(uint256 newWithdrawFee)

func (*BTCBridgeFilterer) WatchWithdraw

func (_BTCBridge *BTCBridgeFilterer) WatchWithdraw(opts *bind.WatchOpts, sink chan<- *BTCBridgeWithdraw) (event.Subscription, error)

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

Solidity: event Withdraw(bytes32 id, uint256 normalizedAmount, address sender)

type BTCBridgeRaw

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

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

func (*BTCBridgeRaw) Call

func (_BTCBridge *BTCBridgeRaw) 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 (*BTCBridgeRaw) Transact

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

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

func (*BTCBridgeRaw) Transfer

func (_BTCBridge *BTCBridgeRaw) 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 BTCBridgeSession

type BTCBridgeSession struct {
	Contract     *BTCBridge        // 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
}

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

func (*BTCBridgeSession) DepositFee

func (_BTCBridge *BTCBridgeSession) DepositFee() (*big.Int, error)

DepositFee is a free data retrieval call binding the contract method 0x67a52793.

Solidity: function depositFee() view returns(uint256)

func (*BTCBridgeSession) FeeRecipient

func (_BTCBridge *BTCBridgeSession) FeeRecipient() (common.Address, error)

FeeRecipient is a free data retrieval call binding the contract method 0x46904840.

Solidity: function feeRecipient() view returns(address)

func (*BTCBridgeSession) GetBridgeFee

func (_BTCBridge *BTCBridgeSession) GetBridgeFee(payload []byte) (*big.Int, error)

GetBridgeFee is a free data retrieval call binding the contract method 0x5c12ba59.

Solidity: function getBridgeFee(bytes payload) view returns(uint256 bridgeFee)

func (*BTCBridgeSession) GetTotalWithdrawFee

func (_BTCBridge *BTCBridgeSession) GetTotalWithdrawFee(amount *big.Int, recipient []byte) (*big.Int, error)

GetTotalWithdrawFee is a free data retrieval call binding the contract method 0xe33f61f0.

Solidity: function getTotalWithdrawFee(uint256 amount, bytes recipient) view returns(uint256 fee)

func (*BTCBridgeSession) MinWithdrawAmount

func (_BTCBridge *BTCBridgeSession) MinWithdrawAmount() (*big.Int, error)

MinWithdrawAmount is a free data retrieval call binding the contract method 0x457e1a49.

Solidity: function minWithdrawAmount() view returns(uint256)

func (*BTCBridgeSession) SetMinWithdrawAmount

func (_BTCBridge *BTCBridgeSession) SetMinWithdrawAmount(newMinWithdrawAmount *big.Int) (*types.Transaction, error)

SetMinWithdrawAmount is a paid mutator transaction binding the contract method 0x1f945d9a.

Solidity: function setMinWithdrawAmount(uint128 newMinWithdrawAmount) returns()

func (*BTCBridgeSession) SubSupply

func (_BTCBridge *BTCBridgeSession) SubSupply() (*big.Int, error)

SubSupply is a free data retrieval call binding the contract method 0x5f8ead51.

Solidity: function subSupply() view returns(uint256)

func (*BTCBridgeSession) Withdraw

func (_BTCBridge *BTCBridgeSession) Withdraw(amount *big.Int, recipient []byte) (*types.Transaction, error)

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

Solidity: function withdraw(uint256 amount, bytes recipient) payable returns()

func (*BTCBridgeSession) WithdrawFee

func (_BTCBridge *BTCBridgeSession) WithdrawFee() (*big.Int, error)

WithdrawFee is a free data retrieval call binding the contract method 0xe941fa78.

Solidity: function withdrawFee() view returns(uint256)

type BTCBridgeSetDepositFee

type BTCBridgeSetDepositFee struct {
	NewDepositFee *big.Int
	Raw           types.Log // Blockchain specific contextual infos
}

BTCBridgeSetDepositFee represents a SetDepositFee event raised by the BTCBridge contract.

type BTCBridgeSetDepositFeeIterator

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

BTCBridgeSetDepositFeeIterator is returned from FilterSetDepositFee and is used to iterate over the raw logs and unpacked data for SetDepositFee events raised by the BTCBridge contract.

func (*BTCBridgeSetDepositFeeIterator) Close

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

func (*BTCBridgeSetDepositFeeIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*BTCBridgeSetDepositFeeIterator) Next

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 BTCBridgeSetFeeRecipient

type BTCBridgeSetFeeRecipient struct {
	NewFeeRecipient common.Address
	Raw             types.Log // Blockchain specific contextual infos
}

BTCBridgeSetFeeRecipient represents a SetFeeRecipient event raised by the BTCBridge contract.

type BTCBridgeSetFeeRecipientIterator

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

BTCBridgeSetFeeRecipientIterator is returned from FilterSetFeeRecipient and is used to iterate over the raw logs and unpacked data for SetFeeRecipient events raised by the BTCBridge contract.

func (*BTCBridgeSetFeeRecipientIterator) Close

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

func (*BTCBridgeSetFeeRecipientIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*BTCBridgeSetFeeRecipientIterator) Next

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 BTCBridgeSetMinWithdrawAmount

type BTCBridgeSetMinWithdrawAmount struct {
	NewMinWithdrawAmount *big.Int
	Raw                  types.Log // Blockchain specific contextual infos
}

BTCBridgeSetMinWithdrawAmount represents a SetMinWithdrawAmount event raised by the BTCBridge contract.

type BTCBridgeSetMinWithdrawAmountIterator

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

BTCBridgeSetMinWithdrawAmountIterator is returned from FilterSetMinWithdrawAmount and is used to iterate over the raw logs and unpacked data for SetMinWithdrawAmount events raised by the BTCBridge contract.

func (*BTCBridgeSetMinWithdrawAmountIterator) Close

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

func (*BTCBridgeSetMinWithdrawAmountIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*BTCBridgeSetMinWithdrawAmountIterator) Next

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 BTCBridgeSetWithdrawFee

type BTCBridgeSetWithdrawFee struct {
	NewWithdrawFee *big.Int
	Raw            types.Log // Blockchain specific contextual infos
}

BTCBridgeSetWithdrawFee represents a SetWithdrawFee event raised by the BTCBridge contract.

type BTCBridgeSetWithdrawFeeIterator

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

BTCBridgeSetWithdrawFeeIterator is returned from FilterSetWithdrawFee and is used to iterate over the raw logs and unpacked data for SetWithdrawFee events raised by the BTCBridge contract.

func (*BTCBridgeSetWithdrawFeeIterator) Close

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

func (*BTCBridgeSetWithdrawFeeIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*BTCBridgeSetWithdrawFeeIterator) Next

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 BTCBridgeTransactor

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

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

func NewBTCBridgeTransactor

func NewBTCBridgeTransactor(address common.Address, transactor bind.ContractTransactor) (*BTCBridgeTransactor, error)

NewBTCBridgeTransactor creates a new write-only instance of BTCBridge, bound to a specific deployed contract.

func (*BTCBridgeTransactor) SetMinWithdrawAmount

func (_BTCBridge *BTCBridgeTransactor) SetMinWithdrawAmount(opts *bind.TransactOpts, newMinWithdrawAmount *big.Int) (*types.Transaction, error)

SetMinWithdrawAmount is a paid mutator transaction binding the contract method 0x1f945d9a.

Solidity: function setMinWithdrawAmount(uint128 newMinWithdrawAmount) returns()

func (*BTCBridgeTransactor) Withdraw

func (_BTCBridge *BTCBridgeTransactor) Withdraw(opts *bind.TransactOpts, amount *big.Int, recipient []byte) (*types.Transaction, error)

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

Solidity: function withdraw(uint256 amount, bytes recipient) payable returns()

type BTCBridgeTransactorRaw

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

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

func (*BTCBridgeTransactorRaw) Transact

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

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

func (*BTCBridgeTransactorRaw) Transfer

func (_BTCBridge *BTCBridgeTransactorRaw) 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 BTCBridgeTransactorSession

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

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

func (*BTCBridgeTransactorSession) SetMinWithdrawAmount

func (_BTCBridge *BTCBridgeTransactorSession) SetMinWithdrawAmount(newMinWithdrawAmount *big.Int) (*types.Transaction, error)

SetMinWithdrawAmount is a paid mutator transaction binding the contract method 0x1f945d9a.

Solidity: function setMinWithdrawAmount(uint128 newMinWithdrawAmount) returns()

func (*BTCBridgeTransactorSession) Withdraw

func (_BTCBridge *BTCBridgeTransactorSession) Withdraw(amount *big.Int, recipient []byte) (*types.Transaction, error)

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

Solidity: function withdraw(uint256 amount, bytes recipient) payable returns()

type BTCBridgeWithdraw

type BTCBridgeWithdraw struct {
	Id               [32]byte
	NormalizedAmount *big.Int
	Sender           common.Address
	Raw              types.Log // Blockchain specific contextual infos
}

BTCBridgeWithdraw represents a Withdraw event raised by the BTCBridge contract.

type BTCBridgeWithdrawIterator

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

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

func (*BTCBridgeWithdrawIterator) Close

func (it *BTCBridgeWithdrawIterator) Close() error

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

func (*BTCBridgeWithdrawIterator) Error

func (it *BTCBridgeWithdrawIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*BTCBridgeWithdrawIterator) Next

func (it *BTCBridgeWithdrawIterator) 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 SAVMBridge

type SAVMBridge struct {
	SAVMBridgeCaller     // Read-only binding to the contract
	SAVMBridgeTransactor // Write-only binding to the contract
	SAVMBridgeFilterer   // Log filterer for contract events
}

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

func NewSAVMBridge

func NewSAVMBridge(address common.Address, backend bind.ContractBackend) (*SAVMBridge, error)

NewSAVMBridge creates a new instance of SAVMBridge, bound to a specific deployed contract.

type SAVMBridgeCaller

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

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

func NewSAVMBridgeCaller

func NewSAVMBridgeCaller(address common.Address, caller bind.ContractCaller) (*SAVMBridgeCaller, error)

NewSAVMBridgeCaller creates a new read-only instance of SAVMBridge, bound to a specific deployed contract.

func (*SAVMBridgeCaller) BridgeToken

func (_SAVMBridge *SAVMBridgeCaller) BridgeToken(opts *bind.CallOpts) (common.Address, error)

BridgeToken is a free data retrieval call binding the contract method 0xf4734b0c.

Solidity: function bridgeToken() view returns(address)

func (*SAVMBridgeCaller) GetBridgeFee

func (_SAVMBridge *SAVMBridgeCaller) GetBridgeFee(opts *bind.CallOpts, dstChainId uint32, amount *big.Int, dstRecipient common.Address, customData []byte) (*big.Int, error)

GetBridgeFee is a free data retrieval call binding the contract method 0x95fa47b1.

Solidity: function getBridgeFee(uint32 dstChainId, uint256 amount, address dstRecipient, bytes customData) view returns(uint256 fee)

type SAVMBridgeCallerRaw

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

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

func (*SAVMBridgeCallerRaw) Call

func (_SAVMBridge *SAVMBridgeCallerRaw) 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 SAVMBridgeCallerSession

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

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

func (*SAVMBridgeCallerSession) BridgeToken

func (_SAVMBridge *SAVMBridgeCallerSession) BridgeToken() (common.Address, error)

BridgeToken is a free data retrieval call binding the contract method 0xf4734b0c.

Solidity: function bridgeToken() view returns(address)

func (*SAVMBridgeCallerSession) GetBridgeFee

func (_SAVMBridge *SAVMBridgeCallerSession) GetBridgeFee(dstChainId uint32, amount *big.Int, dstRecipient common.Address, customData []byte) (*big.Int, error)

GetBridgeFee is a free data retrieval call binding the contract method 0x95fa47b1.

Solidity: function getBridgeFee(uint32 dstChainId, uint256 amount, address dstRecipient, bytes customData) view returns(uint256 fee)

type SAVMBridgeFilterer

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

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

func NewSAVMBridgeFilterer

func NewSAVMBridgeFilterer(address common.Address, filterer bind.ContractFilterer) (*SAVMBridgeFilterer, error)

NewSAVMBridgeFilterer creates a new log filterer instance of SAVMBridge, bound to a specific deployed contract.

type SAVMBridgeRaw

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

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

func (*SAVMBridgeRaw) Call

func (_SAVMBridge *SAVMBridgeRaw) 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 (*SAVMBridgeRaw) Transact

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

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

func (*SAVMBridgeRaw) Transfer

func (_SAVMBridge *SAVMBridgeRaw) 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 SAVMBridgeSession

type SAVMBridgeSession struct {
	Contract     *SAVMBridge       // 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
}

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

func (*SAVMBridgeSession) BridgeOut

func (_SAVMBridge *SAVMBridgeSession) BridgeOut(dstChainId uint32, amount *big.Int, dstRecipient common.Address, customData []byte) (*types.Transaction, error)

BridgeOut is a paid mutator transaction binding the contract method 0xe43772fb.

Solidity: function bridgeOut(uint32 dstChainId, uint256 amount, address dstRecipient, bytes customData) payable returns(bytes32 txUniqueIdentification)

func (*SAVMBridgeSession) BridgeToken

func (_SAVMBridge *SAVMBridgeSession) BridgeToken() (common.Address, error)

BridgeToken is a free data retrieval call binding the contract method 0xf4734b0c.

Solidity: function bridgeToken() view returns(address)

func (*SAVMBridgeSession) GetBridgeFee

func (_SAVMBridge *SAVMBridgeSession) GetBridgeFee(dstChainId uint32, amount *big.Int, dstRecipient common.Address, customData []byte) (*big.Int, error)

GetBridgeFee is a free data retrieval call binding the contract method 0x95fa47b1.

Solidity: function getBridgeFee(uint32 dstChainId, uint256 amount, address dstRecipient, bytes customData) view returns(uint256 fee)

type SAVMBridgeTransactor

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

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

func NewSAVMBridgeTransactor

func NewSAVMBridgeTransactor(address common.Address, transactor bind.ContractTransactor) (*SAVMBridgeTransactor, error)

NewSAVMBridgeTransactor creates a new write-only instance of SAVMBridge, bound to a specific deployed contract.

func (*SAVMBridgeTransactor) BridgeOut

func (_SAVMBridge *SAVMBridgeTransactor) BridgeOut(opts *bind.TransactOpts, dstChainId uint32, amount *big.Int, dstRecipient common.Address, customData []byte) (*types.Transaction, error)

BridgeOut is a paid mutator transaction binding the contract method 0xe43772fb.

Solidity: function bridgeOut(uint32 dstChainId, uint256 amount, address dstRecipient, bytes customData) payable returns(bytes32 txUniqueIdentification)

type SAVMBridgeTransactorRaw

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

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

func (*SAVMBridgeTransactorRaw) Transact

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

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

func (*SAVMBridgeTransactorRaw) Transfer

func (_SAVMBridge *SAVMBridgeTransactorRaw) 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 SAVMBridgeTransactorSession

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

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

func (*SAVMBridgeTransactorSession) BridgeOut

func (_SAVMBridge *SAVMBridgeTransactorSession) BridgeOut(dstChainId uint32, amount *big.Int, dstRecipient common.Address, customData []byte) (*types.Transaction, error)

BridgeOut is a paid mutator transaction binding the contract method 0xe43772fb.

Solidity: function bridgeOut(uint32 dstChainId, uint256 amount, address dstRecipient, bytes customData) payable returns(bytes32 txUniqueIdentification)

Jump to

Keyboard shortcuts

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