test

package module
v0.0.0-...-272df6c Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Unlicense Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CadenceBool

func CadenceBool(value bool) cadence.Bool

CadenceBool returns a bool value from a bool

func CadenceString

func CadenceString(value string) cadence.Value

CadenceString returns a string value from a string representation

func CadenceUFix64

func CadenceUFix64(value string) cadence.Value

CadenceUFix64 returns a UFix64 value from a string representation

func CadenceUInt64

func CadenceUInt64(value uint64) cadence.Value

CadenceUInt64 returns a UInt64 value from a uint64

func CadenceUInt8

func CadenceUInt8(value uint8) cadence.Value

CadenceUInt8 returns a UInt8 value from a uint8

func Submit

func Submit(
	t *testing.T,
	b emulator.Emulator,
	tx *flow.Transaction,
	shouldRevert bool,
) *types.TransactionResult

Submit submits a transaction and checks if it fails or not, based on shouldRevert specification

Types

type CandidateNodes

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

type Cluster

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

/ Used to verify the values of the clusters in the smart contract

type ConfigMetadata

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

/ Used to verify the configurable Epoch metadata in tests

type DelegatorIDs

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

Struct for each delegator that specifies their node ID and delegator ID

type EpochCommit

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

/ Used to verify the EpochCommit event fields in tests

type EpochCommitEvent

type EpochCommitEvent flow.Event

func (EpochCommitEvent) Counter

func (evt EpochCommitEvent) Counter() cadence.UInt64

type EpochMetadata

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

/ Used to verify epoch metadata in tests

type EpochSetup

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

/ Used to verify the EpochSetup event fields in tests

type EpochSetupEvent

type EpochSetupEvent flow.Event

func (EpochSetupEvent) Counter

func (evt EpochSetupEvent) Counter() cadence.UInt64

func (EpochSetupEvent) NodeInfo

func (evt EpochSetupEvent) NodeInfo() cadence.Array

type EpochStart

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

/ Used to verify the EpochStart event fields in tests

type EpochStartEvent

type EpochStartEvent flow.Event

func (EpochStartEvent) Counter

func (evt EpochStartEvent) Counter() cadence.UInt64

type EpochTimingConfig

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

EpochTimingConfig is used to verify timing config stored on-chain.

type EpochTotalRewardsPaid

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

/ Used to verify the EpochSetup event fields in tests

type EpochTotalRewardsPaidEvent

type EpochTotalRewardsPaidEvent flow.Event

func (EpochTotalRewardsPaidEvent) FeesBurned

func (evt EpochTotalRewardsPaidEvent) FeesBurned() cadence.UFix64

func (EpochTotalRewardsPaidEvent) FromFees

func (evt EpochTotalRewardsPaidEvent) FromFees() cadence.UFix64

func (EpochTotalRewardsPaidEvent) Minted

func (EpochTotalRewardsPaidEvent) Total

type MachineAccountCreatedEvent

type MachineAccountCreatedEvent interface {
	NodeID() cadence.String
	Role() cadence.UInt8
	Address() flow.Address
}

type SharedAccountRegisteredEvent

type SharedAccountRegisteredEvent interface {
	Address() flow.Address
}

type StakingCollectionInfo

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

/ Used to verify staking collection info in tests

type StakingInfo

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

/ Used to verify staking info in tests

type UnlockedAccountRegisteredEvent

type UnlockedAccountRegisteredEvent interface {
	Address() flow.Address
}

Unlocked account Registered event

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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