Flow
Flow of the call (used to be flags)
import { Flow } from "fct/constants"
Flow describes how the batch transaction has to be executed. There are 6 options:
  • OK_CONT_FAIL_REVERT - "continue on success, revert on fail"
  • OK_CONT_FAIL_STOP - "continue on success, stop on fail"
  • OK_CONT_FAIL_JUMP - "continue on success, jump on fail"
  • OK_REVERT_FAIL_CONT - "revert on success, continue on fail"
  • OK_STOP_FAIL_CONT - "stop on success, continue on fail"
  • OK_JUMP_FAIL_CONT - "jump on success, continue on fail"

Example with batchMultiSigCall

Creating a transaction with 1 FCT, which sends KIRO with flow "continue on success, jump on fail".
import { Flow } from "fct/constants"
​
const transaction = {
groupId: 1,
nonce: 1,
calls: [
{
value: 0,
to: "0xB1191F691A355b43542Bea9B8847bc73e7Abb137", // KIRO Address
method: "transfer",
params: [
{ name: "to", type: "address", value: "0x0388aedc924a373b28562884458f51dec5dbacbd" },
{ name: "token_amount", type: "uint256", value: "5000000000000000000" },
],
flow: Flow.OK_CONT_FAIL_JUMP, // "continue on success, jump on fail"
jump: 1, // if FCT fails, skip next FCT
signer: "0x9c4fe1c3d5975e5c5e493f24352969aa280b7cfc",
},
]
}
​
await batchMultiSigCall.addBatchCall(tx);
​
Copy link