[Contract]: ClaimableBalanceContract [Interface]: -() [deposit] * Inputs: { env: Env from: Address token: Address amount: BigInteger claimants: List
time_bound: TimeBound } * Instructions: $ { id: 3, instruction: evaluate, input: (claimants.is_empty), assign: CONDITIONAL_JUMP_ASSIGNMENT_0, scope: 0 } { id: 5, instruction: jump, input: (CONDITIONAL_JUMP_ASSIGNMENT_0, 4), scope: 0 } { id: 6, instruction: exit_with_message, input: ("need more than 0 claimants"), scope: 4 } { id: 13, instruction: evaluate, input: (claimants.len), assign: BINARY_EXPRESSION_LEFT_9, scope: 0 } { id: 15, instruction: evaluate, input: (greater_than, BINARY_EXPRESSION_LEFT_9, 10), assign: CONDITIONAL_JUMP_ASSIGNMENT_8, scope: 0 } { id: 17, instruction: jump, input: (CONDITIONAL_JUMP_ASSIGNMENT_8, 16), scope: 0 } { id: 18, instruction: exit_with_message, input: ("too many claimants"), scope: 16 } { id: 25, instruction: evaluate, input: (is_initialized, env), assign: CONDITIONAL_JUMP_ASSIGNMENT_20, scope: 0 } { id: 27, instruction: jump, input: (CONDITIONAL_JUMP_ASSIGNMENT_20, 26), scope: 0 } { id: 28, instruction: exit_with_message, input: ("contract has been already initialized"), scope: 26 } { id: 32, instruction: evaluate, input: (from.require_auth), scope: 0 } { id: 48, instruction: evaluate, input: (token::Client::new, env, token), assign: METHOD_CALL_EXPRESSION_41, scope: 0 } { id: 38, instruction: evaluate, input: (env.current_contract_address), assign: METHOD_CALL_ARG_2_35, scope: 0 } { id: 49, instruction: evaluate, input: (METHOD_CALL_EXPRESSION_41.transfer, from, METHOD_CALL_ARG_2_35, amount), scope: 0 } { id: 63, instruction: evaluate, input: (env.storage), assign: METHOD_CALL_EXPRESSION_60, scope: 0 } { id: 64, instruction: evaluate, input: (METHOD_CALL_EXPRESSION_60.persistent), assign: METHOD_CALL_EXPRESSION_59, scope: 0 } { id: 57, instruction: instantiate_object, input: (UDT, ClaimableBalance, token, amount, time_bound, claimants), assign: METHOD_CALL_ARG_2_52, scope: 0 } { id: 65, instruction: evaluate, input: (METHOD_CALL_EXPRESSION_59.set, DataKey::Balance, METHOD_CALL_ARG_2_52), scope: 0 } { id: 75, instruction: evaluate, input: (env.storage), assign: METHOD_CALL_EXPRESSION_72, scope: 0 } { id: 76, instruction: evaluate, input: (METHOD_CALL_EXPRESSION_72.persistent), assign: METHOD_CALL_EXPRESSION_71, scope: 0 } { id: 69, instruction: instantiate_object, input: (Tuple), assign: METHOD_CALL_ARG_2_68, scope: 0 } { id: 77, instruction: evaluate, input: (METHOD_CALL_EXPRESSION_71.set, DataKey::Init, METHOD_CALL_ARG_2_68), scope: 0 } $ -() [claim] * Inputs: { env: Env claimant: Address amount: BigInteger } * Instructions: $ { id: 80, instruction: evaluate, input: (claimant.require_auth), scope: 0 } { id: 88, instruction: evaluate, input: (env.storage), assign: METHOD_CALL_EXPRESSION_85, scope: 0 } { id: 89, instruction: evaluate, input: (METHOD_CALL_EXPRESSION_85.persistent), assign: METHOD_CALL_EXPRESSION_84, scope: 0 } { id: 90, instruction: evaluate, input: (METHOD_CALL_EXPRESSION_84.get, DataKey::Balance), assign: METHOD_CALL_EXPRESSION_81, scope: 0 } { id: 91, instruction: evaluate, input: (METHOD_CALL_EXPRESSION_81.unwrap), assign: claimable_balance|||ClaimableBalance, scope: 0 } { id: 103, instruction: evaluate, input: (check_time_bound, env, claimable_balance.time_bound), assign: UNARY_ARGUMENT_93, scope: 0 } { id: 104, instruction: evaluate, input: (!, UNARY_ARGUMENT_93), assign: CONDITIONAL_JUMP_ASSIGNMENT_92, scope: 0 } { id: 106, instruction: jump, input: (CONDITIONAL_JUMP_ASSIGNMENT_92, 105), scope: 0 } { id: 107, instruction: exit_with_message, input: ("time predicate is not fulfilled"), scope: 105 } { id: 119, instruction: evaluate, input: (claimants.contains, claimant), assign: UNARY_ARGUMENT_114, scope: 0 } { id: 120, instruction: evaluate, input: (!, UNARY_ARGUMENT_114), assign: CONDITIONAL_JUMP_ASSIGNMENT_113, scope: 0 } { id: 122, instruction: jump, input: (CONDITIONAL_JUMP_ASSIGNMENT_113, 121), scope: 0 } { id: 123, instruction: exit_with_message, input: ("claimant is not allowed to claim this balance"), scope: 121 } { id: 133, instruction: evaluate, input: (greater_than, amount, claimable_balance.amount), assign: CONDITIONAL_JUMP_ASSIGNMENT_125, scope: 0 } { id: 135, instruction: jump, input: (CONDITIONAL_JUMP_ASSIGNMENT_125, 134), scope: 0 } { id: 136, instruction: exit_with_message, input: ("claimed amount greater than balance"), scope: 134 } { id: 156, instruction: evaluate, input: (token::Client::new, env, claimable_balance.token), assign: METHOD_CALL_EXPRESSION_146, scope: 0 } { id: 141, instruction: evaluate, input: (env.current_contract_address), assign: METHOD_CALL_ARG_1_138, scope: 0 } { id: 157, instruction: evaluate, input: (METHOD_CALL_EXPRESSION_146.transfer, METHOD_CALL_ARG_1_138, claimant, amount), scope: 0 } { id: 165, instruction: subtract, input: (claimable_balance.amount, amount), assign: new_balance, scope: 0 } { id: 171, instruction: evaluate, input: (greater_than, new_balance, 0), assign: CONDITIONAL_JUMP_ASSIGNMENT_166, scope: 0 } { id: 173, instruction: jump, input: (CONDITIONAL_JUMP_ASSIGNMENT_166, 172), scope: 0 } { id: 195, instruction: jump, input: (194), scope: 0 } { id: 181, instruction: assign, input: (new_balance), assign: claimable_balance.amount, scope: 172 } { id: 190, instruction: evaluate, input: (env.storage), assign: METHOD_CALL_EXPRESSION_187, scope: 172 } { id: 191, instruction: evaluate, input: (METHOD_CALL_EXPRESSION_187.persistent), assign: METHOD_CALL_EXPRESSION_186, scope: 172 } { id: 192, instruction: evaluate, input: (METHOD_CALL_EXPRESSION_186.set, DataKey::Balance, claimable_balance), scope: 172 } { id: 193, instruction: jump, input: (0), scope: 172 } { id: 202, instruction: evaluate, input: (env.storage), assign: METHOD_CALL_EXPRESSION_199, scope: 194 } { id: 203, instruction: evaluate, input: (METHOD_CALL_EXPRESSION_199.persistent), assign: METHOD_CALL_EXPRESSION_198, scope: 194 } { id: 204, instruction: evaluate, input: (METHOD_CALL_EXPRESSION_198.remove, DataKey::Balance), scope: 194 } { id: 205, instruction: jump, input: (0), scope: 194 } $ :[Interface] [User Defined Types]: * (DataKey_ENUM) { Init: () Balance: () } * (TimeBoundKind_ENUM) { Before: () After: () } * (TimeBound_STRUCT) { kind: TimeBoundKind timestamp: Integer } * (ClaimableBalance_STRUCT) { token: Address amount: BigInteger claimants: List
time_bound: TimeBound } :[User Defined Types] [Helpers]: -() [check_time_bound] * Inputs: { env: &Env time_bound: &TimeBound } * Output: Boolean * Instructions: $ { id: 3, instruction: evaluate, input: (env.ledger), assign: METHOD_CALL_EXPRESSION_0, scope: 0 } { id: 4, instruction: evaluate, input: (METHOD_CALL_EXPRESSION_0.timestamp), assign: ledger_timestamp, scope: 0 } { id: 8, instruction: assign, input: (time_bound, kind), assign: THING_TO_COMPARE_AGAINST_5, scope: 0 } { id: 11, instruction: evaluate, input: (equal_to, time_bound.kind, TimeBoundKind::Before), assign: CONDITIONAL_JUMP_CHECK_10, scope: 0 } { id: 13, instruction: jump, input: (CONDITIONAL_JUMP_CHECK_10, 12), scope: 0 } { id: 24, instruction: evaluate, input: (equal_to, THING_TO_COMPARE_AGAINST_5, TimeBoundKind::After), assign: CONDITIONAL_JUMP_CHECK_23, scope: 0 } { id: 26, instruction: jump, input: (CONDITIONAL_JUMP_CHECK_23, 25), scope: 0 } { id: 21, instruction: evaluate, input: (less_than_or_equal_to, ledger_timestamp, time_bound.timestamp), assign: Thing_to_return, scope: 12 } { id: 22, instruction: jump, input: (0), scope: 12 } { id: 34, instruction: evaluate, input: (greater_than_or_equal_to, ledger_timestamp, time_bound.timestamp), assign: Thing_to_return, scope: 25 } { id: 35, instruction: jump, input: (0), scope: 25 } { id: 0, instruction: return, input: (Thing_to_return), scope: 0 } $ -() [is_initialized] * Inputs: { env: &Env } * Output: Boolean * Instructions: $ { id: 6, instruction: evaluate, input: (env.storage), assign: METHOD_CALL_EXPRESSION_3, scope: 0 } { id: 7, instruction: evaluate, input: (METHOD_CALL_EXPRESSION_3.persistent), assign: METHOD_CALL_EXPRESSION_2, scope: 0 } { id: 8, instruction: evaluate, input: (METHOD_CALL_EXPRESSION_2.has, DataKey::Init), assign: Thing_to_return, scope: 0 } { id: 0, instruction: return, input: (Thing_to_return), scope: 0 } $ :[Helpers] [NonTranslatable]: mod proptest { } :[NonTranslatable]