git.delta.rocks / unique-network / refs/commits / 49ed2a2797e2

difftreelog

fix hide mintWithTokenURI and temporary unhide mintBulk

Alex Saft2022-10-14parent: #e031ad6.patch.diff
in: master

10 files changed

modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
510 /// @param to The new owner510 /// @param to The new owner
511 /// @param tokenId ID of the minted NFT511 /// @param tokenId ID of the minted NFT
512 /// @param tokenUri Token URI that would be stored in the NFT properties512 /// @param tokenUri Token URI that would be stored in the NFT properties
513 #[solidity(/*hide,*/ rename_selector = "mintWithTokenURI")]513 #[solidity(hide, rename_selector = "mintWithTokenURI")]
514 #[weight(<SelfWeightOf<T>>::create_item())]514 #[weight(<SelfWeightOf<T>>::create_item())]
515 fn mint_with_token_uri_check_id(515 fn mint_with_token_uri_check_id(
516 &mut self,516 &mut self,
668 /// should be obtained with `nextTokenId` method668 /// should be obtained with `nextTokenId` method
669 /// @param to The new owner669 /// @param to The new owner
670 /// @param tokenIds IDs of the minted NFTs670 /// @param tokenIds IDs of the minted NFTs
671 #[solidity(hide)]671 // #[solidity(hide)]
672 #[weight(<SelfWeightOf<T>>::create_multiple_items(token_ids.len() as u32))]672 #[weight(<SelfWeightOf<T>>::create_multiple_items(token_ids.len() as u32))]
673 fn mint_bulk(&mut self, caller: caller, to: address, token_ids: Vec<uint256>) -> Result<bool> {673 fn mint_bulk(&mut self, caller: caller, to: address, token_ids: Vec<uint256>) -> Result<bool> {
674 let caller = T::CrossAccountId::from_eth(caller);674 let caller = T::CrossAccountId::from_eth(caller);
modifiedpallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth
500 return 0;500 return 0;
501 }501 }
502502
503 /// @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 manually
506 /// @param to The new owner506 // /// @param to The new owner
507 /// @param tokenId ID of the minted NFT507 // /// @param tokenId ID of the minted NFT
508 /// @param tokenUri Token URI that would be stored in the NFT properties508 // /// @param tokenUri Token URI that would be stored in the NFT properties
509 /// @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 }
523519
524 /// @dev Not implemented520 /// @dev Not implemented
525 /// @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 }
592588
593 // /// @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 number
595 // /// should be obtained with `nextTokenId` method591 /// should be obtained with `nextTokenId` method
596 // /// @param to The new owner592 /// @param to The new owner
597 // /// @param tokenIds IDs of the minted NFTs593 /// @param tokenIds IDs of the minted NFTs
598 // /// @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 }
607603
608 /// @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 consecutive
modifiedpallets/refungible/src/erc.rsdiffbeforeafterboth
536 /// @param to The new owner536 /// @param to The new owner
537 /// @param tokenId ID of the minted RFT537 /// @param tokenId ID of the minted RFT
538 /// @param tokenUri Token URI that would be stored in the RFT properties538 /// @param tokenUri Token URI that would be stored in the RFT properties
539 #[solidity(/*hide,*/ rename_selector = "mintWithTokenURI")]539 #[solidity(hide, rename_selector = "mintWithTokenURI")]
540 #[weight(<SelfWeightOf<T>>::create_item())]540 #[weight(<SelfWeightOf<T>>::create_item())]
541 fn mint_with_token_uri_check_id(541 fn mint_with_token_uri_check_id(
542 &mut self,542 &mut self,
705 /// should be obtained with `nextTokenId` method705 /// should be obtained with `nextTokenId` method
706 /// @param to The new owner706 /// @param to The new owner
707 /// @param tokenIds IDs of the minted RFTs707 /// @param tokenIds IDs of the minted RFTs
708 #[solidity(hide)]708 // #[solidity(hide)]
709 #[weight(<SelfWeightOf<T>>::create_multiple_items(token_ids.len() as u32))]709 #[weight(<SelfWeightOf<T>>::create_multiple_items(token_ids.len() as u32))]
710 fn mint_bulk(&mut self, caller: caller, to: address, token_ids: Vec<uint256>) -> Result<bool> {710 fn mint_bulk(&mut self, caller: caller, to: address, token_ids: Vec<uint256>) -> Result<bool> {
711 let caller = T::CrossAccountId::from_eth(caller);711 let caller = T::CrossAccountId::from_eth(caller);
modifiedpallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth
498 return 0;498 return 0;
499 }499 }
500500
501 /// @notice Function to mint token with the given tokenUri.501 // /// @notice Function to mint token with the given tokenUri.
502 /// @dev `tokenId` should be obtained with `nextTokenId` method,502 // /// @dev `tokenId` should be obtained with `nextTokenId` method,
503 /// unlike standard, you can't specify it manually503 // /// unlike standard, you can't specify it manually
504 /// @param to The new owner504 // /// @param to The new owner
505 /// @param tokenId ID of the minted RFT505 // /// @param tokenId ID of the minted RFT
506 /// @param tokenUri Token URI that would be stored in the RFT properties506 // /// @param tokenUri Token URI that would be stored in the RFT properties
507 /// @dev EVM selector for this function is: 0x50bb4e7f,507 // /// @dev EVM selector for this function is: 0x50bb4e7f,
508 /// or in textual repr: mintWithTokenURI(address,uint256,string)508 // /// or in textual repr: mintWithTokenURI(address,uint256,string)
509 function mintWithTokenURI(509 // function mintWithTokenURI(address to, uint256 tokenId, string memory tokenUri) public returns (bool) {
510 address to,510 // require(false, stub_error);
511 uint256 tokenId,511 // to;
512 string memory tokenUri512 // tokenId;
513 ) public returns (bool) {513 // tokenUri;
514 require(false, stub_error);514 // dummy = 0;
515 to;515 // return false;
516 tokenId;516 // }
517 tokenUri;
518 dummy = 0;
519 return false;
520 }
521517
522 /// @dev Not implemented518 /// @dev Not implemented
523 /// @dev EVM selector for this function is: 0x7d64bcb4,519 /// @dev EVM selector for this function is: 0x7d64bcb4,
590 return 0;586 return 0;
591 }587 }
592588
593 // /// @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 number
595 // /// should be obtained with `nextTokenId` method591 /// should be obtained with `nextTokenId` method
596 // /// @param to The new owner592 /// @param to The new owner
597 // /// @param tokenIds IDs of the minted RFTs593 /// @param tokenIds IDs of the minted RFTs
598 // /// @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 }
607603
608 /// @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 consecutive
modifiedtests/src/eth/api/UniqueNFT.soldiffbeforeafterboth
332 /// or in textual repr: mintWithTokenURI(address,string)332 /// or in textual repr: mintWithTokenURI(address,string)
333 function mintWithTokenURI(address to, string memory tokenUri) external returns (uint256);333 function mintWithTokenURI(address to, string memory tokenUri) external returns (uint256);
334334
335 /// @notice Function to mint token with the given tokenUri.335 // /// @notice Function to mint token with the given tokenUri.
336 /// @dev `tokenId` should be obtained with `nextTokenId` method,336 // /// @dev `tokenId` should be obtained with `nextTokenId` method,
337 /// unlike standard, you can't specify it manually337 // /// unlike standard, you can't specify it manually
338 /// @param to The new owner338 // /// @param to The new owner
339 /// @param tokenId ID of the minted NFT339 // /// @param tokenId ID of the minted NFT
340 /// @param tokenUri Token URI that would be stored in the NFT properties340 // /// @param tokenUri Token URI that would be stored in the NFT properties
341 /// @dev EVM selector for this function is: 0x50bb4e7f,341 // /// @dev EVM selector for this function is: 0x50bb4e7f,
342 /// or in textual repr: mintWithTokenURI(address,uint256,string)342 // /// or in textual repr: mintWithTokenURI(address,uint256,string)
343 function mintWithTokenURI(343 // function mintWithTokenURI(address to, uint256 tokenId, string memory tokenUri) external returns (bool);
344 address to,
345 uint256 tokenId,
346 string memory tokenUri
347 ) external returns (bool);
348344
349 /// @dev Not implemented345 /// @dev Not implemented
350 /// @dev EVM selector for this function is: 0x7d64bcb4,346 /// @dev EVM selector for this function is: 0x7d64bcb4,
389 /// or in textual repr: nextTokenId()385 /// or in textual repr: nextTokenId()
390 function nextTokenId() external view returns (uint256);386 function nextTokenId() external view returns (uint256);
391387
392 // /// @notice Function to mint multiple tokens.388 /// @notice Function to mint multiple tokens.
393 // /// @dev `tokenIds` should be an array of consecutive numbers and first number389 /// @dev `tokenIds` should be an array of consecutive numbers and first number
394 // /// should be obtained with `nextTokenId` method390 /// should be obtained with `nextTokenId` method
395 // /// @param to The new owner391 /// @param to The new owner
396 // /// @param tokenIds IDs of the minted NFTs392 /// @param tokenIds IDs of the minted NFTs
397 // /// @dev EVM selector for this function is: 0x44a9945e,393 /// @dev EVM selector for this function is: 0x44a9945e,
398 // /// or in textual repr: mintBulk(address,uint256[])394 /// or in textual repr: mintBulk(address,uint256[])
399 // function mintBulk(address to, uint256[] memory tokenIds) external returns (bool);395 function mintBulk(address to, uint256[] memory tokenIds) external returns (bool);
400396
401 /// @notice Function to mint multiple tokens with the given tokenUris.397 /// @notice Function to mint multiple tokens with the given tokenUris.
402 /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive398 /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
modifiedtests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth
330 /// or in textual repr: mintWithTokenURI(address,string)330 /// or in textual repr: mintWithTokenURI(address,string)
331 function mintWithTokenURI(address to, string memory tokenUri) external returns (uint256);331 function mintWithTokenURI(address to, string memory tokenUri) external returns (uint256);
332332
333 /// @notice Function to mint token with the given tokenUri.333 // /// @notice Function to mint token with the given tokenUri.
334 /// @dev `tokenId` should be obtained with `nextTokenId` method,334 // /// @dev `tokenId` should be obtained with `nextTokenId` method,
335 /// unlike standard, you can't specify it manually335 // /// unlike standard, you can't specify it manually
336 /// @param to The new owner336 // /// @param to The new owner
337 /// @param tokenId ID of the minted RFT337 // /// @param tokenId ID of the minted RFT
338 /// @param tokenUri Token URI that would be stored in the RFT properties338 // /// @param tokenUri Token URI that would be stored in the RFT properties
339 /// @dev EVM selector for this function is: 0x50bb4e7f,339 // /// @dev EVM selector for this function is: 0x50bb4e7f,
340 /// or in textual repr: mintWithTokenURI(address,uint256,string)340 // /// or in textual repr: mintWithTokenURI(address,uint256,string)
341 function mintWithTokenURI(341 // function mintWithTokenURI(address to, uint256 tokenId, string memory tokenUri) external returns (bool);
342 address to,
343 uint256 tokenId,
344 string memory tokenUri
345 ) external returns (bool);
346342
347 /// @dev Not implemented343 /// @dev Not implemented
348 /// @dev EVM selector for this function is: 0x7d64bcb4,344 /// @dev EVM selector for this function is: 0x7d64bcb4,
389 /// or in textual repr: nextTokenId()385 /// or in textual repr: nextTokenId()
390 function nextTokenId() external view returns (uint256);386 function nextTokenId() external view returns (uint256);
391387
392 // /// @notice Function to mint multiple tokens.388 /// @notice Function to mint multiple tokens.
393 // /// @dev `tokenIds` should be an array of consecutive numbers and first number389 /// @dev `tokenIds` should be an array of consecutive numbers and first number
394 // /// should be obtained with `nextTokenId` method390 /// should be obtained with `nextTokenId` method
395 // /// @param to The new owner391 /// @param to The new owner
396 // /// @param tokenIds IDs of the minted RFTs392 /// @param tokenIds IDs of the minted RFTs
397 // /// @dev EVM selector for this function is: 0x44a9945e,393 /// @dev EVM selector for this function is: 0x44a9945e,
398 // /// or in textual repr: mintBulk(address,uint256[])394 /// or in textual repr: mintBulk(address,uint256[])
399 // function mintBulk(address to, uint256[] memory tokenIds) external returns (bool);395 function mintBulk(address to, uint256[] memory tokenIds) external returns (bool);
400396
401 /// @notice Function to mint multiple tokens with the given tokenUris.397 /// @notice Function to mint multiple tokens with the given tokenUris.
402 /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive398 /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
modifiedtests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth
266 "stateMutability": "nonpayable",266 "stateMutability": "nonpayable",
267 "type": "function"267 "type": "function"
268 },268 },
269 {
270 "inputs": [
271 { "internalType": "address", "name": "to", "type": "address" },
272 { "internalType": "uint256[]", "name": "tokenIds", "type": "uint256[]" }
273 ],
274 "name": "mintBulk",
275 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
276 "stateMutability": "nonpayable",
277 "type": "function"
278 },
269 {279 {
270 "inputs": [280 "inputs": [
271 { "internalType": "address", "name": "to", "type": "address" },281 { "internalType": "address", "name": "to", "type": "address" },
294 "stateMutability": "nonpayable",304 "stateMutability": "nonpayable",
295 "type": "function"305 "type": "function"
296 },306 },
297 {
298 "inputs": [
299 { "internalType": "address", "name": "to", "type": "address" },
300 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },
301 { "internalType": "string", "name": "tokenUri", "type": "string" }
302 ],
303 "name": "mintWithTokenURI",
304 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
305 "stateMutability": "nonpayable",
306 "type": "function"
307 },
308 {307 {
309 "inputs": [],308 "inputs": [],
310 "name": "mintingFinished",309 "name": "mintingFinished",
modifiedtests/src/eth/reFungibleAbi.jsondiffbeforeafterboth
266 "stateMutability": "nonpayable",266 "stateMutability": "nonpayable",
267 "type": "function"267 "type": "function"
268 },268 },
269 {
270 "inputs": [
271 { "internalType": "address", "name": "to", "type": "address" },
272 { "internalType": "uint256[]", "name": "tokenIds", "type": "uint256[]" }
273 ],
274 "name": "mintBulk",
275 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
276 "stateMutability": "nonpayable",
277 "type": "function"
278 },
269 {279 {
270 "inputs": [280 "inputs": [
271 { "internalType": "address", "name": "to", "type": "address" },281 { "internalType": "address", "name": "to", "type": "address" },
294 "stateMutability": "nonpayable",304 "stateMutability": "nonpayable",
295 "type": "function"305 "type": "function"
296 },306 },
297 {
298 "inputs": [
299 { "internalType": "address", "name": "to", "type": "address" },
300 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },
301 { "internalType": "string", "name": "tokenUri", "type": "string" }
302 ],
303 "name": "mintWithTokenURI",
304 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
305 "stateMutability": "nonpayable",
306 "type": "function"
307 },
308 {307 {
309 "inputs": [],308 "inputs": [],
310 "name": "mintingFinished",309 "name": "mintingFinished",