proper naming for client functions, e.g. icrc3_get_blocks instead get_raw_blocks. In general, each function has been changed to use the name of the canister method that it is calling.
Add TestEnv to replace test setup (created StateMachine->install ledger->install depositor) with a single function and to avoid passing env and the canister id to every client function. E.g. icrc1_total_supply(env, ledger_id) is now env.icrc1_total_supply().
Standardize how arguments are passed to functions. Most functions now take in input the Principal caller and a single argument which is the payload to serialize and pass in the call. Note that for egonomics reasons some functions, such as deposit and icrc3_get_blocks, take in input a different set of arguments that is easier to use in the tests.
Avoid hardcoded arguments so that tests can actually test all permutations.
Standardize the errors given by function calles. No more .unwrap() which wouldn't really tell you want the error is. Now each funciton will print out the call input and the resulting error.
Replace CyclesLedgerInStateMachine with TestEnv to unify the client and gen mod. The Ledger installed in a StateMachine is now always represented by TestEnv.
icrc3_get_blocks
insteadget_raw_blocks
. In general, each function has been changed to use the name of the canister method that it is calling.TestEnv
to replace test setup (createdStateMachine
->install ledger->install depositor) with a single function and to avoid passingenv
and the canister id to every client function. E.g.icrc1_total_supply(env, ledger_id)
is nowenv.icrc1_total_supply()
.Principal
caller and a single argument which is the payload to serialize and pass in the call. Note that for egonomics reasons some functions, such asdeposit
andicrc3_get_blocks
, take in input a different set of arguments that is easier to use in the tests..unwrap()
which wouldn't really tell you want the error is. Now each funciton will print out the call input and the resulting error.CyclesLedgerInStateMachine
withTestEnv
to unify theclient
andgen
mod. The Ledger installed in aStateMachine
is now always represented byTestEnv
.