From bfd1d206fb3e99ff83916b0c49e357d55bc8260b Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Fri, 14 May 2021 12:59:57 +0000 Subject: [PATCH] fix: nft collection check --- --- a/pallets/nft/src/eth/mod.rs +++ b/pallets/nft/src/eth/mod.rs @@ -60,7 +60,7 @@ fn call_internal(sender: H160, collection: &CollectionHandle, method_id: u32, mut input: AbiReader) -> Result> { let erc20 = matches!(collection.mode, CollectionMode::Fungible(_)); - let erc721 = matches!(collection.mode, CollectionMode::ReFungible); + let erc721 = matches!(collection.mode, CollectionMode::NFT); Ok(match method_id { // function name() external view returns (string memory) @@ -90,7 +90,7 @@ } } // function totalSupply() external view returns (uint256) - 0x18160ddd if erc20 => { + 0x18160ddd if erc20 || erc721 => { // TODO: can't be implemented, as we don't track total amount of fungibles crate::abi_encode!(uint256(0)) } -- gitstuff