bridge

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: LGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BridgeContract

type BridgeContract struct {
	contracts.Contract
}

func NewBridgeContract

func NewBridgeContract(
	client calls.ContractCallerDispatcher,
	bridgeContractAddress common.Address,
	transactor transactor.Transactor,
) *BridgeContract

func (*BridgeContract) AddRelayer

func (c *BridgeContract) AddRelayer(
	relayerAddr common.Address,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) AdminRemoveGenericResource

func (c *BridgeContract) AdminRemoveGenericResource(
	rID types.ResourceID,
	targetContractAddr common.Address,

	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) AdminRemoveNativeResourceId

func (c *BridgeContract) AdminRemoveNativeResourceId(
	opts transactor.TransactOptions,
) (*common.Hash, error)

deprecated: AdminRemoveNativeResourceId

func (*BridgeContract) AdminRemoveResource

func (c *BridgeContract) AdminRemoveResource(
	rID types.ResourceID,
	targetContractAddr common.Address,
	native bool,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) AdminSetDomainId

func (c *BridgeContract) AdminSetDomainId(
	domain uint8,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) AdminSetGenericResource

func (c *BridgeContract) AdminSetGenericResource(
	handler common.Address,
	rID types.ResourceID,
	addr common.Address,
	depositFunctionSig [4]byte,
	depositerOffset *big.Int,
	executeFunctionSig [4]byte,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) AdminSetNativeResource

func (c *BridgeContract) AdminSetNativeResource(
	handler common.Address,
	rID types.ResourceID,
	addr common.Address,
	depositFunctionSig [4]byte,
	depositerOffset *big.Int,
	executeFunctionSig [4]byte,
	opts transactor.TransactOptions,
) (*common.Hash, error)

deprecated: AdminSetNativeResource

func (*BridgeContract) AdminSetResource

func (c *BridgeContract) AdminSetResource(
	handlerAddr common.Address,
	rID types.ResourceID,
	targetContractAddr common.Address,
	native bool,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) AdminSetWtoken

func (c *BridgeContract) AdminSetWtoken(
	rID types.ResourceID,
	targetContractAddr common.Address,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) CancelProposal

func (c *BridgeContract) CancelProposal(
	domainID uint8,
	depositNonce uint64,
	dataHash [32]byte,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) DefaultAdminRole

func (c *BridgeContract) DefaultAdminRole() ([32]byte, error)

func (*BridgeContract) Erc20Deposit

func (c *BridgeContract) Erc20Deposit(
	recipient common.Address,
	amount *big.Int,
	resourceID types.ResourceID,
	destDomainID uint8,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) Erc721Deposit

func (c *BridgeContract) Erc721Deposit(
	tokenId *big.Int,
	metadata string,
	recipient common.Address,
	resourceID types.ResourceID,
	destDomainID uint8,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) ExecuteProposal

func (c *BridgeContract) ExecuteProposal(
	proposal *proposal.Proposal,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) GenericDeposit

func (c *BridgeContract) GenericDeposit(
	metadata []byte,
	resourceID types.ResourceID,
	destDomainID uint8,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) GetDomainID

func (c *BridgeContract) GetDomainID() (uint8, error)

func (*BridgeContract) GetFee

func (c *BridgeContract) GetFee() (*big.Int, error)

func (*BridgeContract) GetFeeReserve

func (c *BridgeContract) GetFeeReserve() (*big.Int, error)

func (*BridgeContract) GetHandlerAddressForResourceID

func (c *BridgeContract) GetHandlerAddressForResourceID(
	resourceID types.ResourceID,
) (common.Address, error)

func (*BridgeContract) GetProposal

func (c *BridgeContract) GetProposal(source uint8, depositNonce uint64, resourceId types.ResourceID, data []byte) (message.ProposalStatus, error)

func (*BridgeContract) GetRoleMember

func (c *BridgeContract) GetRoleMember(role [32]byte, i int64) (common.Address, error)

func (*BridgeContract) GetRoleMemberCount

func (c *BridgeContract) GetRoleMemberCount(role [32]byte) (*big.Int, error)

func (*BridgeContract) GetThreshold

func (c *BridgeContract) GetThreshold() (uint8, error)

func (*BridgeContract) GrantRole

func (c *BridgeContract) GrantRole(
	role [32]byte,
	account common.Address,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) IsProposalVotedBy

func (c *BridgeContract) IsProposalVotedBy(by common.Address, p *proposal.Proposal) (bool, error)

func (*BridgeContract) IsRelayer

func (c *BridgeContract) IsRelayer(relayerAddress common.Address) (bool, error)

func (*BridgeContract) MinterRole

func (c *BridgeContract) MinterRole() ([32]byte, error)

func (*BridgeContract) Pause

func (*BridgeContract) ProposalStatus

func (c *BridgeContract) ProposalStatus(p *proposal.Proposal) (message.ProposalStatus, error)

func (*BridgeContract) RelayerRole

func (c *BridgeContract) RelayerRole() ([32]byte, error)

func (*BridgeContract) RemoveRelayer

func (c *BridgeContract) RemoveRelayer(
	relayerAddr common.Address,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) RenounceAdmin

func (c *BridgeContract) RenounceAdmin(
	adminAddr common.Address,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) RevokeRole

func (c *BridgeContract) RevokeRole(
	role [32]byte,
	account common.Address,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) SetBurnableInput

func (c *BridgeContract) SetBurnableInput(
	handlerAddr common.Address,
	tokenContractAddr common.Address,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) SetDepositNonce

func (c *BridgeContract) SetDepositNonce(
	domainId uint8,
	depositNonce uint64,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) SetFee

func (c *BridgeContract) SetFee(
	newFee *big.Int,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) SetSpecialFee

func (c *BridgeContract) SetSpecialFee(
	fromDomainID uint8,
	_specialFee *big.Int,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) SetThresholdInput

func (c *BridgeContract) SetThresholdInput(
	threshold uint64,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) SimulateVoteProposal

func (c *BridgeContract) SimulateVoteProposal(proposal *proposal.Proposal) error

func (*BridgeContract) TransferFee

func (c *BridgeContract) TransferFee(
	account common.Address,
	amount *big.Int,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) Unpause

func (*BridgeContract) VoteProposal

func (c *BridgeContract) VoteProposal(
	proposal *proposal.Proposal,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) VoteProposals

func (c *BridgeContract) VoteProposals(
	domainID uint8,
	depositNonce uint64,
	resourceID [32]byte,
	data []byte,
	signatures [][]byte,
	opts transactor.TransactOptions,
) (*common.Hash, error)

func (*BridgeContract) Withdraw

func (c *BridgeContract) Withdraw(
	handlerAddress,
	tokenAddress,
	recipientAddress common.Address,
	amountOrTokenId *big.Int,
	opts transactor.TransactOptions,
) (*common.Hash, error)

Jump to

Keyboard shortcuts

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