Skip to content

Commit

Permalink
feat: implement ICS-721 NFT transfer application (#1053)
Browse files Browse the repository at this point in the history
* feat: establish ICS-721 boilerplate, ready for new additions (#1012)

* chore: establish ics721 boilerplate, ready for new additions

* nit

* Implement ICS-721 NFT transfer (#1020)

* WIP: add types and contexts

* WIP: add events

* WIP: implement modules

* add send_transfer

* add recv and refund handlers

* add tests

* fix send and recv

* fix context and add tests

* fix fmt

* fix for CI

* fix messages and serde

* fix comments

* Add (de)serialization tests for `DataValue`, `TokenUri`, and `ClassUri` types (#1027)

* WIP: add types and contexts

* WIP: add events

* WIP: implement modules

* add send_transfer

* add recv and refund handlers

* add tests

* fix send and recv

* fix context and add tests

* fix fmt

* fix for CI

* fix messages and serde

* fix comments

* Stub out DataValue Borsh unit test

* Add basic borsh (de)ser roundtrip tests

* Add basic serde roundtrip tests for DataValue

* Add json (de)serialization tests

* Add roundtrip tests for TokenUri

* Add roundtrip tests for ClassUri

* Remove ignore statement on a test

* Resolve clippy warning

* Change packet data dummy json strings to use camel case

* Configure nft-transfer app under std feature flag

* Move cfg statement

* Add nft-transfer feature

* Add nft-transfer feature

* Remove nft-transfer feature from default features

* Remove `optional = true` from `http` dependency

---------

Co-authored-by: yito88 <[email protected]>

* fix: calculate trace hash from both class ID and token ID (#1032)

* trace hash with class ID and token ID

* add serde flag

* Fix ClassData and TokenData encoding in NonFungiblePacketData (#1038)

* fix encoding for ClassData and TokenData

* fix Cargo.toml

* Support ClassData and TokenData not according to ICS-721 spec (#1039)

* skip validation, make some data optional

* check the length of token_uri and token_data

* fix to set TokenData and TokenUri at once

* imp: add validate_basic method for PacketData

* imp: allow any format for Data + define parse_as_ics721_data method

* fmt and clippy

* custom serde packet data with option

* add a test

* restore conversions

---------

Co-authored-by: Farhad Shabani <[email protected]>

* chore: add unclog

* nit: fix docstrings

---------

Co-authored-by: Yuji Ito <[email protected]>
Co-authored-by: Sean Chen <[email protected]>
Co-authored-by: yito88 <[email protected]>
  • Loading branch information
4 people authored Jan 24, 2024
1 parent 8289081 commit 342dbcd
Show file tree
Hide file tree
Showing 33 changed files with 3,940 additions and 104 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [ibc-app-nft-transfer] Implement ICS-721 NFT transfer application
([\#346](https://github.com/cosmos/ibc-rs/issues/346))
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ members = [
"ibc-clients",
"ibc-apps/ics20-transfer/types",
"ibc-apps/ics20-transfer",
"ibc-apps/ics721-nft-transfer/types",
"ibc-apps/ics721-nft-transfer",
"ibc-apps",
"ibc-core/ics24-host/cosmos",
"ibc-data-types",
Expand Down Expand Up @@ -74,6 +76,7 @@ ibc-core-handler = { version = "0.49.1", path = "./ibc-core/ics25-handler",
ibc-core-router = { version = "0.49.1", path = "./ibc-core/ics26-routing", default-features = false }
ibc-client-tendermint = { version = "0.49.1", path = "./ibc-clients/ics07-tendermint", default-features = false }
ibc-app-transfer = { version = "0.49.1", path = "./ibc-apps/ics20-transfer", default-features = false }
ibc-app-nft-transfer = { version = "0.49.1", path = "./ibc-apps/ics721-nft-transfer", default-features = false }

ibc-core-client-context = { version = "0.49.1", path = "./ibc-core/ics02-client/context", default-features = false }
ibc-core-client-types = { version = "0.49.1", path = "./ibc-core/ics02-client/types", default-features = false }
Expand All @@ -87,6 +90,7 @@ ibc-core-router-types = { version = "0.49.1", path = "./ibc-core/ics26-rou
ibc-client-tendermint-types = { version = "0.49.1", path = "./ibc-clients/ics07-tendermint/types", default-features = false }
ibc-client-wasm-types = { version = "0.49.1", path = "./ibc-clients/ics08-wasm/types", default-features = false }
ibc-app-transfer-types = { version = "0.49.1", path = "./ibc-apps/ics20-transfer/types", default-features = false }
ibc-app-nft-transfer-types = { version = "0.49.1", path = "./ibc-apps/ics721-nft-transfer/types", default-features = false }

ibc-proto = { version = "0.41.0", default-features = false }

Expand Down
Loading

0 comments on commit 342dbcd

Please sign in to comment.