Documentation ¶
Index ¶
- Constants
- func BuildGetTokenBalanceArgs(balanceOf xdr.ScAddress) (xdr.ScVec, error)
- func BuildInitTokenArgs(adminAddr xdr.ScAddress, decimals uint32, tokenName string, tokenSymbol string) (xdr.ScVec, error)
- func BuildTransferTokenArgs(from xdr.ScAddress, to xdr.ScAddress, amount xdr.Int128Parts) (xdr.ScVec, error)
- func CreateFundStellarAccounts(pairs []*keypair.Full, initialBalance string) error
- func Deploy(t *testing.T, kp *keypair.Full, contractPath string) (xdr.ScAddress, xdr.Hash)
- func FundAll(ctx context.Context, funders []*channel.Funder, reqs []*pchannel.FundingReq) error
- func GetTokenName(kp *keypair.Full, contractAddress xdr.ScAddress) error
- func InitTokenContract(kp *keypair.Full, contractIDAddress xdr.ScAddress) error
- func MakeRandPerunAcc() (*wallet.Account, *keypair.Full)
- func MakeRandPerunAccs(count int) ([]*wallet.Account, []*keypair.Full)
- func MintToken(kp *keypair.Full, contractAddr xdr.ScAddress, amount uint64, ...) error
- func NewParamsWithAddressStateWithAsset(t *testing.T, partsAddr []pwallet.Address, asset pchannel.Asset) (*pchannel.Params, *pchannel.State)
- func NewRandomStellarAsset() *types.StellarAsset
- func NewStellarClients(kps []*keypair.Full) []*env.StellarClient
- type Randomizer
- type Setup
- type TokenParams
Constants ¶
View Source
const ( PerunContractPath = "../testdata/perun_soroban_contract.wasm" StellarAssetContractPath = "../testdata/perun_soroban_token.wasm" DefaultTestTimeout = 200 )
Variables ¶
This section is empty.
Functions ¶
func BuildInitTokenArgs ¶
func BuildTransferTokenArgs ¶
func InitTokenContract ¶
func NewRandomStellarAsset ¶
func NewRandomStellarAsset() *types.StellarAsset
func NewStellarClients ¶
func NewStellarClients(kps []*keypair.Full) []*env.StellarClient
Types ¶
type Randomizer ¶
type Randomizer struct{}
func (*Randomizer) NewRandomAsset ¶
func (*Randomizer) NewRandomAsset(*rand.Rand) channel.Asset
type Setup ¶
func NewTestSetup ¶
func (*Setup) GetAccounts ¶
func (*Setup) GetAdjudicators ¶
func (s *Setup) GetAdjudicators() []*channel.Adjudicator
func (*Setup) GetFunders ¶
func (*Setup) GetStellarClients ¶
func (s *Setup) GetStellarClients() []*env.StellarClient
func (*Setup) GetTokenAsset ¶
type TokenParams ¶
type TokenParams struct {
// contains filtered or unexported fields
}
func NewTokenParams ¶
func NewTokenParams() *TokenParams
func (*TokenParams) GetDecimals ¶
func (t *TokenParams) GetDecimals() uint32
func (*TokenParams) GetName ¶
func (t *TokenParams) GetName() string
func (*TokenParams) GetSymbol ¶
func (t *TokenParams) GetSymbol() string
Click to show internal directories.
Click to hide internal directories.