op

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const SysCtrPropExpTime = 5 * 60
View Source
const TicketBpBonusActors = 30

Variables

This section is empty.

Functions

func Apply

func Apply(d *dandelion.Dandelion, caller, owner, contract, method, jsonParams string, amount uint64) *prototype.TransactionReceiptWithInfo

func ApplyError

func ApplyError(t *testing.T, d *dandelion.Dandelion, call string)

func ApplyGas

func ApplyGas(t *testing.T, d *dandelion.Dandelion, cpu uint64, call string)

func ApplyNoError

func ApplyNoError(t *testing.T, d *dandelion.Dandelion, call string)

func ApplyNoErrorWithConsole

func ApplyNoErrorWithConsole(t *testing.T, d *dandelion.Dandelion, call string, console string)

func BytesToJson

func BytesToJson(data []byte) string

func ContractCodeAndAbi

func ContractCodeAndAbi(contract string) (code, abi []byte, err error)

func CreateContractOwner

func CreateContractOwner(owner string, d *dandelion.Dandelion) error

func Deploy

func Deploy(d *dandelion.Dandelion, owner, contract string) (err error)

func DeploySystemContract

func DeploySystemContract(owner string, contract string, d *dandelion.Dandelion) error

func GetDefChainProps

func GetDefChainProps() *prototype.ChainProperties

func GetNewMemo

func GetNewMemo(old string) string

func ISqrt

func ISqrt(n uint64) uint64

func InsufficientBpVote

func InsufficientBpVote(t *testing.T, d *dandelion.Dandelion, contract string, admin string,
	bpList []*dandelion.DandelionAccount)

func IntsToJson

func IntsToJson(data []int) string

func MultipleProposals

func MultipleProposals(t *testing.T, d *dandelion.Dandelion, contract string,
	bpList []*dandelion.DandelionAccount)

func NewContractGasTest

func NewContractGasTest(seed uint32, cpu uint64) func(*testing.T)

func NewDandelionContractTest

func NewDandelionContractTest(f func(*testing.T, *dandelion.Dandelion), actors int, contracts ...string) func(*testing.T)

func NoApply

func NoApply(t *testing.T, d *dandelion.Dandelion, call string)

func NonBpProposalAdmin

func NonBpProposalAdmin(t *testing.T, d *dandelion.Dandelion, caller string, bp string, contract string)

func NonBpVote

func NonBpVote(t *testing.T, d *dandelion.Dandelion, contract string, admin string,
	bpList []*dandelion.DandelionAccount, nonBpList []*dandelion.DandelionAccount)

func PostArticle

func PostArticle(author *dandelion.DandelionAccount, title string, content string, tags []string, d *dandelion.Dandelion) (uint64, error)

func ProposalWrongBp

func ProposalWrongBp(t *testing.T, d *dandelion.Dandelion, bp string, contract string)

func ReachThresholdWhenExpire

func ReachThresholdWhenExpire(t *testing.T, d *dandelion.Dandelion, contract string, admin string,
	bpList []*dandelion.DandelionAccount)

func RegisterBp

func RegisterBp(list []*dandelion.DandelionAccount, d *dandelion.Dandelion) error

func RepeatVote

func RepeatVote(t *testing.T, d *dandelion.Dandelion, contract string,
	bpList []*dandelion.DandelionAccount, admin string)

func ReplyArticle

func ReplyArticle(author *dandelion.DandelionAccount, parentId uint64, content string) (uint64, error)

func StakeFund

func StakeFund(d *dandelion.Dandelion, actors int) error

func StringsToJson

func StringsToJson(ss []string) string

func Vest2VotePower

func Vest2VotePower(d *Dandelion, vest uint64) uint64

func VoteToPost

func VoteToPost(author *dandelion.DandelionAccount, postId uint64) error

Types

type AccountCreateTester

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

func (*AccountCreateTester) Test

func (tester *AccountCreateTester) Test(t *testing.T, d *Dandelion)

type AccountUpdateTester

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

func (*AccountUpdateTester) Test

func (tester *AccountUpdateTester) Test(t *testing.T, d *Dandelion)

type BpTest

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

func (*BpTest) TestDuplicate

func (tester *BpTest) TestDuplicate(t *testing.T, d *Dandelion)

func (*BpTest) TestGlobalProperty

func (tester *BpTest) TestGlobalProperty(t *testing.T, d *Dandelion)

func (*BpTest) TestNormal

func (tester *BpTest) TestNormal(t *testing.T, d *Dandelion)

func (*BpTest) TestSwitch

func (tester *BpTest) TestSwitch(t *testing.T, d *Dandelion)

type ContractDeployTester

type ContractDeployTester struct{}

func (*ContractDeployTester) Test

func (tester *ContractDeployTester) Test(t *testing.T, d *Dandelion)

type ContractGasTester

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

func NewContractGasTester

func NewContractGasTester(seed uint32, cpu uint64) *ContractGasTester

func (*ContractGasTester) Test

func (tester *ContractGasTester) Test(t *testing.T, d *Dandelion)

type ContractLimitsTester

type ContractLimitsTester struct{}

func (*ContractLimitsTester) Test

func (tester *ContractLimitsTester) Test(t *testing.T, d *Dandelion)

type ContractTester

type ContractTester struct{}

func (*ContractTester) Test

func (tester *ContractTester) Test(t *testing.T, d *Dandelion)

type ConvertVestTester

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

func (*ConvertVestTester) Reset

func (tester *ConvertVestTester) Reset(t *testing.T, d *Dandelion)

func (*ConvertVestTester) Test

func (tester *ConvertVestTester) Test(t *testing.T, d *Dandelion)

type CopyrightTester

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

func (*CopyrightTester) Test

func (tester *CopyrightTester) Test(t *testing.T, d *Dandelion)

type FollowTester

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

func (*FollowTester) Test

func (tester *FollowTester) Test(t *testing.T, d *Dandelion)

type FreezeTester

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

func (*FreezeTester) Test

func (tester *FreezeTester) Test(t *testing.T, d *Dandelion)

type PostTest

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

func (*PostTest) Test

func (tester *PostTest) Test(t *testing.T, d *Dandelion)

type ReplyTest

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

func (*ReplyTest) Test

func (tester *ReplyTest) Test(t *testing.T, d *Dandelion)

type ReputationTester

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

func (*ReputationTester) Test

func (tester *ReputationTester) Test(t *testing.T, d *Dandelion)

type StakeTester

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

func (*StakeTester) Test

func (tester *StakeTester) Test(t *testing.T, d *Dandelion)

type StaminaType

type StaminaType int
const (
	FREE  StaminaType = 0
	STAKE StaminaType = 1
)

type TicketBpBonusTester

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

func (*TicketBpBonusTester) Test

func (tester *TicketBpBonusTester) Test(t *testing.T, d *Dandelion)

type TicketTester

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

func (*TicketTester) Test

func (tester *TicketTester) Test(t *testing.T, d *Dandelion)

type TransferTester

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

func (*TransferTester) Test

func (tester *TransferTester) Test(t *testing.T, d *Dandelion)

type TransferToVestTester

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

func (*TransferToVestTester) Test

func (tester *TransferToVestTester) Test(t *testing.T, d *Dandelion)

type UnStakeTester

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

func (*UnStakeTester) Test

func (tester *UnStakeTester) Test(t *testing.T, d *Dandelion)

type VoteTester

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

func (*VoteTester) TestNormal

func (tester *VoteTester) TestNormal(t *testing.T, d *Dandelion)

func (*VoteTester) TestRevote

func (tester *VoteTester) TestRevote(t *testing.T, d *Dandelion)

func (*VoteTester) TestVoteAfterCashout

func (tester *VoteTester) TestVoteAfterCashout(t *testing.T, d *Dandelion)

func (*VoteTester) TestZeroPower

func (tester *VoteTester) TestZeroPower(t *testing.T, d *Dandelion)

Jump to

Keyboard shortcuts

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