blockchain

package
v0.5.0-rc5-hotfix2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ChainEndpoint is the ip address of iotex api endpoint
	ChainEndpoint = "localhost:14014"
	// Producer indicates block producer's encoded address
	Producer = "io13rjq2c07mqhe8sdd7nf9a4vcmnyk9mn72hu94e"
	// ProducerPubKey indicates block producer's public key
	ProducerPubKey = "" /* 130-byte string literal not displayed */
	// ProducerPrivKey indicates block producer's private key
	ProducerPrivKey = "82a1556b2dbd0e3615e367edf5d3b90ce04346ec4d12ed71f67c70920ef9ac90"
	// GasLimitPerByte indicates the gas limit for each byte
	GasLimitPerByte uint64 = 100
	// GasPrice indicates the gas price
	GasPrice = 0
)
View Source
const (
	// FpRegistryID is the ID of FpRegistry
	FpRegistryID = "0000000000000009"
	// FpRegistryBinary is the binary code of FpRegistry
	FpRegistryBinary = "" /* 9082-byte string literal not displayed */
	// CdpManageID is the ID of CdpManage
	CdpManageID = "0000000000000010"
	// CdpManageBinary is the binary code of CdpManage
	CdpManageBinary = "" /* 23634-byte string literal not displayed */
	// ManageID is the ID of Manage
	ManageID = "0000000000000011"
	// ManageBinary is the binary code of Manage
	ManageBinary = "" /* 46310-byte string literal not displayed */
	// ManageProxyID is the ID of ManageProxy
	ManageProxyID = "0000000000000012"
	// ManageProxyBinary is the binary code of ManageProxy
	ManageProxyBinary = "" /* 17926-byte string literal not displayed */
	// EapStorageID is the ID of EapStorage
	EapStorageID = "0000000000000013"
	// EapStorageBinary is the binary code of EapStorage
	EapStorageBinary = "" /* 17870-byte string literal not displayed */
	// TokenRiskLockID is the ID of TokenRiskLock
	TokenRiskLockID = "0000000000000014"
	// TokenRiskLockBinary is the binary code of TokenRiskLock
	TokenRiskLockBinary = "" /* 7716-byte string literal not displayed */
	// StartFpTokenID is the ID of StartFpToken
	StartFpTokenID = "00000000000000015"
)
View Source
const (
	// StableTokenID is the ID of StableToken
	StableTokenID = "0000000000000000"
	// StableTokenBinary is the binary code of StableToken
	StableTokenBinary = "" /* 36056-byte string literal not displayed */
	// AllowanceSheetID is the ID of AllowanceSheet
	AllowanceSheetID = "0000000000000001"
	// AllowanceSheetBinary is the binary code of AllowanceSheet
	AllowanceSheetBinary = "" /* 5066-byte string literal not displayed */
	// BalanceSheetID is the ID of BalanceSheet
	BalanceSheetID = "0000000000000002"
	// BalanceSheetBinary is the binary code of BalanceSheet
	BalanceSheetBinary = "" /* 4168-byte string literal not displayed */
	// RegistryID is the ID of Registry
	RegistryID = "0000000000000003"
	// RegistryBinary is the binary code of Registry
	RegistryBinary = "" /* 9082-byte string literal not displayed */
	// GlobalPauseID is the ID of GlobalPause
	GlobalPauseID = "0000000000000004"
	// GlobalPauseBinary is the binary code of GlobalPause
	GlobalPauseBinary = "" /* 4462-byte string literal not displayed */
	// StartStableTokenID is the ID of StartStableToken
	StartStableTokenID = "0000000000000005"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Contract

type Contract interface {
	Start() error
	Exist(string) bool
	Explorer() string
	Deploy(string) (string, error)
	Read(string, []byte) (string, error)
	ReadValue(string, string, string) (int64, error)
	ReadAndParseToDecimal(string, string, string) (string, error)
	Call(string, ...[]byte) (string, error)
	Transact([]byte, bool) (string, error)
	CheckCallResult(string) (*iotextypes.Receipt, error)

	Address() string
	SetAddress(string) Contract
	SetOwner(string, string, string) Contract
	SetExecutor(string) Contract
	SetPubKey(string) Contract
	SetPrvKey(string) Contract
	RunAsOwner() Contract
}

Contract is a basic contract

func NewContract

func NewContract(exp string) Contract

NewContract creates a new contract

type FpToken

type FpToken interface {
	Contract
	CreateToken(string, string, string, int64, int64, string, string) (string, error)
	CreateDeferredToken(string, string, string, string, string, int64, string, string) (string, error)
	TokenAddress(string) (string, error)
	Transfer(string, string, string, string, string, int64) (string, error)
	RiskLock(string, string, string, string, int64) (string, error)
	SetRate(string, int64) (string, error)
	GetRate(string) (string, error)

	SetManagement(string) FpToken
	SetManagementProxy(string) FpToken
	SetEapStorage(string) FpToken
	SetRiskLock(string) FpToken
	SetRegistry(string) FpToken
	SetCdpManager(string) FpToken
	SetStableToken(string) FpToken
}

FpToken is an interface for an fp token

func NewFpToken

func NewFpToken(exp string) FpToken

NewFpToken creates a new Fp Token

type StableToken

type StableToken interface {
	Contract
	Mint(string, int64) (string, error)
	Burn(string, string, string, int64) (string, error)
	Transfer(string, int64) (string, error)

	MintWhitelist() []byte
	BurnWhiteList() []byte

	SetAllowance(string) StableToken
	SetBalance(string) StableToken
	SetRegistry(string) StableToken
	SetPause(string) StableToken
	SetStable(string) StableToken
}

StableToken is an interface for a stable token

func NewStableToken

func NewStableToken(exp string) StableToken

NewStableToken creates a new Stable Token

Jump to

Keyboard shortcuts

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