Multisig built-in actor is responsible for dealing with operations involving the Filecoin wallet.
To interact with specific multi-signature wallet address, you need to use this wallet address to invoke the methods in multisig built-in actor. You also need to specify method number of which method you want to invoke. Please refer the each method for its method number.
func Propose(params ProposeParams) ProposeReturn {...}Propose a token transfer transaction for signers to approve, the proposer automatically approves this transaction.
uint ProposeMethodNum = 1696838335.
Params:
structProposeParamsbytesToAddress - the address to receive the token.int256Value - the token amount to be transferred.uint64Method: ?bytep[]Params: ?
Results:
structProposeReturnint64TxnID - the ID of the proposed transaction.boolApplied - if the transaction was applied as proposed or not?uint31Code - the exit code of the transaction, if Applied is false this field should be ignored.bytesRet - the return value of the transaction, if Applied is false this field should be ignored.
func Approve(params TxnIDParams) ApproveReturn {}Other signers of the multi-signature address can use this method to approve the proposed messages.
uint ApproveMethodNum = 1289044053.
Params:
structTxnIDParamsint64ID - the signed message ID.bytesProposalHash - Hash of proposal to ensure an operation can only apply to a specific proposal.
Results:
structApproveReturnboolApplied - if the transaction was applied as proposed or not?uint31Code - the exit code of the transaction, if Applied is false this field should be ignored.bytesRet - the return value of the transaction, if Applied is false this field should be ignored.
func Cancel(param TxnIDParams) EmptyValue {}Multi-signature wallet signer to cancel a pending multi-signatures transaction.
uint CancelMethodNum = 3365893656.
Params:
structTxnIDParamsint64ID - the signed message ID.bytesProposalHash - Hash of proposal to ensure an operation can only apply to a specific proposal.
Results:
structEmptyValue.
func AddSigner(params AddSignerParams) EmptyValue {}Add a signer to the multi-signature wallet.
uint AddSignerMethodNum = 3028530033.
Params:
structAddSignerParamsbytesSigner - the new signer address.boolIncrease - increase threshold or not.
Results:
structEmptyValue.
func RemoveSigner(params RemoveSignerParams) EmptyValue {}Remove a signer from the multi-signature wallet.
uint RemoveSignerMethodNum = 21182899.
Params:
structRemoveSignerParamsbytesSigner - the signer address to be removed.boolDecrease - decrease threshold or not. Only able to decrease when threshold is larger than 2.
Results:
structEmptyValue.
func SwapSigner(params SwapSignerParams) EmptyValue {}Swap signers for the multi-signature wallet.
uint SwapSignerMethodNum = 3968117037;
Params:
structSwapSignerParamsbytesFrom - the signer address should will be removed from multi-signature wallet.bytesTo - the signer address should will be added to multi-signature wallet.
Results:
structEmptyValue.
func ChangeNumApprovalsThreshold(params ChangeNumApprovalsThresholdParams) EmptyValue {}Change the threshold number required for the approvals for the multi-signature wallet.
uint ChangeNumApprovalsThresholdMethodNum = 3375931653.
Params:
structChangeNumApprovalsThresholdParamsunit64NewThreshold - the new threshold number.
Results:
structEmptyValue.
func LockBalance(params LockBalanceParams) EmptyValue {}Lock the amount of token from multi-signature wallet from start epoch to unlock epoch.
uint LockBalanceMethodNum = 1999470977.
Params:
structLockBalanceParamsint64StartEpoch - the epoch to start locking the balance.int64UnlockDuration - the epoch to unlock the balance.int256Amount - the amount of token to be locked.
Results:
structEmptyValue.