diff --git a/contracts/task-registry/src/registry.rs b/contracts/task-registry/src/registry.rs index c82b203..2507723 100644 --- a/contracts/task-registry/src/registry.rs +++ b/contracts/task-registry/src/registry.rs @@ -190,7 +190,7 @@ impl RegistryContract { panic!("registry: task is not active"); } - task.status = TaskStatus::Expired; + task.status = TaskStatus::Cancelled; storage::write_task(&e, &task); TaskCancelledEvent { @@ -512,7 +512,7 @@ mod test { client.cancel_task(&admin, &task_id); let task = client.get_task(&task_id); - assert_eq!(task.status, TaskStatus::Expired); + assert_eq!(task.status, TaskStatus::Cancelled); } #[test] @@ -552,6 +552,43 @@ mod test { client.cancel_task(&admin, &task_id); } + #[test] + #[should_panic(expected = "registry: task is not active")] + fn test_complete_cancelled_task() { + let (e, admin, client) = setup(); + e.mock_all_auths(); + + let user = Address::generate(&e); + let task_id = create_test_task( + &client, + &admin, + &String::from_str(&e, "tree-planting"), + 2, + 1000, + ); + + client.cancel_task(&admin, &task_id); + client.complete_task(&admin, &task_id, &user); + } + + #[test] + #[should_panic(expected = "registry: task is not active")] + fn test_expire_cancelled_task() { + let (e, admin, client) = setup(); + e.mock_all_auths(); + + let task_id = create_test_task( + &client, + &admin, + &String::from_str(&e, "tree-planting"), + 1, + 1000, + ); + + client.cancel_task(&admin, &task_id); + client.expire_task(&admin, &task_id); + } + #[test] fn test_get_tasks_by_creator() { let (e, admin, client) = setup(); diff --git a/contracts/task-registry/src/storage.rs b/contracts/task-registry/src/storage.rs index c5665d0..015ce59 100644 --- a/contracts/task-registry/src/storage.rs +++ b/contracts/task-registry/src/storage.rs @@ -6,6 +6,7 @@ pub enum TaskStatus { Active, Completed, Expired, + Cancelled, } #[derive(Clone, Debug)] diff --git a/contracts/task-registry/test_snapshots/registry/test/test_add_sponsor.1.json b/contracts/task-registry/test_snapshots/registry/test/test_add_sponsor.1.json index 4190ccb..a4bdceb 100644 --- a/contracts/task-registry/test_snapshots/registry/test/test_add_sponsor.1.json +++ b/contracts/task-registry/test_snapshots/registry/test/test_add_sponsor.1.json @@ -45,7 +45,7 @@ "string": "tree-planting" }, { - "bytes": "58702fa6896e30ea4e37ae7b81e50d7d13281fb69438d9ed38865f5f9e48590c" + "bytes": "8724990dc2fc7e6bbf64e3c87b245ff1982a28f38ec6bbae54f0434465c86ae8" }, { "i128": "1000" @@ -191,7 +191,7 @@ "symbol": "location_hash" }, "val": { - "bytes": "58702fa6896e30ea4e37ae7b81e50d7d13281fb69438d9ed38865f5f9e48590c" + "bytes": "8724990dc2fc7e6bbf64e3c87b245ff1982a28f38ec6bbae54f0434465c86ae8" } }, { diff --git a/contracts/task-registry/test_snapshots/registry/test/test_cancel_already_completed_task.1.json b/contracts/task-registry/test_snapshots/registry/test/test_cancel_already_completed_task.1.json index d3acc90..c4b4bd4 100644 --- a/contracts/task-registry/test_snapshots/registry/test/test_cancel_already_completed_task.1.json +++ b/contracts/task-registry/test_snapshots/registry/test/test_cancel_already_completed_task.1.json @@ -23,7 +23,7 @@ "string": "tree-planting" }, { - "bytes": "6637d6b2768119be6cec82d6f1ae50de96cef74cb89f962a672ba453f9e1cb25" + "bytes": "302fd88a502120f680f7dbf7201fb9b8830685ef9ee90f96c45fda9f9251a12e" }, { "i128": "1000" @@ -244,7 +244,7 @@ "symbol": "location_hash" }, "val": { - "bytes": "6637d6b2768119be6cec82d6f1ae50de96cef74cb89f962a672ba453f9e1cb25" + "bytes": "302fd88a502120f680f7dbf7201fb9b8830685ef9ee90f96c45fda9f9251a12e" } }, { diff --git a/contracts/task-registry/test_snapshots/registry/test/test_cancel_task_by_creator.1.json b/contracts/task-registry/test_snapshots/registry/test/test_cancel_task_by_creator.1.json index a42f759..e93b0f9 100644 --- a/contracts/task-registry/test_snapshots/registry/test/test_cancel_task_by_creator.1.json +++ b/contracts/task-registry/test_snapshots/registry/test/test_cancel_task_by_creator.1.json @@ -23,7 +23,7 @@ "string": "tree-planting" }, { - "bytes": "3ea3ce6109d34eb3ebbbf12cfd0ee5a183c7b817f97737e259cfe1a569b4b043" + "bytes": "a8ca1cea466767acb0dd9316e8be843a683920a9d3032d046390fe62a430fc5d" }, { "i128": "1000" @@ -211,7 +211,7 @@ "symbol": "location_hash" }, "val": { - "bytes": "3ea3ce6109d34eb3ebbbf12cfd0ee5a183c7b817f97737e259cfe1a569b4b043" + "bytes": "a8ca1cea466767acb0dd9316e8be843a683920a9d3032d046390fe62a430fc5d" } }, { @@ -237,7 +237,7 @@ "val": { "vec": [ { - "symbol": "Expired" + "symbol": "Cancelled" } ] } diff --git a/contracts/task-registry/test_snapshots/registry/test/test_cancel_task_not_creator.1.json b/contracts/task-registry/test_snapshots/registry/test/test_cancel_task_not_creator.1.json index c4ebfe0..74a96d7 100644 --- a/contracts/task-registry/test_snapshots/registry/test/test_cancel_task_not_creator.1.json +++ b/contracts/task-registry/test_snapshots/registry/test/test_cancel_task_not_creator.1.json @@ -23,7 +23,7 @@ "string": "tree-planting" }, { - "bytes": "02e012f69ff8ab7b34bef8aa6b88921320de232e3d07bde7e901586ad2a9993d" + "bytes": "4d45bf901961e6dce6e24dcf426ba2f781d54cf26a41dc66e7eaabbeb3a8af3c" }, { "i128": "1000" @@ -169,7 +169,7 @@ "symbol": "location_hash" }, "val": { - "bytes": "02e012f69ff8ab7b34bef8aa6b88921320de232e3d07bde7e901586ad2a9993d" + "bytes": "4d45bf901961e6dce6e24dcf426ba2f781d54cf26a41dc66e7eaabbeb3a8af3c" } }, { diff --git a/contracts/task-registry/test_snapshots/registry/test/test_complete_cancelled_task.1.json b/contracts/task-registry/test_snapshots/registry/test/test_complete_cancelled_task.1.json new file mode 100644 index 0000000..8ff03bf --- /dev/null +++ b/contracts/task-registry/test_snapshots/registry/test/test_complete_cancelled_task.1.json @@ -0,0 +1,326 @@ +{ + "generators": { + "address": 3, + "nonce": 0, + "mux_id": 0 + }, + "auth": [ + [], + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "function_name": "create_task", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "string": "tree-planting" + }, + { + "bytes": "7d035ea1dfa95e6017148420848b050f6bb8e58baadaebd73c0c49f23e4e68a3" + }, + { + "i128": "1000" + }, + { + "u32": 2 + }, + { + "u64": "1000" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "function_name": "cancel_task", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "u64": "0" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 26, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": "801925984706572462" + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + "live_until": 6311999 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": "5541220902715666415" + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + "live_until": 6311999 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "vec": [ + { + "symbol": "CreatorTasks" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + ] + }, + "durability": "persistent", + "val": { + "vec": [ + { + "u64": "0" + } + ] + } + } + }, + "ext": "v0" + }, + "live_until": 4095 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "vec": [ + { + "symbol": "Task" + }, + { + "u64": "0" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "completions" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "created_at" + }, + "val": { + "u64": "0" + } + }, + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "symbol": "expires_at" + }, + "val": { + "u64": "1000" + } + }, + { + "key": { + "symbol": "id" + }, + "val": { + "u64": "0" + } + }, + { + "key": { + "symbol": "location_hash" + }, + "val": { + "bytes": "7d035ea1dfa95e6017148420848b050f6bb8e58baadaebd73c0c49f23e4e68a3" + } + }, + { + "key": { + "symbol": "max_completions" + }, + "val": { + "u32": 2 + } + }, + { + "key": { + "symbol": "reward_amount" + }, + "val": { + "i128": "1000" + } + }, + { + "key": { + "symbol": "status" + }, + "val": { + "vec": [ + { + "symbol": "Cancelled" + } + ] + } + }, + { + "key": { + "symbol": "task_type" + }, + "val": { + "string": "tree-planting" + } + } + ] + } + } + }, + "ext": "v0" + }, + "live_until": 4095 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "Admin" + } + ] + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "vec": [ + { + "symbol": "TaskCount" + } + ] + }, + "val": { + "u64": "1" + } + } + ] + } + } + } + }, + "ext": "v0" + }, + "live_until": 4095 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + "live_until": 4095 + } + ] + }, + "events": [] +} \ No newline at end of file diff --git a/contracts/task-registry/test_snapshots/registry/test/test_complete_task.1.json b/contracts/task-registry/test_snapshots/registry/test/test_complete_task.1.json index 8b156d8..ed6429e 100644 --- a/contracts/task-registry/test_snapshots/registry/test/test_complete_task.1.json +++ b/contracts/task-registry/test_snapshots/registry/test/test_complete_task.1.json @@ -23,7 +23,7 @@ "string": "trash-collection" }, { - "bytes": "54c97719b82cb651f6c24b956fea8dbada345f7834ac535b8314c7d7e3ea139b" + "bytes": "4c6a66a00cdfcf7de091180089b4659196727729987659359ba69a8e53028cd2" }, { "i128": "1000" @@ -245,7 +245,7 @@ "symbol": "location_hash" }, "val": { - "bytes": "54c97719b82cb651f6c24b956fea8dbada345f7834ac535b8314c7d7e3ea139b" + "bytes": "4c6a66a00cdfcf7de091180089b4659196727729987659359ba69a8e53028cd2" } }, { diff --git a/contracts/task-registry/test_snapshots/registry/test/test_create_and_get_task.1.json b/contracts/task-registry/test_snapshots/registry/test/test_create_and_get_task.1.json index c4c58f2..2a3c9e7 100644 --- a/contracts/task-registry/test_snapshots/registry/test/test_create_and_get_task.1.json +++ b/contracts/task-registry/test_snapshots/registry/test/test_create_and_get_task.1.json @@ -23,7 +23,7 @@ "string": "tree-planting" }, { - "bytes": "0a12bbfb8d26f0552f08cfc9ad2e5e6965cff21adfd03a18f38174daa405a150" + "bytes": "ecdd9857028d4e14776e9abe9cbb516105d50a2a96dcd3d77daa19dfcfc1f1f8" }, { "i128": "1000" @@ -169,7 +169,7 @@ "symbol": "location_hash" }, "val": { - "bytes": "0a12bbfb8d26f0552f08cfc9ad2e5e6965cff21adfd03a18f38174daa405a150" + "bytes": "ecdd9857028d4e14776e9abe9cbb516105d50a2a96dcd3d77daa19dfcfc1f1f8" } }, { diff --git a/contracts/task-registry/test_snapshots/registry/test/test_double_claim_prevention.1.json b/contracts/task-registry/test_snapshots/registry/test/test_double_claim_prevention.1.json index 72b0944..bd5d940 100644 --- a/contracts/task-registry/test_snapshots/registry/test/test_double_claim_prevention.1.json +++ b/contracts/task-registry/test_snapshots/registry/test/test_double_claim_prevention.1.json @@ -23,7 +23,7 @@ "string": "ocean-cleanup" }, { - "bytes": "99cc7a2651e1e841276e9b3738d9caf24aed861ed233bf73037154408c504fae" + "bytes": "02c49e9152aa65bc5b1891c829454425ac24172cec0019ad57413e878838df0e" }, { "i128": "1000" @@ -244,7 +244,7 @@ "symbol": "location_hash" }, "val": { - "bytes": "99cc7a2651e1e841276e9b3738d9caf24aed861ed233bf73037154408c504fae" + "bytes": "02c49e9152aa65bc5b1891c829454425ac24172cec0019ad57413e878838df0e" } }, { diff --git a/contracts/task-registry/test_snapshots/registry/test/test_expire_already_expired_task.1.json b/contracts/task-registry/test_snapshots/registry/test/test_expire_already_expired_task.1.json index e8ca255..9c05c7a 100644 --- a/contracts/task-registry/test_snapshots/registry/test/test_expire_already_expired_task.1.json +++ b/contracts/task-registry/test_snapshots/registry/test/test_expire_already_expired_task.1.json @@ -23,7 +23,7 @@ "string": "tree-planting" }, { - "bytes": "44cee5651d50ebaa78c81df29cd0a6f5ad21c8cde8a842d4575bea31523a2f47" + "bytes": "83c4dafd1ddf9681b150afc4674537e4063d44c9efafa623b4c9288d2c1db1e8" }, { "i128": "1000" @@ -211,7 +211,7 @@ "symbol": "location_hash" }, "val": { - "bytes": "44cee5651d50ebaa78c81df29cd0a6f5ad21c8cde8a842d4575bea31523a2f47" + "bytes": "83c4dafd1ddf9681b150afc4674537e4063d44c9efafa623b4c9288d2c1db1e8" } }, { diff --git a/contracts/task-registry/test_snapshots/registry/test/test_expire_cancelled_task.1.json b/contracts/task-registry/test_snapshots/registry/test/test_expire_cancelled_task.1.json new file mode 100644 index 0000000..d2f0caf --- /dev/null +++ b/contracts/task-registry/test_snapshots/registry/test/test_expire_cancelled_task.1.json @@ -0,0 +1,326 @@ +{ + "generators": { + "address": 2, + "nonce": 0, + "mux_id": 0 + }, + "auth": [ + [], + [], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "function_name": "create_task", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "string": "tree-planting" + }, + { + "bytes": "4c4c20924e9753fc273bbb23e10de56f24f0f28147fb25289f2c5e8bbb20d263" + }, + { + "i128": "1000" + }, + { + "u32": 1 + }, + { + "u64": "1000" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [ + [ + "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + { + "function": { + "contract_fn": { + "contract_address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "function_name": "cancel_task", + "args": [ + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + }, + { + "u64": "0" + } + ] + } + }, + "sub_invocations": [] + } + ] + ], + [] + ], + "ledger": { + "protocol_version": 26, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": "801925984706572462" + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + "live_until": 6311999 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", + "key": { + "ledger_key_nonce": { + "nonce": "5541220902715666415" + } + }, + "durability": "temporary", + "val": "void" + } + }, + "ext": "v0" + }, + "live_until": 6311999 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "vec": [ + { + "symbol": "CreatorTasks" + }, + { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + ] + }, + "durability": "persistent", + "val": { + "vec": [ + { + "u64": "0" + } + ] + } + } + }, + "ext": "v0" + }, + "live_until": 4095 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": { + "vec": [ + { + "symbol": "Task" + }, + { + "u64": "0" + } + ] + }, + "durability": "persistent", + "val": { + "map": [ + { + "key": { + "symbol": "completions" + }, + "val": { + "u32": 0 + } + }, + { + "key": { + "symbol": "created_at" + }, + "val": { + "u64": "0" + } + }, + { + "key": { + "symbol": "creator" + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "symbol": "expires_at" + }, + "val": { + "u64": "1000" + } + }, + { + "key": { + "symbol": "id" + }, + "val": { + "u64": "0" + } + }, + { + "key": { + "symbol": "location_hash" + }, + "val": { + "bytes": "4c4c20924e9753fc273bbb23e10de56f24f0f28147fb25289f2c5e8bbb20d263" + } + }, + { + "key": { + "symbol": "max_completions" + }, + "val": { + "u32": 1 + } + }, + { + "key": { + "symbol": "reward_amount" + }, + "val": { + "i128": "1000" + } + }, + { + "key": { + "symbol": "status" + }, + "val": { + "vec": [ + { + "symbol": "Cancelled" + } + ] + } + }, + { + "key": { + "symbol": "task_type" + }, + "val": { + "string": "tree-planting" + } + } + ] + } + } + }, + "ext": "v0" + }, + "live_until": 4095 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "Admin" + } + ] + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "vec": [ + { + "symbol": "TaskCount" + } + ] + }, + "val": { + "u64": "1" + } + } + ] + } + } + } + }, + "ext": "v0" + }, + "live_until": 4095 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "code": "" + } + }, + "ext": "v0" + }, + "live_until": 4095 + } + ] + }, + "events": [] +} \ No newline at end of file diff --git a/contracts/task-registry/test_snapshots/registry/test/test_expire_task.1.json b/contracts/task-registry/test_snapshots/registry/test/test_expire_task.1.json index adf142b..65021f3 100644 --- a/contracts/task-registry/test_snapshots/registry/test/test_expire_task.1.json +++ b/contracts/task-registry/test_snapshots/registry/test/test_expire_task.1.json @@ -23,7 +23,7 @@ "string": "tree-planting" }, { - "bytes": "36403533c69dc4cc6bd8ecb53397719f2c7c6888bafbd62c6d58d8785b5f8dbd" + "bytes": "abb7fb117eb4b83b59adb6a363c6054c2eea9f45839da392de2cd3399bc04277" }, { "i128": "1000" @@ -211,7 +211,7 @@ "symbol": "location_hash" }, "val": { - "bytes": "36403533c69dc4cc6bd8ecb53397719f2c7c6888bafbd62c6d58d8785b5f8dbd" + "bytes": "abb7fb117eb4b83b59adb6a363c6054c2eea9f45839da392de2cd3399bc04277" } }, { diff --git a/contracts/task-registry/test_snapshots/registry/test/test_expired_task_cannot_be_completed.1.json b/contracts/task-registry/test_snapshots/registry/test/test_expired_task_cannot_be_completed.1.json index 3d7b06f..0406e01 100644 --- a/contracts/task-registry/test_snapshots/registry/test/test_expired_task_cannot_be_completed.1.json +++ b/contracts/task-registry/test_snapshots/registry/test/test_expired_task_cannot_be_completed.1.json @@ -23,7 +23,7 @@ "string": "tree-planting" }, { - "bytes": "d77f7243da8d86bad39033de085c66ca2bfbde04e8b055823d6135540ae7f50b" + "bytes": "0f6a257005371347de93bf24003fb40691a8209885dd2bc1e5c04eaa8d4c465a" }, { "i128": "1000" @@ -169,7 +169,7 @@ "symbol": "location_hash" }, "val": { - "bytes": "d77f7243da8d86bad39033de085c66ca2bfbde04e8b055823d6135540ae7f50b" + "bytes": "0f6a257005371347de93bf24003fb40691a8209885dd2bc1e5c04eaa8d4c465a" } }, { diff --git a/contracts/task-registry/test_snapshots/registry/test/test_get_tasks_by_creator.1.json b/contracts/task-registry/test_snapshots/registry/test/test_get_tasks_by_creator.1.json index be58fdc..50089da 100644 --- a/contracts/task-registry/test_snapshots/registry/test/test_get_tasks_by_creator.1.json +++ b/contracts/task-registry/test_snapshots/registry/test/test_get_tasks_by_creator.1.json @@ -23,7 +23,7 @@ "string": "tree-planting" }, { - "bytes": "f1dbb30435ce9fab2c0f23dc6590a4cf100c06e34ebc7668c84bde1c8125252f" + "bytes": "a7795a3336d1cde5bd4f898933b5b43b983efcbf76d0eefebeb3cd361bc19159" }, { "i128": "1000" @@ -57,7 +57,7 @@ "string": "tree-planting" }, { - "bytes": "463ed7995f98c9397fcafc160d1c8d129baaaa894601311ff70a8fc69e21e90a" + "bytes": "4606b08ed4018b2c6a742e1de2b070134592b1b50e9a5c78e7e04bf278308c16" }, { "i128": "1000" @@ -91,7 +91,7 @@ "string": "tree-planting" }, { - "bytes": "d4c83527e0570f9190be964a39e0d5e697217e846c00a9ed95ef8ae6450967f3" + "bytes": "3084d440d64edfc23afb91ef3dbd037624175a36141299caff5077ae0b151fa9" }, { "i128": "1000" @@ -284,7 +284,7 @@ "symbol": "location_hash" }, "val": { - "bytes": "f1dbb30435ce9fab2c0f23dc6590a4cf100c06e34ebc7668c84bde1c8125252f" + "bytes": "a7795a3336d1cde5bd4f898933b5b43b983efcbf76d0eefebeb3cd361bc19159" } }, { @@ -396,7 +396,7 @@ "symbol": "location_hash" }, "val": { - "bytes": "463ed7995f98c9397fcafc160d1c8d129baaaa894601311ff70a8fc69e21e90a" + "bytes": "4606b08ed4018b2c6a742e1de2b070134592b1b50e9a5c78e7e04bf278308c16" } }, { @@ -508,7 +508,7 @@ "symbol": "location_hash" }, "val": { - "bytes": "d4c83527e0570f9190be964a39e0d5e697217e846c00a9ed95ef8ae6450967f3" + "bytes": "3084d440d64edfc23afb91ef3dbd037624175a36141299caff5077ae0b151fa9" } }, { diff --git a/contracts/task-registry/test_snapshots/registry/test/test_max_completions.1.json b/contracts/task-registry/test_snapshots/registry/test/test_max_completions.1.json index 9605680..886750a 100644 --- a/contracts/task-registry/test_snapshots/registry/test/test_max_completions.1.json +++ b/contracts/task-registry/test_snapshots/registry/test/test_max_completions.1.json @@ -23,7 +23,7 @@ "string": "tree-planting" }, { - "bytes": "785b5e3a88ce459ad2b81e5bf670319b83c6253e37b9aab4bf17563729b0b0a7" + "bytes": "c83467572ee4e68b64ad3d01df968a694cc159999714ffeae83581bdc56a74fc" }, { "i128": "1000" @@ -320,7 +320,7 @@ "symbol": "location_hash" }, "val": { - "bytes": "785b5e3a88ce459ad2b81e5bf670319b83c6253e37b9aab4bf17563729b0b0a7" + "bytes": "c83467572ee4e68b64ad3d01df968a694cc159999714ffeae83581bdc56a74fc" } }, { diff --git a/contracts/task-registry/test_snapshots/registry/test/test_remove_sponsor.1.json b/contracts/task-registry/test_snapshots/registry/test/test_remove_sponsor.1.json index 8a0242c..77eac08 100644 --- a/contracts/task-registry/test_snapshots/registry/test/test_remove_sponsor.1.json +++ b/contracts/task-registry/test_snapshots/registry/test/test_remove_sponsor.1.json @@ -45,7 +45,7 @@ "string": "tree-planting" }, { - "bytes": "c06dbedf499ce0ceaa1e5dbadef7013e8c5bd44a5ecff239d664ef227fb2c84b" + "bytes": "b00f08283443b0db570916747593dec6b870a5bec701300b9d5143594792d7a7" }, { "i128": "1000" @@ -232,7 +232,7 @@ "symbol": "location_hash" }, "val": { - "bytes": "c06dbedf499ce0ceaa1e5dbadef7013e8c5bd44a5ecff239d664ef227fb2c84b" + "bytes": "b00f08283443b0db570916747593dec6b870a5bec701300b9d5143594792d7a7" } }, { diff --git a/contracts/task-registry/test_snapshots/registry/test/test_task_survives_ledger_advancement.1.json b/contracts/task-registry/test_snapshots/registry/test/test_task_survives_ledger_advancement.1.json index 4304577..b400607 100644 --- a/contracts/task-registry/test_snapshots/registry/test/test_task_survives_ledger_advancement.1.json +++ b/contracts/task-registry/test_snapshots/registry/test/test_task_survives_ledger_advancement.1.json @@ -23,7 +23,7 @@ "string": "tree-planting" }, { - "bytes": "2491eeb097549c8bd475e2ab38858b13f465b3f0b6a83b15341871ce282a6014" + "bytes": "8a2cd7cf3dc05805ffcb9dbe5f30c4746790a1abd1ff0842425560c8f12cbd4b" }, { "i128": "1000" @@ -246,7 +246,7 @@ "symbol": "location_hash" }, "val": { - "bytes": "2491eeb097549c8bd475e2ab38858b13f465b3f0b6a83b15341871ce282a6014" + "bytes": "8a2cd7cf3dc05805ffcb9dbe5f30c4746790a1abd1ff0842425560c8f12cbd4b" } }, {