Documentation ¶
Index ¶
- Variables
- func ErrCounterLogic(errStr string, domainId uint8)
- type CommonTransaction
- type DepositLogs
- type EVMClient
- func (c *EVMClient) BaseFee() (*big.Int, error)
- func (c *EVMClient) CallContext(ctx context.Context, target interface{}, rpcMethod string, args ...interface{}) error
- func (c *EVMClient) CallContract(ctx context.Context, callArgs map[string]interface{}, blockNumber *big.Int) ([]byte, error)
- func (c *EVMClient) EnsureHasBytecode(addr common.Address) error
- func (c *EVMClient) FetchDepositLogs(ctx context.Context, contractAddress common.Address, startBlock *big.Int, ...) ([]*DepositLogs, error)
- func (c *EVMClient) FetchEventLogs(ctx context.Context, contractAddress common.Address, event string, ...) ([]types.Log, error)
- func (c *EVMClient) From() common.Address
- func (c *EVMClient) GetTransactionByHash(h common.Hash) (tx *types.Transaction, isPending bool, err error)
- func (c *EVMClient) LatestBlock() (*big.Int, error)
- func (c *EVMClient) LatestFinalizedBlock() (*big.Int, error)
- func (c *EVMClient) LockNonce()
- func (c *EVMClient) PendingCallContract(ctx context.Context, callArgs map[string]interface{}) ([]byte, error)
- func (c *EVMClient) PolygonGasStation() bool
- func (c *EVMClient) PrivateKey() *ecdsa.PrivateKey
- func (c *EVMClient) RelayerAddress() common.Address
- func (c *EVMClient) SendRawTransaction(ctx context.Context, tx []byte) error
- func (c *EVMClient) Sign(byteData []byte) ([]byte, error)
- func (c *EVMClient) SignAndSendTransaction(ctx context.Context, tx CommonTransaction) (common.Hash, error)
- func (c *EVMClient) SubscribePendingTransactions(ctx context.Context, ch chan<- common.Hash) (*rpc.ClientSubscription, error)
- func (c *EVMClient) UnlockNonce()
- func (c *EVMClient) UnpackDepositEventLog(abi abi.ABI, data []byte) (*DepositLogs, error)
- func (c *EVMClient) UnsafeIncreaseNonce() error
- func (c *EVMClient) UnsafeNonce() (*big.Int, error)
- func (c *EVMClient) UpdateEndpoint() (string, error)
- func (c *EVMClient) UpdateNonce()
- func (c *EVMClient) WaitAndReturnTxReceipt(h common.Hash) (*types.Receipt, error)
- type ProposalEvents
- type SignaturePass
Constants ¶
This section is empty.
Variables ¶
View Source
var DomainIdMappingEVMClient = make(map[uint8]*EVMClient)
Functions ¶
func ErrCounterLogic ¶
Types ¶
type CommonTransaction ¶
type DepositLogs ¶
type DepositLogs struct { // ID of chain deposit will be bridged to DestinationDomainID uint8 // ResourceID used to find address of handler to be used for deposit ResourceID bridgeTypes.ResourceID // Nonce of deposit DepositNonce uint64 // Address of sender (msg.sender: user) SenderAddress common.Address // Additional data to be passed to specified handler Data []byte // ERC20Handler: responds with empty data // ERC721Handler: responds with deposited token metadata acquired by calling a tokenURI method in the token contract // GenericHandler: responds with the raw bytes returned from the call to the target contract HandlerResponse []byte BlockHash common.Hash BlockNumber uint64 }
DepositLogs struct holds event data with all necessary parameters and a handler response https://github.com/ChainSafe/chainbridge-solidity/blob/develop/contracts/Bridge.sol#L47
type EVMClient ¶
func NewEVMClient ¶
NewEVMClient creates a client for EVM chain configured with specified config. Private key is chosen by 'from' param in chain config that matches filename inside keystore path.
func NewEVMClientFromParams ¶
func NewEVMClientFromParams(url string, privateKey *ecdsa.PrivateKey) (*EVMClient, error)
NewEVMClientFromParams creates a client for EVMChain with provided private key.
func (*EVMClient) CallContext ¶
func (*EVMClient) CallContract ¶
func (*EVMClient) EnsureHasBytecode ¶
EnsureHasBytecode asserts if contract code exists at the specified address
func (*EVMClient) FetchDepositLogs ¶
func (*EVMClient) FetchEventLogs ¶
func (*EVMClient) GetTransactionByHash ¶
func (*EVMClient) LatestBlock ¶
LatestBlock returns the latest block from the current chain
func (*EVMClient) LatestFinalizedBlock ¶
func (*EVMClient) PendingCallContract ¶
func (*EVMClient) PolygonGasStation ¶
func (*EVMClient) PrivateKey ¶
func (c *EVMClient) PrivateKey() *ecdsa.PrivateKey
func (*EVMClient) RelayerAddress ¶
func (*EVMClient) SendRawTransaction ¶
SendRawTransaction accepts rlp-encode of signed transaction and sends it via RPC call
func (*EVMClient) SignAndSendTransaction ¶
func (*EVMClient) SubscribePendingTransactions ¶
func (*EVMClient) UnlockNonce ¶
func (c *EVMClient) UnlockNonce()
func (*EVMClient) UnpackDepositEventLog ¶
func (*EVMClient) UnsafeIncreaseNonce ¶
func (*EVMClient) UpdateEndpoint ¶
func (*EVMClient) UpdateNonce ¶
func (c *EVMClient) UpdateNonce()
type ProposalEvents ¶
Click to show internal directories.
Click to hide internal directories.