Documentation
¶
Index ¶
- Constants
- Variables
- func InitEnv(t *testing.T, configFilePath string)
- func TestXXXXAttack(t *testing.T)
- func TestXXXXEdge(t *testing.T)
- func TestXXXXException(t *testing.T)
- func TestXXXXRight(t *testing.T)
- type Account
- type BalanceData
- type BalanceProofForContract
- type BalanceProofUpdateForContracts
- type CoOperativeSettleForContracts
- type Env
- type UnlockDelegateForContract
- type WithDrawForContract
Constants ¶
View Source
const ChannelStateClosed uint8 = 2
ChannelStateClosed :
View Source
const ChannelStateOpened uint8 = 1
ChannelStateOpened :
View Source
const ChannelStateSettledOrNotExist uint8 = 0
ChannelStateSettledOrNotExist :
View Source
const EmptyBalanceHash = "000000000000000000000000000000000000000000000000"
EmptyBalanceHash :
Variables ¶
View Source
var EmptyAccountAddress = common.HexToAddress("0x0000000000000000000000000000000000000000")
EmptyAccountAddress :
View Source
var FakeAccountAddress = common.HexToAddress("0x03432")
FakeAccountAddress :
View Source
var TestSettleTimeoutMax uint64 = 2700000
TestSettleTimeoutMax :
View Source
var TestSettleTimeoutMin uint64 = 6
TestSettleTimeoutMin :
Functions ¶
Types ¶
type Account ¶
type Account struct {
Address common.Address
Key *ecdsa.PrivateKey
Auth *bind.TransactOpts
}
Account :
type BalanceData ¶
BalanceData of contract
type BalanceProofForContract ¶
type BalanceProofForContract struct {
AdditionalHash common.Hash
ChannelIdentifier contracts.ChannelIdentifier
TokenNetworkAddress common.Address
ChainID *big.Int
Signature []byte
OpenBlockNumber uint64
Nonce uint64
BalanceData
}
BalanceProofForContract for contract
type BalanceProofUpdateForContracts ¶
type BalanceProofUpdateForContracts struct {
BalanceProofForContract
NonClosingSignature []byte
}
BalanceProofUpdateForContracts :
type CoOperativeSettleForContracts ¶
type CoOperativeSettleForContracts struct {
Particiant1 common.Address
Participant2 common.Address
Participant1Balance *big.Int
Participant2Balance *big.Int
ChannelIdentifier contracts.ChannelIdentifier
OpenBlockNumber uint64
TokenNetworkAddress common.Address
ChainID *big.Int
}
CoOperativeSettleForContracts : param for CoOperativeSettle
type Env ¶
type Env struct {
KeystorePath string
EthRPCEndpoint string
TokenAddress common.Address
Token *contracts.Token
TokenNetworkAddress common.Address
TokenNetwork *contracts.TokensNetwork
Client *ethclient.Client
SecretRegistryAddress common.Address
SecretRegistry *contracts.SecretRegistry
Accounts []*Account
// contains filtered or unexported fields
}
Env :
type UnlockDelegateForContract ¶
type UnlockDelegateForContract struct {
Agent common.Address
Expiraition int64
Amount *big.Int
SecretHash common.Hash
ChannelIdentifier contracts.ChannelIdentifier
ChainID *big.Int
OpenBlockNumber uint64
MerkleProof []byte
}
UnlockDelegateForContract :
type WithDrawForContract ¶
type WithDrawForContract struct {
Participant1 common.Address
Participant2 common.Address
Participant1Deposit *big.Int
Participant1Withdraw *big.Int
ChannelIdentifier contracts.ChannelIdentifier
OpenBlockNumber uint64
TokenNetworkAddress common.Address
ChainID *big.Int
}
WithDrawForContract : param for withdraw 1
Click to show internal directories.
Click to hide internal directories.