integration

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelBatch added in v0.0.7

func CancelBatch(
	t *testing.T,
	ctx context.Context, transactor *bind.TransactOpts, backend Backend,
	timelockContract *contracts.RBACTimelock, operationID [32]byte,
) (
	*types.Transaction, *types.Receipt,
)

func DeployCallProxy added in v0.0.7

func DeployCallProxy(
	t *testing.T, ctx context.Context, transactor *bind.TransactOpts, backend Backend, timelockAddress common.Address,
) (
	common.Address, *types.Transaction, *types.Receipt, *contracts.CallProxy,
)

func DeployStorage added in v0.0.7

func DeployStorage(
	t *testing.T, ctx context.Context, transactor *bind.TransactOpts, backend Backend,
) (
	common.Address, *types.Transaction, *types.Receipt, *test_contracts.StorageContract,
)

func DeployTimelock added in v0.0.7

func DeployTimelock(
	t *testing.T, ctx context.Context, transactor *bind.TransactOpts, backend Backend,
	adminAccount common.Address, minDelay *big.Int,
) (
	common.Address, *types.Transaction, *types.Receipt, *contracts.RBACTimelock,
)

func ExecuteBatch added in v0.0.7

func ExecuteBatch(
	t *testing.T, ctx context.Context, transactor *bind.TransactOpts, backend Backend,
	timelockContract *contracts.RBACTimelock, calls []contracts.RBACTimelockCall,
	predecessor [32]byte, salt [32]byte,
) (
	*types.Transaction, *types.Receipt,
)

func ScheduleBatch added in v0.0.7

func ScheduleBatch(
	t *testing.T,
	ctx context.Context, transactor *bind.TransactOpts, backend Backend,
	timelockContract *contracts.RBACTimelock, calls []contracts.RBACTimelockCall,
	predecessor [32]byte, salt [32]byte, delay *big.Int,
) (
	*types.Transaction, *types.Receipt,
)

func SendTransaction added in v0.0.7

func SendTransaction(
	t *testing.T, ctx context.Context, transactor *bind.TransactOpts, backend Backend,
	account TestAccount, chainID *big.Int, value *big.Int, to common.Address, data []byte,
)

func UpdateDelay added in v0.0.7

func UpdateDelay(
	t *testing.T, ctx context.Context, transactor *bind.TransactOpts, backend Backend,
	timelockContract *contracts.RBACTimelock, delay *big.Int,
) (
	*types.Transaction, *types.Receipt,
)

Types

type Backend added in v0.0.7

type Backend interface {
	simulated.Client
	Commit() common.Hash
}

func NewRPCBackend added in v0.0.7

func NewRPCBackend(t *testing.T, ctx context.Context, url string) Backend

func NewSimulatedBackend added in v0.0.7

func NewSimulatedBackend(t *testing.T, genesisAlloc types.GenesisAlloc) Backend

type TestAccount

type TestAccount struct {
	Address       common.Address
	HexAddress    string
	PrivateKey    *ecdsa.PrivateKey
	HexPrivateKey string
}

TestAccount is data type wrapping attributes typically needed when managing ethereum accounts.

func NewTestAccount

func NewTestAccount(t *testing.T) TestAccount

NewTestAccount generates a new ecdsa key and returns a TestAccount structure with the associated attributes.

func (TestAccount) String

func (ta TestAccount) String() string

Jump to

Keyboard shortcuts

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