testutils

package
v0.15.16 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTestTransactions

func GetTestTransactions[C, P any](t *testing.T, network *utils.Network, factories ...factory[C, P]) ([]C, []P)

func StripCompilerFields

func StripCompilerFields(t *testing.T, class core.ClassDefinition)

StripCompilerFields strips the some fields related to compiler in the compiled class. It's due to the difference between the expected compiler version and the actual compiler version.

Types

type SyncTransactionBuilder added in v0.15.9

type SyncTransactionBuilder[C, P any] struct {
	ToCore         toCoreType[C]
	ToP2PDeclareV0 toP2PType[P, *synctransaction.TransactionInBlock_DeclareV0WithoutClass]
	ToP2PDeclareV1 toP2PType[P, *synctransaction.TransactionInBlock_DeclareV1WithoutClass]
	ToP2PDeclareV2 toP2PType[P, *synctransaction.TransactionInBlock_DeclareV2WithoutClass]
	ToP2PDeclareV3 toP2PType[P, *synctransaction.TransactionInBlock_DeclareV3WithoutClass]
	ToP2PDeployV0  toP2PType[P, *synctransaction.TransactionInBlock_Deploy]
	ToP2PDeployV1  toP2PType[P, *synctransaction.TransactionInBlock_DeployAccountV1]
	ToP2PDeployV3  toP2PType[P, *synctransaction.TransactionInBlock_DeployAccountV3]
	ToP2PInvokeV0  toP2PType[P, *synctransaction.TransactionInBlock_InvokeV0]
	ToP2PInvokeV1  toP2PType[P, *synctransaction.TransactionInBlock_InvokeV1]
	ToP2PInvokeV3  toP2PType[P, *synctransaction.TransactionInBlock_InvokeV3]
	ToP2PL1Handler toP2PType[P, *synctransaction.TransactionInBlock_L1Handler]
}

func (*SyncTransactionBuilder[C, P]) GetTestDeclareV0Transaction added in v0.15.9

func (b *SyncTransactionBuilder[C, P]) GetTestDeclareV0Transaction(
	t *testing.T,
	network *utils.Network,
) (C, P)

func (*SyncTransactionBuilder[C, P]) GetTestDeclareV1Transaction added in v0.15.9

func (b *SyncTransactionBuilder[C, P]) GetTestDeclareV1Transaction(
	t *testing.T,
	network *utils.Network,
) (C, P)

func (*SyncTransactionBuilder[C, P]) GetTestDeclareV2Transaction added in v0.15.9

func (b *SyncTransactionBuilder[C, P]) GetTestDeclareV2Transaction(
	t *testing.T,
	network *utils.Network,
) (C, P)

func (*SyncTransactionBuilder[C, P]) GetTestDeclareV3Transaction added in v0.15.9

func (b *SyncTransactionBuilder[C, P]) GetTestDeclareV3Transaction(
	t *testing.T,
	network *utils.Network,
) (C, P)

func (*SyncTransactionBuilder[C, P]) GetTestDeployAccountTransactionV1 added in v0.15.9

func (b *SyncTransactionBuilder[C, P]) GetTestDeployAccountTransactionV1(
	t *testing.T,
	network *utils.Network,
) (C, P)

func (*SyncTransactionBuilder[C, P]) GetTestDeployAccountTransactionV3 added in v0.15.9

func (b *SyncTransactionBuilder[C, P]) GetTestDeployAccountTransactionV3(
	t *testing.T,
	network *utils.Network,
) (C, P)

func (*SyncTransactionBuilder[C, P]) GetTestDeployTransactionV0 added in v0.15.9

func (b *SyncTransactionBuilder[C, P]) GetTestDeployTransactionV0(
	t *testing.T,
	network *utils.Network,
) (C, P)

func (*SyncTransactionBuilder[C, P]) GetTestInvokeTransactionV0 added in v0.15.9

func (b *SyncTransactionBuilder[C, P]) GetTestInvokeTransactionV0(
	t *testing.T,
	network *utils.Network,
) (C, P)

func (*SyncTransactionBuilder[C, P]) GetTestInvokeTransactionV1 added in v0.15.9

func (b *SyncTransactionBuilder[C, P]) GetTestInvokeTransactionV1(
	t *testing.T,
	network *utils.Network,
) (C, P)

func (*SyncTransactionBuilder[C, P]) GetTestInvokeTransactionV3 added in v0.15.9

func (b *SyncTransactionBuilder[C, P]) GetTestInvokeTransactionV3(
	t *testing.T,
	network *utils.Network,
) (C, P)

func (*SyncTransactionBuilder[C, P]) GetTestL1HandlerTransaction added in v0.15.9

func (b *SyncTransactionBuilder[C, P]) GetTestL1HandlerTransaction(
	t *testing.T,
	network *utils.Network,
) (C, P)

type TransactionBuilder

type TransactionBuilder[C, P any] struct {
	ToCore         toCoreType[C]
	ToP2PDeclareV3 toP2PType[P, *transaction.DeclareV3WithClass]
	ToP2PDeploy    toP2PType[P, *transaction.DeployAccountV3]
	ToP2PInvoke    toP2PType[P, *transaction.InvokeV3]
	ToP2PL1Handler toP2PType[P, *transaction.L1HandlerV0]
}

func (*TransactionBuilder[C, P]) GetTestDeclareTransaction

func (b *TransactionBuilder[C, P]) GetTestDeclareTransaction(t *testing.T, network *utils.Network) (C, P)

func (*TransactionBuilder[C, P]) GetTestDeployAccountTransaction

func (b *TransactionBuilder[C, P]) GetTestDeployAccountTransaction(t *testing.T, network *utils.Network) (C, P)

func (*TransactionBuilder[C, P]) GetTestInvokeTransaction

func (b *TransactionBuilder[C, P]) GetTestInvokeTransaction(t *testing.T, network *utils.Network) (C, P)

func (*TransactionBuilder[C, P]) GetTestL1HandlerTransaction

func (b *TransactionBuilder[C, P]) GetTestL1HandlerTransaction(t *testing.T, network *utils.Network) (C, P)

Jump to

Keyboard shortcuts

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