multiAccountTest

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OfferDir       = "offerDir"
	NftDir         = "nftDir" //makeSell transfer withdraw
	Collection2Nft = "collection2Nft"
	NftTestTmp     = "/Users/user0/work/zecrey-marketplace-go-sdk/sdk/test/.nftTestTmp/"
	KeyDir         = "test_account_in_dev_count_1000/"
	TestNetwork    = "https://dev-legend-app.zecrey.com"
)

Variables

View Source
var MediaIndex int //from media dir

Functions

func StartTest

func StartTest(accountNum int, testType TxType)

Types

type AcceptOfferProcessor

type AcceptOfferProcessor struct {
	Repeat                int
	RandomNextOptionParam AcceptOfferRandomOptionParam
	RandomOptions         []AcceptOfferRandomOption
}

func NewAcceptOfferProcessor

func NewAcceptOfferProcessor(RandomOptions ...AcceptOfferRandomOption) *AcceptOfferProcessor

func (*AcceptOfferProcessor) End

func (c *AcceptOfferProcessor) End()

func (*AcceptOfferProcessor) Process

func (t *AcceptOfferProcessor) Process(ctx *Ctx) error

type AcceptOfferRandomOption

type AcceptOfferRandomOption func(t *AcceptOfferRandomOptionParam)

type AcceptOfferRandomOptionParam

type AcceptOfferRandomOptionParam struct {
	Repeat int
}

type CancelOfferProcessor

type CancelOfferProcessor struct {
	Repeat int
}

func NewCancelOfferProcessor

func NewCancelOfferProcessor(RandomOptions ...CancelOfferRandomOption) *CancelOfferProcessor

func (*CancelOfferProcessor) End

func (c *CancelOfferProcessor) End()

func (*CancelOfferProcessor) Process

func (t *CancelOfferProcessor) Process(ctx *Ctx) error

type CancelOfferRandomOption

type CancelOfferRandomOption func(t *CancelOfferRandomOptionParam)

type CancelOfferRandomOptionParam

type CancelOfferRandomOptionParam struct {
	Repeat int
}

type CreateCProcessor

type CreateCProcessor struct {
	Repeat int

	ShortName          string
	CategoryId         string
	CreatorEarningRate string
	Ops                []model.CollectionOption

	RandomOptions    []RandomOption
	RandomOptionNext RandomOptionParam
}

func NewCreateCollectionProcessor

func NewCreateCollectionProcessor(RandomOptions ...RandomOption) *CreateCProcessor

func (*CreateCProcessor) End

func (t *CreateCProcessor) End()

func (*CreateCProcessor) Process

func (t *CreateCProcessor) Process(ctx *Ctx) error

type Ctx

type Ctx struct {
	PrivateKey  string
	Client      *sdk.Client
	L1Addr      common.Address
	AccountInfo *legendSdk.RespGetAccountInfoByPubKey
	Seed        string
	Index       int
}

func GetCtx

func GetCtx(index int) *Ctx

func GetCtxAmber

func GetCtxAmber(index int) *Ctx

type ListOfferProcessor

type ListOfferProcessor struct {
	UseForAccept  bool
	Repeat        int
	AssetAmount   int64
	RandomOptions []ListOfferRandomOption
}

func NewlistOfferProcessor

func NewlistOfferProcessor(RandomOptions ...ListOfferRandomOption) *ListOfferProcessor

func (*ListOfferProcessor) End

func (t *ListOfferProcessor) End()

func (*ListOfferProcessor) Process

func (t *ListOfferProcessor) Process(ctx *Ctx) error

type ListOfferRandomOption

type ListOfferRandomOption func(t *ListOfferRandomOptionParam)

type ListOfferRandomOptionParam

type ListOfferRandomOptionParam struct {
	RandomAssetAmount bool
	UseForAccept      bool

	AssetAmountDefault int64
	Repeat             int
}

type MintNftProcessor

type MintNftProcessor struct {
	Repeat           int
	RandomOptions    []NftRandomOption
	RandomOptionNext NftRandomOptionParam

	NftUrl      string
	Name        string
	Description string
	Media       string
	Properties  string
	Levels      string
	Stats       string
}

func NewMintNftProcessor

func NewMintNftProcessor(RandomOptions ...NftRandomOption) *MintNftProcessor

func (*MintNftProcessor) End

func (c *MintNftProcessor) End()

func (*MintNftProcessor) Process

func (c *MintNftProcessor) Process(ctx *Ctx) error

Process to get medias from TestUploadMediaRepeat

type NftInfo

type NftInfo struct {
	AccountKeyIndex int
	PrivateKey      string
	NftId           int64
}

type NftRandomOption

type NftRandomOption func(t *NftRandomOptionParam)

func GetDefaultNftOption

func GetDefaultNftOption() NftRandomOption

type NftRandomOptionParam

type NftRandomOptionParam struct {
	RandomCollectionId bool
	RandomNftUrl       bool
	RandomName         bool
	RandomDescription  bool
	RandomMedia        bool
	RandomProperties   bool
	RandomLevels       bool
	RandomStats        bool

	Properties string
	Levels     string
	Stats      string
	Medias     []string
	Repeat     int
}

type OfferInfo

type OfferInfo struct {
	AccountKeyIndex int
	PrivateKey      string
	AssetAmount     string
	OfferId         int64
}

type Processor

type Processor interface {
	Process(tx *Ctx) error
	End()
}

type Processors

type Processors struct {
	// contains filtered or unexported fields
}

func GetProcessors

func GetProcessors() *Processors

type RandomOption

type RandomOption func(t *RandomOptionParam)

func GetDefaultOption

func GetDefaultOption() RandomOption

type RandomOptionParam

type RandomOptionParam struct {
	RandomShortName          bool
	RandomCategoryId         bool
	RandomCreatorEarningRate bool
	RandomOps                bool

	Ops                []model.CollectionOption
	CategoryId         int64
	CreatorEarningRate int64
	Repeat             int
}

type TransferNftRandomOption

type TransferNftRandomOption func(t *TransferNftRandomOptionParam)

type TransferNftRandomOptionParam

type TransferNftRandomOptionParam struct {
	ToAccountName string
	Repeat        int
}

type TransferProcessor

type TransferProcessor struct {
	Repeat           int
	ToAccountName    string
	RandomOptions    []TransferNftRandomOption
	RandomNextOption TransferNftRandomOptionParam
}

func NewTransferNftProcessor

func NewTransferNftProcessor(RandomOptions ...TransferNftRandomOption) *TransferProcessor

func (*TransferProcessor) End

func (c *TransferProcessor) End()

func (*TransferProcessor) Process

func (t *TransferProcessor) Process(ctx *Ctx) error

type TxType

type TxType int
const (
	TxTypeCreateCollection TxType = sdk.TxTypeCreateCollection // 11
	TxTypeMint             TxType = sdk.TxTypeMintNft          // 12
	TxTypeTransfer         TxType = sdk.TxTypeTransferNft      // 13
	TxTypeMatch            TxType = sdk.TxTypeAtomicMatch      // 14
	TxTypeCancelOffer      TxType = sdk.TxTypeCancelOffer      // 15
	TxTypeWithdrawNft      TxType = sdk.TxTypeWithdrawNft      // 16
	TxTypeListOffer        TxType = sdk.TxTypeOffer            // 19
)

type WithdrawNftRandomOption

type WithdrawNftRandomOption func(t *WithdrawNftRandomOptionParam)

type WithdrawNftRandomOptionParam

type WithdrawNftRandomOptionParam struct {
	Repeat int
}

type WithdrawProcessor

type WithdrawProcessor struct {
	Repeat            int
	RandomOptions     []WithdrawNftRandomOption
	RandomNextOptions WithdrawNftRandomOptionParam
}

func NewWithdrawNftProcessor

func NewWithdrawNftProcessor(RandomOptions ...WithdrawNftRandomOption) *WithdrawProcessor

func (*WithdrawProcessor) End

func (c *WithdrawProcessor) End()

func (*WithdrawProcessor) Process

func (t *WithdrawProcessor) Process(ctx *Ctx) error

Jump to

Keyboard shortcuts

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