Documentation ¶
Index ¶
- Constants
- Variables
- func CreateRegistedRedeemedScript(publicKey *crypto.PublicKey) ([]byte, error)
- func Sync()
- func SyncEth()
- func SyncHeight() string
- type Address_history
- type Block_header
- type Block_transaction_history
- type Did_Property
- type Did_info
- type Erc20
- type Erc20Caller
- func (_Erc20 *Erc20Caller) Decimals(opts *bind.CallOpts) (uint8, error)
- func (_Erc20 *Erc20Caller) DefaultGasLimit(opts *bind.CallOpts) (*big.Int, error)
- func (_Erc20 *Erc20Caller) DefaultGasPrice(opts *bind.CallOpts) (*big.Int, error)
- func (_Erc20 *Erc20Caller) Description(opts *bind.CallOpts) (string, error)
- func (_Erc20 *Erc20Caller) Name(opts *bind.CallOpts) (string, error)
- func (_Erc20 *Erc20Caller) Symbol(opts *bind.CallOpts) (string, error)
- type Erc20CallerRaw
- type Erc20CallerSession
- func (_Erc20 *Erc20CallerSession) Decimals() (uint8, error)
- func (_Erc20 *Erc20CallerSession) DefaultGasLimit() (*big.Int, error)
- func (_Erc20 *Erc20CallerSession) DefaultGasPrice() (*big.Int, error)
- func (_Erc20 *Erc20CallerSession) Description() (string, error)
- func (_Erc20 *Erc20CallerSession) Name() (string, error)
- func (_Erc20 *Erc20CallerSession) Symbol() (string, error)
- type Erc20Filterer
- type Erc20Raw
- func (_Erc20 *Erc20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error
- func (_Erc20 *Erc20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_Erc20 *Erc20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type Erc20Session
- func (_Erc20 *Erc20Session) Decimals() (uint8, error)
- func (_Erc20 *Erc20Session) DefaultGasLimit() (*big.Int, error)
- func (_Erc20 *Erc20Session) DefaultGasPrice() (*big.Int, error)
- func (_Erc20 *Erc20Session) Description() (string, error)
- func (_Erc20 *Erc20Session) Name() (string, error)
- func (_Erc20 *Erc20Session) Symbol() (string, error)
- type Erc20Token
- type Erc20TokenSorter
- type Erc20Transactor
- type Erc20TransactorRaw
- type Erc20TransactorSession
- type Eth_token_transaction
- type Eth_transaction
- type Producer_info
- type Properties
- type TransactionHistorySorter
- type TransactionTokenHistorySorter
- type Vote_info
- type Vote_statistic
- type Vote_statisticSorter
- type Vote_statistic_header
Constants ¶
const ( BlockHeight = "/api/v1/block/height" BlockDetail = "/api/v1/block/details/height/" TransactionDetail = "/api/v1/transaction/" INCOME = "income" SPEND = "spend" ELA = 100000000 MINING_ADDR = "0000000000000000000000000000000000" ELA_ASSETID = "a3d0eaa466df74983b5d7c543de6904f4c9418ead5ffd6d25814234a96db37b0" )
const ( CoinBase int = iota RegisterAsset TransferAsset Record Deploy SideChainPow // cross chain transfer tx in did chain RechargeToSideChain // cross chain transfer tx in main chain WithdrawFromSideChain // cross chain transfer the initial chain TransferCrossChainAsset // register producer RegisterProducer // cancle producer CancelProducer // update producer UpdateProducer // return deposite coin ReturnDepositCoin // activate producer ActivateProducer //Vote transfer Vote )
const ( Nonce int = 0x00 Script int = 0x20 Memo int = 0x81 Description int = 0x90 DescriptionUrl int = 0x91 Confirmations int = 0x92 )
const Erc20ABI = "" /* 1063-byte string literal not displayed */
Erc20ABI is the input ABI used to generate the binding from.
Variables ¶
var (
Tokens = make([]interface{}, 0)
)
Functions ¶
func SyncHeight ¶
func SyncHeight() string
Types ¶
type Address_history ¶
type Address_history struct { History []Block_transaction_history TotalNum int }
type Block_header ¶
type Block_header struct { Hash string Size int64 Weight int64 Height int64 Version int64 Merkleroot string Time int64 Nonce int64 Bits int64 Difficulty string Chainwork string Previousblockhash string `json:previous_block_hash` Nextblockhash string `json:next_block_hash` Minerinfo string `json:miner_info` }
type Did_Property ¶
type Did_info ¶
type Did_info struct { Tag string Ver string Status interface{} Properties []Properties }
type Erc20 ¶
type Erc20 struct { Erc20Caller // Read-only binding to the contract Erc20Transactor // Write-only binding to the contract Erc20Filterer // Log filterer for contract events }
Erc20 is an auto generated Go binding around an Ethereum contract.
type Erc20Caller ¶
type Erc20Caller struct {
// contains filtered or unexported fields
}
Erc20Caller is an auto generated read-only Go binding around an Ethereum contract.
func NewErc20Caller ¶
func NewErc20Caller(address common.Address, caller bind.ContractCaller) (*Erc20Caller, error)
NewErc20Caller creates a new read-only instance of Erc20, bound to a specific deployed contract.
func (*Erc20Caller) Decimals ¶
func (_Erc20 *Erc20Caller) Decimals(opts *bind.CallOpts) (uint8, error)
Decimals is a free data retrieval call binding the contract method 0x313ce567.
Solidity: function decimals() constant returns(uint8)
func (*Erc20Caller) DefaultGasLimit ¶
DefaultGasLimit is a free data retrieval call binding the contract method 0x95368d2e.
Solidity: function defaultGasLimit() constant returns(uint256)
func (*Erc20Caller) DefaultGasPrice ¶
DefaultGasPrice is a free data retrieval call binding the contract method 0xe7b4294c.
Solidity: function defaultGasPrice() constant returns(uint256)
func (*Erc20Caller) Description ¶
func (_Erc20 *Erc20Caller) Description(opts *bind.CallOpts) (string, error)
Description is a free data retrieval call binding the contract method 0x7284e416.
Solidity: function description() constant returns(string)
type Erc20CallerRaw ¶
type Erc20CallerRaw struct {
Contract *Erc20Caller // Generic read-only contract binding to access the raw methods on
}
Erc20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*Erc20CallerRaw) Call ¶
func (_Erc20 *Erc20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
type Erc20CallerSession ¶
type Erc20CallerSession struct { Contract *Erc20Caller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
Erc20CallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
func (*Erc20CallerSession) Decimals ¶
func (_Erc20 *Erc20CallerSession) Decimals() (uint8, error)
Decimals is a free data retrieval call binding the contract method 0x313ce567.
Solidity: function decimals() constant returns(uint8)
func (*Erc20CallerSession) DefaultGasLimit ¶
func (_Erc20 *Erc20CallerSession) DefaultGasLimit() (*big.Int, error)
DefaultGasLimit is a free data retrieval call binding the contract method 0x95368d2e.
Solidity: function defaultGasLimit() constant returns(uint256)
func (*Erc20CallerSession) DefaultGasPrice ¶
func (_Erc20 *Erc20CallerSession) DefaultGasPrice() (*big.Int, error)
DefaultGasPrice is a free data retrieval call binding the contract method 0xe7b4294c.
Solidity: function defaultGasPrice() constant returns(uint256)
func (*Erc20CallerSession) Description ¶
func (_Erc20 *Erc20CallerSession) Description() (string, error)
Description is a free data retrieval call binding the contract method 0x7284e416.
Solidity: function description() constant returns(string)
func (*Erc20CallerSession) Name ¶
func (_Erc20 *Erc20CallerSession) Name() (string, error)
Name is a free data retrieval call binding the contract method 0x06fdde03.
Solidity: function name() constant returns(string)
func (*Erc20CallerSession) Symbol ¶
func (_Erc20 *Erc20CallerSession) Symbol() (string, error)
Symbol is a free data retrieval call binding the contract method 0x95d89b41.
Solidity: function symbol() constant returns(string)
type Erc20Filterer ¶
type Erc20Filterer struct {
// contains filtered or unexported fields
}
Erc20Filterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewErc20Filterer ¶
func NewErc20Filterer(address common.Address, filterer bind.ContractFilterer) (*Erc20Filterer, error)
NewErc20Filterer creates a new log filterer instance of Erc20, bound to a specific deployed contract.
type Erc20Raw ¶
type Erc20Raw struct {
Contract *Erc20 // Generic contract binding to access the raw methods on
}
Erc20Raw is an auto generated low-level Go binding around an Ethereum contract.
func (*Erc20Raw) Call ¶
func (_Erc20 *Erc20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
func (*Erc20Raw) Transact ¶
func (_Erc20 *Erc20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*Erc20Raw) Transfer ¶
func (_Erc20 *Erc20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type Erc20Session ¶
type Erc20Session struct { Contract *Erc20 // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
Erc20Session is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*Erc20Session) Decimals ¶
func (_Erc20 *Erc20Session) Decimals() (uint8, error)
Decimals is a free data retrieval call binding the contract method 0x313ce567.
Solidity: function decimals() constant returns(uint8)
func (*Erc20Session) DefaultGasLimit ¶
func (_Erc20 *Erc20Session) DefaultGasLimit() (*big.Int, error)
DefaultGasLimit is a free data retrieval call binding the contract method 0x95368d2e.
Solidity: function defaultGasLimit() constant returns(uint256)
func (*Erc20Session) DefaultGasPrice ¶
func (_Erc20 *Erc20Session) DefaultGasPrice() (*big.Int, error)
DefaultGasPrice is a free data retrieval call binding the contract method 0xe7b4294c.
Solidity: function defaultGasPrice() constant returns(uint256)
func (*Erc20Session) Description ¶
func (_Erc20 *Erc20Session) Description() (string, error)
Description is a free data retrieval call binding the contract method 0x7284e416.
Solidity: function description() constant returns(string)
func (*Erc20Session) Name ¶
func (_Erc20 *Erc20Session) Name() (string, error)
Name is a free data retrieval call binding the contract method 0x06fdde03.
Solidity: function name() constant returns(string)
func (*Erc20Session) Symbol ¶
func (_Erc20 *Erc20Session) Symbol() (string, error)
Symbol is a free data retrieval call binding the contract method 0x95d89b41.
Solidity: function symbol() constant returns(string)
type Erc20Token ¶
type Erc20Token struct { Address string `json:"address"` Name string `json:"name"` Symbol string `json:"symbol"` Decimals string `json:"decimals"` Height string `json:"height"` Description string `json:"description"` DefaultGasLimit string `json:"defaultGasLimit"` DefaultGasPrice string `json:"defaultGasPrice"` }
func GetTokenList ¶
func GetTokenList() ([]Erc20Token, error)
func (*Erc20Token) Deserialize ¶
func (token *Erc20Token) Deserialize(data []byte) error
func (*Erc20Token) Serialize ¶
func (token *Erc20Token) Serialize() []byte
type Erc20TokenSorter ¶
type Erc20TokenSorter []Erc20Token
func (Erc20TokenSorter) Len ¶
func (a Erc20TokenSorter) Len() int
func (Erc20TokenSorter) Less ¶
func (a Erc20TokenSorter) Less(i, j int) bool
func (Erc20TokenSorter) Swap ¶
func (a Erc20TokenSorter) Swap(i, j int)
type Erc20Transactor ¶
type Erc20Transactor struct {
// contains filtered or unexported fields
}
Erc20Transactor is an auto generated write-only Go binding around an Ethereum contract.
func NewErc20Transactor ¶
func NewErc20Transactor(address common.Address, transactor bind.ContractTransactor) (*Erc20Transactor, error)
NewErc20Transactor creates a new write-only instance of Erc20, bound to a specific deployed contract.
type Erc20TransactorRaw ¶
type Erc20TransactorRaw struct {
Contract *Erc20Transactor // Generic write-only contract binding to access the raw methods on
}
Erc20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*Erc20TransactorRaw) Transact ¶
func (_Erc20 *Erc20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*Erc20TransactorRaw) Transfer ¶
func (_Erc20 *Erc20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type Erc20TransactorSession ¶
type Erc20TransactorSession struct { Contract *Erc20Transactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
Erc20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.
type Eth_token_transaction ¶
type Eth_token_transaction struct { Address string `json:"address"` BlockNumber string `json:"blockNumber"` Data string `json:"data"` LogIndex string `json:"logIndex"` Topics []interface{} `json:"topics"` TransactionHash string `json:"transactionHash"` TransactionIndex string `json:"transactionIndex"` GasUsed string `json:"gasUsed"` GasPrice string `json:"gasPrice"` TimeStamp string `json:"timeStamp"` }
func GetEthTokenLogs ¶
func GetEthTokenLogs(from string, to string) ([]Eth_token_transaction, error)
func (*Eth_token_transaction) Deserialize ¶
func (tx *Eth_token_transaction) Deserialize(data []byte) error
func (*Eth_token_transaction) Serialize ¶
func (txt *Eth_token_transaction) Serialize() []byte
type Eth_transaction ¶
type Eth_transaction struct { BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` From string `json:"from"` Gas string `json:"gas"` To string `json:"to"` GasPrice string `json:"gasPrice"` Hash string `json:"hash"` Input string `json:"input"` Nonce string `json:"nonce"` TransactionIndex string `json:"transactionIndex"` Value string `json:"value"` GasUsed string `json:"gasUsed"` CumulativeGasUsed string `json:"cumulativeGasUsed"` IsError string `json:"isError"` ContractAddress string `json:"contractAddress"` Timestamp string `json:"timeStamp"` Confirmations string `json:"confirmations"` TransferType string `json:"transferType,omitempty"` }
func GetEthHistory ¶
func GetEthHistory(addr string) ([]Eth_transaction, error)
func (*Eth_transaction) Deserialize ¶
func (tx *Eth_transaction) Deserialize(data []byte) error
func (*Eth_transaction) Serialize ¶
func (tx *Eth_transaction) Serialize() []byte
type Producer_info ¶
type Properties ¶
type TransactionHistorySorter ¶
type TransactionHistorySorter []Eth_transaction
func (TransactionHistorySorter) Len ¶
func (a TransactionHistorySorter) Len() int
func (TransactionHistorySorter) Less ¶
func (a TransactionHistorySorter) Less(i, j int) bool
func (TransactionHistorySorter) Swap ¶
func (a TransactionHistorySorter) Swap(i, j int)
type TransactionTokenHistorySorter ¶
type TransactionTokenHistorySorter []Eth_token_transaction
func (TransactionTokenHistorySorter) Len ¶
func (a TransactionTokenHistorySorter) Len() int
func (TransactionTokenHistorySorter) Less ¶
func (a TransactionTokenHistorySorter) Less(i, j int) bool
func (TransactionTokenHistorySorter) Swap ¶
func (a TransactionTokenHistorySorter) Swap(i, j int)
type Vote_info ¶
type Vote_info struct { Producer_public_key string `json:",omitempty"` Vote_type string `json:",omitempty"` Txid string `json:",omitempty"` N int `json:",omitempty"` Value string `json:",omitempty"` Outputlock int `json:",omitempty"` Address string `json:",omitempty"` Block_time int64 `json:",omitempty"` Height int64 `json:",omitempty"` Rank int64 `json:",omitempty"` Producer_info `json:",omitempty"` Is_valid string `json:",omitempty"` Reward string `json:",omitempty"` EstRewardPerYear string `json:",omitempty"` }
type Vote_statistic ¶
type Vote_statistic struct { Vote_Header Vote_statistic_header `json:",omitempty"` Vote_Body []Vote_info `json:",omitempty"` }
type Vote_statisticSorter ¶
type Vote_statisticSorter []Vote_statistic
func (Vote_statisticSorter) Len ¶
func (a Vote_statisticSorter) Len() int
func (Vote_statisticSorter) Less ¶
func (a Vote_statisticSorter) Less(i, j int) bool
func (Vote_statisticSorter) Swap ¶
func (a Vote_statisticSorter) Swap(i, j int)