Table of Contents
This document provides an overview of the application.
It outlines the use cases, i.e., desirable functionality, in addition to requirements for the smart contracts.
This section contains general information about the functionality of the application and thus does not touch upon any technical aspects.
If you are interested in a functional overview then this is the section for you.
- Sets the parameters for approving a transaction and sets the owners of the multisig.
- If the constructor hasn't already been called.
- Requires the config time constant
THRESHOLD
; the number of approvals required for a transaction to occur.- If the
THRESHOLD
is not 0.
- If the
- Requires the
users
; the information about the owners of the multisig- If the sum of the owners' approval weightings is a value larger than the
threshold
parameter. This prevents the contract being setup when the owners can never submit enough approvals to allow a transaction.
- If the sum of the owners' approval weightings is a value larger than the
- Execute either a transfer or a contract call.
- Reverts when:
- The constructor has not been called to initialize the contract.
- Attempting to transfer with
transfer_params.value
as [Option::None]. - The amount of the asset being sent is greater than the balance in the contract.
- The public key cannot be recovered from a signature.
- The recovered addresses in
count_approvals
are not in ascending order (0x1 < 0x2 < 0x3...) [b256]. - The total approval count is less than the required threshold for execution.
- Attempting to call when
target
is not a [Identity::ContractId].
- Changes the threshold required for execution of transactions.
- Reverts when:
- The constructor has not been called.
- The new threshold is zero.
- The new threshold is greater than the total weight of the owners.
- Signature recovery failed.
- Recovered addresses are not in ascending order.
- The number of approvals does not meet the threshold.
- Sets the weight of a user which may be able to vote on the execution of transactions.
- Reverts when:
- The constructor has not been called.
- Signature recovery failed.
- The number of approvals does not meet the threshold.
- The new total weighting is less than the threshold.
- Returns the approval weight of a user.
- Returns the contract's balance of the specified asset.
- Requires
asset_id
; The contract ID of the asset to check that balance of.
- Requires
- Returns the current nonce of the contract.
- Returns the threshold for execution.
- Takes a struct comprised of transaction data and hashes it.