difftreelog
fix hide mintWithTokenURI and temporary unhide mintBulk
in: master
10 files changed
pallets/nonfungible/src/erc.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -510,7 +510,7 @@
/// @param to The new owner
/// @param tokenId ID of the minted NFT
/// @param tokenUri Token URI that would be stored in the NFT properties
- #[solidity(/*hide,*/ rename_selector = "mintWithTokenURI")]
+ #[solidity(hide, rename_selector = "mintWithTokenURI")]
#[weight(<SelfWeightOf<T>>::create_item())]
fn mint_with_token_uri_check_id(
&mut self,
@@ -668,7 +668,7 @@
/// should be obtained with `nextTokenId` method
/// @param to The new owner
/// @param tokenIds IDs of the minted NFTs
- #[solidity(hide)]
+ // #[solidity(hide)]
#[weight(<SelfWeightOf<T>>::create_multiple_items(token_ids.len() as u32))]
fn mint_bulk(&mut self, caller: caller, to: address, token_ids: Vec<uint256>) -> Result<bool> {
let caller = T::CrossAccountId::from_eth(caller);
pallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterbothbinary blob — no preview
pallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth500 return 0;500 return 0;501 }501 }502502503 /// @notice Function to mint token with the given tokenUri.503 // /// @notice Function to mint token with the given tokenUri.504 /// @dev `tokenId` should be obtained with `nextTokenId` method,504 // /// @dev `tokenId` should be obtained with `nextTokenId` method,505 /// unlike standard, you can't specify it manually505 // /// unlike standard, you can't specify it manually506 /// @param to The new owner506 // /// @param to The new owner507 /// @param tokenId ID of the minted NFT507 // /// @param tokenId ID of the minted NFT508 /// @param tokenUri Token URI that would be stored in the NFT properties508 // /// @param tokenUri Token URI that would be stored in the NFT properties509 /// @dev EVM selector for this function is: 0x50bb4e7f,509 // /// @dev EVM selector for this function is: 0x50bb4e7f,510 /// or in textual repr: mintWithTokenURI(address,uint256,string)510 // /// or in textual repr: mintWithTokenURI(address,uint256,string)511 function mintWithTokenURI(511 // function mintWithTokenURI(address to, uint256 tokenId, string memory tokenUri) public returns (bool) {512 address to,512 // require(false, stub_error);513 uint256 tokenId,513 // to;514 string memory tokenUri514 // tokenId;515 ) public returns (bool) {515 // tokenUri;516 require(false, stub_error);516 // dummy = 0;517 to;517 // return false;518 tokenId;518 // }519 tokenUri;520 dummy = 0;521 return false;522 }523519524 /// @dev Not implemented520 /// @dev Not implemented525 /// @dev EVM selector for this function is: 0x7d64bcb4,521 /// @dev EVM selector for this function is: 0x7d64bcb4,590 return 0;586 return 0;591 }587 }592588593 // /// @notice Function to mint multiple tokens.589 /// @notice Function to mint multiple tokens.594 // /// @dev `tokenIds` should be an array of consecutive numbers and first number590 /// @dev `tokenIds` should be an array of consecutive numbers and first number595 // /// should be obtained with `nextTokenId` method591 /// should be obtained with `nextTokenId` method596 // /// @param to The new owner592 /// @param to The new owner597 // /// @param tokenIds IDs of the minted NFTs593 /// @param tokenIds IDs of the minted NFTs598 // /// @dev EVM selector for this function is: 0x44a9945e,594 /// @dev EVM selector for this function is: 0x44a9945e,599 // /// or in textual repr: mintBulk(address,uint256[])595 /// or in textual repr: mintBulk(address,uint256[])600 // function mintBulk(address to, uint256[] memory tokenIds) public returns (bool) {596 function mintBulk(address to, uint256[] memory tokenIds) public returns (bool) {601 // require(false, stub_error);597 require(false, stub_error);602 // to;598 to;603 // tokenIds;599 tokenIds;604 // dummy = 0;600 dummy = 0;605 // return false;601 return false;606 // }602 }607603608 /// @notice Function to mint multiple tokens with the given tokenUris.604 /// @notice Function to mint multiple tokens with the given tokenUris.609 /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive605 /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutivepallets/refungible/src/erc.rsdiffbeforeafterboth--- a/pallets/refungible/src/erc.rs
+++ b/pallets/refungible/src/erc.rs
@@ -536,7 +536,7 @@
/// @param to The new owner
/// @param tokenId ID of the minted RFT
/// @param tokenUri Token URI that would be stored in the RFT properties
- #[solidity(/*hide,*/ rename_selector = "mintWithTokenURI")]
+ #[solidity(hide, rename_selector = "mintWithTokenURI")]
#[weight(<SelfWeightOf<T>>::create_item())]
fn mint_with_token_uri_check_id(
&mut self,
@@ -705,7 +705,7 @@
/// should be obtained with `nextTokenId` method
/// @param to The new owner
/// @param tokenIds IDs of the minted RFTs
- #[solidity(hide)]
+ // #[solidity(hide)]
#[weight(<SelfWeightOf<T>>::create_multiple_items(token_ids.len() as u32))]
fn mint_bulk(&mut self, caller: caller, to: address, token_ids: Vec<uint256>) -> Result<bool> {
let caller = T::CrossAccountId::from_eth(caller);
pallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth--- a/pallets/refungible/src/stubs/UniqueRefungible.sol
+++ b/pallets/refungible/src/stubs/UniqueRefungible.sol
@@ -498,26 +498,22 @@
return 0;
}
- /// @notice Function to mint token with the given tokenUri.
- /// @dev `tokenId` should be obtained with `nextTokenId` method,
- /// unlike standard, you can't specify it manually
- /// @param to The new owner
- /// @param tokenId ID of the minted RFT
- /// @param tokenUri Token URI that would be stored in the RFT properties
- /// @dev EVM selector for this function is: 0x50bb4e7f,
- /// or in textual repr: mintWithTokenURI(address,uint256,string)
- function mintWithTokenURI(
- address to,
- uint256 tokenId,
- string memory tokenUri
- ) public returns (bool) {
- require(false, stub_error);
- to;
- tokenId;
- tokenUri;
- dummy = 0;
- return false;
- }
+ // /// @notice Function to mint token with the given tokenUri.
+ // /// @dev `tokenId` should be obtained with `nextTokenId` method,
+ // /// unlike standard, you can't specify it manually
+ // /// @param to The new owner
+ // /// @param tokenId ID of the minted RFT
+ // /// @param tokenUri Token URI that would be stored in the RFT properties
+ // /// @dev EVM selector for this function is: 0x50bb4e7f,
+ // /// or in textual repr: mintWithTokenURI(address,uint256,string)
+ // function mintWithTokenURI(address to, uint256 tokenId, string memory tokenUri) public returns (bool) {
+ // require(false, stub_error);
+ // to;
+ // tokenId;
+ // tokenUri;
+ // dummy = 0;
+ // return false;
+ // }
/// @dev Not implemented
/// @dev EVM selector for this function is: 0x7d64bcb4,
@@ -590,20 +586,20 @@
return 0;
}
- // /// @notice Function to mint multiple tokens.
- // /// @dev `tokenIds` should be an array of consecutive numbers and first number
- // /// should be obtained with `nextTokenId` method
- // /// @param to The new owner
- // /// @param tokenIds IDs of the minted RFTs
- // /// @dev EVM selector for this function is: 0x44a9945e,
- // /// or in textual repr: mintBulk(address,uint256[])
- // function mintBulk(address to, uint256[] memory tokenIds) public returns (bool) {
- // require(false, stub_error);
- // to;
- // tokenIds;
- // dummy = 0;
- // return false;
- // }
+ /// @notice Function to mint multiple tokens.
+ /// @dev `tokenIds` should be an array of consecutive numbers and first number
+ /// should be obtained with `nextTokenId` method
+ /// @param to The new owner
+ /// @param tokenIds IDs of the minted RFTs
+ /// @dev EVM selector for this function is: 0x44a9945e,
+ /// or in textual repr: mintBulk(address,uint256[])
+ function mintBulk(address to, uint256[] memory tokenIds) public returns (bool) {
+ require(false, stub_error);
+ to;
+ tokenIds;
+ dummy = 0;
+ return false;
+ }
/// @notice Function to mint multiple tokens with the given tokenUris.
/// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -332,19 +332,15 @@
/// or in textual repr: mintWithTokenURI(address,string)
function mintWithTokenURI(address to, string memory tokenUri) external returns (uint256);
- /// @notice Function to mint token with the given tokenUri.
- /// @dev `tokenId` should be obtained with `nextTokenId` method,
- /// unlike standard, you can't specify it manually
- /// @param to The new owner
- /// @param tokenId ID of the minted NFT
- /// @param tokenUri Token URI that would be stored in the NFT properties
- /// @dev EVM selector for this function is: 0x50bb4e7f,
- /// or in textual repr: mintWithTokenURI(address,uint256,string)
- function mintWithTokenURI(
- address to,
- uint256 tokenId,
- string memory tokenUri
- ) external returns (bool);
+ // /// @notice Function to mint token with the given tokenUri.
+ // /// @dev `tokenId` should be obtained with `nextTokenId` method,
+ // /// unlike standard, you can't specify it manually
+ // /// @param to The new owner
+ // /// @param tokenId ID of the minted NFT
+ // /// @param tokenUri Token URI that would be stored in the NFT properties
+ // /// @dev EVM selector for this function is: 0x50bb4e7f,
+ // /// or in textual repr: mintWithTokenURI(address,uint256,string)
+ // function mintWithTokenURI(address to, uint256 tokenId, string memory tokenUri) external returns (bool);
/// @dev Not implemented
/// @dev EVM selector for this function is: 0x7d64bcb4,
@@ -389,14 +385,14 @@
/// or in textual repr: nextTokenId()
function nextTokenId() external view returns (uint256);
- // /// @notice Function to mint multiple tokens.
- // /// @dev `tokenIds` should be an array of consecutive numbers and first number
- // /// should be obtained with `nextTokenId` method
- // /// @param to The new owner
- // /// @param tokenIds IDs of the minted NFTs
- // /// @dev EVM selector for this function is: 0x44a9945e,
- // /// or in textual repr: mintBulk(address,uint256[])
- // function mintBulk(address to, uint256[] memory tokenIds) external returns (bool);
+ /// @notice Function to mint multiple tokens.
+ /// @dev `tokenIds` should be an array of consecutive numbers and first number
+ /// should be obtained with `nextTokenId` method
+ /// @param to The new owner
+ /// @param tokenIds IDs of the minted NFTs
+ /// @dev EVM selector for this function is: 0x44a9945e,
+ /// or in textual repr: mintBulk(address,uint256[])
+ function mintBulk(address to, uint256[] memory tokenIds) external returns (bool);
/// @notice Function to mint multiple tokens with the given tokenUris.
/// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
tests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -330,19 +330,15 @@
/// or in textual repr: mintWithTokenURI(address,string)
function mintWithTokenURI(address to, string memory tokenUri) external returns (uint256);
- /// @notice Function to mint token with the given tokenUri.
- /// @dev `tokenId` should be obtained with `nextTokenId` method,
- /// unlike standard, you can't specify it manually
- /// @param to The new owner
- /// @param tokenId ID of the minted RFT
- /// @param tokenUri Token URI that would be stored in the RFT properties
- /// @dev EVM selector for this function is: 0x50bb4e7f,
- /// or in textual repr: mintWithTokenURI(address,uint256,string)
- function mintWithTokenURI(
- address to,
- uint256 tokenId,
- string memory tokenUri
- ) external returns (bool);
+ // /// @notice Function to mint token with the given tokenUri.
+ // /// @dev `tokenId` should be obtained with `nextTokenId` method,
+ // /// unlike standard, you can't specify it manually
+ // /// @param to The new owner
+ // /// @param tokenId ID of the minted RFT
+ // /// @param tokenUri Token URI that would be stored in the RFT properties
+ // /// @dev EVM selector for this function is: 0x50bb4e7f,
+ // /// or in textual repr: mintWithTokenURI(address,uint256,string)
+ // function mintWithTokenURI(address to, uint256 tokenId, string memory tokenUri) external returns (bool);
/// @dev Not implemented
/// @dev EVM selector for this function is: 0x7d64bcb4,
@@ -389,14 +385,14 @@
/// or in textual repr: nextTokenId()
function nextTokenId() external view returns (uint256);
- // /// @notice Function to mint multiple tokens.
- // /// @dev `tokenIds` should be an array of consecutive numbers and first number
- // /// should be obtained with `nextTokenId` method
- // /// @param to The new owner
- // /// @param tokenIds IDs of the minted RFTs
- // /// @dev EVM selector for this function is: 0x44a9945e,
- // /// or in textual repr: mintBulk(address,uint256[])
- // function mintBulk(address to, uint256[] memory tokenIds) external returns (bool);
+ /// @notice Function to mint multiple tokens.
+ /// @dev `tokenIds` should be an array of consecutive numbers and first number
+ /// should be obtained with `nextTokenId` method
+ /// @param to The new owner
+ /// @param tokenIds IDs of the minted RFTs
+ /// @dev EVM selector for this function is: 0x44a9945e,
+ /// or in textual repr: mintBulk(address,uint256[])
+ function mintBulk(address to, uint256[] memory tokenIds) external returns (bool);
/// @notice Function to mint multiple tokens with the given tokenUris.
/// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
tests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth--- a/tests/src/eth/nonFungibleAbi.json
+++ b/tests/src/eth/nonFungibleAbi.json
@@ -269,6 +269,16 @@
{
"inputs": [
{ "internalType": "address", "name": "to", "type": "address" },
+ { "internalType": "uint256[]", "name": "tokenIds", "type": "uint256[]" }
+ ],
+ "name": "mintBulk",
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ { "internalType": "address", "name": "to", "type": "address" },
{
"components": [
{ "internalType": "uint256", "name": "field_0", "type": "uint256" },
@@ -291,17 +301,6 @@
],
"name": "mintWithTokenURI",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- { "internalType": "address", "name": "to", "type": "address" },
- { "internalType": "uint256", "name": "tokenId", "type": "uint256" },
- { "internalType": "string", "name": "tokenUri", "type": "string" }
- ],
- "name": "mintWithTokenURI",
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "nonpayable",
"type": "function"
},
tests/src/eth/reFungibleAbi.jsondiffbeforeafterboth--- a/tests/src/eth/reFungibleAbi.json
+++ b/tests/src/eth/reFungibleAbi.json
@@ -269,6 +269,16 @@
{
"inputs": [
{ "internalType": "address", "name": "to", "type": "address" },
+ { "internalType": "uint256[]", "name": "tokenIds", "type": "uint256[]" }
+ ],
+ "name": "mintBulk",
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ { "internalType": "address", "name": "to", "type": "address" },
{
"components": [
{ "internalType": "uint256", "name": "field_0", "type": "uint256" },
@@ -291,17 +301,6 @@
],
"name": "mintWithTokenURI",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- { "internalType": "address", "name": "to", "type": "address" },
- { "internalType": "uint256", "name": "tokenId", "type": "uint256" },
- { "internalType": "string", "name": "tokenUri", "type": "string" }
- ],
- "name": "mintWithTokenURI",
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "nonpayable",
"type": "function"
},