Documentation
¶
Index ¶
Constants ¶
const EvmAddress = evmtypes.TestBedPrecompileAddress
const EvmByteCode = ""
EvmByteCode is the EVM bytecode of the BTC token precompile. This code is returned by eth_getCode and ensures the precompile address is detected as a smart contract by external services. note: It should NOT contain a 0x prefix
WARNING! This value is used in the InitChain ABCI hook and affects the app state hash. DO NOT change this value on a live chain, instead, use `setPrecompileByteCode` provided by the `Maintenance` precompile
This bytecode was generated by compiling the BTCCaller contract found in the precompile/hardhat package. Then extracting `deployedBytecode` from the build artifacts
const TransferEventName = "Transfer"
TransferEventName is the name of the Transfer event. It matches the name of the event in the contract ABI.
const (
TransferWithRevertMethodName = "transferWithRevert"
)
Variables ¶
var SendMsgURL = sdk.MsgTypeURL(&banktypes.MsgSend{})
SendMsgURL defines the authorization type for MsgSend
Functions ¶
func NewPrecompile ¶
func NewPrecompile(bankKeeper bankkeeper.Keeper, authzkeeper authzkeeper.Keeper, evmkeeper evmkeeper.Keeper, id string) (*precompile.Contract, error)
NewPrecompile creates a new TestBed token precompile.
func NewPrecompileVersionMap ¶
func NewPrecompileVersionMap( bankKeeper bankkeeper.Keeper, authzkeeper authzkeeper.Keeper, evmkeeper evmkeeper.Keeper, id string, ) (*precompile.VersionMap, error)
NewPrecompileVersionMap creates a new version map for the TestBed token precompile.
Types ¶
type TransferEvent ¶
type TransferEvent struct {
// contains filtered or unexported fields
}
transferEvent is the implementation of the Transfer event that contains the following arguments: - from (indexed): the address from which the tokens are transferred, - to (indexed): the address to which the tokens are transferred, - value (non-indexed): the amount of tokens transferred.
func NewTransferEvent ¶
func NewTransferEvent(from, to common.Address, value *big.Int) *TransferEvent
func (*TransferEvent) Arguments ¶
func (te *TransferEvent) Arguments() []*precompile.EventArgument
func (*TransferEvent) EventName ¶
func (te *TransferEvent) EventName() string