Documentation ¶
Index ¶
- Constants
- func GetName() string
- func Init(name string, cfg *types.Chain33Config, sub []byte)
- func InitExecType()
- type MultiSig
- func (m *MultiSig) CheckTx(tx *types.Transaction, index int) error
- func (m *MultiSig) ExecDelLocal_MultiSigAccCreate(payload *mty.MultiSigAccCreate, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (m *MultiSig) ExecDelLocal_MultiSigAccOperate(payload *mty.MultiSigAccOperate, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (m *MultiSig) ExecDelLocal_MultiSigConfirmTx(payload *mty.MultiSigConfirmTx, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (m *MultiSig) ExecDelLocal_MultiSigExecTransferFrom(payload *mty.MultiSigExecTransferFrom, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (m *MultiSig) ExecDelLocal_MultiSigExecTransferTo(payload *mty.MultiSigExecTransferTo, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (m *MultiSig) ExecDelLocal_MultiSigOwnerOperate(payload *mty.MultiSigOwnerOperate, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (m *MultiSig) ExecLocal_MultiSigAccCreate(payload *mty.MultiSigAccCreate, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (m *MultiSig) ExecLocal_MultiSigAccOperate(payload *mty.MultiSigAccOperate, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (m *MultiSig) ExecLocal_MultiSigConfirmTx(payload *mty.MultiSigConfirmTx, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (m *MultiSig) ExecLocal_MultiSigExecTransferFrom(payload *mty.MultiSigExecTransferFrom, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (m *MultiSig) ExecLocal_MultiSigExecTransferTo(payload *mty.MultiSigExecTransferTo, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (m *MultiSig) ExecLocal_MultiSigOwnerOperate(payload *mty.MultiSigOwnerOperate, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (m *MultiSig) Exec_MultiSigAccCreate(payload *mty.MultiSigAccCreate, tx *types.Transaction, index int) (*types.Receipt, error)
- func (m *MultiSig) Exec_MultiSigAccOperate(payload *mty.MultiSigAccOperate, tx *types.Transaction, index int) (*types.Receipt, error)
- func (m *MultiSig) Exec_MultiSigConfirmTx(payload *mty.MultiSigConfirmTx, tx *types.Transaction, index int) (*types.Receipt, error)
- func (m *MultiSig) Exec_MultiSigExecTransferFrom(payload *mty.MultiSigExecTransferFrom, tx *types.Transaction, index int) (*types.Receipt, error)
- func (m *MultiSig) Exec_MultiSigExecTransferTo(payload *mty.MultiSigExecTransferTo, tx *types.Transaction, index int) (*types.Receipt, error)
- func (m *MultiSig) Exec_MultiSigOwnerOperate(payload *mty.MultiSigOwnerOperate, tx *types.Transaction, index int) (*types.Receipt, error)
- func (m *MultiSig) GetDriverName() string
- func (m *MultiSig) Query_MultiSigAccAllAddress(in *mty.ReqMultiSigAccInfo) (types.Message, error)
- func (m *MultiSig) Query_MultiSigAccAssets(in *mty.ReqAccAssets) (types.Message, error)
- func (m *MultiSig) Query_MultiSigAccCount(in *types.ReqNil) (types.Message, error)
- func (m *MultiSig) Query_MultiSigAccTxCount(in *mty.ReqMultiSigAccInfo) (types.Message, error)
- func (m *MultiSig) Query_MultiSigAccUnSpentToday(in *mty.ReqAccAssets) (types.Message, error)
- func (m *MultiSig) Query_MultiSigAccountInfo(in *mty.ReqMultiSigAccInfo) (types.Message, error)
- func (m *MultiSig) Query_MultiSigAccounts(in *mty.ReqMultiSigAccs) (types.Message, error)
- func (m *MultiSig) Query_MultiSigTxConfirmedWeight(in *mty.ReqMultiSigTxInfo) (types.Message, error)
- func (m *MultiSig) Query_MultiSigTxInfo(in *mty.ReqMultiSigTxInfo) (types.Message, error)
- func (m *MultiSig) Query_MultiSigTxids(in *mty.ReqMultiSigTxids) (types.Message, error)
Constants ¶
const ( //MultiSigPrefix statedb中账户和交易的存储格式 MultiSigPrefix = "mavl-multisig-" MultiSigTxPrefix = "mavl-multisig-tx-" //MultiSigLocalPrefix localdb中账户和交易的存储格式multisig account count记录账户个数 MultiSigLocalPrefix = "LODB-multisig-" MultiSigAccCount = "acccount" MultiSigAcc = "account" MultiSigAllAcc = "allacc" MultiSigTx = "tx" MultiSigRecvAssets = "assets" MultiSigAccCreate = "create" )
数据库存储格式key
Variables ¶
This section is empty.
Functions ¶
func InitExecType ¶
func InitExecType()
Types ¶
type MultiSig ¶
type MultiSig struct {
drivers.DriverBase
}
MultiSig multisig合约实例
func (*MultiSig) CheckTx ¶
func (m *MultiSig) CheckTx(tx *types.Transaction, index int) error
CheckTx 检测multisig合约交易,转账交易amount不能为负数
func (*MultiSig) ExecDelLocal_MultiSigAccCreate ¶
func (m *MultiSig) ExecDelLocal_MultiSigAccCreate(payload *mty.MultiSigAccCreate, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_MultiSigAccCreate 创建多重签名账户,根据payload和receiptData信息获取相关信息并保存到db中
func (*MultiSig) ExecDelLocal_MultiSigAccOperate ¶
func (m *MultiSig) ExecDelLocal_MultiSigAccOperate(payload *mty.MultiSigAccOperate, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_MultiSigAccOperate 多重签名账户属性的修改:weight权重以及每日限额的修改
func (*MultiSig) ExecDelLocal_MultiSigConfirmTx ¶
func (m *MultiSig) ExecDelLocal_MultiSigConfirmTx(payload *mty.MultiSigConfirmTx, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_MultiSigConfirmTx 多重签名账户上交易的确认和撤销
func (*MultiSig) ExecDelLocal_MultiSigExecTransferFrom ¶
func (m *MultiSig) ExecDelLocal_MultiSigExecTransferFrom(payload *mty.MultiSigExecTransferFrom, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_MultiSigExecTransferFrom 合约中多重签名账户转账到外部账户,multiSigAddr--->Addr
func (*MultiSig) ExecDelLocal_MultiSigExecTransferTo ¶
func (m *MultiSig) ExecDelLocal_MultiSigExecTransferTo(payload *mty.MultiSigExecTransferTo, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_MultiSigExecTransferTo 合约中外部账户转账到多重签名账户,Addr --->multiSigAddr
func (*MultiSig) ExecDelLocal_MultiSigOwnerOperate ¶
func (m *MultiSig) ExecDelLocal_MultiSigOwnerOperate(payload *mty.MultiSigOwnerOperate, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_MultiSigOwnerOperate 多重签名账户owner属性的修改:owner的add/del/replace/modify等
func (*MultiSig) ExecLocal_MultiSigAccCreate ¶
func (m *MultiSig) ExecLocal_MultiSigAccCreate(payload *mty.MultiSigAccCreate, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_MultiSigAccCreate 创建多重签名账户,根据payload和receiptData信息获取相关信息并保存到db中
func (*MultiSig) ExecLocal_MultiSigAccOperate ¶
func (m *MultiSig) ExecLocal_MultiSigAccOperate(payload *mty.MultiSigAccOperate, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_MultiSigAccOperate 多重签名账户属性的修改:weight权重以及每日限额的修改
func (*MultiSig) ExecLocal_MultiSigConfirmTx ¶
func (m *MultiSig) ExecLocal_MultiSigConfirmTx(payload *mty.MultiSigConfirmTx, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_MultiSigConfirmTx 多重签名账户上交易的确认和撤销
func (*MultiSig) ExecLocal_MultiSigExecTransferFrom ¶
func (m *MultiSig) ExecLocal_MultiSigExecTransferFrom(payload *mty.MultiSigExecTransferFrom, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_MultiSigExecTransferFrom 合约中多重签名账户转账到外部账户,multiSigAddr--->Addr
func (*MultiSig) ExecLocal_MultiSigExecTransferTo ¶
func (m *MultiSig) ExecLocal_MultiSigExecTransferTo(payload *mty.MultiSigExecTransferTo, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_MultiSigExecTransferTo 合约中外部账户转账到多重签名账户,Addr --->multiSigAddr
func (*MultiSig) ExecLocal_MultiSigOwnerOperate ¶
func (m *MultiSig) ExecLocal_MultiSigOwnerOperate(payload *mty.MultiSigOwnerOperate, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_MultiSigOwnerOperate 多重签名账户owner属性的修改:owner的add/del/replace/modify等
func (*MultiSig) Exec_MultiSigAccCreate ¶
func (m *MultiSig) Exec_MultiSigAccCreate(payload *mty.MultiSigAccCreate, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_MultiSigAccCreate 创建多重签名账户
func (*MultiSig) Exec_MultiSigAccOperate ¶
func (m *MultiSig) Exec_MultiSigAccOperate(payload *mty.MultiSigAccOperate, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_MultiSigAccOperate 多重签名账户属性的修改:weight权重以及每日限额的修改
func (*MultiSig) Exec_MultiSigConfirmTx ¶
func (m *MultiSig) Exec_MultiSigConfirmTx(payload *mty.MultiSigConfirmTx, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_MultiSigConfirmTx 多重签名账户上交易的确认和撤销
func (*MultiSig) Exec_MultiSigExecTransferFrom ¶
func (m *MultiSig) Exec_MultiSigExecTransferFrom(payload *mty.MultiSigExecTransferFrom, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_MultiSigExecTransferFrom 合约中多重签名账户转账到外部账户,multiSigAddr--->Addr
func (*MultiSig) Exec_MultiSigExecTransferTo ¶
func (m *MultiSig) Exec_MultiSigExecTransferTo(payload *mty.MultiSigExecTransferTo, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_MultiSigExecTransferTo 合约中外部账户转账到多重签名账户,Addr --->multiSigAddr
func (*MultiSig) Exec_MultiSigOwnerOperate ¶
func (m *MultiSig) Exec_MultiSigOwnerOperate(payload *mty.MultiSigOwnerOperate, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_MultiSigOwnerOperate 多重签名账户owner属性的修改:owner的add/del/replace等
func (*MultiSig) GetDriverName ¶
GetDriverName 获取multisig合约name
func (*MultiSig) Query_MultiSigAccAllAddress ¶
Query_MultiSigAccAllAddress 获取指定地址创建的所有多重签名账户 输入: createaddr 返回: []string
func (*MultiSig) Query_MultiSigAccAssets ¶
Query_MultiSigAccAssets 获取多重签名账户上的所有资产,或者指定资产 输入:
message ReqAccAssets { string multiSigAddr = 1; Assets assets = 2; bool isAll = 3;
返回:
message MultiSigAccAssets { Assets assets = 1; int64 recvAmount = 2; Account account = 3;
func (*MultiSig) Query_MultiSigAccCount ¶
Query_MultiSigAccCount 获取多重签名账户的数量,用于分批获取多重签名账户地址 返回ReplyMultiSigAccounts
func (*MultiSig) Query_MultiSigAccTxCount ¶
Query_MultiSigAccTxCount 获取指定多重签名账号下的tx交易数量 输入:
message ReqMultiSigAccountInfo { string MultiSigAccAddr = 1;
返回: uint64
func (*MultiSig) Query_MultiSigAccUnSpentToday ¶
Query_MultiSigAccUnSpentToday 获取指定资产当日还能使用的免多重签名的余额 输入:
message ReqMultiSigAccUnSpentToday { string multiSigAddr = 1; string execer = 2; string symbol = 3;
返回:
message ReplyMultiSigAccUnSpentToday { uint64 amount = 1;
func (*MultiSig) Query_MultiSigAccountInfo ¶
Query_MultiSigAccountInfo 获取指定多重签名账号的状态信息 输入:
message ReqMultiSigAccountInfo { string MultiSigAccAddr = 1;
返回:
message MultiSig { string createAddr = 1; string multiSigAddr = 2; repeated Owner owners = 3; repeated DailyLimit dailyLimits = 4; uint64 txCount = 5; uint64 requiredWeight = 6;
func (*MultiSig) Query_MultiSigAccounts ¶
Query_MultiSigAccounts 获取指定区间的多重签名账户 输入:
message ReqMultiSigAccs { int64 start = 1; int64 end = 2;
输出:
message ReplyMultiSigAccs { repeated string address = 1;
func (*MultiSig) Query_MultiSigTxConfirmedWeight ¶
func (m *MultiSig) Query_MultiSigTxConfirmedWeight(in *mty.ReqMultiSigTxInfo) (types.Message, error)
Query_MultiSigTxConfirmedWeight 获取txid交易已经确认的权重之和 输入:
message ReqMultiSigTxInfo { string multisigaddr = 1; uint64 txid = 2;
返回: message Int64
func (*MultiSig) Query_MultiSigTxInfo ¶
Query_MultiSigTxInfo 获取txid交易的信息,以及参与确认的owner信息 输入:
message ReqMultiSigTxInfo { string multisigaddr = 1; uint64 txid = 2;
返回:
message ReplyMultiSigTxInfo { MultiSigTransaction multisigtxinfo = 1; repeated Owner confirmowners = 3;
func (*MultiSig) Query_MultiSigTxids ¶
Query_MultiSigTxids 获取txids通过设置的过滤条件和区间,pending, executed 输入:
message ReqMultiSigTxids { string multisigaddr = 1; uint64 fromtxid = 2; uint64 totxid = 3; bool pending = 4; bool executed = 5;
返回:
message ReplyMultiSigTxids { string multisigaddr = 1; repeated uint64 txids = 2;