testbed

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2025 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
const TransferEventName = "Transfer"

TransferEventName is the name of the Transfer event. It matches the name of the event in the contract ABI.

View Source
const (
	TransferWithRevertMethodName = "transferWithRevert"
)

Variables

View Source
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

Jump to

Keyboard shortcuts

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