blockchain

package
v1.8.4-rc1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// 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 = "" /* 47372-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 of AllowanceSheet
	AllowanceSheetBinary = "" /* 5066-byte string literal not displayed */
	// BalanceSheetID is the ID of BalanceSheet
	BalanceSheetID = "0000000000000002"
	// BalanceSheetBinary is the binary of BalanceSheet
	BalanceSheetBinary = "" /* 4168-byte string literal not displayed */
	// RegistryID is the ID of Registry
	RegistryID = "0000000000000003"
	// RegistryBinary is the binary of Registry
	RegistryBinary = "" /* 9082-byte string literal not displayed */
	// GlobalPauseID is the ID of GlobalPause
	GlobalPauseID = "0000000000000004"
	// GlobalPauseBinary is the binary of GlobalPause
	GlobalPauseBinary = "" /* 4462-byte string literal not displayed */
	// StartStableTokenID is the ID of StartStableToken
	StartStableTokenID = "0000000000000005"
)
View Source
const (
	// TradingID is the ID of Trading
	TradingID = "0000000000000032"
	// TradingBinary is the binary of Trading
	TradingBinary = "" /* 43092-byte string literal not displayed */
	// TradingProxyID is the ID of Trading proxy
	TradingProxyID = "0000000000000033"
	// TradingProxyBinary is the binary of Trading proxy
	TradingProxyBinary = "" /* 26206-byte string literal not displayed */
	// ReserveID is the ID of Reserve
	ReserveID = "0000000000000034"
	// ReserveBinary is the binary of Reserve
	ReserveBinary = "" /* 34310-byte string literal not displayed */
	// CreditRatingID is the ID of CreditRating
	CreditRatingID = "0000000000000035"
	// CreditRatingBinary is the binary of CreditRating
	CreditRatingBinary = "" /* 15786-byte string literal not displayed */
	// ExpectedRateID is the ID of ExpectedRate
	ExpectedRateID = "0000000000000036"
	// ExpectedRateBinary is the binary of ExpectedRate
	ExpectedRateBinary = "" /* 18920-byte string literal not displayed */
	// ConversionRateID is the ID of ConversionRate
	ConversionRateID = "0000000000000037"
	// ConversionRateBinary is the binary of ConversionRate
	ConversionRateBinary = "" /* 32342-byte string literal not displayed */
	// StartTradingID is the ID of StartTrading
	StartTradingID = "0000000000000038"
)
View Source
const (
	// Erc721Binary a simple erc721 token bin, the following is its binary
	Erc721Binary = "" /* 15346-byte string literal not displayed */
	// CreateTo createTo(address _owner,uint256 _tokenId)
	CreateTo = "fdb05e85"
	// TransferFrom transferFrom(address _from, address _to, uint256 _tokenId)
	TransferFrom = "23b872dd"
	// BalanceOf BalanceOf(opts *bind.CallOpts, _owner common.Address)
	BalanceOf = "70a08231"
	// ArrayDeletePassingBin is a test contract, source code in array-delete-passing.sol, the following is its binary
	ArrayDeletePassingBin = `` /* 2752-byte string literal not displayed */
	// ArrayDeletePassingGetArray is a contract method
	ArrayDeletePassingGetArray = "d504ea1d"
	// ArrayDeletePassingMakeA is a contract method
	ArrayDeletePassingMakeA = "cb852271"
	// ArrayStringBin is a test contract, source code in array-of-strings.sol, the following is its binary
	ArrayStringBin = `` /* 1686-byte string literal not displayed */
	// ArrayStringBar is string return contract method
	ArrayStringBar = "febb0f7e"
)

Variables

This section is empty.

Functions

func U256

func U256(n *big.Int) []byte

U256 converts a big Int into a 256bit EVM number.

Types

type ArrayDeletePassing

type ArrayDeletePassing interface {
	Contract
	GetArray() (ret []*big.Int, err error)
	GetNum() (ret int64, err error)
}

ArrayDeletePassing interface for array-delete.sol

func NewArrayDelete

func NewArrayDelete(exp string) ArrayDeletePassing

NewArrayDelete creates a new ArrayDelete contract

type ArrayString

type ArrayString interface {
	Contract
	GetString() (ret string, err error)
}

ArrayString interface for array-of-strings.sol

func NewArrayString

func NewArrayString(exp string) ArrayString

NewArrayString creates a new ArrayString contract

type Contract

type Contract interface {
	Start() error
	Exist(string) bool
	Explorer() string
	Deploy(string, ...[]byte) (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) Contract
	SetExecutor(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 Erc721Token

type Erc721Token interface {
	Contract
	CreateToken(string, string) (string, error)
	Transfer(string, string, string, string, string) (string, error)
}

Erc721Token erc721 token interface

func NewErc721Token

func NewErc721Token(exp string) Erc721Token

NewErc721Token creates a new Erc721Token

type FpToken

type FpToken interface {
	Contract
	CreateToken(string, string, string, int64, int64, int64, int64) (string, error)
	CreateDeferredToken(string, string, string, string, int64, int64, int64) (string, error)
	TokenAddress(string) (string, error)
	Transfer(string, string, string, string, int64) (string, error)
	RiskLock(string, string, string, int64) (string, error)
	SetRate(string, int64) (string, error)
	GetRate(string) (string, error)
	SetPayDate(string, int64) (string, error)
	GetPayDate(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 FpToken

type ICanBytes

type ICanBytes interface {
	Bytes() []byte
}

ICanBytes is []byte

type SliceAssembler

type SliceAssembler interface {
	PackArguments(args ...interface{}) ([]byte, error)
	IsDynamicType(param interface{}) bool
}

SliceAssembler is an interface to pack arguments for ABI

func NewSliceAssembler

func NewSliceAssembler() SliceAssembler

NewSliceAssembler creates a slice assembler

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

type Trading

type Trading interface {
	Contract
	CreateReserve(string, string) (string, string, error)
	SetInterest(string, []string, []int64, []int64) (string, error)
	SetFactor(string, string, []int64, []int64, []int64) (string, error)
	SetAccountCreditRating(string, int64) (string, error)
	GetAccountCreditRating(string) (string, error)
	QuoteRate(string, string, int64, int64) (string, error)
	Trade(string, string, string, string, int64, int64) (string, error)

	SetTrading(string) Trading
	SetTradingProxy(string) Trading
	SetCreditRating(string) Trading
	SetExpectedRate(string) Trading
	SetEapStorage(string) Trading
	SetFpManage(string) Trading
	SetStableToken(string) Trading
}

Trading is an interface for trading platform

func NewTrading

func NewTrading(exp string) Trading

NewTrading creates a new trading

Jump to

Keyboard shortcuts

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