Documentation ¶
Index ¶
Constants ¶
const ( // BaseNativeDenom defines the default coin denomination used in Ethermint in: // // - Staking parameters: denomination used as stake in the PoS chain // - Mint parameters: denomination minted due to fee distribution rewards // - Governance parameters: denomination used for spam prevention in proposal deposits // - Crisis parameters: constant fee denomination used for spam prevention to check broken invariant // - EVM parameters: denomination used for running EVM state transitions in Ethermint. BaseNativeDenom string = "uplugcn" //DisplayNativeDenom defines the denomination displayed to users in client applications. DisplayNativeDenom string = "pc" // BaseDenomUnit defines the base denomination unit for plugcns. // 1 pc = 1x10^{BaseDenomUnit} uplugcn BaseDenomUnit = 6 // DefaultGasPrice is default gas price for evm transactions DefaultGasPrice = 20 )
Variables ¶
This section is empty.
Functions ¶
func GetGxAddressFromBech32 ¶ added in v1.7.0
func GetGxAddressFromBech32(address string) (sdk.AccAddress, error)
GeGxAddressFromBech32 returns the sdk.Account address of given address, while also changing bech32 human readable prefix (HRP) to the value set on the global sdk.Config (eg: `gx`). The function fails if the provided bech32 address is invalid.
func NewSocketCoin ¶
NewSocketCoin is a utility function that returns an "uplugcn" coin with the given sdk.Int amount. The function will panic if the provided amount is negative.
func NewSocketCoinInt64 ¶
NewSocketCoinInt64 is a utility function that returns an "uplugcn" coin with the given int64 amount. The function will panic if the provided amount is negative.
Types ¶
type CompiledContract ¶ added in v1.3.0
CompiledContract contains compiled bytecode and abi
var ( // ERC20Contract is the compiled test erc20 contract ERC20Contract CompiledContract )
func (CompiledContract) MarshalJSON ¶ added in v1.3.0
func (s CompiledContract) MarshalJSON() ([]byte, error)
MarshalJSON serializes ByteArray to hex
func (*CompiledContract) UnmarshalJSON ¶ added in v1.3.0
func (s *CompiledContract) UnmarshalJSON(data []byte) error
UnmarshalJSON deserializes ByteArray to hex
type HexString ¶ added in v1.3.0
type HexString []byte
HexString is a byte array that serializes to hex
func (HexString) MarshalJSON ¶ added in v1.3.0
MarshalJSON serializes ByteArray to hex
func (*HexString) UnmarshalJSON ¶ added in v1.3.0
UnmarshalJSON deserializes ByteArray to hex