FCT Utils
Utility functions of the FCT
Functions
getAllRequiredApprovals
Promise
function - Returns an array of required approvals for each call in the FCT.
Returns
getCalldataForActuator
Retrieve the encoded calldata for the actuator to execute the FCT.
Method Arguments
Name | Type | Description |
---|---|---|
| SignatureLike | Signatures of the FCT |
|
| Hash of FCT that is purged |
|
| Address of investor |
|
| Address of activator |
Returns
string
- Encoded calldata for FCT_BatchMultiSigCall
function batchMultiSigCall
getAuthenticatorSignature
Get the authenticator's signature for the FCT.
The authenticator's signature must always be at signatures[0].
Otherwise, the execution of the FCT will fail with an error FCT:E data mismatch
Method Arguments
No arguments
Returns
SignatureLike
recoverAddress
Recover the address from a signature that was used to sign the FCT.
Method Arguments
Name | Type | Description |
---|---|---|
| SignatureLike | Signature of the FCT |
Returns
string
getOptions
Parses FCT's sessionId
and returns an object of FCT options.
Returns
getMessageHash
Retrieve the message hash of the FCT.
Method Arguments
No arguments
Returns
string
isValid
Check if the FCT is valid. If the FCT is invalid, an error will be thrown with a reason.
Method Arguments
No arguments
Returns
boolean | Error
getSigners
Retrieve all signer addresses from the FCT.
Method Arguments
No arguments
Returns
string[]
getAllPaths
Retrieve all possible run paths for the execution of the FCT.
Method Arguments
No arguments
Returns
Returns an array of paths, where each path is represented as a string[]
of call indexes.
string[][]
getPaymentPerPayer
Calculates the largest and smallest possible payments for every payer in the FCT.
Method Arguments
All variables are optional except kiroPriceInETH
Name | Type | Description |
---|---|---|
|
| Signatures for FCT |
|
| Intented FCT execution gas price. Note - if the provided gas price is higher than |
|
| Default - |
|
| |
|
| Penalty if payment is in ETH instead of KIRO. Format in wei. Example - penalty 4 is "40000" |
| { baseFeeBPS?: }; | Fees of the FCT execution. By default: - baseFeeBPS: 1000, - bonusFeeBPS: 5000 |
Returns
Last updated