vesting

package
v0.2.24-beta.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: MIT Imports: 6 Imported by: 3

Documentation

Overview

nolint

Index

Constants

View Source
const (
	// BaseGas is a cost of Parse and Verify methods.
	BaseGas1 = multisig.BaseGas1
	BaseGas2 = multisig.BaseGas1
	BaseGas3 = multisig.BaseGas1

	FixedGasSpawn1 = multisig.FixedGasSpawn1
	FixedGasSpawn2 = multisig.FixedGasSpawn2
	FixedGasSpawn3 = multisig.FixedGasSpawn3

	FixedGasSpend1 = multisig.FixedGasSpend1
	FixedGasSpend2 = multisig.FixedGasSpend2
	FixedGasSpend3 = multisig.FixedGasSpend3

	FixedGasDrainVault1 = 100
	FixedGasDrainVault2 = 200
	FixedGasDrainVault3 = 300
)
View Source
const MethodDrainVault = 17

MethodDrainVault is used to relay a call to drain a vault.

Variables

View Source
var (
	// TemplateAddress1 is an address for 1/n vesting wallet.
	TemplateAddress1 core.Address
	// TemplateAddress2 is an address for 2/n vesting wallet.
	TemplateAddress2 core.Address
	// TemplateAddress3 is an address for 3/n vesting wallet.
	TemplateAddress3 core.Address
)

Functions

func Register

func Register(reg *registry.Registry)

Register vesting templates.

Types

type DrainVaultArguments

type DrainVaultArguments struct {
	Vault core.Address
	vault.SpendArguments
}

DrainVaultArguments are arguments for drain vault method.

func (*DrainVaultArguments) DecodeScale

func (t *DrainVaultArguments) DecodeScale(dec *scale.Decoder) (total int, err error)

func (*DrainVaultArguments) EncodeScale

func (t *DrainVaultArguments) EncodeScale(enc *scale.Encoder) (total int, err error)

type Part

type Part = multisig.Part

Part of the multisig signature.

type Vesting

type Vesting struct {
	*multisig.MultiSig
}

Vesting is a mutlsig template that supports transaction to drain vault.

func (*Vesting) MaxSpend

func (v *Vesting) MaxSpend(method uint8, args any) (uint64, error)

MaxSpend returns zero for drain vault or forwards to multisig template.

Jump to

Keyboard shortcuts

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