difftreelog
Merge pull request #853 from UniqueNetwork/fix/erc20
in: master
9 files changed
pallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/erc.rsdiffbeforeafterboth57 },57 },58}58}595960#[solidity_interface(name = ERC20, events(ERC20Events))]60#[solidity_interface(name = ERC20, events(ERC20Events), expect_selector = 0x942e8b22)]61impl<T: Config> FungibleHandle<T> {61impl<T: Config> FungibleHandle<T> {62 fn name(&self) -> Result<String> {62 fn name(&self) -> Result<String> {63 Ok(decode_utf16(self.name.iter().copied())63 Ok(decode_utf16(self.name.iter().copied())136 Ok(<Allowance<T>>::get((self.id, owner, spender)).into())136 Ok(<Allowance<T>>::get((self.id, owner, spender)).into())137 }137 }138139 /// @notice Returns collection helper contract address140 fn collection_helper_address(&self) -> Result<Address> {141 Ok(T::ContractAddress::get())142 }143}138}144139145#[solidity_interface(name = ERC20Mintable)]140#[solidity_interface(name = ERC20Mintable)]313 Ok(true)308 Ok(true)314 }309 }310311 /// @notice Returns collection helper contract address312 fn collection_helper_address(&self) -> Result<Address> {313 Ok(T::ContractAddress::get())314 }315}315}316316317#[solidity_interface(317#[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.soldiffbeforeafterboth353 bytes value;353 bytes value;354}354}355355356/// @dev the ERC-165 identifier for this interface is 0x7dee5997356/// @dev the ERC-165 identifier for this interface is 0x65789571357interface ERC20UniqueExtensions is Dummy, ERC165 {357interface ERC20UniqueExtensions is Dummy, ERC165 {358 /// @notice A description for the collection.358 /// @notice A description for the collection.359 /// @dev EVM selector for this function is: 0x7284e416,359 /// @dev EVM selector for this function is: 0x7284e416,404 uint256 amount404 uint256 amount405 ) external returns (bool);405 ) external returns (bool);406407 /// @notice Returns collection helper contract address408 /// @dev EVM selector for this function is: 0x1896cce6,409 /// or in textual repr: collectionHelperAddress()410 function collectionHelperAddress() external view returns (address);406}411}407412408/// @dev anonymous struct413/// @dev anonymous struct427 event Approval(address indexed owner, address indexed spender, uint256 value);432 event Approval(address indexed owner, address indexed spender, uint256 value);428}433}429434430/// @dev the ERC-165 identifier for this interface is 0x8cb847c4435/// @dev the ERC-165 identifier for this interface is 0x942e8b22431interface ERC20 is Dummy, ERC165, ERC20Events {436interface ERC20 is Dummy, ERC165, ERC20Events {432 /// @dev EVM selector for this function is: 0x06fdde03,437 /// @dev EVM selector for this function is: 0x06fdde03,433 /// or in textual repr: name()438 /// or in textual repr: name()469 /// or in textual repr: allowance(address,address)474 /// or in textual repr: allowance(address,address)470 function allowance(address owner, address spender) external view returns (uint256);475 function allowance(address owner, address spender) external view returns (uint256);471472 /// @notice Returns collection helper contract address473 /// @dev EVM selector for this function is: 0x1896cce6,474 /// or in textual repr: collectionHelperAddress()475 function collectionHelperAddress() external view returns (address);476}476}477477478interface UniqueFungible is Dummy, ERC165, ERC20, ERC20Mintable, ERC20UniqueExtensions, Collection {}478interface UniqueFungible is Dummy, ERC165, ERC20, ERC20Mintable, ERC20UniqueExtensions, Collection {}