git.delta.rocks / unique-network / refs/commits / 9f46930e9ef7

difftreelog

fix `erc20` interface identifier for fungible collection

PraetorP2023-01-23parent: #1154c05.patch.diff
in: master

9 files changed

modifiedpallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/fungible/src/erc.rsdiffbeforeafterboth
136 Ok(<Allowance<T>>::get((self.id, owner, spender)).into())136 Ok(<Allowance<T>>::get((self.id, owner, spender)).into())
137 }137 }
138
139 /// @notice Returns collection helper contract address
140 fn collection_helper_address(&self) -> Result<Address> {
141 Ok(T::ContractAddress::get())
142 }
143}138}
144139
145#[solidity_interface(name = ERC20Mintable)]140#[solidity_interface(name = ERC20Mintable)]
313 Ok(true)308 Ok(true)
314 }309 }
310
311 /// @notice Returns collection helper contract address
312 fn collection_helper_address(&self) -> Result<Address> {
313 Ok(T::ContractAddress::get())
314 }
315}315}
316316
317#[solidity_interface(317#[solidity_interface(
modifiedpallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth
511 bytes value;511 bytes value;
512}512}
513513
514/// @dev the ERC-165 identifier for this interface is 0x7dee5997514/// @dev the ERC-165 identifier for this interface is 0x65789571
515contract 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 }
610
611 /// @notice Returns collection helper contract address
612 /// @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}
611620
612/// @dev anonymous struct621/// @dev anonymous struct
637 event Approval(address indexed owner, address indexed spender, uint256 value);646 event Approval(address indexed owner, address indexed spender, uint256 value);
638}647}
639648
640/// @dev the ERC-165 identifier for this interface is 0x8cb847c4649/// @dev the ERC-165 identifier for this interface is 0x942e8b22
641contract 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 }
727
728 /// @notice Returns collection helper contract address
729 /// @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}
737737
738contract UniqueFungible is Dummy, ERC165, ERC20, ERC20Mintable, ERC20UniqueExtensions, Collection {}738contract UniqueFungible is Dummy, ERC165, ERC20, ERC20Mintable, ERC20UniqueExtensions, Collection {}
modifiedpallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/refungible/src/stubs/UniqueRefungibleToken.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/unique/src/eth/stubs/CollectionHelpers.rawdiffbeforeafterboth

binary blob — no preview

modifiedtests/src/eth/api/UniqueFungible.soldiffbeforeafterboth
353 bytes value;353 bytes value;
354}354}
355355
356/// @dev the ERC-165 identifier for this interface is 0x7dee5997356/// @dev the ERC-165 identifier for this interface is 0x65789571
357interface 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 amount
405 ) external returns (bool);405 ) external returns (bool);
406
407 /// @notice Returns collection helper contract address
408 /// @dev EVM selector for this function is: 0x1896cce6,
409 /// or in textual repr: collectionHelperAddress()
410 function collectionHelperAddress() external view returns (address);
406}411}
407412
408/// @dev anonymous struct413/// @dev anonymous struct
427 event Approval(address indexed owner, address indexed spender, uint256 value);432 event Approval(address indexed owner, address indexed spender, uint256 value);
428}433}
429434
430/// @dev the ERC-165 identifier for this interface is 0x8cb847c4435/// @dev the ERC-165 identifier for this interface is 0x942e8b22
431interface 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);
471
472 /// @notice Returns collection helper contract address
473 /// @dev EVM selector for this function is: 0x1896cce6,
474 /// or in textual repr: collectionHelperAddress()
475 function collectionHelperAddress() external view returns (address);
476}476}
477477
478interface UniqueFungible is Dummy, ERC165, ERC20, ERC20Mintable, ERC20UniqueExtensions, Collection {}478interface UniqueFungible is Dummy, ERC165, ERC20, ERC20Mintable, ERC20UniqueExtensions, Collection {}