deposit

package
v0.9.15 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const XNS = "XNS"

Variables

This section is empty.

Functions

func INSCONSTRUCTOR_New

func INSCONSTRUCTOR_New(data []byte) ([]byte, []byte, error)

func INSMETHOD_Accept

func INSMETHOD_Accept(object []byte, data []byte) ([]byte, []byte, error)

func INSMETHOD_Confirm

func INSMETHOD_Confirm(object []byte, data []byte) ([]byte, []byte, error)

func INSMETHOD_GetAmount

func INSMETHOD_GetAmount(object []byte, data []byte) ([]byte, []byte, error)

func INSMETHOD_GetCode

func INSMETHOD_GetCode(object []byte, data []byte) ([]byte, []byte, error)

func INSMETHOD_GetPrototype

func INSMETHOD_GetPrototype(object []byte, data []byte) ([]byte, []byte, error)

func INSMETHOD_GetPulseUnHold

func INSMETHOD_GetPulseUnHold(object []byte, data []byte) ([]byte, []byte, error)

func INSMETHOD_GetTxHash

func INSMETHOD_GetTxHash(object []byte, data []byte) ([]byte, []byte, error)

func INSMETHOD_Itself

func INSMETHOD_Itself(object []byte, data []byte) ([]byte, []byte, error)

func INSMETHOD_Transfer

func INSMETHOD_Transfer(object []byte, data []byte) ([]byte, []byte, error)

func INS_META_INFO

func INS_META_INFO() []map[string]string

func Initialize

func Initialize() XXX_insolar.ContractWrapper

Types

type DaemonConfirm added in v0.9.9

type DaemonConfirm struct {
	Reference string `json:"reference"`
	Amount    string `json:"amount"`
}

type Deposit

type Deposit struct {
	foundation.BaseContract
	Balance                 string                 `json:"balance"`
	PulseDepositUnHold      insolar.PulseNumber    `json:"holdReleaseDate"`
	MigrationDaemonConfirms foundation.StableMap   `json:"confirmerReferences"`
	Amount                  string                 `json:"amount"`
	TxHash                  string                 `json:"ethTxHash"`
	VestingType             foundation.VestingType `json:"vestingType"`
	MaturePulse             insolar.PulseNumber    `json:"maturePulse"`
	Lockup                  int64                  `json:"lockupInPulses"`
	Vesting                 int64                  `json:"vestingInPulses"`
	VestingStep             int64                  `json:"vestingStepInPulses"`
}

Deposit is like wallet. It holds migrated money.

func New

func New(migrationDaemonRef insolar.Reference, txHash string, amount string,
	lockup int64, vesting int64, vestingStep int64) (*Deposit, error)

New creates new deposit.

func (*Deposit) Accept

func (d *Deposit) Accept(amountStr string) error

Accept accepts transfer to balance. ins:saga(INS_FLAG_NO_ROLLBACK_METHOD)

func (*Deposit) Confirm

func (d *Deposit) Confirm(migrationDaemonRef string, txHash string, amountStr string) error

Confirm adds confirm for deposit by migration daemon.

func (*Deposit) GetAmount

func (d *Deposit) GetAmount() (string, error)

GetAmount gets amount. ins:immutable

func (*Deposit) GetPulseUnHold

func (d *Deposit) GetPulseUnHold() (insolar.PulseNumber, error)

Return pulse of unhold deposit. ins:immutable

func (*Deposit) GetTxHash

func (d *Deposit) GetTxHash() (string, error)

GetTxHash gets transaction hash.

func (*Deposit) Itself

func (d *Deposit) Itself() (interface{}, error)

Itself gets deposit information. ins:immutable

func (*Deposit) Transfer

func (d *Deposit) Transfer(amountStr string, memberRef insolar.Reference) (interface{}, error)

Transfer transfers money from deposit to wallet. It can be called only after deposit hold period.

type DepositOut added in v0.9.9

type DepositOut struct {
	Balance                 string                 `json:"balance"`
	PulseDepositUnHold      insolar.PulseNumber    `json:"holdReleaseDate"`
	MigrationDaemonConfirms []DaemonConfirm        `json:"confirmerReferences"`
	Amount                  string                 `json:"amount"`
	TxHash                  string                 `json:"ethTxHash"`
	VestingType             foundation.VestingType `json:"vestingType"`
	MaturePulse             insolar.PulseNumber    `json:"maturePulse"`
	Lockup                  int64                  `json:"lockupInPulses"`
	Vesting                 int64                  `json:"vestingInPulses"`
	VestingStep             int64                  `json:"vestingStepInPulses"`
}

Form of Deposit that is applied in API

Jump to

Keyboard shortcuts

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