chat_contract¶
In [ ]:
open rust
open rust.rust_operators
In [ ]:
//// test
open testing
chat_contract¶
state¶
In [ ]:
type state =
{
version : u32
account_set : near.iterable_set near.account_id
alias_set : near.iterable_set sm'.std_string
account_map : near.lookup_map near.account_id sm'.std_string
alias_map : near.lookup_map sm'.std_string (mapm.hash_map near.account_id (u64 * u32))
}
In [ ]:
//// test
///! rust -c
()
Installed near-sandbox into /home/runner/work/polyglot/polyglot/workspace/target/release/build/near-sandbox-utils-c39df2faf0b47791/out/.near/near-sandbox-1.40.0_7dd0b5993577f592be15eb102e5a3da37be66271/near-sandbox 00:00:03 i #2 near_workspaces.print_usd / { retry = 1; total_gas_burnt_usd = +0.000808; total_gas_burnt = 1209326779756 } 00:00:03 i #3 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:03 i #4 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000602; tokens_burnt_usd = +0.000602; gas_burnt = 901244920416; tokens_burnt = 90124492041600000000 } 00:00:03 w #5 spiral_wasm.run / Error error / { retry = 1; error = "{ receipt_outcomes_len = 1; retry = 1; receipt_failures = [] }" } 00:00:05 i #8 near_workspaces.print_usd / { retry = 2; total_gas_burnt_usd = +0.000808; total_gas_burnt = 1209326779756 } 00:00:05 i #9 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:05 i #10 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000602; tokens_burnt_usd = +0.000602; gas_burnt = 901244920416; tokens_burnt = 90124492041600000000 } 00:00:05 w #11 spiral_wasm.run / Error error / { retry = 2; error = "{ receipt_outcomes_len = 1; retry = 2; receipt_failures = [] }" } 00:00:07 i #14 near_workspaces.print_usd / { retry = 3; total_gas_burnt_usd = +0.000808; total_gas_burnt = 1209326779756 } 00:00:07 i #15 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:07 i #16 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000602; tokens_burnt_usd = +0.000602; gas_burnt = 901244920416; tokens_burnt = 90124492041600000000 } 00:00:07 w #17 spiral_wasm.run / Error error / { retry = 3; error = "{ receipt_outcomes_len = 1; retry = 3; receipt_failures = [] }" } 00:00:09 i #20 near_workspaces.print_usd / { retry = 4; total_gas_burnt_usd = +0.000808; total_gas_burnt = 1209326779756 } 00:00:09 i #21 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:09 i #22 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000602; tokens_burnt_usd = +0.000602; gas_burnt = 901244920416; tokens_burnt = 90124492041600000000 } 00:00:09 w #23 spiral_wasm.run / Error error / { retry = 4; error = "{ receipt_outcomes_len = 1; retry = 4; receipt_failures = [] }" } 00:00:11 i #26 near_workspaces.print_usd / { retry = 5; total_gas_burnt_usd = +0.000808; total_gas_burnt = 1209326779756 } 00:00:11 i #27 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:11 i #28 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000602; tokens_burnt_usd = +0.000602; gas_burnt = 901244920416; tokens_burnt = 90124492041600000000 } 00:00:11 w #29 spiral_wasm.run / Error error / { retry = 5; error = "{ receipt_outcomes_len = 1; retry = 5; receipt_failures = [] }" } 00:00:13 i #32 near_workspaces.print_usd / { retry = 6; total_gas_burnt_usd = +0.000808; total_gas_burnt = 1209326779756 } 00:00:13 i #33 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:13 i #34 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000602; tokens_burnt_usd = +0.000602; gas_burnt = 901244920416; tokens_burnt = 90124492041600000000 } 00:00:13 w #35 spiral_wasm.run / Error error / { retry = 6; error = "{ receipt_outcomes_len = 1; retry = 6; receipt_failures = [] }" } 00:00:15 i #38 near_workspaces.print_usd / { retry = 7; total_gas_burnt_usd = +0.000808; total_gas_burnt = 1209326779756 } 00:00:15 i #39 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:15 i #40 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000602; tokens_burnt_usd = +0.000602; gas_burnt = 901244920416; tokens_burnt = 90124492041600000000 } 00:00:15 w #41 spiral_wasm.run / Error error / { retry = 7; error = "{ receipt_outcomes_len = 1; retry = 7; receipt_failures = [] }" } 00:00:17 i #44 near_workspaces.print_usd / { retry = 8; total_gas_burnt_usd = +0.000808; total_gas_burnt = 1209326779756 } 00:00:17 i #45 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:17 i #46 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000602; tokens_burnt_usd = +0.000602; gas_burnt = 901244920416; tokens_burnt = 90124492041600000000 } 00:00:17 w #47 spiral_wasm.run / Error error / { retry = 8; error = "{ receipt_outcomes_len = 1; retry = 8; receipt_failures = [] }" } 00:00:19 i #50 near_workspaces.print_usd / { retry = 9; total_gas_burnt_usd = +0.000808; total_gas_burnt = 1209326779756 } 00:00:19 i #51 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:19 i #52 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000602; tokens_burnt_usd = +0.000602; gas_burnt = 901244920416; tokens_burnt = 90124492041600000000 } 00:00:19 w #53 spiral_wasm.run / Error error / { retry = 9; error = "{ receipt_outcomes_len = 1; retry = 9; receipt_failures = [] }" } 00:00:21 i #56 near_workspaces.print_usd / { retry = 10; total_gas_burnt_usd = +0.000808; total_gas_burnt = 1209326779756 } 00:00:21 i #57 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:21 i #58 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000602; tokens_burnt_usd = +0.000602; gas_burnt = 901244920416; tokens_burnt = 90124492041600000000 } 00:00:21 w #59 spiral_wasm.run / Error error / { retry = 10; error = "{ receipt_outcomes_len = 1; retry = 10; receipt_failures = [] }" } 00:00:24 i #62 near_workspaces.print_usd / { retry = 11; total_gas_burnt_usd = +0.000808; total_gas_burnt = 1209326779756 } 00:00:24 i #63 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:24 i #64 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000602; tokens_burnt_usd = +0.000602; gas_burnt = 901244920416; tokens_burnt = 90124492041600000000 } 00:00:24 w #65 spiral_wasm.run / Error error / { retry = 11; error = "{ receipt_outcomes_len = 1; retry = 11; receipt_failures = [] }" } 00:00:26 i #68 near_workspaces.print_usd / { retry = 12; total_gas_burnt_usd = +0.000808; total_gas_burnt = 1209326779756 } 00:00:26 i #69 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:26 i #70 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000602; tokens_burnt_usd = +0.000602; gas_burnt = 901244920416; tokens_burnt = 90124492041600000000 } 00:00:26 w #71 spiral_wasm.run / Error error / { retry = 12; error = "{ receipt_outcomes_len = 1; retry = 12; receipt_failures = [] }" } 00:00:28 i #74 near_workspaces.print_usd / { retry = 13; total_gas_burnt_usd = +0.000808; total_gas_burnt = 1209326779756 } 00:00:28 i #75 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:28 i #76 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000602; tokens_burnt_usd = +0.000602; gas_burnt = 901244920416; tokens_burnt = 90124492041600000000 } 00:00:28 w #77 spiral_wasm.run / Error error / { retry = 13; error = "{ receipt_outcomes_len = 1; retry = 13; receipt_failures = [] }" } 00:00:30 i #80 near_workspaces.print_usd / { retry = 14; total_gas_burnt_usd = +0.000808; total_gas_burnt = 1209326779756 } 00:00:30 i #81 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:30 i #82 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000602; tokens_burnt_usd = +0.000602; gas_burnt = 901244920416; tokens_burnt = 90124492041600000000 } 00:00:30 w #83 spiral_wasm.run / Error error / { retry = 14; error = "{ receipt_outcomes_len = 1; retry = 14; receipt_failures = [] }" } 00:00:32 i #86 near_workspaces.print_usd / { retry = 15; total_gas_burnt_usd = +0.000808; total_gas_burnt = 1209326779756 } 00:00:32 i #87 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:32 i #88 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000602; tokens_burnt_usd = +0.000602; gas_burnt = 901244920416; tokens_burnt = 90124492041600000000 } 00:00:32 w #89 spiral_wasm.run / Error error / { retry = 15; error = "{ receipt_outcomes_len = 1; retry = 15; receipt_failures = [] }" }
In [ ]:
//// test
///! rust -c
trace Verbose (fun () => "") id
00:00:02 i #2 near_workspaces.print_usd / { retry = 1; total_gas_burnt_usd = +0.000885; total_gas_burnt = 1324654351675 } 00:00:02 i #3 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:02 i #4 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000679; tokens_burnt_usd = +0.000679; gas_burnt = 1016572492335; tokens_burnt = 101657249233500000000 } 00:00:02 w #5 spiral_wasm.run / Error error / { retry = 1; error = "{ receipt_outcomes_len = 1; retry = 1; receipt_failures = [] }" } 00:00:04 i #8 near_workspaces.print_usd / { retry = 2; total_gas_burnt_usd = +0.000885; total_gas_burnt = 1324654351675 } 00:00:04 i #9 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:04 i #10 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000679; tokens_burnt_usd = +0.000679; gas_burnt = 1016572492335; tokens_burnt = 101657249233500000000 } 00:00:04 w #11 spiral_wasm.run / Error error / { retry = 2; error = "{ receipt_outcomes_len = 1; retry = 2; receipt_failures = [] }" } 00:00:06 i #14 near_workspaces.print_usd / { retry = 3; total_gas_burnt_usd = +0.000885; total_gas_burnt = 1324654351675 } 00:00:06 i #15 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:06 i #16 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000679; tokens_burnt_usd = +0.000679; gas_burnt = 1016572492335; tokens_burnt = 101657249233500000000 } 00:00:06 w #17 spiral_wasm.run / Error error / { retry = 3; error = "{ receipt_outcomes_len = 1; retry = 3; receipt_failures = [] }" } 00:00:08 i #20 near_workspaces.print_usd / { retry = 4; total_gas_burnt_usd = +0.000885; total_gas_burnt = 1324654351675 } 00:00:08 i #21 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:08 i #22 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000679; tokens_burnt_usd = +0.000679; gas_burnt = 1016572492335; tokens_burnt = 101657249233500000000 } 00:00:08 w #23 spiral_wasm.run / Error error / { retry = 4; error = "{ receipt_outcomes_len = 1; retry = 4; receipt_failures = [] }" } 00:00:10 i #26 near_workspaces.print_usd / { retry = 5; total_gas_burnt_usd = +0.000885; total_gas_burnt = 1324654351675 } 00:00:10 i #27 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:10 i #28 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000679; tokens_burnt_usd = +0.000679; gas_burnt = 1016572492335; tokens_burnt = 101657249233500000000 } 00:00:10 w #29 spiral_wasm.run / Error error / { retry = 5; error = "{ receipt_outcomes_len = 1; retry = 5; receipt_failures = [] }" } 00:00:12 i #32 near_workspaces.print_usd / { retry = 6; total_gas_burnt_usd = +0.000885; total_gas_burnt = 1324654351675 } 00:00:12 i #33 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:12 i #34 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000679; tokens_burnt_usd = +0.000679; gas_burnt = 1016572492335; tokens_burnt = 101657249233500000000 } 00:00:12 w #35 spiral_wasm.run / Error error / { retry = 6; error = "{ receipt_outcomes_len = 1; retry = 6; receipt_failures = [] }" } 00:00:14 i #38 near_workspaces.print_usd / { retry = 7; total_gas_burnt_usd = +0.000885; total_gas_burnt = 1324654351675 } 00:00:14 i #39 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:14 i #40 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000679; tokens_burnt_usd = +0.000679; gas_burnt = 1016572492335; tokens_burnt = 101657249233500000000 } 00:00:14 w #41 spiral_wasm.run / Error error / { retry = 7; error = "{ receipt_outcomes_len = 1; retry = 7; receipt_failures = [] }" } 00:00:16 i #44 near_workspaces.print_usd / { retry = 8; total_gas_burnt_usd = +0.000885; total_gas_burnt = 1324654351675 } 00:00:16 i #45 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:16 i #46 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000679; tokens_burnt_usd = +0.000679; gas_burnt = 1016572492335; tokens_burnt = 101657249233500000000 } 00:00:16 w #47 spiral_wasm.run / Error error / { retry = 8; error = "{ receipt_outcomes_len = 1; retry = 8; receipt_failures = [] }" } 00:00:18 i #50 near_workspaces.print_usd / { retry = 9; total_gas_burnt_usd = +0.000885; total_gas_burnt = 1324654351675 } 00:00:18 i #51 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:18 i #52 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000679; tokens_burnt_usd = +0.000679; gas_burnt = 1016572492335; tokens_burnt = 101657249233500000000 } 00:00:18 w #53 spiral_wasm.run / Error error / { retry = 9; error = "{ receipt_outcomes_len = 1; retry = 9; receipt_failures = [] }" } 00:00:20 i #56 near_workspaces.print_usd / { retry = 10; total_gas_burnt_usd = +0.000885; total_gas_burnt = 1324654351675 } 00:00:20 i #57 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:20 i #58 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000679; tokens_burnt_usd = +0.000679; gas_burnt = 1016572492335; tokens_burnt = 101657249233500000000 } 00:00:20 w #59 spiral_wasm.run / Error error / { retry = 10; error = "{ receipt_outcomes_len = 1; retry = 10; receipt_failures = [] }" } 00:00:22 i #62 near_workspaces.print_usd / { retry = 11; total_gas_burnt_usd = +0.000885; total_gas_burnt = 1324654351675 } 00:00:22 i #63 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:22 i #64 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000679; tokens_burnt_usd = +0.000679; gas_burnt = 1016572492335; tokens_burnt = 101657249233500000000 } 00:00:22 w #65 spiral_wasm.run / Error error / { retry = 11; error = "{ receipt_outcomes_len = 1; retry = 11; receipt_failures = [] }" } 00:00:24 i #68 near_workspaces.print_usd / { retry = 12; total_gas_burnt_usd = +0.000885; total_gas_burnt = 1324654351675 } 00:00:24 i #69 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:24 i #70 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000679; tokens_burnt_usd = +0.000679; gas_burnt = 1016572492335; tokens_burnt = 101657249233500000000 } 00:00:24 w #71 spiral_wasm.run / Error error / { retry = 12; error = "{ receipt_outcomes_len = 1; retry = 12; receipt_failures = [] }" } 00:00:26 i #74 near_workspaces.print_usd / { retry = 13; total_gas_burnt_usd = +0.000885; total_gas_burnt = 1324654351675 } 00:00:26 i #75 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:26 i #76 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000679; tokens_burnt_usd = +0.000679; gas_burnt = 1016572492335; tokens_burnt = 101657249233500000000 } 00:00:26 w #77 spiral_wasm.run / Error error / { retry = 13; error = "{ receipt_outcomes_len = 1; retry = 13; receipt_failures = [] }" } 00:00:28 i #80 near_workspaces.print_usd / { retry = 14; total_gas_burnt_usd = +0.000885; total_gas_burnt = 1324654351675 } 00:00:28 i #81 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:28 i #82 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000679; tokens_burnt_usd = +0.000679; gas_burnt = 1016572492335; tokens_burnt = 101657249233500000000 } 00:00:28 w #83 spiral_wasm.run / Error error / { retry = 14; error = "{ receipt_outcomes_len = 1; retry = 14; receipt_failures = [] }" } 00:00:30 i #86 near_workspaces.print_usd / { retry = 15; total_gas_burnt_usd = +0.000885; total_gas_burnt = 1324654351675 } 00:00:30 i #87 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:30 i #88 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000679; tokens_burnt_usd = +0.000679; gas_burnt = 1016572492335; tokens_burnt = 101657249233500000000 } 00:00:30 w #89 spiral_wasm.run / Error error / { retry = 15; error = "{ receipt_outcomes_len = 1; retry = 15; receipt_failures = [] }" }
new¶
In [ ]:
inl new () : state =
{
version = 2
account_set = "account_set" |> sm'.byte_slice |> near.new_iterable_set
alias_set = "alias_set" |> sm'.byte_slice |> near.new_iterable_set
account_map = "account_map" |> sm'.byte_slice |> near.new_lookup_map
alias_map = "alias_map" |> sm'.byte_slice |> near.new_lookup_map
}
In [ ]:
//// test
///! rust -c
inl state = new ()
trace Verbose (fun () => "chat_contract") fun () => { state = state |> sm'.format_debug }
trace Verbose (fun () => "") id
00:00:00 v #1 chat_contract / { state = (2, IterableSet { elements: Vector { len: 0, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 0, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:02 i #2 near_workspaces.print_usd / { retry = 1; total_gas_burnt_usd = +0.001326; total_gas_burnt = 1984629049102 } 00:00:02 i #3 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:02 i #4 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.001120; tokens_burnt_usd = +0.001120; gas_burnt = 1676547189762; tokens_burnt = 167654718976200000000 } 00:00:02 w #5 spiral_wasm.run / Error error / { retry = 1; error = "{ receipt_outcomes_len = 1; retry = 1; receipt_failures = [] }" } 00:00:00 v #1 chat_contract / { state = (2, IterableSet { elements: Vector { len: 0, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 0, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:04 i #8 near_workspaces.print_usd / { retry = 2; total_gas_burnt_usd = +0.001326; total_gas_burnt = 1984629049102 } 00:00:04 i #9 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:04 i #10 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.001120; tokens_burnt_usd = +0.001120; gas_burnt = 1676547189762; tokens_burnt = 167654718976200000000 } 00:00:04 w #11 spiral_wasm.run / Error error / { retry = 2; error = "{ receipt_outcomes_len = 1; retry = 2; receipt_failures = [] }" } 00:00:00 v #1 chat_contract / { state = (2, IterableSet { elements: Vector { len: 0, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 0, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:06 i #14 near_workspaces.print_usd / { retry = 3; total_gas_burnt_usd = +0.001326; total_gas_burnt = 1984629049102 } 00:00:06 i #15 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:06 i #16 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.001120; tokens_burnt_usd = +0.001120; gas_burnt = 1676547189762; tokens_burnt = 167654718976200000000 } 00:00:06 w #17 spiral_wasm.run / Error error / { retry = 3; error = "{ receipt_outcomes_len = 1; retry = 3; receipt_failures = [] }" } 00:00:00 v #1 chat_contract / { state = (2, IterableSet { elements: Vector { len: 0, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 0, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:08 i #20 near_workspaces.print_usd / { retry = 4; total_gas_burnt_usd = +0.001326; total_gas_burnt = 1984629049102 } 00:00:08 i #21 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:08 i #22 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.001120; tokens_burnt_usd = +0.001120; gas_burnt = 1676547189762; tokens_burnt = 167654718976200000000 } 00:00:08 w #23 spiral_wasm.run / Error error / { retry = 4; error = "{ receipt_outcomes_len = 1; retry = 4; receipt_failures = [] }" } 00:00:00 v #1 chat_contract / { state = (2, IterableSet { elements: Vector { len: 0, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 0, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:10 i #26 near_workspaces.print_usd / { retry = 5; total_gas_burnt_usd = +0.001326; total_gas_burnt = 1984629049102 } 00:00:10 i #27 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:10 i #28 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.001120; tokens_burnt_usd = +0.001120; gas_burnt = 1676547189762; tokens_burnt = 167654718976200000000 } 00:00:10 w #29 spiral_wasm.run / Error error / { retry = 5; error = "{ receipt_outcomes_len = 1; retry = 5; receipt_failures = [] }" } 00:00:00 v #1 chat_contract / { state = (2, IterableSet { elements: Vector { len: 0, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 0, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:12 i #32 near_workspaces.print_usd / { retry = 6; total_gas_burnt_usd = +0.001326; total_gas_burnt = 1984629049102 } 00:00:12 i #33 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:12 i #34 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.001120; tokens_burnt_usd = +0.001120; gas_burnt = 1676547189762; tokens_burnt = 167654718976200000000 } 00:00:12 w #35 spiral_wasm.run / Error error / { retry = 6; error = "{ receipt_outcomes_len = 1; retry = 6; receipt_failures = [] }" } 00:00:00 v #1 chat_contract / { state = (2, IterableSet { elements: Vector { len: 0, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 0, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:14 i #38 near_workspaces.print_usd / { retry = 7; total_gas_burnt_usd = +0.001326; total_gas_burnt = 1984629049102 } 00:00:14 i #39 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:14 i #40 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.001120; tokens_burnt_usd = +0.001120; gas_burnt = 1676547189762; tokens_burnt = 167654718976200000000 } 00:00:14 w #41 spiral_wasm.run / Error error / { retry = 7; error = "{ receipt_outcomes_len = 1; retry = 7; receipt_failures = [] }" } 00:00:00 v #1 chat_contract / { state = (2, IterableSet { elements: Vector { len: 0, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 0, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:16 i #44 near_workspaces.print_usd / { retry = 8; total_gas_burnt_usd = +0.001326; total_gas_burnt = 1984629049102 } 00:00:16 i #45 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:16 i #46 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.001120; tokens_burnt_usd = +0.001120; gas_burnt = 1676547189762; tokens_burnt = 167654718976200000000 } 00:00:16 w #47 spiral_wasm.run / Error error / { retry = 8; error = "{ receipt_outcomes_len = 1; retry = 8; receipt_failures = [] }" } 00:00:00 v #1 chat_contract / { state = (2, IterableSet { elements: Vector { len: 0, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 0, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:18 i #50 near_workspaces.print_usd / { retry = 9; total_gas_burnt_usd = +0.001326; total_gas_burnt = 1984629049102 } 00:00:18 i #51 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:18 i #52 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.001120; tokens_burnt_usd = +0.001120; gas_burnt = 1676547189762; tokens_burnt = 167654718976200000000 } 00:00:18 w #53 spiral_wasm.run / Error error / { retry = 9; error = "{ receipt_outcomes_len = 1; retry = 9; receipt_failures = [] }" } 00:00:00 v #1 chat_contract / { state = (2, IterableSet { elements: Vector { len: 0, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 0, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:20 i #56 near_workspaces.print_usd / { retry = 10; total_gas_burnt_usd = +0.001326; total_gas_burnt = 1984629049102 } 00:00:20 i #57 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:20 i #58 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.001120; tokens_burnt_usd = +0.001120; gas_burnt = 1676547189762; tokens_burnt = 167654718976200000000 } 00:00:20 w #59 spiral_wasm.run / Error error / { retry = 10; error = "{ receipt_outcomes_len = 1; retry = 10; receipt_failures = [] }" } 00:00:00 v #1 chat_contract / { state = (2, IterableSet { elements: Vector { len: 0, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 0, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:22 i #62 near_workspaces.print_usd / { retry = 11; total_gas_burnt_usd = +0.001326; total_gas_burnt = 1984629049102 } 00:00:22 i #63 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:22 i #64 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.001120; tokens_burnt_usd = +0.001120; gas_burnt = 1676547189762; tokens_burnt = 167654718976200000000 } 00:00:22 w #65 spiral_wasm.run / Error error / { retry = 11; error = "{ receipt_outcomes_len = 1; retry = 11; receipt_failures = [] }" } 00:00:00 v #1 chat_contract / { state = (2, IterableSet { elements: Vector { len: 0, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 0, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:24 i #68 near_workspaces.print_usd / { retry = 12; total_gas_burnt_usd = +0.001326; total_gas_burnt = 1984629049102 } 00:00:24 i #69 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:24 i #70 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.001120; tokens_burnt_usd = +0.001120; gas_burnt = 1676547189762; tokens_burnt = 167654718976200000000 } 00:00:24 w #71 spiral_wasm.run / Error error / { retry = 12; error = "{ receipt_outcomes_len = 1; retry = 12; receipt_failures = [] }" } 00:00:00 v #1 chat_contract / { state = (2, IterableSet { elements: Vector { len: 0, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 0, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:26 i #74 near_workspaces.print_usd / { retry = 13; total_gas_burnt_usd = +0.001326; total_gas_burnt = 1984629049102 } 00:00:26 i #75 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:26 i #76 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.001120; tokens_burnt_usd = +0.001120; gas_burnt = 1676547189762; tokens_burnt = 167654718976200000000 } 00:00:26 w #77 spiral_wasm.run / Error error / { retry = 13; error = "{ receipt_outcomes_len = 1; retry = 13; receipt_failures = [] }" } 00:00:00 v #1 chat_contract / { state = (2, IterableSet { elements: Vector { len: 0, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 0, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:28 i #80 near_workspaces.print_usd / { retry = 14; total_gas_burnt_usd = +0.001326; total_gas_burnt = 1984629049102 } 00:00:28 i #81 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:28 i #82 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.001120; tokens_burnt_usd = +0.001120; gas_burnt = 1676547189762; tokens_burnt = 167654718976200000000 } 00:00:28 w #83 spiral_wasm.run / Error error / { retry = 14; error = "{ receipt_outcomes_len = 1; retry = 14; receipt_failures = [] }" } 00:00:00 v #1 chat_contract / { state = (2, IterableSet { elements: Vector { len: 0, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 0, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:30 i #86 near_workspaces.print_usd / { retry = 15; total_gas_burnt_usd = +0.001326; total_gas_burnt = 1984629049102 } 00:00:30 i #87 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:30 i #88 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.001120; tokens_burnt_usd = +0.001120; gas_burnt = 1676547189762; tokens_burnt = 167654718976200000000 } 00:00:30 w #89 spiral_wasm.run / Error error / { retry = 15; error = "{ receipt_outcomes_len = 1; retry = 15; receipt_failures = [] }" }
is_valid_alias¶
In [ ]:
inl is_valid_alias (alias : sm'.std_string) : bool =
inl alias' = alias |> sm'.from_std_string
inl alias_len = alias' |> sm'.length
alias_len > 0i32
&& alias_len < 64
&& (alias' |> sm'.starts_with "-" |> not)
&& (alias' |> sm'.ends_with "-" |> not)
&& (alias' |> sm'.as_str |> sm'.chars |> iter.all (fun c => (c |> sm'.char_is_alphanumeric) || c = '-'))
In [ ]:
//// test
///! rust -c
""
|> sm'.to_std_string
|> is_valid_alias
|> _assert_eq false
00:00:02 i #2 near_workspaces.print_usd / { retry = 1; total_gas_burnt_usd = +0.000822; total_gas_burnt = 1230902536433 } 00:00:02 i #3 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:02 i #4 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000616; tokens_burnt_usd = +0.000616; gas_burnt = 922820677093; tokens_burnt = 92282067709300000000 } 00:00:02 w #5 spiral_wasm.run / Error error / { retry = 1; error = "{ receipt_outcomes_len = 1; retry = 1; receipt_failures = [] }" } 00:00:04 i #8 near_workspaces.print_usd / { retry = 2; total_gas_burnt_usd = +0.000822; total_gas_burnt = 1230902536433 } 00:00:04 i #9 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:04 i #10 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000616; tokens_burnt_usd = +0.000616; gas_burnt = 922820677093; tokens_burnt = 92282067709300000000 } 00:00:04 w #11 spiral_wasm.run / Error error / { retry = 2; error = "{ receipt_outcomes_len = 1; retry = 2; receipt_failures = [] }" } 00:00:06 i #14 near_workspaces.print_usd / { retry = 3; total_gas_burnt_usd = +0.000822; total_gas_burnt = 1230902536433 } 00:00:06 i #15 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:06 i #16 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000616; tokens_burnt_usd = +0.000616; gas_burnt = 922820677093; tokens_burnt = 92282067709300000000 } 00:00:06 w #17 spiral_wasm.run / Error error / { retry = 3; error = "{ receipt_outcomes_len = 1; retry = 3; receipt_failures = [] }" } 00:00:08 i #20 near_workspaces.print_usd / { retry = 4; total_gas_burnt_usd = +0.000822; total_gas_burnt = 1230902536433 } 00:00:08 i #21 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:08 i #22 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000616; tokens_burnt_usd = +0.000616; gas_burnt = 922820677093; tokens_burnt = 92282067709300000000 } 00:00:08 w #23 spiral_wasm.run / Error error / { retry = 4; error = "{ receipt_outcomes_len = 1; retry = 4; receipt_failures = [] }" } 00:00:10 i #26 near_workspaces.print_usd / { retry = 5; total_gas_burnt_usd = +0.000822; total_gas_burnt = 1230902536433 } 00:00:10 i #27 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:10 i #28 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000616; tokens_burnt_usd = +0.000616; gas_burnt = 922820677093; tokens_burnt = 92282067709300000000 } 00:00:10 w #29 spiral_wasm.run / Error error / { retry = 5; error = "{ receipt_outcomes_len = 1; retry = 5; receipt_failures = [] }" } 00:00:12 i #32 near_workspaces.print_usd / { retry = 6; total_gas_burnt_usd = +0.000822; total_gas_burnt = 1230902536433 } 00:00:12 i #33 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:12 i #34 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000616; tokens_burnt_usd = +0.000616; gas_burnt = 922820677093; tokens_burnt = 92282067709300000000 } 00:00:12 w #35 spiral_wasm.run / Error error / { retry = 6; error = "{ receipt_outcomes_len = 1; retry = 6; receipt_failures = [] }" } 00:00:14 i #38 near_workspaces.print_usd / { retry = 7; total_gas_burnt_usd = +0.000822; total_gas_burnt = 1230902536433 } 00:00:14 i #39 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:14 i #40 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000616; tokens_burnt_usd = +0.000616; gas_burnt = 922820677093; tokens_burnt = 92282067709300000000 } 00:00:14 w #41 spiral_wasm.run / Error error / { retry = 7; error = "{ receipt_outcomes_len = 1; retry = 7; receipt_failures = [] }" } 00:00:16 i #44 near_workspaces.print_usd / { retry = 8; total_gas_burnt_usd = +0.000822; total_gas_burnt = 1230902536433 } 00:00:16 i #45 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:16 i #46 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000616; tokens_burnt_usd = +0.000616; gas_burnt = 922820677093; tokens_burnt = 92282067709300000000 } 00:00:16 w #47 spiral_wasm.run / Error error / { retry = 8; error = "{ receipt_outcomes_len = 1; retry = 8; receipt_failures = [] }" } 00:00:18 i #50 near_workspaces.print_usd / { retry = 9; total_gas_burnt_usd = +0.000822; total_gas_burnt = 1230902536433 } 00:00:18 i #51 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:18 i #52 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000616; tokens_burnt_usd = +0.000616; gas_burnt = 922820677093; tokens_burnt = 92282067709300000000 } 00:00:18 w #53 spiral_wasm.run / Error error / { retry = 9; error = "{ receipt_outcomes_len = 1; retry = 9; receipt_failures = [] }" } 00:00:20 i #56 near_workspaces.print_usd / { retry = 10; total_gas_burnt_usd = +0.000822; total_gas_burnt = 1230902536433 } 00:00:20 i #57 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:20 i #58 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000616; tokens_burnt_usd = +0.000616; gas_burnt = 922820677093; tokens_burnt = 92282067709300000000 } 00:00:20 w #59 spiral_wasm.run / Error error / { retry = 10; error = "{ receipt_outcomes_len = 1; retry = 10; receipt_failures = [] }" } 00:00:22 i #62 near_workspaces.print_usd / { retry = 11; total_gas_burnt_usd = +0.000822; total_gas_burnt = 1230902536433 } 00:00:22 i #63 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:22 i #64 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000616; tokens_burnt_usd = +0.000616; gas_burnt = 922820677093; tokens_burnt = 92282067709300000000 } 00:00:22 w #65 spiral_wasm.run / Error error / { retry = 11; error = "{ receipt_outcomes_len = 1; retry = 11; receipt_failures = [] }" } 00:00:24 i #68 near_workspaces.print_usd / { retry = 12; total_gas_burnt_usd = +0.000822; total_gas_burnt = 1230902536433 } 00:00:24 i #69 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:24 i #70 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000616; tokens_burnt_usd = +0.000616; gas_burnt = 922820677093; tokens_burnt = 92282067709300000000 } 00:00:24 w #71 spiral_wasm.run / Error error / { retry = 12; error = "{ receipt_outcomes_len = 1; retry = 12; receipt_failures = [] }" } 00:00:26 i #74 near_workspaces.print_usd / { retry = 13; total_gas_burnt_usd = +0.000822; total_gas_burnt = 1230902536433 } 00:00:26 i #75 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:26 i #76 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000616; tokens_burnt_usd = +0.000616; gas_burnt = 922820677093; tokens_burnt = 92282067709300000000 } 00:00:26 w #77 spiral_wasm.run / Error error / { retry = 13; error = "{ receipt_outcomes_len = 1; retry = 13; receipt_failures = [] }" } 00:00:28 i #80 near_workspaces.print_usd / { retry = 14; total_gas_burnt_usd = +0.000822; total_gas_burnt = 1230902536433 } 00:00:28 i #81 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:28 i #82 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000616; tokens_burnt_usd = +0.000616; gas_burnt = 922820677093; tokens_burnt = 92282067709300000000 } 00:00:28 w #83 spiral_wasm.run / Error error / { retry = 14; error = "{ receipt_outcomes_len = 1; retry = 14; receipt_failures = [] }" } 00:00:30 i #86 near_workspaces.print_usd / { retry = 15; total_gas_burnt_usd = +0.000822; total_gas_burnt = 1230902536433 } 00:00:30 i #87 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:30 i #88 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000616; tokens_burnt_usd = +0.000616; gas_burnt = 922820677093; tokens_burnt = 92282067709300000000 } 00:00:30 w #89 spiral_wasm.run / Error error / { retry = 15; error = "{ receipt_outcomes_len = 1; retry = 15; receipt_failures = [] }" }
In [ ]:
//// test
///! rust -c
"a-"
|> sm'.to_std_string
|> is_valid_alias
|> _assert_eq false
00:00:02 i #2 near_workspaces.print_usd / { retry = 1; total_gas_burnt_usd = +0.000824; total_gas_burnt = 1232868853856 } 00:00:02 i #3 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:02 i #4 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000618; tokens_burnt_usd = +0.000618; gas_burnt = 924786994516; tokens_burnt = 92478699451600000000 } 00:00:02 w #5 spiral_wasm.run / Error error / { retry = 1; error = "{ receipt_outcomes_len = 1; retry = 1; receipt_failures = [] }" } 00:00:04 i #8 near_workspaces.print_usd / { retry = 2; total_gas_burnt_usd = +0.000824; total_gas_burnt = 1232868853856 } 00:00:04 i #9 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:04 i #10 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000618; tokens_burnt_usd = +0.000618; gas_burnt = 924786994516; tokens_burnt = 92478699451600000000 } 00:00:04 w #11 spiral_wasm.run / Error error / { retry = 2; error = "{ receipt_outcomes_len = 1; retry = 2; receipt_failures = [] }" } 00:00:06 i #14 near_workspaces.print_usd / { retry = 3; total_gas_burnt_usd = +0.000824; total_gas_burnt = 1232868853856 } 00:00:06 i #15 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:06 i #16 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000618; tokens_burnt_usd = +0.000618; gas_burnt = 924786994516; tokens_burnt = 92478699451600000000 } 00:00:06 w #17 spiral_wasm.run / Error error / { retry = 3; error = "{ receipt_outcomes_len = 1; retry = 3; receipt_failures = [] }" } 00:00:08 i #20 near_workspaces.print_usd / { retry = 4; total_gas_burnt_usd = +0.000824; total_gas_burnt = 1232868853856 } 00:00:08 i #21 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:08 i #22 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000618; tokens_burnt_usd = +0.000618; gas_burnt = 924786994516; tokens_burnt = 92478699451600000000 } 00:00:08 w #23 spiral_wasm.run / Error error / { retry = 4; error = "{ receipt_outcomes_len = 1; retry = 4; receipt_failures = [] }" } 00:00:10 i #26 near_workspaces.print_usd / { retry = 5; total_gas_burnt_usd = +0.000824; total_gas_burnt = 1232868853856 } 00:00:10 i #27 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:10 i #28 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000618; tokens_burnt_usd = +0.000618; gas_burnt = 924786994516; tokens_burnt = 92478699451600000000 } 00:00:10 w #29 spiral_wasm.run / Error error / { retry = 5; error = "{ receipt_outcomes_len = 1; retry = 5; receipt_failures = [] }" } 00:00:12 i #32 near_workspaces.print_usd / { retry = 6; total_gas_burnt_usd = +0.000824; total_gas_burnt = 1232868853856 } 00:00:12 i #33 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:12 i #34 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000618; tokens_burnt_usd = +0.000618; gas_burnt = 924786994516; tokens_burnt = 92478699451600000000 } 00:00:12 w #35 spiral_wasm.run / Error error / { retry = 6; error = "{ receipt_outcomes_len = 1; retry = 6; receipt_failures = [] }" } 00:00:14 i #38 near_workspaces.print_usd / { retry = 7; total_gas_burnt_usd = +0.000824; total_gas_burnt = 1232868853856 } 00:00:14 i #39 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:14 i #40 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000618; tokens_burnt_usd = +0.000618; gas_burnt = 924786994516; tokens_burnt = 92478699451600000000 } 00:00:14 w #41 spiral_wasm.run / Error error / { retry = 7; error = "{ receipt_outcomes_len = 1; retry = 7; receipt_failures = [] }" } 00:00:16 i #44 near_workspaces.print_usd / { retry = 8; total_gas_burnt_usd = +0.000824; total_gas_burnt = 1232868853856 } 00:00:16 i #45 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:16 i #46 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000618; tokens_burnt_usd = +0.000618; gas_burnt = 924786994516; tokens_burnt = 92478699451600000000 } 00:00:16 w #47 spiral_wasm.run / Error error / { retry = 8; error = "{ receipt_outcomes_len = 1; retry = 8; receipt_failures = [] }" } 00:00:18 i #50 near_workspaces.print_usd / { retry = 9; total_gas_burnt_usd = +0.000824; total_gas_burnt = 1232868853856 } 00:00:18 i #51 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:18 i #52 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000618; tokens_burnt_usd = +0.000618; gas_burnt = 924786994516; tokens_burnt = 92478699451600000000 } 00:00:18 w #53 spiral_wasm.run / Error error / { retry = 9; error = "{ receipt_outcomes_len = 1; retry = 9; receipt_failures = [] }" } 00:00:20 i #56 near_workspaces.print_usd / { retry = 10; total_gas_burnt_usd = +0.000824; total_gas_burnt = 1232868853856 } 00:00:20 i #57 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:20 i #58 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000618; tokens_burnt_usd = +0.000618; gas_burnt = 924786994516; tokens_burnt = 92478699451600000000 } 00:00:20 w #59 spiral_wasm.run / Error error / { retry = 10; error = "{ receipt_outcomes_len = 1; retry = 10; receipt_failures = [] }" } 00:00:22 i #62 near_workspaces.print_usd / { retry = 11; total_gas_burnt_usd = +0.000824; total_gas_burnt = 1232868853856 } 00:00:22 i #63 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:22 i #64 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000618; tokens_burnt_usd = +0.000618; gas_burnt = 924786994516; tokens_burnt = 92478699451600000000 } 00:00:22 w #65 spiral_wasm.run / Error error / { retry = 11; error = "{ receipt_outcomes_len = 1; retry = 11; receipt_failures = [] }" } 00:00:24 i #68 near_workspaces.print_usd / { retry = 12; total_gas_burnt_usd = +0.000824; total_gas_burnt = 1232868853856 } 00:00:24 i #69 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:24 i #70 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000618; tokens_burnt_usd = +0.000618; gas_burnt = 924786994516; tokens_burnt = 92478699451600000000 } 00:00:24 w #71 spiral_wasm.run / Error error / { retry = 12; error = "{ receipt_outcomes_len = 1; retry = 12; receipt_failures = [] }" } 00:00:26 i #74 near_workspaces.print_usd / { retry = 13; total_gas_burnt_usd = +0.000824; total_gas_burnt = 1232868853856 } 00:00:26 i #75 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:26 i #76 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000618; tokens_burnt_usd = +0.000618; gas_burnt = 924786994516; tokens_burnt = 92478699451600000000 } 00:00:26 w #77 spiral_wasm.run / Error error / { retry = 13; error = "{ receipt_outcomes_len = 1; retry = 13; receipt_failures = [] }" } 00:00:28 i #80 near_workspaces.print_usd / { retry = 14; total_gas_burnt_usd = +0.000824; total_gas_burnt = 1232868853856 } 00:00:28 i #81 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:28 i #82 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000618; tokens_burnt_usd = +0.000618; gas_burnt = 924786994516; tokens_burnt = 92478699451600000000 } 00:00:28 w #83 spiral_wasm.run / Error error / { retry = 14; error = "{ receipt_outcomes_len = 1; retry = 14; receipt_failures = [] }" } 00:00:30 i #86 near_workspaces.print_usd / { retry = 15; total_gas_burnt_usd = +0.000824; total_gas_burnt = 1232868853856 } 00:00:30 i #87 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:30 i #88 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000618; tokens_burnt_usd = +0.000618; gas_burnt = 924786994516; tokens_burnt = 92478699451600000000 } 00:00:30 w #89 spiral_wasm.run / Error error / { retry = 15; error = "{ receipt_outcomes_len = 1; retry = 15; receipt_failures = [] }" }
In [ ]:
//// test
///! rust -c
"a-a"
|> sm'.to_std_string
|> is_valid_alias
|> _assert_eq true
00:00:02 i #2 near_workspaces.print_usd / { retry = 1; total_gas_burnt_usd = +0.000825; total_gas_burnt = 1234466970835 } 00:00:02 i #3 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:02 i #4 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000619; tokens_burnt_usd = +0.000619; gas_burnt = 926385111495; tokens_burnt = 92638511149500000000 } 00:00:02 w #5 spiral_wasm.run / Error error / { retry = 1; error = "{ receipt_outcomes_len = 1; retry = 1; receipt_failures = [] }" } 00:00:04 i #8 near_workspaces.print_usd / { retry = 2; total_gas_burnt_usd = +0.000825; total_gas_burnt = 1234466970835 } 00:00:04 i #9 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:04 i #10 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000619; tokens_burnt_usd = +0.000619; gas_burnt = 926385111495; tokens_burnt = 92638511149500000000 } 00:00:04 w #11 spiral_wasm.run / Error error / { retry = 2; error = "{ receipt_outcomes_len = 1; retry = 2; receipt_failures = [] }" } 00:00:06 i #14 near_workspaces.print_usd / { retry = 3; total_gas_burnt_usd = +0.000825; total_gas_burnt = 1234466970835 } 00:00:06 i #15 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:06 i #16 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000619; tokens_burnt_usd = +0.000619; gas_burnt = 926385111495; tokens_burnt = 92638511149500000000 } 00:00:06 w #17 spiral_wasm.run / Error error / { retry = 3; error = "{ receipt_outcomes_len = 1; retry = 3; receipt_failures = [] }" } 00:00:08 i #20 near_workspaces.print_usd / { retry = 4; total_gas_burnt_usd = +0.000825; total_gas_burnt = 1234466970835 } 00:00:08 i #21 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:08 i #22 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000619; tokens_burnt_usd = +0.000619; gas_burnt = 926385111495; tokens_burnt = 92638511149500000000 } 00:00:08 w #23 spiral_wasm.run / Error error / { retry = 4; error = "{ receipt_outcomes_len = 1; retry = 4; receipt_failures = [] }" } 00:00:10 i #26 near_workspaces.print_usd / { retry = 5; total_gas_burnt_usd = +0.000825; total_gas_burnt = 1234466970835 } 00:00:10 i #27 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:10 i #28 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000619; tokens_burnt_usd = +0.000619; gas_burnt = 926385111495; tokens_burnt = 92638511149500000000 } 00:00:10 w #29 spiral_wasm.run / Error error / { retry = 5; error = "{ receipt_outcomes_len = 1; retry = 5; receipt_failures = [] }" } 00:00:12 i #32 near_workspaces.print_usd / { retry = 6; total_gas_burnt_usd = +0.000825; total_gas_burnt = 1234466970835 } 00:00:12 i #33 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:12 i #34 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000619; tokens_burnt_usd = +0.000619; gas_burnt = 926385111495; tokens_burnt = 92638511149500000000 } 00:00:12 w #35 spiral_wasm.run / Error error / { retry = 6; error = "{ receipt_outcomes_len = 1; retry = 6; receipt_failures = [] }" } 00:00:14 i #38 near_workspaces.print_usd / { retry = 7; total_gas_burnt_usd = +0.000825; total_gas_burnt = 1234466970835 } 00:00:14 i #39 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:14 i #40 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000619; tokens_burnt_usd = +0.000619; gas_burnt = 926385111495; tokens_burnt = 92638511149500000000 } 00:00:14 w #41 spiral_wasm.run / Error error / { retry = 7; error = "{ receipt_outcomes_len = 1; retry = 7; receipt_failures = [] }" } 00:00:16 i #44 near_workspaces.print_usd / { retry = 8; total_gas_burnt_usd = +0.000825; total_gas_burnt = 1234466970835 } 00:00:16 i #45 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:16 i #46 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000619; tokens_burnt_usd = +0.000619; gas_burnt = 926385111495; tokens_burnt = 92638511149500000000 } 00:00:16 w #47 spiral_wasm.run / Error error / { retry = 8; error = "{ receipt_outcomes_len = 1; retry = 8; receipt_failures = [] }" } 00:00:18 i #50 near_workspaces.print_usd / { retry = 9; total_gas_burnt_usd = +0.000825; total_gas_burnt = 1234466970835 } 00:00:18 i #51 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:18 i #52 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000619; tokens_burnt_usd = +0.000619; gas_burnt = 926385111495; tokens_burnt = 92638511149500000000 } 00:00:18 w #53 spiral_wasm.run / Error error / { retry = 9; error = "{ receipt_outcomes_len = 1; retry = 9; receipt_failures = [] }" } 00:00:20 i #56 near_workspaces.print_usd / { retry = 10; total_gas_burnt_usd = +0.000825; total_gas_burnt = 1234466970835 } 00:00:20 i #57 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:20 i #58 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000619; tokens_burnt_usd = +0.000619; gas_burnt = 926385111495; tokens_burnt = 92638511149500000000 } 00:00:20 w #59 spiral_wasm.run / Error error / { retry = 10; error = "{ receipt_outcomes_len = 1; retry = 10; receipt_failures = [] }" } 00:00:22 i #62 near_workspaces.print_usd / { retry = 11; total_gas_burnt_usd = +0.000825; total_gas_burnt = 1234466970835 } 00:00:22 i #63 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:22 i #64 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000619; tokens_burnt_usd = +0.000619; gas_burnt = 926385111495; tokens_burnt = 92638511149500000000 } 00:00:22 w #65 spiral_wasm.run / Error error / { retry = 11; error = "{ receipt_outcomes_len = 1; retry = 11; receipt_failures = [] }" } 00:00:24 i #68 near_workspaces.print_usd / { retry = 12; total_gas_burnt_usd = +0.000825; total_gas_burnt = 1234466970835 } 00:00:24 i #69 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:24 i #70 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000619; tokens_burnt_usd = +0.000619; gas_burnt = 926385111495; tokens_burnt = 92638511149500000000 } 00:00:24 w #71 spiral_wasm.run / Error error / { retry = 12; error = "{ receipt_outcomes_len = 1; retry = 12; receipt_failures = [] }" } 00:00:26 i #74 near_workspaces.print_usd / { retry = 13; total_gas_burnt_usd = +0.000825; total_gas_burnt = 1234466970835 } 00:00:26 i #75 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:26 i #76 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000619; tokens_burnt_usd = +0.000619; gas_burnt = 926385111495; tokens_burnt = 92638511149500000000 } 00:00:26 w #77 spiral_wasm.run / Error error / { retry = 13; error = "{ receipt_outcomes_len = 1; retry = 13; receipt_failures = [] }" } 00:00:28 i #80 near_workspaces.print_usd / { retry = 14; total_gas_burnt_usd = +0.000825; total_gas_burnt = 1234466970835 } 00:00:28 i #81 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:28 i #82 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000619; tokens_burnt_usd = +0.000619; gas_burnt = 926385111495; tokens_burnt = 92638511149500000000 } 00:00:28 w #83 spiral_wasm.run / Error error / { retry = 14; error = "{ receipt_outcomes_len = 1; retry = 14; receipt_failures = [] }" } 00:00:30 i #86 near_workspaces.print_usd / { retry = 15; total_gas_burnt_usd = +0.000825; total_gas_burnt = 1234466970835 } 00:00:30 i #87 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:30 i #88 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000619; tokens_burnt_usd = +0.000619; gas_burnt = 926385111495; tokens_burnt = 92638511149500000000 } 00:00:30 w #89 spiral_wasm.run / Error error / { retry = 15; error = "{ receipt_outcomes_len = 1; retry = 15; receipt_failures = [] }" }
generate_cid¶
In [ ]:
inl generate_cid (content : am'.vec u8) : sm'.std_string =
!\($'" fn encode_u64(value: u64) -> Vec<u8> { //"') : ()
!\($'" let mut buffer = unsigned_varint::encode::u64_buffer(); //"') : ()
!\($'" unsigned_varint::encode::u64(value, &mut buffer).to_vec() //"') : ()
!\($'" } //"') : ()
!\($'" fn sha256_hash(content: &[u8]) -> Vec<u8> { //"') : ()
!\($'" let mut hasher: sha2::Sha256 = sha2::Digest::new(); //"') : ()
!\($'" sha2::Digest::update(&mut hasher, content); //"') : ()
!\($'" sha2::Digest::finalize(hasher).to_vec() //"') : ()
!\($'" } //"') : ()
!\($'" let version: u8 = 1; //"') : ()
!\($'" let codec_raw: u64 = 0x55; //"') : ()
!\($'" let codec_bytes = encode_u64(codec_raw); //"') : ()
!\($'" let hash_result = sha256_hash(&!content); //"') : ()
!\($'" let multihash = std::iter::once(0x12) //"') : ()
!\($'" .chain(std::iter::once(32)) //"') : ()
!\($'" .chain(hash_result.into_iter()) //"') : ()
!\($'" .collect(); //"') : ()
!\($'" let cid_bytes = [vec\![version], codec_bytes, multihash].concat(); //"') : ()
!\($'" let result = multibase::encode(multibase::Base::Base32Lower, &cid_bytes); //"') : ()
!\($'"result"')
In [ ]:
//// test
///! rust -c -d multibase sha2 unsigned-varint
;[]
|> am'.to_vec
|> generate_cid
|> sm'.from_std_string
|> _assert_eq "bafkreihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku"
00:00:02 i #2 near_workspaces.print_usd / { retry = 1; total_gas_burnt_usd = +0.000876; total_gas_burnt = 1311905494477 } 00:00:02 i #3 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:02 i #4 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000671; tokens_burnt_usd = +0.000671; gas_burnt = 1003823635137; tokens_burnt = 100382363513700000000 } 00:00:02 w #5 spiral_wasm.run / Error error / { retry = 1; error = "{ receipt_outcomes_len = 1; retry = 1; receipt_failures = [] }" } 00:00:04 i #8 near_workspaces.print_usd / { retry = 2; total_gas_burnt_usd = +0.000876; total_gas_burnt = 1311905494477 } 00:00:04 i #9 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:04 i #10 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000671; tokens_burnt_usd = +0.000671; gas_burnt = 1003823635137; tokens_burnt = 100382363513700000000 } 00:00:04 w #11 spiral_wasm.run / Error error / { retry = 2; error = "{ receipt_outcomes_len = 1; retry = 2; receipt_failures = [] }" } 00:00:06 i #14 near_workspaces.print_usd / { retry = 3; total_gas_burnt_usd = +0.000876; total_gas_burnt = 1311905494477 } 00:00:06 i #15 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:06 i #16 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000671; tokens_burnt_usd = +0.000671; gas_burnt = 1003823635137; tokens_burnt = 100382363513700000000 } 00:00:06 w #17 spiral_wasm.run / Error error / { retry = 3; error = "{ receipt_outcomes_len = 1; retry = 3; receipt_failures = [] }" } 00:00:08 i #20 near_workspaces.print_usd / { retry = 4; total_gas_burnt_usd = +0.000876; total_gas_burnt = 1311905494477 } 00:00:08 i #21 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:08 i #22 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000671; tokens_burnt_usd = +0.000671; gas_burnt = 1003823635137; tokens_burnt = 100382363513700000000 } 00:00:08 w #23 spiral_wasm.run / Error error / { retry = 4; error = "{ receipt_outcomes_len = 1; retry = 4; receipt_failures = [] }" } 00:00:10 i #26 near_workspaces.print_usd / { retry = 5; total_gas_burnt_usd = +0.000876; total_gas_burnt = 1311905494477 } 00:00:10 i #27 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:10 i #28 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000671; tokens_burnt_usd = +0.000671; gas_burnt = 1003823635137; tokens_burnt = 100382363513700000000 } 00:00:10 w #29 spiral_wasm.run / Error error / { retry = 5; error = "{ receipt_outcomes_len = 1; retry = 5; receipt_failures = [] }" } 00:00:12 i #32 near_workspaces.print_usd / { retry = 6; total_gas_burnt_usd = +0.000876; total_gas_burnt = 1311905494477 } 00:00:12 i #33 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:12 i #34 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000671; tokens_burnt_usd = +0.000671; gas_burnt = 1003823635137; tokens_burnt = 100382363513700000000 } 00:00:12 w #35 spiral_wasm.run / Error error / { retry = 6; error = "{ receipt_outcomes_len = 1; retry = 6; receipt_failures = [] }" } 00:00:14 i #38 near_workspaces.print_usd / { retry = 7; total_gas_burnt_usd = +0.000876; total_gas_burnt = 1311905494477 } 00:00:14 i #39 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:14 i #40 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000671; tokens_burnt_usd = +0.000671; gas_burnt = 1003823635137; tokens_burnt = 100382363513700000000 } 00:00:14 w #41 spiral_wasm.run / Error error / { retry = 7; error = "{ receipt_outcomes_len = 1; retry = 7; receipt_failures = [] }" } 00:00:16 i #44 near_workspaces.print_usd / { retry = 8; total_gas_burnt_usd = +0.000876; total_gas_burnt = 1311905494477 } 00:00:16 i #45 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:16 i #46 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000671; tokens_burnt_usd = +0.000671; gas_burnt = 1003823635137; tokens_burnt = 100382363513700000000 } 00:00:16 w #47 spiral_wasm.run / Error error / { retry = 8; error = "{ receipt_outcomes_len = 1; retry = 8; receipt_failures = [] }" } 00:00:18 i #50 near_workspaces.print_usd / { retry = 9; total_gas_burnt_usd = +0.000876; total_gas_burnt = 1311905494477 } 00:00:18 i #51 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:18 i #52 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000671; tokens_burnt_usd = +0.000671; gas_burnt = 1003823635137; tokens_burnt = 100382363513700000000 } 00:00:18 w #53 spiral_wasm.run / Error error / { retry = 9; error = "{ receipt_outcomes_len = 1; retry = 9; receipt_failures = [] }" } 00:00:20 i #56 near_workspaces.print_usd / { retry = 10; total_gas_burnt_usd = +0.000876; total_gas_burnt = 1311905494477 } 00:00:20 i #57 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:20 i #58 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000671; tokens_burnt_usd = +0.000671; gas_burnt = 1003823635137; tokens_burnt = 100382363513700000000 } 00:00:20 w #59 spiral_wasm.run / Error error / { retry = 10; error = "{ receipt_outcomes_len = 1; retry = 10; receipt_failures = [] }" } 00:00:22 i #62 near_workspaces.print_usd / { retry = 11; total_gas_burnt_usd = +0.000876; total_gas_burnt = 1311905494477 } 00:00:22 i #63 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:22 i #64 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000671; tokens_burnt_usd = +0.000671; gas_burnt = 1003823635137; tokens_burnt = 100382363513700000000 } 00:00:22 w #65 spiral_wasm.run / Error error / { retry = 11; error = "{ receipt_outcomes_len = 1; retry = 11; receipt_failures = [] }" } 00:00:24 i #68 near_workspaces.print_usd / { retry = 12; total_gas_burnt_usd = +0.000876; total_gas_burnt = 1311905494477 } 00:00:24 i #69 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:24 i #70 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000671; tokens_burnt_usd = +0.000671; gas_burnt = 1003823635137; tokens_burnt = 100382363513700000000 } 00:00:24 w #71 spiral_wasm.run / Error error / { retry = 12; error = "{ receipt_outcomes_len = 1; retry = 12; receipt_failures = [] }" } 00:00:26 i #74 near_workspaces.print_usd / { retry = 13; total_gas_burnt_usd = +0.000876; total_gas_burnt = 1311905494477 } 00:00:26 i #75 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:26 i #76 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000671; tokens_burnt_usd = +0.000671; gas_burnt = 1003823635137; tokens_burnt = 100382363513700000000 } 00:00:26 w #77 spiral_wasm.run / Error error / { retry = 13; error = "{ receipt_outcomes_len = 1; retry = 13; receipt_failures = [] }" } 00:00:28 i #80 near_workspaces.print_usd / { retry = 14; total_gas_burnt_usd = +0.000876; total_gas_burnt = 1311905494477 } 00:00:28 i #81 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:28 i #82 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000671; tokens_burnt_usd = +0.000671; gas_burnt = 1003823635137; tokens_burnt = 100382363513700000000 } 00:00:28 w #83 spiral_wasm.run / Error error / { retry = 14; error = "{ receipt_outcomes_len = 1; retry = 14; receipt_failures = [] }" } 00:00:30 i #86 near_workspaces.print_usd / { retry = 15; total_gas_burnt_usd = +0.000876; total_gas_burnt = 1311905494477 } 00:00:30 i #87 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:30 i #88 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000671; tokens_burnt_usd = +0.000671; gas_burnt = 1003823635137; tokens_burnt = 100382363513700000000 } 00:00:30 w #89 spiral_wasm.run / Error error / { retry = 15; error = "{ receipt_outcomes_len = 1; retry = 15; receipt_failures = [] }" }
claim_alias¶
In [ ]:
inl claim_alias (state : rust.ref (rust.mut' state)) (alias : sm'.std_string) : () =
inl account_set : rust.ref (rust.mut' (near.iterable_set near.account_id)) =
!\($'$"&mut !state.1"')
inl alias_set : rust.ref (rust.mut' (near.iterable_set sm'.std_string)) =
!\($'$"&mut !state.2"')
inl account_map : rust.ref (rust.mut' (near.lookup_map near.account_id sm'.std_string)) =
!\($'$"&mut !state.3"')
inl alias_map : rust.ref (rust.mut' (near.lookup_map sm'.std_string (mapm.hash_map near.account_id (u64 * u32)))) =
!\($'$"&mut !state.4"')
inl signer_account_id = near.signer_account_id ()
inl predecessor_account_id = near.predecessor_account_id ()
inl block_timestamp = near.block_timestamp ()
trace Debug
fun () => "chat_contract.claim_alias"
fun () => {
alias
block_timestamp
signer_account_id = signer_account_id |> sm'.to_string'
predecessor_account_id = predecessor_account_id |> sm'.to_string'
}
if alias |> is_valid_alias |> not
then near.panic_str "chat_contract.claim_alias / invalid alias" . true
else false
|> ignore
inl account_alias =
account_map
|> near.lookup_get signer_account_id
|> optionm'.cloned
match account_alias |> optionm'.unbox with
| Some account_alias when account_alias =. alias =>
trace Warning
fun () => "chat_contract.claim_alias / alias already claimed"
fun () => { account_alias = account_alias |> sm'.format_debug }
| account_alias' =>
trace Debug
fun () => "chat_contract.claim_alias"
fun () => { account_alias = account_alias |> sm'.format_debug }
match account_alias' with
| Some account_alias =>
!\($'" !alias_map //"') : ()
!\($'" .get_mut(&!account_alias) //"') : ()
!\($'" .unwrap() //"') : ()
!\\(signer_account_id, $'" .remove(&$0); //"') : ()
| None => ()
!\\((signer_account_id, alias), $'" !account_map.insert($0.clone(), $1.clone()); //"') : ()
account_set |> near.iterable_set_insert signer_account_id |> ignore
alias_set |> near.iterable_set_insert alias |> ignore
!\\(alias, $'" let new_alias_account_map = match !alias_map.get(&$0) { //"') : ()
!\($'" None => { //"') : ()
!\($'" let mut new_map = std::collections::HashMap::new(); //"') : ()
!\\((signer_account_id, block_timestamp), $'" new_map.insert($0, ($1, 0u32)); //"') : ()
!\($'" new_map //"') : ()
!\($'" } //"') : ()
!\($'" Some(accounts) => { //"') : ()
!\($'" let mut accounts_vec = accounts.iter().collect::<Vec<_>>(); //"') : ()
!\($'" accounts_vec.sort_unstable_by_key(|(_, (_, index))| index); //"') : ()
!\($'" let mut new_map = accounts_vec //"') : ()
!\($'" .iter() //"') : ()
!\($'" .enumerate() //"') : ()
!\($'" .map(|(i, (signer_account_id, (timestamp, _)))| { //"') : ()
!\($'" ((*signer_account_id).clone(), (*timestamp, i as u32)) //"') : ()
!\($'" }) //"') : ()
!\($'" .collect::<std::collections::HashMap<_, _>>(); //"') : ()
!\\(signer_account_id, $'" new_map.insert($0, (!block_timestamp, accounts_vec.len() as u32)); //"') : ()
!\($'" new_map //"') : ()
!\($'" } //"') : ()
!\($'" }; //"') : ()
!\\(alias, $'" !alias_map.insert($0, new_alias_account_map); //"') : ()
In [ ]:
//// test
///! rust -c
inl state = new ()
inl version = state.version
inl account_set = state.account_set
inl alias_set = state.alias_set
inl account_map = state.account_map
inl alias_map = state.alias_map
inl version = join version
inl account_set = join account_set
inl alias_set = join alias_set
inl account_map = join account_map
inl alias_map = join alias_map
inl state : rust.ref (rust.mut' state) =
!\\(
version,
$'$"&mut ($0, !account_set, !alias_set, !account_map, !alias_map)"'
)
"alias1"
|> sm'.to_std_string
|> claim_alias state
trace Verbose
fun () => "chat_contract"
fun () => { state = state |> sm'.format_debug }
trace Debug (fun () => "") id
00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575307396250841; signer_account_id = "dev-20241219022826-91835714238944"; predecessor_account_id = "dev-20241219022826-91835714238944" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 v #3 chat_contract / { state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:02 i #2 near_workspaces.print_usd / { retry = 1; total_gas_burnt_usd = +0.002571; total_gas_burnt = 3849379198056 } 00:00:02 i #3 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:02 i #4 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.002366; tokens_burnt_usd = +0.002366; gas_burnt = 3541297338716; tokens_burnt = 354129733871600000000 } 00:00:02 w #5 spiral_wasm.run / Error error / { retry = 1; error = "{ receipt_outcomes_len = 1; retry = 1; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575309430420871; signer_account_id = "dev-20241219022828-20674483385071"; predecessor_account_id = "dev-20241219022828-20674483385071" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 v #3 chat_contract / { state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:04 i #8 near_workspaces.print_usd / { retry = 2; total_gas_burnt_usd = +0.002571; total_gas_burnt = 3849379198056 } 00:00:04 i #9 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:04 i #10 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.002366; tokens_burnt_usd = +0.002366; gas_burnt = 3541297338716; tokens_burnt = 354129733871600000000 } 00:00:04 w #11 spiral_wasm.run / Error error / { retry = 2; error = "{ receipt_outcomes_len = 1; retry = 2; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575311470076797; signer_account_id = "dev-20241219022830-67866641891627"; predecessor_account_id = "dev-20241219022830-67866641891627" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 v #3 chat_contract / { state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:06 i #14 near_workspaces.print_usd / { retry = 3; total_gas_burnt_usd = +0.002571; total_gas_burnt = 3849379198056 } 00:00:06 i #15 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:06 i #16 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.002366; tokens_burnt_usd = +0.002366; gas_burnt = 3541297338716; tokens_burnt = 354129733871600000000 } 00:00:06 w #17 spiral_wasm.run / Error error / { retry = 3; error = "{ receipt_outcomes_len = 1; retry = 3; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575313508298513; signer_account_id = "dev-20241219022832-78772269443857"; predecessor_account_id = "dev-20241219022832-78772269443857" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 v #3 chat_contract / { state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:08 i #20 near_workspaces.print_usd / { retry = 4; total_gas_burnt_usd = +0.002571; total_gas_burnt = 3849379198056 } 00:00:08 i #21 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:08 i #22 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.002366; tokens_burnt_usd = +0.002366; gas_burnt = 3541297338716; tokens_burnt = 354129733871600000000 } 00:00:08 w #23 spiral_wasm.run / Error error / { retry = 4; error = "{ receipt_outcomes_len = 1; retry = 4; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575315548035627; signer_account_id = "dev-20241219022834-58733437424117"; predecessor_account_id = "dev-20241219022834-58733437424117" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 v #3 chat_contract / { state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:10 i #26 near_workspaces.print_usd / { retry = 5; total_gas_burnt_usd = +0.002571; total_gas_burnt = 3849379198056 } 00:00:10 i #27 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:10 i #28 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.002366; tokens_burnt_usd = +0.002366; gas_burnt = 3541297338716; tokens_burnt = 354129733871600000000 } 00:00:10 w #29 spiral_wasm.run / Error error / { retry = 5; error = "{ receipt_outcomes_len = 1; retry = 5; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575317599182849; signer_account_id = "dev-20241219022836-68100011900831"; predecessor_account_id = "dev-20241219022836-68100011900831" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 v #3 chat_contract / { state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:12 i #32 near_workspaces.print_usd / { retry = 6; total_gas_burnt_usd = +0.002571; total_gas_burnt = 3849379198056 } 00:00:12 i #33 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:12 i #34 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.002366; tokens_burnt_usd = +0.002366; gas_burnt = 3541297338716; tokens_burnt = 354129733871600000000 } 00:00:12 w #35 spiral_wasm.run / Error error / { retry = 6; error = "{ receipt_outcomes_len = 1; retry = 6; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575319618477205; signer_account_id = "dev-20241219022838-64056880551242"; predecessor_account_id = "dev-20241219022838-64056880551242" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 v #3 chat_contract / { state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:14 i #38 near_workspaces.print_usd / { retry = 7; total_gas_burnt_usd = +0.002571; total_gas_burnt = 3849379198056 } 00:00:14 i #39 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:14 i #40 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.002366; tokens_burnt_usd = +0.002366; gas_burnt = 3541297338716; tokens_burnt = 354129733871600000000 } 00:00:14 w #41 spiral_wasm.run / Error error / { retry = 7; error = "{ receipt_outcomes_len = 1; retry = 7; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575322139085128; signer_account_id = "dev-20241219022840-89152101293602"; predecessor_account_id = "dev-20241219022840-89152101293602" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 v #3 chat_contract / { state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:16 i #44 near_workspaces.print_usd / { retry = 8; total_gas_burnt_usd = +0.002571; total_gas_burnt = 3849379198056 } 00:00:16 i #45 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:16 i #46 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.002366; tokens_burnt_usd = +0.002366; gas_burnt = 3541297338716; tokens_burnt = 354129733871600000000 } 00:00:16 w #47 spiral_wasm.run / Error error / { retry = 8; error = "{ receipt_outcomes_len = 1; retry = 8; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575324243597187; signer_account_id = "dev-20241219022843-68073809982709"; predecessor_account_id = "dev-20241219022843-68073809982709" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 v #3 chat_contract / { state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:18 i #50 near_workspaces.print_usd / { retry = 9; total_gas_burnt_usd = +0.002571; total_gas_burnt = 3849379198056 } 00:00:18 i #51 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:18 i #52 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.002366; tokens_burnt_usd = +0.002366; gas_burnt = 3541297338716; tokens_burnt = 354129733871600000000 } 00:00:18 w #53 spiral_wasm.run / Error error / { retry = 9; error = "{ receipt_outcomes_len = 1; retry = 9; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575326278562831; signer_account_id = "dev-20241219022845-22120422365549"; predecessor_account_id = "dev-20241219022845-22120422365549" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 v #3 chat_contract / { state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:20 i #56 near_workspaces.print_usd / { retry = 10; total_gas_burnt_usd = +0.002571; total_gas_burnt = 3849379198056 } 00:00:20 i #57 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:20 i #58 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.002366; tokens_burnt_usd = +0.002366; gas_burnt = 3541297338716; tokens_burnt = 354129733871600000000 } 00:00:20 w #59 spiral_wasm.run / Error error / { retry = 10; error = "{ receipt_outcomes_len = 1; retry = 10; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575328805445067; signer_account_id = "dev-20241219022847-35827416592785"; predecessor_account_id = "dev-20241219022847-35827416592785" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 v #3 chat_contract / { state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:23 i #62 near_workspaces.print_usd / { retry = 11; total_gas_burnt_usd = +0.002571; total_gas_burnt = 3849379198056 } 00:00:23 i #63 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:23 i #64 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.002366; tokens_burnt_usd = +0.002366; gas_burnt = 3541297338716; tokens_burnt = 354129733871600000000 } 00:00:23 w #65 spiral_wasm.run / Error error / { retry = 11; error = "{ receipt_outcomes_len = 1; retry = 11; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575330847415018; signer_account_id = "dev-20241219022849-45467398990577"; predecessor_account_id = "dev-20241219022849-45467398990577" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 v #3 chat_contract / { state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:25 i #68 near_workspaces.print_usd / { retry = 12; total_gas_burnt_usd = +0.002571; total_gas_burnt = 3849379198056 } 00:00:25 i #69 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:25 i #70 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.002366; tokens_burnt_usd = +0.002366; gas_burnt = 3541297338716; tokens_burnt = 354129733871600000000 } 00:00:25 w #71 spiral_wasm.run / Error error / { retry = 12; error = "{ receipt_outcomes_len = 1; retry = 12; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575332869455965; signer_account_id = "dev-20241219022852-39591484387170"; predecessor_account_id = "dev-20241219022852-39591484387170" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 v #3 chat_contract / { state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:27 i #74 near_workspaces.print_usd / { retry = 13; total_gas_burnt_usd = +0.002571; total_gas_burnt = 3849379198056 } 00:00:27 i #75 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:27 i #76 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.002366; tokens_burnt_usd = +0.002366; gas_burnt = 3541297338716; tokens_burnt = 354129733871600000000 } 00:00:27 w #77 spiral_wasm.run / Error error / { retry = 13; error = "{ receipt_outcomes_len = 1; retry = 13; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575334905360216; signer_account_id = "dev-20241219022854-19485137878617"; predecessor_account_id = "dev-20241219022854-19485137878617" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 v #3 chat_contract / { state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:29 i #80 near_workspaces.print_usd / { retry = 14; total_gas_burnt_usd = +0.002571; total_gas_burnt = 3849379198056 } 00:00:29 i #81 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:29 i #82 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.002366; tokens_burnt_usd = +0.002366; gas_burnt = 3541297338716; tokens_burnt = 354129733871600000000 } 00:00:29 w #83 spiral_wasm.run / Error error / { retry = 14; error = "{ receipt_outcomes_len = 1; retry = 14; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575337513071928; signer_account_id = "dev-20241219022856-54792818194993"; predecessor_account_id = "dev-20241219022856-54792818194993" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 v #3 chat_contract / { state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:32 i #86 near_workspaces.print_usd / { retry = 15; total_gas_burnt_usd = +0.002571; total_gas_burnt = 3849379198056 } 00:00:32 i #87 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:32 i #88 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.002366; tokens_burnt_usd = +0.002366; gas_burnt = 3541297338716; tokens_burnt = 354129733871600000000 } 00:00:32 w #89 spiral_wasm.run / Error error / { retry = 15; error = "{ receipt_outcomes_len = 1; retry = 15; receipt_failures = [] }" }
In [ ]:
//// test
///! rust \"-c=-e=\\\"chat_contract.claim_alias / invalid alias\\\"\"
""
|> sm'.to_std_string
|> claim_alias (
inl state = new ()
inl version = state.version
inl account_set = state.account_set
inl alias_set = state.alias_set
inl account_map = state.account_map
inl alias_map = state.alias_map
!\\(version, $'$"&mut ($0, !account_set, !alias_set, !account_map, !alias_map)"')
)
trace Debug (fun () => "") id
00:00:07 i #2 near_workspaces.print_usd / { retry = 1; total_gas_burnt_usd = +0.001159; total_gas_burnt = 1735044847230 } 00:00:07 i #3 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:07 i #4 near_workspaces.print_usd / outcome / { is_success = false; gas_burnt_usd = +0.000953; tokens_burnt_usd = +0.000953; gas_burnt = 1426962987890; tokens_burnt = 142696298789000000000 } 00:00:07 c #5 spiral_wasm.run / Ok (Some error) / { retry = 1; error = { receipt_outcomes_len = 1; retry = 1; receipt_failures = [ ExecutionOutcome { transaction_hash: J6jEM264rN2txTprxSEK5EuTkx4coELbtFb75wUmGb62, block_hash: 9ZAu9uDx6SAWhwnA1fWzkkbUwh3m1waCfDHzuYiknAd6, logs: [], receipt_ids: [ CdFGMGg8uhdxjkoYcdWTM3BdBMG46wPDoL1fG7Z1qq9a, ], gas_burnt: NearGas { inner: 1426962987890, }, tokens_burnt: NearToken { inner: 142696298789000000000, }, executor_id: AccountId( "dev-20241219022915-81099083563195", ), status: Failure(ActionError(ActionError { index: Some(0), kind: FunctionCallError(ExecutionError("Smart contract panicked: chat_contract.claim_alias / invalid alias")) })), }, ] } }
In [ ]:
//// test
///! rust -cd borsh
inl state' = new ()
inl state = state'
inl version = state.version
inl account_set = state.account_set
inl alias_set = state.alias_set
inl account_map = state.account_map
inl alias_map = state.alias_map
inl version = join version
inl account_set = join account_set
inl alias_set = join alias_set
inl account_map = join account_map
inl alias_map = join alias_map
inl state =
!\\(
(version, account_set, alias_set),
$'$"&mut ($0, $1, $2, !account_map, !alias_map)"'
)
"alias1"
|> sm'.to_std_string
|> claim_alias state
"alias1"
|> sm'.to_std_string
|> claim_alias state
"alias1"
|> sm'.to_std_string
|> claim_alias state
inl account_set' : rust.ref (near.iterable_set near.account_id) =
!\($'$"&!state.1"')
inl alias_set' : rust.ref (near.iterable_set sm'.std_string) =
!\($'$"&!state.2"')
inl account_set' =
account_set'
|> iter.iter_ref''
|> iter.cloned
|> iter_collect
inl alias_set' =
alias_set'
|> iter.iter_ref''
|> iter.cloned
|> iter_collect
|> am'.vec_map sm'.from_std_string
trace Verbose
fun () => "chat_contract"
fun () => {
account_set' = account_set' |> sm'.format_debug
alias_set' = alias_set' |> sm'.format_debug
state = state |> sm'.format_debug
}
trace Debug (fun () => "") id
account_set'
|> am'.vec_len
|> convert
|> _assert_eq 1u32
alias_set'
|> am'.from_vec_base
|> _assert_eq' ;[ "alias1" ]
00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575370270197988; signer_account_id = "dev-20241219022929-36594492990078"; predecessor_account_id = "dev-20241219022929-36594492990078" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 d #3 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575370270197988; signer_account_id = "dev-20241219022929-36594492990078"; predecessor_account_id = "dev-20241219022929-36594492990078" } 00:00:00 d #4 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 d #5 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575370270197988; signer_account_id = "dev-20241219022929-36594492990078"; predecessor_account_id = "dev-20241219022929-36594492990078" } 00:00:00 d #6 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 v #7 chat_contract / { account_set' = [AccountId("dev-20241219022929-36594492990078")]; alias_set' = ["alias1"]; state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:02 i #2 near_workspaces.print_usd / { retry = 1; total_gas_burnt_usd = +0.004515; total_gas_burnt = 6758387707754 } 00:00:02 i #3 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:02 i #4 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.004309; tokens_burnt_usd = +0.004309; gas_burnt = 6450305848414; tokens_burnt = 645030584841400000000 } 00:00:02 w #5 spiral_wasm.run / Error error / { retry = 1; error = "{ receipt_outcomes_len = 1; retry = 1; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575372791045622; signer_account_id = "dev-20241219022931-67391922679732"; predecessor_account_id = "dev-20241219022931-67391922679732" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 d #3 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575372791045622; signer_account_id = "dev-20241219022931-67391922679732"; predecessor_account_id = "dev-20241219022931-67391922679732" } 00:00:00 d #4 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 d #5 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575372791045622; signer_account_id = "dev-20241219022931-67391922679732"; predecessor_account_id = "dev-20241219022931-67391922679732" } 00:00:00 d #6 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 v #7 chat_contract / { account_set' = [AccountId("dev-20241219022931-67391922679732")]; alias_set' = ["alias1"]; state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:04 i #8 near_workspaces.print_usd / { retry = 2; total_gas_burnt_usd = +0.004515; total_gas_burnt = 6758387707754 } 00:00:04 i #9 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:04 i #10 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.004309; tokens_burnt_usd = +0.004309; gas_burnt = 6450305848414; tokens_burnt = 645030584841400000000 } 00:00:04 w #11 spiral_wasm.run / Error error / { retry = 2; error = "{ receipt_outcomes_len = 1; retry = 2; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575374852858464; signer_account_id = "dev-20241219022934-99430302696636"; predecessor_account_id = "dev-20241219022934-99430302696636" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 d #3 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575374852858464; signer_account_id = "dev-20241219022934-99430302696636"; predecessor_account_id = "dev-20241219022934-99430302696636" } 00:00:00 d #4 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 d #5 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575374852858464; signer_account_id = "dev-20241219022934-99430302696636"; predecessor_account_id = "dev-20241219022934-99430302696636" } 00:00:00 d #6 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 v #7 chat_contract / { account_set' = [AccountId("dev-20241219022934-99430302696636")]; alias_set' = ["alias1"]; state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:06 i #14 near_workspaces.print_usd / { retry = 3; total_gas_burnt_usd = +0.004515; total_gas_burnt = 6758387707754 } 00:00:06 i #15 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:06 i #16 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.004309; tokens_burnt_usd = +0.004309; gas_burnt = 6450305848414; tokens_burnt = 645030584841400000000 } 00:00:06 w #17 spiral_wasm.run / Error error / { retry = 3; error = "{ receipt_outcomes_len = 1; retry = 3; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575376898677322; signer_account_id = "dev-20241219022936-68725176445692"; predecessor_account_id = "dev-20241219022936-68725176445692" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 d #3 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575376898677322; signer_account_id = "dev-20241219022936-68725176445692"; predecessor_account_id = "dev-20241219022936-68725176445692" } 00:00:00 d #4 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 d #5 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575376898677322; signer_account_id = "dev-20241219022936-68725176445692"; predecessor_account_id = "dev-20241219022936-68725176445692" } 00:00:00 d #6 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 v #7 chat_contract / { account_set' = [AccountId("dev-20241219022936-68725176445692")]; alias_set' = ["alias1"]; state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:08 i #20 near_workspaces.print_usd / { retry = 4; total_gas_burnt_usd = +0.004515; total_gas_burnt = 6758387707754 } 00:00:08 i #21 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:08 i #22 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.004309; tokens_burnt_usd = +0.004309; gas_burnt = 6450305848414; tokens_burnt = 645030584841400000000 } 00:00:08 w #23 spiral_wasm.run / Error error / { retry = 4; error = "{ receipt_outcomes_len = 1; retry = 4; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575378944839100; signer_account_id = "dev-20241219022938-11168701228159"; predecessor_account_id = "dev-20241219022938-11168701228159" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 d #3 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575378944839100; signer_account_id = "dev-20241219022938-11168701228159"; predecessor_account_id = "dev-20241219022938-11168701228159" } 00:00:00 d #4 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 d #5 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575378944839100; signer_account_id = "dev-20241219022938-11168701228159"; predecessor_account_id = "dev-20241219022938-11168701228159" } 00:00:00 d #6 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 v #7 chat_contract / { account_set' = [AccountId("dev-20241219022938-11168701228159")]; alias_set' = ["alias1"]; state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:10 i #26 near_workspaces.print_usd / { retry = 5; total_gas_burnt_usd = +0.004515; total_gas_burnt = 6758387707754 } 00:00:10 i #27 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:10 i #28 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.004309; tokens_burnt_usd = +0.004309; gas_burnt = 6450305848414; tokens_burnt = 645030584841400000000 } 00:00:10 w #29 spiral_wasm.run / Error error / { retry = 5; error = "{ receipt_outcomes_len = 1; retry = 5; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575380963300018; signer_account_id = "dev-20241219022940-20491847890132"; predecessor_account_id = "dev-20241219022940-20491847890132" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 d #3 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575380963300018; signer_account_id = "dev-20241219022940-20491847890132"; predecessor_account_id = "dev-20241219022940-20491847890132" } 00:00:00 d #4 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 d #5 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575380963300018; signer_account_id = "dev-20241219022940-20491847890132"; predecessor_account_id = "dev-20241219022940-20491847890132" } 00:00:00 d #6 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 v #7 chat_contract / { account_set' = [AccountId("dev-20241219022940-20491847890132")]; alias_set' = ["alias1"]; state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:12 i #32 near_workspaces.print_usd / { retry = 6; total_gas_burnt_usd = +0.004515; total_gas_burnt = 6758387707754 } 00:00:12 i #33 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:12 i #34 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.004309; tokens_burnt_usd = +0.004309; gas_burnt = 6450305848414; tokens_burnt = 645030584841400000000 } 00:00:12 w #35 spiral_wasm.run / Error error / { retry = 6; error = "{ receipt_outcomes_len = 1; retry = 6; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575382998950321; signer_account_id = "dev-20241219022942-54178267124871"; predecessor_account_id = "dev-20241219022942-54178267124871" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 d #3 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575382998950321; signer_account_id = "dev-20241219022942-54178267124871"; predecessor_account_id = "dev-20241219022942-54178267124871" } 00:00:00 d #4 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 d #5 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575382998950321; signer_account_id = "dev-20241219022942-54178267124871"; predecessor_account_id = "dev-20241219022942-54178267124871" } 00:00:00 d #6 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 v #7 chat_contract / { account_set' = [AccountId("dev-20241219022942-54178267124871")]; alias_set' = ["alias1"]; state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:14 i #38 near_workspaces.print_usd / { retry = 7; total_gas_burnt_usd = +0.004515; total_gas_burnt = 6758387707754 } 00:00:14 i #39 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:14 i #40 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.004309; tokens_burnt_usd = +0.004309; gas_burnt = 6450305848414; tokens_burnt = 645030584841400000000 } 00:00:14 w #41 spiral_wasm.run / Error error / { retry = 7; error = "{ receipt_outcomes_len = 1; retry = 7; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575385037440529; signer_account_id = "dev-20241219022944-82273506893553"; predecessor_account_id = "dev-20241219022944-82273506893553" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 d #3 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575385037440529; signer_account_id = "dev-20241219022944-82273506893553"; predecessor_account_id = "dev-20241219022944-82273506893553" } 00:00:00 d #4 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 d #5 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575385037440529; signer_account_id = "dev-20241219022944-82273506893553"; predecessor_account_id = "dev-20241219022944-82273506893553" } 00:00:00 d #6 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 v #7 chat_contract / { account_set' = [AccountId("dev-20241219022944-82273506893553")]; alias_set' = ["alias1"]; state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:16 i #44 near_workspaces.print_usd / { retry = 8; total_gas_burnt_usd = +0.004515; total_gas_burnt = 6758387707754 } 00:00:16 i #45 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:16 i #46 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.004309; tokens_burnt_usd = +0.004309; gas_burnt = 6450305848414; tokens_burnt = 645030584841400000000 } 00:00:16 w #47 spiral_wasm.run / Error error / { retry = 8; error = "{ receipt_outcomes_len = 1; retry = 8; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575387074779767; signer_account_id = "dev-20241219022946-84289471203475"; predecessor_account_id = "dev-20241219022946-84289471203475" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 d #3 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575387074779767; signer_account_id = "dev-20241219022946-84289471203475"; predecessor_account_id = "dev-20241219022946-84289471203475" } 00:00:00 d #4 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 d #5 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575387074779767; signer_account_id = "dev-20241219022946-84289471203475"; predecessor_account_id = "dev-20241219022946-84289471203475" } 00:00:00 d #6 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 v #7 chat_contract / { account_set' = [AccountId("dev-20241219022946-84289471203475")]; alias_set' = ["alias1"]; state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:18 i #50 near_workspaces.print_usd / { retry = 9; total_gas_burnt_usd = +0.004515; total_gas_burnt = 6758387707754 } 00:00:18 i #51 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:18 i #52 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.004309; tokens_burnt_usd = +0.004309; gas_burnt = 6450305848414; tokens_burnt = 645030584841400000000 } 00:00:18 w #53 spiral_wasm.run / Error error / { retry = 9; error = "{ receipt_outcomes_len = 1; retry = 9; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575389122265754; signer_account_id = "dev-20241219022948-72225547203246"; predecessor_account_id = "dev-20241219022948-72225547203246" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 d #3 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575389122265754; signer_account_id = "dev-20241219022948-72225547203246"; predecessor_account_id = "dev-20241219022948-72225547203246" } 00:00:00 d #4 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 d #5 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575389122265754; signer_account_id = "dev-20241219022948-72225547203246"; predecessor_account_id = "dev-20241219022948-72225547203246" } 00:00:00 d #6 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 v #7 chat_contract / { account_set' = [AccountId("dev-20241219022948-72225547203246")]; alias_set' = ["alias1"]; state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:20 i #56 near_workspaces.print_usd / { retry = 10; total_gas_burnt_usd = +0.004515; total_gas_burnt = 6758387707754 } 00:00:20 i #57 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:20 i #58 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.004309; tokens_burnt_usd = +0.004309; gas_burnt = 6450305848414; tokens_burnt = 645030584841400000000 } 00:00:20 w #59 spiral_wasm.run / Error error / { retry = 10; error = "{ receipt_outcomes_len = 1; retry = 10; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575391169203250; signer_account_id = "dev-20241219022950-30746084376135"; predecessor_account_id = "dev-20241219022950-30746084376135" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 d #3 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575391169203250; signer_account_id = "dev-20241219022950-30746084376135"; predecessor_account_id = "dev-20241219022950-30746084376135" } 00:00:00 d #4 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 d #5 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575391169203250; signer_account_id = "dev-20241219022950-30746084376135"; predecessor_account_id = "dev-20241219022950-30746084376135" } 00:00:00 d #6 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 v #7 chat_contract / { account_set' = [AccountId("dev-20241219022950-30746084376135")]; alias_set' = ["alias1"]; state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:22 i #62 near_workspaces.print_usd / { retry = 11; total_gas_burnt_usd = +0.004515; total_gas_burnt = 6758387707754 } 00:00:22 i #63 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:22 i #64 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.004309; tokens_burnt_usd = +0.004309; gas_burnt = 6450305848414; tokens_burnt = 645030584841400000000 } 00:00:22 w #65 spiral_wasm.run / Error error / { retry = 11; error = "{ receipt_outcomes_len = 1; retry = 11; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575393215022760; signer_account_id = "dev-20241219022952-62633271297904"; predecessor_account_id = "dev-20241219022952-62633271297904" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 d #3 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575393215022760; signer_account_id = "dev-20241219022952-62633271297904"; predecessor_account_id = "dev-20241219022952-62633271297904" } 00:00:00 d #4 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 d #5 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575393215022760; signer_account_id = "dev-20241219022952-62633271297904"; predecessor_account_id = "dev-20241219022952-62633271297904" } 00:00:00 d #6 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 v #7 chat_contract / { account_set' = [AccountId("dev-20241219022952-62633271297904")]; alias_set' = ["alias1"]; state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:24 i #68 near_workspaces.print_usd / { retry = 12; total_gas_burnt_usd = +0.004515; total_gas_burnt = 6758387707754 } 00:00:24 i #69 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:24 i #70 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.004309; tokens_burnt_usd = +0.004309; gas_burnt = 6450305848414; tokens_burnt = 645030584841400000000 } 00:00:24 w #71 spiral_wasm.run / Error error / { retry = 12; error = "{ receipt_outcomes_len = 1; retry = 12; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575395264711659; signer_account_id = "dev-20241219022954-13045298649709"; predecessor_account_id = "dev-20241219022954-13045298649709" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 d #3 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575395264711659; signer_account_id = "dev-20241219022954-13045298649709"; predecessor_account_id = "dev-20241219022954-13045298649709" } 00:00:00 d #4 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 d #5 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575395264711659; signer_account_id = "dev-20241219022954-13045298649709"; predecessor_account_id = "dev-20241219022954-13045298649709" } 00:00:00 d #6 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 v #7 chat_contract / { account_set' = [AccountId("dev-20241219022954-13045298649709")]; alias_set' = ["alias1"]; state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:27 i #74 near_workspaces.print_usd / { retry = 13; total_gas_burnt_usd = +0.004515; total_gas_burnt = 6758387707754 } 00:00:27 i #75 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:27 i #76 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.004309; tokens_burnt_usd = +0.004309; gas_burnt = 6450305848414; tokens_burnt = 645030584841400000000 } 00:00:27 w #77 spiral_wasm.run / Error error / { retry = 13; error = "{ receipt_outcomes_len = 1; retry = 13; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575397775285627; signer_account_id = "dev-20241219022956-87016104203125"; predecessor_account_id = "dev-20241219022956-87016104203125" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 d #3 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575397775285627; signer_account_id = "dev-20241219022956-87016104203125"; predecessor_account_id = "dev-20241219022956-87016104203125" } 00:00:00 d #4 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 d #5 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575397775285627; signer_account_id = "dev-20241219022956-87016104203125"; predecessor_account_id = "dev-20241219022956-87016104203125" } 00:00:00 d #6 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 v #7 chat_contract / { account_set' = [AccountId("dev-20241219022956-87016104203125")]; alias_set' = ["alias1"]; state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:29 i #80 near_workspaces.print_usd / { retry = 14; total_gas_burnt_usd = +0.004515; total_gas_burnt = 6758387707754 } 00:00:29 i #81 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:29 i #82 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.004309; tokens_burnt_usd = +0.004309; gas_burnt = 6450305848414; tokens_burnt = 645030584841400000000 } 00:00:29 w #83 spiral_wasm.run / Error error / { retry = 14; error = "{ receipt_outcomes_len = 1; retry = 14; receipt_failures = [] }" } 00:00:00 d #1 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575400364236322; signer_account_id = "dev-20241219022959-44562993721722"; predecessor_account_id = "dev-20241219022959-44562993721722" } 00:00:00 d #2 chat_contract.claim_alias / { account_alias = None } 00:00:00 d #3 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575400364236322; signer_account_id = "dev-20241219022959-44562993721722"; predecessor_account_id = "dev-20241219022959-44562993721722" } 00:00:00 d #4 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 d #5 chat_contract.claim_alias / { alias = "alias1"; block_timestamp = 1734575400364236322; signer_account_id = "dev-20241219022959-44562993721722"; predecessor_account_id = "dev-20241219022959-44562993721722" } 00:00:00 d #6 chat_contract.claim_alias / { account_alias = Some("alias1") } 00:00:00 v #7 chat_contract / { account_set' = [AccountId("dev-20241219022959-44562993721722")]; alias_set' = ["alias1"]; state = (2, IterableSet { elements: Vector { len: 1, prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 115, 101, 116, 109] } }, IterableSet { elements: Vector { len: 1, prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 118] }, index: LookupMap { prefix: [97, 108, 105, 97, 115, 95, 115, 101, 116, 109] } }, LookupMap { prefix: [97, 99, 99, 111, 117, 110, 116, 95, 109, 97, 112] }, LookupMap { prefix: [97, 108, 105, 97, 115, 95, 109, 97, 112] }) } 00:00:32 i #86 near_workspaces.print_usd / { retry = 15; total_gas_burnt_usd = +0.004515; total_gas_burnt = 6758387707754 } 00:00:32 i #87 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.000206; tokens_burnt_usd = +0.000206; gas_burnt = 308081859340; tokens_burnt = 30808185934000000000 } 00:00:32 i #88 near_workspaces.print_usd / outcome / { is_success = true; gas_burnt_usd = +0.004309; tokens_burnt_usd = +0.004309; gas_burnt = 6450305848414; tokens_burnt = 645030584841400000000 } 00:00:32 w #89 spiral_wasm.run / Error error / { retry = 15; error = "{ receipt_outcomes_len = 1; retry = 15; receipt_failures = [] }" }
get_account_info¶
In [ ]:
inl get_account_info
(state : rust.ref state)
(account_id : near.account_id)
: optionm'.option' (sm'.std_string * (u64 * u32))
=
inl account_map : rust.ref (near.lookup_map near.account_id sm'.std_string) =
!\($'$"&!state.3"')
inl alias_map : rust.ref (near.lookup_map sm'.std_string (mapm.hash_map near.account_id (u64 * u32))) =
!\($'$"&!state.4"')
!\\(account_id, $'"let result = !account_map.get(&$0).and_then(|alias| { //"') : ()
!\($'" !alias_map //"') : ()
!\($'" .get(alias) //"') : ()
!\($'" .map(|accounts| { //"') : ()
!\($'" let result = (alias.clone(), *accounts.get(&!account_id).unwrap()); //"') : ()
!\($'" (result.0, result.1.0, result.1.1) //"') : ()
!\($'" }) //"') : ()
!\($'"}); //"') : ()
inl result = !\($'"result"')
trace Debug
fun () => "chat_contract.get_account_info"
fun () => { account_id result }
trace Debug (fun () => "") id
result
main¶
In [ ]:
///! _
inl main () =
!\($'"} //"') : ()
!\($'"#[near_sdk::near_bindgen] //"') : ()
!\($'"#[derive( //"') : ()
!\($'" near_sdk::PanicOnDefault, //"') : ()
!\($'" borsh::BorshDeserialize, //"') : ()
!\($'" borsh::BorshSerialize, //"') : ()
!\($'")] //"') : ()
!\($'"pub struct State ( //"') : ()
!\($'"/*"') : ()
(null () : rust.type_emit state) |> ignore
!\($'"*/ )"') : ()
inl new_ () =
!\($'"#[init] //"') : ()
!\($'"pub fn new() -> Self { // 1"') : ()
(!\($'"true; /*"') : bool) |> ignore
(null () : rust.type_emit ()) |> ignore
(!\($'"true; */"') : bool) |> ignore
inl result = new ()
$'let _result = !result in _result |> (fun x -> Fable.Core.RustInterop.emitRustExpr x $"Self($0) // x") // 2' : ()
!\($'"} // 2."') : ()
!\($'"} // 1."') : ()
2
inl is_valid_alias () =
!\($'"fn is_valid_alias(alias: String) -> bool { //"') : ()
inl alias = !\($'$"alias"')
inl result = alias |> is_valid_alias
$'let _result = !result in _result |> (fun x -> Fable.Core.RustInterop.emitRustExpr x "$0 }") // 2' : ()
!\($'"} //"') : ()
1
inl generate_cid () =
!\($'"pub fn generate_cid( //"') : ()
!\($'" &self, //"') : ()
!\($'" content: Vec<u8>, //"') : ()
!\($'") -> String { //"') : ()
inl content = !\($'$"content"')
inl result = generate_cid content
$'let _result = !result in _result |> (fun x -> Fable.Core.RustInterop.emitRustExpr x "$0 }") // 2' : ()
!\($'"} //"') : ()
2
inl generate_cid_borsh () =
!\($'"#[result_serializer(borsh)] //"') : ()
!\($'"pub fn generate_cid_borsh( //"') : ()
!\($'" &self, //"') : ()
!\($'" #[serializer(borsh)] content: Vec<u8>, //"') : ()
!\($'") -> String { //"') : ()
!\($'" self.generate_cid(content) //"') : ()
!\($'"} //"') : ()
1
inl claim_alias () =
!\($'"pub fn claim_alias( //"') : ()
!\($'" &mut self, //"') : ()
!\($'" alias: String, //"') : ()
!\($'") { //"') : ()
inl state = !\($'$"&mut self.0"')
inl alias = !\($'$"alias"')
inl result = claim_alias state alias
trace Debug (fun () => "") (join id)
!\($'"} //"') : ()
!\($'"} //"') : ()
!\($'"} //"') : ()
3
inl get_account_info () =
!\($'"pub fn get_account_info( //"') : ()
!\($'" &self, //"') : ()
!\($'" account_id: near_sdk::AccountId, //"') : ()
!\($'") -> Option<(String, u64, u32)> { //"') : ()
inl state = !\($'$"&self.0"')
inl account_id : near.account_id = !\($'$"account_id"')
inl result = account_id |> get_account_info state
$'let _result = !result in _result |> (fun x -> Fable.Core.RustInterop.emitRustExpr x "$0 } // 4") // 3' : ()
!\($'"} // 2"') : ()
!\($'"} // 1"') : ()
2
inl get_alias_map () =
!\($'"pub fn get_alias_map( //"') : ()
!\($'" &self, //"') : ()
!\($'" alias: String, //"') : ()
!\($'") -> Option<std::collections::HashMap<near_sdk::AccountId, (u64, u32)>> { //"') : ()
inl alias_map : rust.ref (near.lookup_map sm'.std_string (mapm.hash_map near.account_id (u64 * u32))) =
!\($'$"&self.0.4"')
inl alias : sm'.std_string = !\($'$"alias"')
trace Debug
fun () => "chat_contract.get_alias_map"
fun () => { alias }
trace Debug (fun () => "") (join id)
!\\(alias, $'" !alias_map.get(&$0).cloned() //"') : ()
!\($'"} //"') : ()
!\($'"} //"') : ()
2
inl get_alias_map_borsh () =
!\($'"#[result_serializer(borsh)] //"') : ()
!\($'"pub fn get_alias_map_borsh( //"') : ()
!\($'" &self, //"') : ()
!\($'" #[serializer(borsh)] alias: String, //"') : ()
!\($'") -> Option<std::collections::HashMap<near_sdk::AccountId, (u64, u32)>> { //"') : ()
!\($'" self.get_alias_map(alias) //"') : ()
!\($'"} //"') : ()
1
inl fns =
[
new_
is_valid_alias
generate_cid
generate_cid_borsh
claim_alias
get_account_info
get_alias_map
get_alias_map_borsh
]
inl rec loop acc fns i =
match fns with
| [] => acc
| x :: xs =>
!\($'"#[near_sdk::near_bindgen] //"') : ()
!\($'"impl State { //"') : ()
inl n = x ()
!\($'"} /* c"') : ()
inl rec loop' i' =
if i' <> 1 // <= n
then (!\($'"true; */ // ???? / i: !i / i\': !i' / acc: !acc / n: !n"') : bool) |> ignore
else
(!\($'"true; // ??? / i: !i / i\': !i' / acc: !acc / n: !n"') : bool) |> ignore
loop' (i' + 1)
loop' 1u8
loop (acc + n) xs (i + 1)
inl n = loop 0u8 fns 1u8
// !\($'"/* a"') : ()
// !\($'"} // b"') : ()
!\($'"fn _main() //"') : ()
!\($'"{ { //"') : ()
inl rec loop' i' =
if i' <= n
then
(!\($'"true; { (); // ?? / i\': !i' / n: !n"') : bool) |> ignore
loop' (i' + 1)
else
(!\($'"true; { { (); // ? / i\': !i' / n: !n"') : bool) |> ignore
// (!\($'"true; */ // ?? / i\': !i' / n: !n"') : bool) |> ignore
loop' 1u8
inl main () =
$'!main |> ignore' : ()