git.delta.rocks / unique-network / refs/commits / efa1195717a8

difftreelog

feat hide mintBulk methods

Yaroslav Bolyukin2022-10-19parent: #39148f6.patch.diff
in: master

11 files changed

modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
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);
705 /// numbers and first number should be obtained with `nextTokenId` method705 /// numbers and first number should be obtained with `nextTokenId` method
706 /// @param to The new owner706 /// @param to The new owner
707 /// @param tokens array of pairs of token ID and token URI for minted tokens707 /// @param tokens array of pairs of token ID and token URI for minted tokens
708 #[solidity(/*hide,*/ rename_selector = "mintBulkWithTokenURI")]708 #[solidity(hide, rename_selector = "mintBulkWithTokenURI")]
709 #[weight(<SelfWeightOf<T>>::create_multiple_items(tokens.len() as u32))]709 #[weight(<SelfWeightOf<T>>::create_multiple_items(tokens.len() as u32))]
710 fn mint_bulk_with_token_uri(710 fn mint_bulk_with_token_uri(
711 &mut self,711 &mut self,
modifiedpallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth
586 return 0;586 return 0;
587 }587 }
588
589 /// @notice Function to mint multiple tokens.588 // /// @notice Function to mint multiple tokens.
590 /// @dev `tokenIds` should be an array of consecutive numbers and first number589 // /// @dev `tokenIds` should be an array of consecutive numbers and first number
591 /// should be obtained with `nextTokenId` method590 // /// should be obtained with `nextTokenId` method
592 /// @param to The new owner591 // /// @param to The new owner
593 /// @param tokenIds IDs of the minted NFTs592 // /// @param tokenIds IDs of the minted NFTs
594 /// @dev EVM selector for this function is: 0x44a9945e,593 // /// @dev EVM selector for this function is: 0x44a9945e,
595 /// or in textual repr: mintBulk(address,uint256[])594 // /// or in textual repr: mintBulk(address,uint256[])
596 function mintBulk(address to, uint256[] memory tokenIds) public returns (bool) {595 // function mintBulk(address to, uint256[] memory tokenIds) public returns (bool) {
597 require(false, stub_error);596 // require(false, stub_error);
598 to;597 // to;
599 tokenIds;598 // tokenIds;
600 dummy = 0;599 // dummy = 0;
601 return false;600 // return false;
602 }601 // }
603602
604 /// @notice Function to mint multiple tokens with the given tokenUris.603 // /// @notice Function to mint multiple tokens with the given tokenUris.
605 /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive604 // /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
606 /// numbers and first number should be obtained with `nextTokenId` method605 // /// numbers and first number should be obtained with `nextTokenId` method
607 /// @param to The new owner606 // /// @param to The new owner
608 /// @param tokens array of pairs of token ID and token URI for minted tokens607 // /// @param tokens array of pairs of token ID and token URI for minted tokens
609 /// @dev EVM selector for this function is: 0x36543006,608 // /// @dev EVM selector for this function is: 0x36543006,
610 /// or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])609 // /// or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])
611 function mintBulkWithTokenURI(address to, Tuple6[] memory tokens) public returns (bool) {610 // function mintBulkWithTokenURI(address to, Tuple6[] memory tokens) public returns (bool) {
612 require(false, stub_error);611 // require(false, stub_error);
613 to;612 // to;
614 tokens;613 // tokens;
615 dummy = 0;614 // dummy = 0;
616 return false;615 // return false;
617 }616 // }
617
618}618}
619619
modifiedpallets/refungible/src/erc.rsdiffbeforeafterboth
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);
748 /// numbers and first number should be obtained with `nextTokenId` method748 /// numbers and first number should be obtained with `nextTokenId` method
749 /// @param to The new owner749 /// @param to The new owner
750 /// @param tokens array of pairs of token ID and token URI for minted tokens750 /// @param tokens array of pairs of token ID and token URI for minted tokens
751 #[solidity(/*hide,*/ rename_selector = "mintBulkWithTokenURI")]751 #[solidity(hide, rename_selector = "mintBulkWithTokenURI")]
752 #[weight(<SelfWeightOf<T>>::create_multiple_items(tokens.len() as u32))]752 #[weight(<SelfWeightOf<T>>::create_multiple_items(tokens.len() as u32))]
753 fn mint_bulk_with_token_uri(753 fn mint_bulk_with_token_uri(
754 &mut self,754 &mut self,
modifiedpallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth
586 return 0;586 return 0;
587 }587 }
588588
589 /// @notice Function to mint multiple tokens.589 // /// @notice Function to mint multiple tokens.
590 /// @dev `tokenIds` should be an array of consecutive numbers and first number590 // /// @dev `tokenIds` should be an array of consecutive numbers and first number
591 /// should be obtained with `nextTokenId` method591 // /// should be obtained with `nextTokenId` method
592 /// @param to The new owner592 // /// @param to The new owner
593 /// @param tokenIds IDs of the minted RFTs593 // /// @param tokenIds IDs of the minted RFTs
594 /// @dev EVM selector for this function is: 0x44a9945e,594 // /// @dev EVM selector for this function is: 0x44a9945e,
595 /// or in textual repr: mintBulk(address,uint256[])595 // /// or in textual repr: mintBulk(address,uint256[])
596 function mintBulk(address to, uint256[] memory tokenIds) public returns (bool) {596 // function mintBulk(address to, uint256[] memory tokenIds) public returns (bool) {
597 require(false, stub_error);597 // require(false, stub_error);
598 to;598 // to;
599 tokenIds;599 // tokenIds;
600 dummy = 0;600 // dummy = 0;
601 return false;601 // return false;
602 }602 // }
603603
604 /// @notice Function to mint multiple tokens with the given tokenUris.604 // /// @notice Function to mint multiple tokens with the given tokenUris.
605 /// @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
606 /// numbers and first number should be obtained with `nextTokenId` method606 // /// numbers and first number should be obtained with `nextTokenId` method
607 /// @param to The new owner607 // /// @param to The new owner
608 /// @param tokens array of pairs of token ID and token URI for minted tokens608 // /// @param tokens array of pairs of token ID and token URI for minted tokens
609 /// @dev EVM selector for this function is: 0x36543006,609 // /// @dev EVM selector for this function is: 0x36543006,
610 /// or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])610 // /// or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])
611 function mintBulkWithTokenURI(address to, Tuple6[] memory tokens) public returns (bool) {611 // function mintBulkWithTokenURI(address to, Tuple6[] memory tokens) public returns (bool) {
612 require(false, stub_error);612 // require(false, stub_error);
613 to;613 // to;
614 tokens;614 // tokens;
615 dummy = 0;615 // dummy = 0;
616 return false;616 // return false;
617 }617 // }
618618
619 /// Returns EVM address for refungible token619 /// Returns EVM address for refungible token
620 ///620 ///
modifiedpallets/refungible/src/stubs/UniqueRefungibleToken.rawdiffbeforeafterboth

binary blob — no preview

modifiedtests/src/eth/api/UniqueNFT.soldiffbeforeafterboth
385 /// or in textual repr: nextTokenId()385 /// or in textual repr: nextTokenId()
386 function nextTokenId() external view returns (uint256);386 function nextTokenId() external view returns (uint256);
387
388 /// @notice Function to mint multiple tokens.387 // /// @notice Function to mint multiple tokens.
389 /// @dev `tokenIds` should be an array of consecutive numbers and first number388 // /// @dev `tokenIds` should be an array of consecutive numbers and first number
390 /// should be obtained with `nextTokenId` method389 // /// should be obtained with `nextTokenId` method
391 /// @param to The new owner390 // /// @param to The new owner
392 /// @param tokenIds IDs of the minted NFTs391 // /// @param tokenIds IDs of the minted NFTs
393 /// @dev EVM selector for this function is: 0x44a9945e,392 // /// @dev EVM selector for this function is: 0x44a9945e,
394 /// or in textual repr: mintBulk(address,uint256[])393 // /// or in textual repr: mintBulk(address,uint256[])
395 function mintBulk(address to, uint256[] memory tokenIds) external returns (bool);394 // function mintBulk(address to, uint256[] memory tokenIds) external returns (bool);
396395
397 /// @notice Function to mint multiple tokens with the given tokenUris.396 // /// @notice Function to mint multiple tokens with the given tokenUris.
398 /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive397 // /// @dev `tokenIds` is array of pairs of token ID and token URI. Token IDs should be consecutive
399 /// numbers and first number should be obtained with `nextTokenId` method398 // /// numbers and first number should be obtained with `nextTokenId` method
400 /// @param to The new owner399 // /// @param to The new owner
401 /// @param tokens array of pairs of token ID and token URI for minted tokens400 // /// @param tokens array of pairs of token ID and token URI for minted tokens
402 /// @dev EVM selector for this function is: 0x36543006,401 // /// @dev EVM selector for this function is: 0x36543006,
403 /// or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])402 // /// or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])
404 function mintBulkWithTokenURI(address to, Tuple6[] memory tokens) external returns (bool);403 // function mintBulkWithTokenURI(address to, Tuple6[] memory tokens) external returns (bool);
404
405}405}
406406
modifiedtests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth
385 /// or in textual repr: nextTokenId()385 /// or in textual repr: nextTokenId()
386 function nextTokenId() external view returns (uint256);386 function nextTokenId() external view returns (uint256);
387387
388 /// @notice Function to mint multiple tokens.388 // /// @notice Function to mint multiple tokens.
389 /// @dev `tokenIds` should be an array of consecutive numbers and first number389 // /// @dev `tokenIds` should be an array of consecutive numbers and first number
390 /// should be obtained with `nextTokenId` method390 // /// should be obtained with `nextTokenId` method
391 /// @param to The new owner391 // /// @param to The new owner
392 /// @param tokenIds IDs of the minted RFTs392 // /// @param tokenIds IDs of the minted RFTs
393 /// @dev EVM selector for this function is: 0x44a9945e,393 // /// @dev EVM selector for this function is: 0x44a9945e,
394 /// or in textual repr: mintBulk(address,uint256[])394 // /// or in textual repr: mintBulk(address,uint256[])
395 function mintBulk(address to, uint256[] memory tokenIds) external returns (bool);395 // function mintBulk(address to, uint256[] memory tokenIds) external returns (bool);
396396
397 /// @notice Function to mint multiple tokens with the given tokenUris.397 // /// @notice Function to mint multiple tokens with the given tokenUris.
398 /// @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
399 /// numbers and first number should be obtained with `nextTokenId` method399 // /// numbers and first number should be obtained with `nextTokenId` method
400 /// @param to The new owner400 // /// @param to The new owner
401 /// @param tokens array of pairs of token ID and token URI for minted tokens401 // /// @param tokens array of pairs of token ID and token URI for minted tokens
402 /// @dev EVM selector for this function is: 0x36543006,402 // /// @dev EVM selector for this function is: 0x36543006,
403 /// or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])403 // /// or in textual repr: mintBulkWithTokenURI(address,(uint256,string)[])
404 function mintBulkWithTokenURI(address to, Tuple6[] memory tokens) external returns (bool);404 // function mintBulkWithTokenURI(address to, Tuple6[] memory tokens) external returns (bool);
405405
406 /// Returns EVM address for refungible token406 /// Returns EVM address for refungible token
407 ///407 ///
modifiedtests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth
275 "stateMutability": "nonpayable",275 "stateMutability": "nonpayable",
276 "type": "function"276 "type": "function"
277 },277 },
278 {
279 "inputs": [
280 { "internalType": "address", "name": "to", "type": "address" },
281 { "internalType": "uint256[]", "name": "tokenIds", "type": "uint256[]" }
282 ],
283 "name": "mintBulk",
284 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
285 "stateMutability": "nonpayable",
286 "type": "function"
287 },
288 {
289 "inputs": [
290 { "internalType": "address", "name": "to", "type": "address" },
291 {
292 "components": [
293 { "internalType": "uint256", "name": "field_0", "type": "uint256" },
294 { "internalType": "string", "name": "field_1", "type": "string" }
295 ],
296 "internalType": "struct Tuple6[]",
297 "name": "tokens",
298 "type": "tuple[]"
299 }
300 ],
301 "name": "mintBulkWithTokenURI",
302 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
303 "stateMutability": "nonpayable",
304 "type": "function"
305 },
306 {278 {
307 "inputs": [279 "inputs": [
308 { "internalType": "address", "name": "to", "type": "address" },280 { "internalType": "address", "name": "to", "type": "address" },
modifiedtests/src/eth/reFungibleAbi.jsondiffbeforeafterboth
275 "stateMutability": "nonpayable",275 "stateMutability": "nonpayable",
276 "type": "function"276 "type": "function"
277 },277 },
278 {
279 "inputs": [
280 { "internalType": "address", "name": "to", "type": "address" },
281 { "internalType": "uint256[]", "name": "tokenIds", "type": "uint256[]" }
282 ],
283 "name": "mintBulk",
284 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
285 "stateMutability": "nonpayable",
286 "type": "function"
287 },
288 {
289 "inputs": [
290 { "internalType": "address", "name": "to", "type": "address" },
291 {
292 "components": [
293 { "internalType": "uint256", "name": "field_0", "type": "uint256" },
294 { "internalType": "string", "name": "field_1", "type": "string" }
295 ],
296 "internalType": "struct Tuple6[]",
297 "name": "tokens",
298 "type": "tuple[]"
299 }
300 ],
301 "name": "mintBulkWithTokenURI",
302 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
303 "stateMutability": "nonpayable",
304 "type": "function"
305 },
306 {278 {
307 "inputs": [279 "inputs": [
308 { "internalType": "address", "name": "to", "type": "address" },280 { "internalType": "address", "name": "to", "type": "address" },