diff --git a/.github/workflows/pr-integration-test-runner.yml b/.github/workflows/pr-integration-test-runner.yml
index 65c1970..37663f7 100644
--- a/.github/workflows/pr-integration-test-runner.yml
+++ b/.github/workflows/pr-integration-test-runner.yml
@@ -16,7 +16,7 @@ jobs:
env:
CI: 1
DEBUG: 0
- DFX_VERSION: 0.9.3
+ DFX_VERSION: 0.11.1
DFX_WARNING: -version_check
NODE_ENV: ci
DFX_CANDID_RELEASE: 2022-01-06
@@ -48,9 +48,9 @@ jobs:
override: true
target: wasm32-unknown-unknown
- - name: Install ic-cdk-optimizer
- if: steps.cache-rust.outputs.cache-hit != 'true'
- run: cargo install ic-cdk-optimizer
+ # - name: Install ic-cdk-optimizer
+ # if: steps.cache-rust.outputs.cache-hit != 'true'
+ # run: cargo install ic-cdk-optimizer
- name: Cache Dfx
id: cache-dfx
diff --git a/Makefile b/Makefile
index deb29fe..9b5fa85 100644
--- a/Makefile
+++ b/Makefile
@@ -2,10 +2,10 @@
LOCAL_CUSTODIAN_PRINCIPAL = $(shell dfx identity get-principal)
TEST_CUSTODIAN_PRINCIPAL = $(shell cat test/custodian-test-principal)
-CAP_ID ?= $(shell cd cap && dfx canister id ic-history-router)
+CAP_ID ?= $(shell dfx canister id cap-router)
cap-local:
- # Verifying cap... $(shell [ -z "$(CAP_ID)" ] && cd cap && dfx deploy ic-history-router)
+ # Verifying cap... $(shell [ -z "$(CAP_ID)" ] && dfx deploy cap-router)
@echo "cap local canister id: $(CAP_ID)"
init:
@@ -52,4 +52,4 @@ clean: clean-dfx
npm --prefix test run clean
clean-dfx: stop-replica
- rm -rf .dfx cap/.dfx
\ No newline at end of file
+ rm -rf .dfx cap/.dfx
diff --git a/README.md b/README.md
index 1111582..3b6b9ae 100644
--- a/README.md
+++ b/README.md
@@ -6,19 +6,23 @@
[DIP-721](spec.md) is an ERC-721 style non-fungible token standard built mirroring its Ethereum counterpart and adapting it to the Internet Computer, maintaining the same interface.
This standard aims to adopt the EIP-721 to the Internet Computer; providing a
-simple, non-ambiguous, extendable API for the transfer and tracking ownership of NFTs and expanding/building upon the EXT standard with partial compatibility.
+simple, non-ambiguous, extendable API for the transfer and tracking ownership of NFTs
## ๐ Table of Contents
-- [Specification](#-specification)
-- [Community](#-community)
-- [NFT Implementation example](#-nft-implementation-example)
-- [Contribution guideline](#-contributing)
+- [๐ DIP-721](#-dip-721)
+ - [๐ Table of Contents](#-table-of-contents)
+ - [๐ Specification](#-specification)
+ - [๐ Community](#-community)
+ - [๐ฉ NFT Implementation example](#-nft-implementation-example)
+ - [๐ Contributing](#-contributing)
## ๐ Specification
The document for the [DIP-721](spec.md) is available [here](spec.md).
+There are 2 versions of the v2 spec. One with namespace and snakecase, and one non namespaced and camel case. The legacy.rs provides the initial v2 spec without namespace, but the final version that should be used and integrated against has the namespace.
+
โ ๏ธ This is an an in-development standard, consider it a work in progress as we finalize details in its design and gather feedback from the community.
## ๐ Community
diff --git a/cap b/cap
index a97dd7f..521ff43 160000
--- a/cap
+++ b/cap
@@ -1 +1 @@
-Subproject commit a97dd7f5bcbf0af45d58f0a36a3ed39f4a5d7b6e
+Subproject commit 521ff43cdaf1ec4e8bab58902ad26995b5cfd9ee
diff --git a/dfx.json b/dfx.json
index a3e6992..dc3de9a 100644
--- a/dfx.json
+++ b/dfx.json
@@ -1,11 +1,16 @@
{
"version": 1,
- "dfx": "0.9.3",
+ "dfx": "0.11.1",
"canisters": {
"nft": {
"package": "nft",
"candid": "nft.did",
"type": "rust"
+ },
+ "cap-router": {
+ "type": "custom",
+ "wasm": "cap/wasm/cap_router.wasm",
+ "candid": "cap/candid/router.did"
}
},
"defaults": {
diff --git a/nft.did b/nft.did
index d2081d2..f5af872 100644
--- a/nft.did
+++ b/nft.did
@@ -96,8 +96,38 @@ service : (opt InitArgs) -> {
burn : (nat) -> (Result);
custodians : () -> (vec principal) query;
cycles : () -> (nat) query;
- dfxInfo : () -> (text) query;
- gitCommitHash : () -> (text) query;
+ dfx_info : () -> (text) query;
+ dip721_approve : (principal, nat) -> (Result);
+ dip721_balance_of : (principal) -> (Result) query;
+ dip721_burn : (nat) -> (Result);
+ dip721_custodians : () -> (vec principal) query;
+ dip721_cycles : () -> (nat) query;
+ dip721_is_approved_for_all : (principal, principal) -> (Result_1) query;
+ dip721_logo : () -> (opt text) query;
+ dip721_metadata : () -> (ManualReply) query;
+ dip721_mint : (principal, nat, vec record { text; GenericValue }) -> (Result);
+ dip721_name : () -> (opt text) query;
+ dip721_operator_of : (nat) -> (Result_2) query;
+ dip721_operator_token_identifiers : (principal) -> (ManualReply_1) query;
+ dip721_operator_token_metadata : (principal) -> (ManualReply_2) query;
+ dip721_owner_of : (nat) -> (Result_2) query;
+ dip721_owner_token_identifiers : (principal) -> (ManualReply_1) query;
+ dip721_owner_token_metadata : (principal) -> (ManualReply_2) query;
+ dip721_set_approval_for_all : (principal, bool) -> (Result);
+ dip721_set_custodians : (vec principal) -> ();
+ dip721_set_logo : (text) -> ();
+ dip721_set_name : (text) -> ();
+ dip721_set_symbol : (text) -> ();
+ dip721_stats : () -> (Stats) query;
+ dip721_supported_interfaces : () -> (vec SupportedInterface) query;
+ dip721_symbol : () -> (opt text) query;
+ dip721_token_metadata : (nat) -> (ManualReply_3) query;
+ dip721_total_supply : () -> (nat) query;
+ dip721_total_transactions : () -> (nat) query;
+ dip721_total_unique_holders : () -> (nat) query;
+ dip721_transfer : (principal, nat) -> (Result);
+ dip721_transfer_from : (principal, principal, nat) -> (Result);
+ git_commit_hash : () -> (text) query;
isApprovedForAll : (principal, principal) -> (Result_1) query;
logo : () -> (opt text) query;
metadata : () -> (ManualReply) query;
@@ -109,7 +139,7 @@ service : (opt InitArgs) -> {
ownerOf : (nat) -> (Result_2) query;
ownerTokenIdentifiers : (principal) -> (ManualReply_1) query;
ownerTokenMetadata : (principal) -> (ManualReply_2) query;
- rustToolchainInfo : () -> (text) query;
+ rust_toolchain_info : () -> (text) query;
setApprovalForAll : (principal, bool) -> (Result);
setCustodians : (vec principal) -> ();
setLogo : (text) -> ();
diff --git a/src/legacy.rs b/src/legacy.rs
new file mode 100644
index 0000000..b7c772e
--- /dev/null
+++ b/src/legacy.rs
@@ -0,0 +1,204 @@
+use crate::*;
+
+// ======================
+// QUERY CALLS
+// ======================
+
+#[query(manual_reply = true)]
+#[candid_method(query)]
+fn name() -> ManualReply