singleAccountTest

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: 13 Imported by: 0

README

Zecrey nft Concurrent test

Within 30 minutes, the number of transactions sent increased gradually from 1000 to 30000

The test is divided into two modules

Expectations are correct:

This module is not necessarily correct, and there is competition with each other

Expected failure:

This module will test the wrong form of each parameter, which must be wrong

Running

Before running, configure the 'config. yaml' file. Except for the fields beginning with BoundaryStr, the correct values are required to be written in the file

Start the main.go file under the test file directly

    go run ./mian.go

Operating instructions:

  1. Start the go process incrementally through the host to test the concurrency. If there is no abnormality in the nft background within 30 minutes, the test can be considered as passed
  2. Output the log to the log file and check whether it meets the expectation by checking the log

Documentation

Index

Constants

View Source
const (
	DefaultGasLimit = 5000000
	NameSuffix      = ".zec"
	MinGasFee       = 100000000000000 // 0.0001BNB

	BNBAssetId = 0
	LEGAssetId = 1
	PerMinute  = 1000
)

Variables

View Source
var Client *sdk.Client
View Source
var ConfigFile = flag.String("f",
	"/Users/user0/work/zecrey-marketplace-go-sdk/sdk/test/config.yaml", "the config file")

Functions

func AcceptOfferWrongBatch

func AcceptOfferWrongBatch(index int)

func CreateCollectionCorrectBatch

func CreateCollectionCorrectBatch(index int)

func CreateCollectionWrongBatch

func CreateCollectionWrongBatch(index int)

func MakeBuyOfferCorrect

func MakeBuyOfferCorrect(index int)

func MakeOfferCorrectBatch

func MakeOfferCorrectBatch(index int)

func MakeOfferWrongBatch

func MakeOfferWrongBatch(index int)

func MintNftCorrectOnce

func MintNftCorrectOnce(index int)

MintNftCorrectOnce nft media just once chance

func MintNftCorrectWrongBatch

func MintNftCorrectWrongBatch(index int)

func SignAndSendCreateCollectionTx

func SignAndSendCreateCollectionTx(keyManager sdk.KeyManager, tx *sdk.CreateCollectionTxInfo, ShortName string, CategoryId string, CreatorEarningRate string, ops ...model.CollectionOption) (*sdk.RespCreateCollection, error)

func SignAndSendMintNftTx

func SignAndSendMintNftTx(CollectionId, NftUrl, Name, Description, Media, _PropertiesByte, _LevelsByte, _StatsByte string, txInfo *sdk.MintNftTxInfo) (*sdk.RespCreateAsset, error)

func SignAndSendTransferNftTx

func SignAndSendTransferNftTx(keyManager sdk.KeyManager, AssetId, txInfoSdk string) (*sdk.RespSendTransferNft, error)

func TransferNftCorrectOnce

func TransferNftCorrectOnce(index int)

func TransferNftWrongBatch

func TransferNftWrongBatch(index int)

func WithdrawNftCorrectOnce

func WithdrawNftCorrectOnce(index int)

func WithdrawNftWrongBatch

func WithdrawNftWrongBatch(index int)

Types

type Config

type Config struct {
	AccountName        string
	ShortName          string
	Seed               string
	CategoryId         string
	CollectionUrl      string
	ExternalLink       string
	TwitterLink        string
	InstagramLink      string
	TelegramLink       string
	DiscordLink        string
	LogoImage          string
	FeaturedImage      string
	BannerImage        string
	Description        string
	CreatorEarningRate string
	BoundaryStr        string
	BoundaryStr2       string
	BoundaryStr3       string
	NftDescription     string
	Properties         string
	Levels             string
	Stats              string
	CollectionId       int64
	NftName            string
	NftUrl             string
	NftMedia           string
	NftMediaWrong      string
	SellAssetId        int64
	BuyAssetId         int64
	WithdrawAssetId    int64
	TransferAssetId    int64
	Tol1Address        string
	ToAccountName      string
	AssetAmount        int64
}
var Cfg Config

type MintNftTxInfo

type MintNftTxInfo struct {
	CollectionId string
	NftUrl       string
	Name         string
	Description  string
	Media        string
	Properties   string
	Levels       string
	Stats        string
}

type TransferNftTxInfo

type TransferNftTxInfo struct {
	ToAccountName,
	AssetId string
}

Jump to

Keyboard shortcuts

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