difftreelog
fix `erc20` interface identifier for fungible collection
in: master
9 files changed
pallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/erc.rsdiffbeforeafterboth--- a/pallets/fungible/src/erc.rs
+++ b/pallets/fungible/src/erc.rs
@@ -135,11 +135,6 @@
Ok(<Allowance<T>>::get((self.id, owner, spender)).into())
}
-
- /// @notice Returns collection helper contract address
- fn collection_helper_address(&self) -> Result<Address> {
- Ok(T::ContractAddress::get())
- }
}
#[solidity_interface(name = ERC20Mintable)]
@@ -312,6 +307,11 @@
.map_err(dispatch_to_evm::<T>)?;
Ok(true)
}
+
+ /// @notice Returns collection helper contract address
+ fn collection_helper_address(&self) -> Result<Address> {
+ Ok(T::ContractAddress::get())
+ }
}
#[solidity_interface(
pallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth511 bytes value;511 bytes value;512}512}513513514/// @dev the ERC-165 identifier for this interface is 0x7dee5997514/// @dev the ERC-165 identifier for this interface is 0x65789571515contract ERC20UniqueExtensions is Dummy, ERC165 {515contract ERC20UniqueExtensions is Dummy, ERC165 {516 /// @notice A description for the collection.516 /// @notice A description for the collection.517 /// @dev EVM selector for this function is: 0x7284e416,517 /// @dev EVM selector for this function is: 0x7284e416,608 return false;608 return false;609 }609 }610611 /// @notice Returns collection helper contract address612 /// @dev EVM selector for this function is: 0x1896cce6,613 /// or in textual repr: collectionHelperAddress()614 function collectionHelperAddress() public view returns (address) {615 require(false, stub_error);616 dummy;617 return 0x0000000000000000000000000000000000000000;618 }610}619}611620612/// @dev anonymous struct621/// @dev anonymous struct637 event Approval(address indexed owner, address indexed spender, uint256 value);646 event Approval(address indexed owner, address indexed spender, uint256 value);638}647}639648640/// @dev the ERC-165 identifier for this interface is 0x8cb847c4649/// @dev the ERC-165 identifier for this interface is 0x942e8b22641contract ERC20 is Dummy, ERC165, ERC20Events {650contract ERC20 is Dummy, ERC165, ERC20Events {642 /// @dev EVM selector for this function is: 0x06fdde03,651 /// @dev EVM selector for this function is: 0x06fdde03,643 /// or in textual repr: name()652 /// or in textual repr: name()725 return 0;734 return 0;726 }735 }727728 /// @notice Returns collection helper contract address729 /// @dev EVM selector for this function is: 0x1896cce6,730 /// or in textual repr: collectionHelperAddress()731 function collectionHelperAddress() public view returns (address) {732 require(false, stub_error);733 dummy;734 return 0x0000000000000000000000000000000000000000;735 }736}736}737737738contract UniqueFungible is Dummy, ERC165, ERC20, ERC20Mintable, ERC20UniqueExtensions, Collection {}738contract UniqueFungible is Dummy, ERC165, ERC20, ERC20Mintable, ERC20UniqueExtensions, Collection {}pallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterbothbinary blob — no preview
pallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/refungible/src/stubs/UniqueRefungibleToken.rawdiffbeforeafterbothbinary blob — no preview
pallets/unique/src/eth/stubs/CollectionHelpers.rawdiffbeforeafterbothbinary blob — no preview
tests/src/eth/api/UniqueFungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -353,7 +353,7 @@
bytes value;
}
-/// @dev the ERC-165 identifier for this interface is 0x7dee5997
+/// @dev the ERC-165 identifier for this interface is 0x65789571
interface ERC20UniqueExtensions is Dummy, ERC165 {
/// @notice A description for the collection.
/// @dev EVM selector for this function is: 0x7284e416,
@@ -403,6 +403,11 @@
CrossAddress memory to,
uint256 amount
) external returns (bool);
+
+ /// @notice Returns collection helper contract address
+ /// @dev EVM selector for this function is: 0x1896cce6,
+ /// or in textual repr: collectionHelperAddress()
+ function collectionHelperAddress() external view returns (address);
}
/// @dev anonymous struct
@@ -427,7 +432,7 @@
event Approval(address indexed owner, address indexed spender, uint256 value);
}
-/// @dev the ERC-165 identifier for this interface is 0x8cb847c4
+/// @dev the ERC-165 identifier for this interface is 0x942e8b22
interface ERC20 is Dummy, ERC165, ERC20Events {
/// @dev EVM selector for this function is: 0x06fdde03,
/// or in textual repr: name()
@@ -468,11 +473,6 @@
/// @dev EVM selector for this function is: 0xdd62ed3e,
/// or in textual repr: allowance(address,address)
function allowance(address owner, address spender) external view returns (uint256);
-
- /// @notice Returns collection helper contract address
- /// @dev EVM selector for this function is: 0x1896cce6,
- /// or in textual repr: collectionHelperAddress()
- function collectionHelperAddress() external view returns (address);
}
interface UniqueFungible is Dummy, ERC165, ERC20, ERC20Mintable, ERC20UniqueExtensions, Collection {}