dao

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DaoDepositCellInfo added in v0.101.6

type DaoDepositCellInfo struct {
	Outpoint            types.OutPoint
	WithdrawBlockHash   types.Hash
	WithdrawBlockNumber uint64
	DepositCapacity     uint64
	Compensation        uint64
	UnlockableEpoch     types.EpochParams
}

type DaoHelper added in v0.101.6

type DaoHelper struct {
	Client rpc.Client
}

func (*DaoHelper) GetDaoDepositCellInfo added in v0.101.6

func (c *DaoHelper) GetDaoDepositCellInfo(outpoint *types.OutPoint, withdrawBlockHash *types.Hash) (DaoDepositCellInfo, error)

GetDaoDepositCellInfo Get information for DAO cell deposited as outpoint and withdrawn in block of withdrawBlockHash

func (*DaoHelper) GetDaoDepositCellInfoByNow added in v0.101.6

func (c *DaoHelper) GetDaoDepositCellInfoByNow(outpoint *types.OutPoint) (DaoDepositCellInfo, error)

GetDaoDepositCellInfoByNow DAO information for DAO cell deposited as outpoint and withdrawn in tip block

func (*DaoHelper) GetDaoDepositCellInfoWithWithdrawOutpoint added in v0.101.6

func (c *DaoHelper) GetDaoDepositCellInfoWithWithdrawOutpoint(outpoint *types.OutPoint, withdrawCellOutPoint *types.OutPoint) (DaoDepositCellInfo, error)

GetDaoDepositCellInfoWithWithdrawOutpoint Get information for DAO cell deposited as outpoint and withdrawn in block where the withdrawCellOutPoint is

type Deposit

type Deposit struct {
	Transaction *types.Transaction
}

func NewDeposit

func NewDeposit(scripts *utils.SystemScripts, isMultisig bool) *Deposit

func (*Deposit) AddDaoOutput

func (d *Deposit) AddDaoOutput(scripts *utils.SystemScripts, lock *types.Script, amount uint64) error

func (*Deposit) AddOutput

func (d *Deposit) AddOutput(lock *types.Script, amount uint64) error

type WithdrawPhase1

type WithdrawPhase1 struct {
	Transaction *types.Transaction
}

func NewWithdrawPhase1

func NewWithdrawPhase1(scripts *utils.SystemScripts, isMultisig bool) *WithdrawPhase1

func (*WithdrawPhase1) AddDaoDepositTick

func (w *WithdrawPhase1) AddDaoDepositTick(client rpc.Client, cell *types.Cell) (int, error)

func (*WithdrawPhase1) AddOutput

func (w *WithdrawPhase1) AddOutput(lock *types.Script, amount uint64) error

type WithdrawPhase2

type WithdrawPhase2 struct {
	Transaction *types.Transaction
}

func NewWithdrawPhase2

func NewWithdrawPhase2(scripts *utils.SystemScripts, isMultisig bool) *WithdrawPhase2

func (*WithdrawPhase2) AddDaoWithdrawTick

func (w *WithdrawPhase2) AddDaoWithdrawTick(client rpc.Client, depositCell *types.Cell, withdrawCell *types.Cell, fee uint64) (int, *types.WitnessArgs, error)

func (*WithdrawPhase2) AddOutput

func (w *WithdrawPhase2) AddOutput(lock *types.Script, amount uint64) error

Jump to

Keyboard shortcuts

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