Documentation
¶
Index ¶
- Constants
- Variables
- type WarpBackend
- type WarpConfig
- type WarpModule
- func (w *WarpModule) GetBlockchainID(evm *vm.EVM, caller common.Address, value *uint256.Int, readOnly bool) ([]byte, error)
- func (w *WarpModule) GetVerifiedWarpMessage(index uint32, evm *vm.EVM, caller common.Address, value *uint256.Int, ...) ([]byte, error)
- func (w *WarpModule) SendWarpMessage(payload []byte, evm *vm.EVM, caller common.Address, value *uint256.Int, ...) ([]byte, error)
- type WarpPrecompile
Constants ¶
View Source
const ( GetVerifiedWarpMessageGas = 200_000 SendWarpMessageGas = 100_000 GetBlockchainIDGas = 10_000 )
Gas costs for warp operations
View Source
const WarpABI = `` /* 1392-byte string literal not displayed */
WarpABI is the ABI for the warp precompile
Variables ¶
View Source
var WarpPrecompileContract = common.HexToAddress("0x0200000000000000000000000000000000000005")
WarpPrecompileContract is the precompile contract address
Functions ¶
This section is empty.
Types ¶
type WarpBackend ¶
type WarpBackend interface {
GetMessage(index uint32) (*warp.Message, error)
AddMessage(unsignedMessage *warp.UnsignedMessage) error
GetValidatorState() warp.ValidatorState
}
WarpBackend is the backend interface for warp operations
type WarpConfig ¶
type WarpConfig struct {
NetworkID uint32
SourceChainID ids.ID
BlockchainID ids.ID
QuorumNumerator uint64
QuorumDenominator uint64
}
WarpConfig is the configuration for the warp precompile
func DefaultWarpConfig ¶
func DefaultWarpConfig(networkID uint32, chainID ids.ID) *WarpConfig
DefaultWarpConfig returns the default warp configuration
type WarpModule ¶
type WarpModule struct {
// contains filtered or unexported fields
}
WarpModule implements the warp precompile functionality
func NewWarpModule ¶
func NewWarpModule(config *WarpConfig, backend WarpBackend) *WarpModule
NewWarpModule creates a new warp module
func (*WarpModule) GetBlockchainID ¶
func (w *WarpModule) GetBlockchainID( evm *vm.EVM, caller common.Address, value *uint256.Int, readOnly bool, ) ([]byte, error)
GetBlockchainID retrieves the blockchain ID
type WarpPrecompile ¶
type WarpPrecompile interface {
GetVerifiedWarpMessage(
index uint32, evm *vm.EVM, caller common.Address, value *uint256.Int, readOnly bool,
) ([]byte, error)
SendWarpMessage(
payload []byte, evm *vm.EVM, caller common.Address, value *uint256.Int, readOnly bool,
) ([]byte, error)
GetBlockchainID(
evm *vm.EVM, caller common.Address, value *uint256.Int, readOnly bool,
) ([]byte, error)
}
WarpPrecompile is the interface for the warp precompile contract
Click to show internal directories.
Click to hide internal directories.