Documentation ¶
Index ¶
- func GetKeyStore() (string, *strings.Reader)
- func GetKeyStoreReader() *strings.Reader
- type Blockchain
- func (b *Blockchain) GetLendingRelayer(coinAddress common.Address, contractAddress common.Address) (*LendingRInfo, error)
- func (b *Blockchain) GetLendingRelayers(registrationAddress common.Address, lendingAddress common.Address) ([]*LendingRInfo, error)
- func (b *Blockchain) GetRelayer(coinAddress common.Address, contractAddress common.Address) (*RInfo, error)
- func (b *Blockchain) GetRelayerCoinBaseByIndex(idx int64, contractAddress common.Address) (common.Address, error)
- func (b *Blockchain) GetRelayerCount(contractAddress common.Address) (*big.Int, error)
- func (b *Blockchain) GetRelayerResignStatus(contractAddress common.Address, coinbase common.Address) (*big.Int, error)
- func (b *Blockchain) GetRelayers(contractAddress common.Address) ([]*RInfo, error)
- func (b *Blockchain) GetTokenInfo(token common.Address, abi *abi.ABI) (*TokenInfo, error)
- func (b *Blockchain) GetTokenInfoEx(token common.Address, abiPath string) (*TokenInfo, error)
- func (b *Blockchain) RunContract(contractAddr common.Address, abi *abi.ABI, method string, args ...interface{}) (interface{}, error)
- type Corrateral
- type LendingPairToken
- type LendingRInfo
- type PairToken
- type RInfo
- type Relayer
- type Signer
- type TokenInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKeyStore ¶
GetKeyStore return passparser and keystore reader
func GetKeyStoreReader ¶
GetKeyStoreReader return reader for keystore
Types ¶
type Blockchain ¶
type Blockchain struct {
// contains filtered or unexported fields
}
Blockchain struct
func NewBlockchain ¶
NewBlockchain init
func (*Blockchain) GetLendingRelayer ¶ added in v1.2.0
func (b *Blockchain) GetLendingRelayer(coinAddress common.Address, contractAddress common.Address) (*LendingRInfo, error)
GetLendingRelayer return all lending pair in smart contract
func (*Blockchain) GetLendingRelayers ¶ added in v1.2.0
func (b *Blockchain) GetLendingRelayers(registrationAddress common.Address, lendingAddress common.Address) ([]*LendingRInfo, error)
func (*Blockchain) GetRelayer ¶
func (b *Blockchain) GetRelayer(coinAddress common.Address, contractAddress common.Address) (*RInfo, error)
GetRelayer return all tokens in smart contract
func (*Blockchain) GetRelayerCoinBaseByIndex ¶ added in v1.2.0
func (*Blockchain) GetRelayerCount ¶ added in v1.2.0
func (*Blockchain) GetRelayerResignStatus ¶ added in v1.2.0
func (*Blockchain) GetRelayers ¶ added in v1.2.0
func (b *Blockchain) GetRelayers(contractAddress common.Address) ([]*RInfo, error)
func (*Blockchain) GetTokenInfo ¶
GetTokenInfo return token info
func (*Blockchain) GetTokenInfoEx ¶
GetTokenInfoEx return token info
func (*Blockchain) RunContract ¶
func (b *Blockchain) RunContract(contractAddr common.Address, abi *abi.ABI, method string, args ...interface{}) (interface{}, error)
RunContract run smart contract
type Corrateral ¶ added in v1.2.0
type LendingPairToken ¶ added in v1.2.0
LendingPairToken lending pari
type LendingRInfo ¶ added in v1.2.0
type LendingRInfo struct { Address common.Address ColateralTokens map[common.Address]*TokenInfo LendingTokens map[common.Address]*TokenInfo LendingPairs []*LendingPairToken Fee uint16 }
LendingRInfo lending relayer info
type RInfo ¶
type RInfo struct { RID int Owner common.Address Deposit *big.Int Address common.Address Tokens map[common.Address]*TokenInfo Pairs []*PairToken Resign bool LockTime int MakeFee uint16 TakeFee uint16 }
RInfo struct
type Relayer ¶
type Relayer struct {
// contains filtered or unexported fields
}
Relayer get token
func NewRelayer ¶
func NewRelayer(rpcURL string, coinBase common.Address, relayerAddress common.Address, lendingRelayerAddress common.Address, ) *Relayer
NewRelayer init relayer
func (*Relayer) GetLending ¶ added in v1.2.0
func (r *Relayer) GetLending() (*LendingRInfo, error)
GetLending get relayer information
func (*Relayer) GetLendings ¶ added in v1.2.0
func (r *Relayer) GetLendings() ([]*LendingRInfo, error)
func (*Relayer) GetRelayer ¶
GetRelayer get relayer information
func (*Relayer) GetRelayers ¶ added in v1.2.0
type Signer ¶
type Signer struct { Keystore string `json:"keystore_path"` Passphrase string `json:"passphrase"` // contains filtered or unexported fields }
func NewSignerFile ¶
func (*Signer) GetAddress ¶
func (*Signer) GetTransactOpts ¶
func (self *Signer) GetTransactOpts() *bind.TransactOpts
func (*Signer) Sign ¶
func (self *Signer) Sign(tx *types.Transaction) (*types.Transaction, error)
Click to show internal directories.
Click to hide internal directories.