types

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

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

func NewSocketCoin(amount sdk.Int) sdk.Coin

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

func NewSocketCoinInt64(amount int64) sdk.Coin

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.

func NewSocketDecCoin

func NewSocketDecCoin(amount sdk.Int) sdk.DecCoin

NewSocketDecCoin is a utility function that returns an "uplugcn" decimal coin with the given sdk.Int amount. The function will panic if the provided amount is negative.

Types

type CompiledContract added in v1.3.0

type CompiledContract struct {
	ABI abi.ABI
	Bin HexString
}

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

func (s HexString) MarshalJSON() ([]byte, error)

MarshalJSON serializes ByteArray to hex

func (*HexString) UnmarshalJSON added in v1.3.0

func (s *HexString) UnmarshalJSON(data []byte) error

UnmarshalJSON deserializes ByteArray to hex

Jump to

Keyboard shortcuts

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