difftreelog
chore generate stubs & fix docs
in: master
13 files changed
pallets/common/src/eth.rsdiffbeforeafterboth1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617//! The module contains a number of functions for converting and checking ethereum identifiers.1819use evm_coder::{20 AbiCoder,21 types::{uint256, address},22};23pub use pallet_evm::{Config, account::CrossAccountId};24use sp_core::H160;25use up_data_structs::CollectionId;2627// 0x17c4e6453Cc49AAAaEACA894e6D9683e00000001 - collection 128// TODO: Unhardcode prefix29const ETH_COLLECTION_PREFIX: [u8; 16] = [30 0x17, 0xc4, 0xe6, 0x45, 0x3c, 0xc4, 0x9a, 0xaa, 0xae, 0xac, 0xa8, 0x94, 0xe6, 0xd9, 0x68, 0x3e,31];3233/// Maps the ethereum address of the collection in substrate.34pub fn map_eth_to_id(eth: &H160) -> Option<CollectionId> {35 if eth[0..16] != ETH_COLLECTION_PREFIX {36 return None;37 }38 let mut id_bytes = [0; 4];39 id_bytes.copy_from_slice(ð[16..20]);40 Some(CollectionId(u32::from_be_bytes(id_bytes)))41}4243/// Maps the substrate collection id in ethereum.44pub fn collection_id_to_address(id: CollectionId) -> H160 {45 let mut out = [0; 20];46 out[0..16].copy_from_slice(Ð_COLLECTION_PREFIX);47 out[16..20].copy_from_slice(&u32::to_be_bytes(id.0));48 H160(out)49}5051/// Check if the ethereum address is a collection.52pub fn is_collection(address: &H160) -> bool {53 address[0..16] == ETH_COLLECTION_PREFIX54}5556/// Convert `uint256` to `CrossAccountId`.57pub fn convert_uint256_to_cross_account<T: Config>(from: uint256) -> T::CrossAccountId58where59 T::AccountId: From<[u8; 32]>,60{61 let mut new_admin_arr = [0_u8; 32];62 from.to_big_endian(&mut new_admin_arr);63 let account_id = T::AccountId::from(new_admin_arr);64 T::CrossAccountId::from_sub(account_id)65}6667/// Convert tuple `(address, uint256)` to `CrossAccountId`.68///69/// If `address` in the tuple has *default* value, then the canonical form is substrate,70/// if `uint256` has *default* value, then the ethereum form is canonical,71/// if both values are *default* or *non default*, then this is considered an invalid address and `Error` is returned.72pub fn convert_tuple_to_cross_account<T: Config>(73 eth_cross_account_id: (address, uint256),74) -> evm_coder::execution::Result<T::CrossAccountId>75where76 T::AccountId: From<[u8; 32]>,77{78 if eth_cross_account_id == Default::default() {79 Err("All fields of cross account is zeroed".into())80 } else if eth_cross_account_id.0 == Default::default() {81 Ok(convert_uint256_to_cross_account::<T>(82 eth_cross_account_id.1,83 ))84 } else if eth_cross_account_id.1 == Default::default() {85 Ok(T::CrossAccountId::from_eth(eth_cross_account_id.0))86 } else {87 Err("All fields of cross account is non zeroed".into())88 }89}9091/// Cross account struct92#[derive(Debug, Default, AbiCoder)]93pub struct EthCrossAccount {94 pub(crate) eth: address,95 pub(crate) sub: uint256,96}9798impl EthCrossAccount {99 /// Converts `CrossAccountId` to `EthCrossAccountId`100 pub fn from_sub_cross_account<T>(cross_account_id: &T::CrossAccountId) -> Self101 where102 T: pallet_evm::Config,103 T::AccountId: AsRef<[u8; 32]>,104 {105 if cross_account_id.is_canonical_substrate() {106 Self::from_sub::<T>(cross_account_id.as_sub())107 } else {108 Self {109 eth: *cross_account_id.as_eth(),110 sub: Default::default(),111 }112 }113 }114 /// Creates `EthCrossAccount` from substrate account115 pub fn from_sub<T>(account_id: &T::AccountId) -> Self116 where117 T: pallet_evm::Config,118 T::AccountId: AsRef<[u8; 32]>,119 {120 Self {121 eth: Default::default(),122 sub: uint256::from_big_endian(account_id.as_ref()),123 }124 }125 /// Converts `EthCrossAccount` to `CrossAccountId`126 pub fn into_sub_cross_account<T>(&self) -> evm_coder::execution::Result<T::CrossAccountId>127 where128 T: pallet_evm::Config,129 T::AccountId: From<[u8; 32]>,130 {131 if self.eth == Default::default() && self.sub == Default::default() {132 Err("All fields of cross account is zeroed".into())133 } else if self.eth == Default::default() {134 Ok(convert_uint256_to_cross_account::<T>(self.sub))135 } else if self.sub == Default::default() {136 Ok(T::CrossAccountId::from_eth(self.eth))137 } else {138 Err("All fields of cross account is non zeroed".into())139 }140 }141}142143/// [`CollectionLimits`](up_data_structs::CollectionLimits) representation for EVM.144#[derive(Debug, Default, Clone, Copy, AbiCoder)]145#[repr(u8)]146pub enum CollectionLimits {147 /// How many tokens can a user have on one account.148 #[default]149 AccountTokenOwnership,150 /// How many bytes of data are available for sponsorship.151 SponsoredDataSize,152 /// In any case, chain default: [`SponsoringRateLimit::SponsoringDisabled`]153 SponsoredDataRateLimit,154 /// How many tokens can be mined into this collection.155 TokenLimit,156 /// Timeouts for transfer sponsoring.157 SponsorTransferTimeout,158 /// Timeout for sponsoring an approval in passed blocks.159 SponsorApproveTimeout,160 /// Whether the collection owner of the collection can send tokens (which belong to other users).161 OwnerCanTransfer,162 /// Can the collection owner burn other people's tokens.163 OwnerCanDestroy,164 /// Is it possible to send tokens from this collection between users.165 TransferEnabled,166}167#[derive(Default, Debug, Clone, Copy, AbiCoder)]168#[repr(u8)]169pub enum CollectionPermissions {170 #[default]171 CollectionAdmin,172 TokenOwner,173}174175/// Ethereum representation of TokenPermissions (see [`up_data_structs::PropertyPermission`]) fields as an enumeration.176#[derive(AbiCoder, Copy, Clone, Default, Debug)]177#[repr(u8)]178pub enum EthTokenPermissions {179 /// Permission to change the property and property permission. See [`up_data_structs::PropertyPermission::mutable`]180 #[default]181 Mutable,182183 /// Change permission for the collection administrator. See [`up_data_structs::PropertyPermission::token_owner`]184 TokenOwner,185186 /// Permission to change the property for the owner of the token. See [`up_data_structs::PropertyPermission::collection_admin`]187 CollectionAdmin,188}pallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth--- a/pallets/fungible/src/stubs/UniqueFungible.sol
+++ b/pallets/fungible/src/stubs/UniqueFungible.sol
@@ -173,10 +173,10 @@
/// Return `false` if a limit not set.
/// @dev EVM selector for this function is: 0xf63bc572,
/// or in textual repr: collectionLimits()
- function collectionLimits() public view returns (Tuple20[] memory) {
+ function collectionLimits() public view returns (Tuple23[] memory) {
require(false, stub_error);
dummy;
- return new Tuple20[](0);
+ return new Tuple23[](0);
}
/// Set limits for the collection.
@@ -284,33 +284,19 @@
/// Returns nesting for a collection
/// @dev EVM selector for this function is: 0x22d25bfe,
/// or in textual repr: collectionNestingRestrictedCollectionIds()
-<<<<<<< HEAD
- function collectionNestingRestrictedCollectionIds() public view returns (Tuple26 memory) {
+ function collectionNestingRestrictedCollectionIds() public view returns (Tuple29 memory) {
require(false, stub_error);
dummy;
- return Tuple26(false, new uint256[](0));
-=======
- function collectionNestingRestrictedCollectionIds() public view returns (Tuple24 memory) {
- require(false, stub_error);
- dummy;
- return Tuple24(false, new uint256[](0));
->>>>>>> 09f69700... chore: generate stubs
+ return Tuple29(false, new uint256[](0));
}
/// Returns permissions for a collection
/// @dev EVM selector for this function is: 0x5b2eaf4b,
/// or in textual repr: collectionNestingPermissions()
-<<<<<<< HEAD
- function collectionNestingPermissions() public view returns (Tuple29[] memory) {
+ function collectionNestingPermissions() public view returns (Tuple32[] memory) {
require(false, stub_error);
dummy;
- return new Tuple29[](0);
-=======
- function collectionNestingPermissions() public view returns (Tuple27[] memory) {
- require(false, stub_error);
- dummy;
- return new Tuple27[](0);
->>>>>>> 09f69700... chore: generate stubs
+ return new Tuple32[](0);
}
/// Set the collection access method.
@@ -490,21 +476,13 @@
}
/// @dev anonymous struct
-<<<<<<< HEAD
-struct Tuple29 {
-=======
-struct Tuple27 {
->>>>>>> 09f69700... chore: generate stubs
+struct Tuple32 {
CollectionPermissions field_0;
bool field_1;
}
/// @dev anonymous struct
-<<<<<<< HEAD
-struct Tuple26 {
-=======
-struct Tuple24 {
->>>>>>> 09f69700... chore: generate stubs
+struct Tuple29 {
bool field_0;
uint256[] field_1;
}
@@ -532,7 +510,7 @@
}
/// @dev anonymous struct
-struct Tuple20 {
+struct Tuple23 {
CollectionLimits field_0;
bool field_1;
uint256 field_2;
pallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterbothbinary blob — no preview
pallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth--- a/pallets/nonfungible/src/stubs/UniqueNFT.sol
+++ b/pallets/nonfungible/src/stubs/UniqueNFT.sol
@@ -42,11 +42,7 @@
/// @param permissions Permissions for keys.
/// @dev EVM selector for this function is: 0xbd92983a,
/// or in textual repr: setTokenPropertyPermissions((string,(uint8,bool)[])[])
-<<<<<<< HEAD
- function setTokenPropertyPermissions(Tuple59[] memory permissions) public {
-=======
- function setTokenPropertyPermissions(Tuple56[] memory permissions) public {
->>>>>>> 9e929f90... chore: generate stubs & types
+ function setTokenPropertyPermissions(Tuple61[] memory permissions) public {
require(false, stub_error);
permissions;
dummy = 0;
@@ -55,17 +51,10 @@
/// @notice Get permissions for token properties.
/// @dev EVM selector for this function is: 0xf23d7790,
/// or in textual repr: tokenPropertyPermissions()
-<<<<<<< HEAD
- function tokenPropertyPermissions() public view returns (Tuple59[] memory) {
- require(false, stub_error);
- dummy;
- return new Tuple59[](0);
-=======
- function tokenPropertyPermissions() public view returns (Tuple56[] memory) {
+ function tokenPropertyPermissions() public view returns (Tuple61[] memory) {
require(false, stub_error);
dummy;
- return new Tuple56[](0);
->>>>>>> 9e929f90... chore: generate stubs & types
+ return new Tuple61[](0);
}
// /// @notice Set token property value.
@@ -155,23 +144,13 @@
}
/// @dev anonymous struct
-<<<<<<< HEAD
-struct Tuple59 {
+struct Tuple61 {
string field_0;
- Tuple57[] field_1;
+ Tuple59[] field_1;
}
/// @dev anonymous struct
-struct Tuple57 {
-=======
-struct Tuple56 {
- string field_0;
- Tuple54[] field_1;
-}
-
-/// @dev anonymous struct
-struct Tuple54 {
->>>>>>> 9e929f90... chore: generate stubs & types
+struct Tuple59 {
EthTokenPermissions field_0;
bool field_1;
}
@@ -332,10 +311,10 @@
/// Return `false` if a limit not set.
/// @dev EVM selector for this function is: 0xf63bc572,
/// or in textual repr: collectionLimits()
- function collectionLimits() public view returns (Tuple33[] memory) {
+ function collectionLimits() public view returns (Tuple35[] memory) {
require(false, stub_error);
dummy;
- return new Tuple33[](0);
+ return new Tuple35[](0);
}
/// Set limits for the collection.
@@ -443,33 +422,19 @@
/// Returns nesting for a collection
/// @dev EVM selector for this function is: 0x22d25bfe,
/// or in textual repr: collectionNestingRestrictedCollectionIds()
-<<<<<<< HEAD
- function collectionNestingRestrictedCollectionIds() public view returns (Tuple39 memory) {
+ function collectionNestingRestrictedCollectionIds() public view returns (Tuple41 memory) {
require(false, stub_error);
dummy;
- return Tuple39(false, new uint256[](0));
-=======
- function collectionNestingRestrictedCollectionIds() public view returns (Tuple36 memory) {
- require(false, stub_error);
- dummy;
- return Tuple36(false, new uint256[](0));
->>>>>>> 09f69700... chore: generate stubs
+ return Tuple41(false, new uint256[](0));
}
/// Returns permissions for a collection
/// @dev EVM selector for this function is: 0x5b2eaf4b,
/// or in textual repr: collectionNestingPermissions()
-<<<<<<< HEAD
- function collectionNestingPermissions() public view returns (Tuple42[] memory) {
- require(false, stub_error);
- dummy;
- return new Tuple42[](0);
-=======
- function collectionNestingPermissions() public view returns (Tuple39[] memory) {
+ function collectionNestingPermissions() public view returns (Tuple44[] memory) {
require(false, stub_error);
dummy;
- return new Tuple39[](0);
->>>>>>> 09f69700... chore: generate stubs
+ return new Tuple44[](0);
}
/// Set the collection access method.
@@ -649,26 +614,17 @@
}
/// @dev anonymous struct
-<<<<<<< HEAD
-struct Tuple42 {
-=======
-struct Tuple39 {
->>>>>>> 09f69700... chore: generate stubs
+struct Tuple44 {
CollectionPermissions field_0;
bool field_1;
}
/// @dev anonymous struct
-<<<<<<< HEAD
-struct Tuple39 {
-=======
-struct Tuple36 {
->>>>>>> 09f69700... chore: generate stubs
+struct Tuple41 {
bool field_0;
uint256[] field_1;
}
-<<<<<<< HEAD
/// @dev [`CollectionLimits`](up_data_structs::CollectionLimits) representation for EVM.
enum CollectionLimits {
/// @dev How many tokens can a user have on one account.
@@ -692,22 +648,12 @@
}
/// @dev anonymous struct
-struct Tuple33 {
+struct Tuple35 {
CollectionLimits field_0;
bool field_1;
uint256 field_2;
}
-/// @dev anonymous struct
-struct Tuple32 {
- address field_0;
- uint256 field_1;
-}
-
-=======
->>>>>>> 0bf15e6f... fixed tests&tuple instead of struct, refactored `refungible` pallet
-=======
->>>>>>> 09f69700... chore: generate stubs
/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension
/// @dev See https://eips.ethereum.org/EIPS/eip-721
/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
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
@@ -42,11 +42,7 @@
/// @param permissions Permissions for keys.
/// @dev EVM selector for this function is: 0xbd92983a,
/// or in textual repr: setTokenPropertyPermissions((string,(uint8,bool)[])[])
-<<<<<<< HEAD
- function setTokenPropertyPermissions(Tuple58[] memory permissions) public {
-=======
- function setTokenPropertyPermissions(Tuple55[] memory permissions) public {
->>>>>>> 9e929f90... chore: generate stubs & types
+ function setTokenPropertyPermissions(Tuple60[] memory permissions) public {
require(false, stub_error);
permissions;
dummy = 0;
@@ -55,17 +51,10 @@
/// @notice Get permissions for token properties.
/// @dev EVM selector for this function is: 0xf23d7790,
/// or in textual repr: tokenPropertyPermissions()
-<<<<<<< HEAD
- function tokenPropertyPermissions() public view returns (Tuple58[] memory) {
- require(false, stub_error);
- dummy;
- return new Tuple58[](0);
-=======
- function tokenPropertyPermissions() public view returns (Tuple55[] memory) {
+ function tokenPropertyPermissions() public view returns (Tuple60[] memory) {
require(false, stub_error);
dummy;
- return new Tuple55[](0);
->>>>>>> 9e929f90... chore: generate stubs & types
+ return new Tuple60[](0);
}
// /// @notice Set token property value.
@@ -155,23 +144,13 @@
}
/// @dev anonymous struct
-<<<<<<< HEAD
-struct Tuple58 {
- string field_0;
- Tuple56[] field_1;
-}
-
-/// @dev anonymous struct
-struct Tuple56 {
-=======
-struct Tuple55 {
+struct Tuple60 {
string field_0;
- Tuple53[] field_1;
+ Tuple58[] field_1;
}
/// @dev anonymous struct
-struct Tuple53 {
->>>>>>> 9e929f90... chore: generate stubs & types
+struct Tuple58 {
EthTokenPermissions field_0;
bool field_1;
}
@@ -332,10 +311,10 @@
/// Return `false` if a limit not set.
/// @dev EVM selector for this function is: 0xf63bc572,
/// or in textual repr: collectionLimits()
- function collectionLimits() public view returns (Tuple32[] memory) {
+ function collectionLimits() public view returns (Tuple34[] memory) {
require(false, stub_error);
dummy;
- return new Tuple32[](0);
+ return new Tuple34[](0);
}
/// Set limits for the collection.
@@ -443,33 +422,19 @@
/// Returns nesting for a collection
/// @dev EVM selector for this function is: 0x22d25bfe,
/// or in textual repr: collectionNestingRestrictedCollectionIds()
-<<<<<<< HEAD
- function collectionNestingRestrictedCollectionIds() public view returns (Tuple38 memory) {
+ function collectionNestingRestrictedCollectionIds() public view returns (Tuple40 memory) {
require(false, stub_error);
dummy;
- return Tuple38(false, new uint256[](0));
-=======
- function collectionNestingRestrictedCollectionIds() public view returns (Tuple35 memory) {
- require(false, stub_error);
- dummy;
- return Tuple35(false, new uint256[](0));
->>>>>>> 09f69700... chore: generate stubs
+ return Tuple40(false, new uint256[](0));
}
/// Returns permissions for a collection
/// @dev EVM selector for this function is: 0x5b2eaf4b,
/// or in textual repr: collectionNestingPermissions()
-<<<<<<< HEAD
- function collectionNestingPermissions() public view returns (Tuple41[] memory) {
- require(false, stub_error);
- dummy;
- return new Tuple41[](0);
-=======
- function collectionNestingPermissions() public view returns (Tuple38[] memory) {
+ function collectionNestingPermissions() public view returns (Tuple43[] memory) {
require(false, stub_error);
dummy;
- return new Tuple38[](0);
->>>>>>> 09f69700... chore: generate stubs
+ return new Tuple43[](0);
}
/// Set the collection access method.
@@ -649,26 +614,17 @@
}
/// @dev anonymous struct
-<<<<<<< HEAD
-struct Tuple41 {
-=======
-struct Tuple38 {
->>>>>>> 09f69700... chore: generate stubs
+struct Tuple43 {
CollectionPermissions field_0;
bool field_1;
}
/// @dev anonymous struct
-<<<<<<< HEAD
-struct Tuple38 {
-=======
-struct Tuple35 {
->>>>>>> 09f69700... chore: generate stubs
+struct Tuple40 {
bool field_0;
uint256[] field_1;
}
-<<<<<<< HEAD
/// @dev [`CollectionLimits`](up_data_structs::CollectionLimits) representation for EVM.
enum CollectionLimits {
/// @dev How many tokens can a user have on one account.
@@ -692,20 +648,12 @@
}
/// @dev anonymous struct
-struct Tuple32 {
+struct Tuple34 {
CollectionLimits field_0;
bool field_1;
uint256 field_2;
-}
-
-/// @dev anonymous struct
-struct Tuple31 {
- address field_0;
- uint256 field_1;
}
-=======
->>>>>>> 09f69700... chore: generate stubs
/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
contract ERC721Metadata is Dummy, ERC165 {
// /// @notice A descriptive name for a collection of NFTs in this contract
tests/src/eth/abi/fungible.jsondiffbeforeafterboth--- a/tests/src/eth/abi/fungible.json
+++ b/tests/src/eth/abi/fungible.json
@@ -220,7 +220,7 @@
{ "internalType": "bool", "name": "field_1", "type": "bool" },
{ "internalType": "uint256", "name": "field_2", "type": "uint256" }
],
- "internalType": "struct Tuple20[]",
+ "internalType": "struct Tuple23[]",
"name": "",
"type": "tuple[]"
}
@@ -241,11 +241,7 @@
},
{ "internalType": "bool", "name": "field_1", "type": "bool" }
],
-<<<<<<< HEAD
- "internalType": "struct Tuple29[]",
-=======
- "internalType": "struct Tuple27[]",
->>>>>>> 09f69700... chore: generate stubs
+ "internalType": "struct Tuple32[]",
"name": "",
"type": "tuple[]"
}
@@ -266,11 +262,7 @@
"type": "uint256[]"
}
],
-<<<<<<< HEAD
- "internalType": "struct Tuple26",
-=======
- "internalType": "struct Tuple24",
->>>>>>> 09f69700... chore: generate stubs
+ "internalType": "struct Tuple29",
"name": "",
"type": "tuple"
}
tests/src/eth/abi/nonFungible.jsondiffbeforeafterboth--- a/tests/src/eth/abi/nonFungible.json
+++ b/tests/src/eth/abi/nonFungible.json
@@ -250,7 +250,7 @@
{ "internalType": "bool", "name": "field_1", "type": "bool" },
{ "internalType": "uint256", "name": "field_2", "type": "uint256" }
],
- "internalType": "struct Tuple33[]",
+ "internalType": "struct Tuple35[]",
"name": "",
"type": "tuple[]"
}
@@ -271,11 +271,7 @@
},
{ "internalType": "bool", "name": "field_1", "type": "bool" }
],
-<<<<<<< HEAD
- "internalType": "struct Tuple42[]",
-=======
- "internalType": "struct Tuple39[]",
->>>>>>> 09f69700... chore: generate stubs
+ "internalType": "struct Tuple44[]",
"name": "",
"type": "tuple[]"
}
@@ -296,11 +292,7 @@
"type": "uint256[]"
}
],
-<<<<<<< HEAD
- "internalType": "struct Tuple39",
-=======
- "internalType": "struct Tuple36",
->>>>>>> 09f69700... chore: generate stubs
+ "internalType": "struct Tuple41",
"name": "",
"type": "tuple"
}
@@ -770,20 +762,12 @@
},
{ "internalType": "bool", "name": "field_1", "type": "bool" }
],
-<<<<<<< HEAD
- "internalType": "struct Tuple57[]",
-=======
- "internalType": "struct Tuple54[]",
->>>>>>> 9e929f90... chore: generate stubs & types
+ "internalType": "struct Tuple59[]",
"name": "field_1",
"type": "tuple[]"
}
],
-<<<<<<< HEAD
- "internalType": "struct Tuple59[]",
-=======
- "internalType": "struct Tuple56[]",
->>>>>>> 9e929f90... chore: generate stubs & types
+ "internalType": "struct Tuple61[]",
"name": "permissions",
"type": "tuple[]"
}
@@ -844,20 +828,12 @@
},
{ "internalType": "bool", "name": "field_1", "type": "bool" }
],
-<<<<<<< HEAD
- "internalType": "struct Tuple57[]",
-=======
- "internalType": "struct Tuple54[]",
->>>>>>> 9e929f90... chore: generate stubs & types
+ "internalType": "struct Tuple59[]",
"name": "field_1",
"type": "tuple[]"
}
],
-<<<<<<< HEAD
- "internalType": "struct Tuple59[]",
-=======
- "internalType": "struct Tuple56[]",
->>>>>>> 9e929f90... chore: generate stubs & types
+ "internalType": "struct Tuple61[]",
"name": "",
"type": "tuple[]"
}
tests/src/eth/abi/reFungible.jsondiffbeforeafterboth--- a/tests/src/eth/abi/reFungible.json
+++ b/tests/src/eth/abi/reFungible.json
@@ -232,7 +232,7 @@
{ "internalType": "bool", "name": "field_1", "type": "bool" },
{ "internalType": "uint256", "name": "field_2", "type": "uint256" }
],
- "internalType": "struct Tuple32[]",
+ "internalType": "struct Tuple34[]",
"name": "",
"type": "tuple[]"
}
@@ -253,11 +253,7 @@
},
{ "internalType": "bool", "name": "field_1", "type": "bool" }
],
-<<<<<<< HEAD
- "internalType": "struct Tuple41[]",
-=======
- "internalType": "struct Tuple38[]",
->>>>>>> 09f69700... chore: generate stubs
+ "internalType": "struct Tuple43[]",
"name": "",
"type": "tuple[]"
}
@@ -278,11 +274,7 @@
"type": "uint256[]"
}
],
-<<<<<<< HEAD
- "internalType": "struct Tuple38",
-=======
- "internalType": "struct Tuple35",
->>>>>>> 09f69700... chore: generate stubs
+ "internalType": "struct Tuple40",
"name": "",
"type": "tuple"
}
@@ -752,20 +744,12 @@
},
{ "internalType": "bool", "name": "field_1", "type": "bool" }
],
-<<<<<<< HEAD
- "internalType": "struct Tuple56[]",
-=======
- "internalType": "struct Tuple53[]",
->>>>>>> 9e929f90... chore: generate stubs & types
+ "internalType": "struct Tuple58[]",
"name": "field_1",
"type": "tuple[]"
}
],
-<<<<<<< HEAD
- "internalType": "struct Tuple58[]",
-=======
- "internalType": "struct Tuple55[]",
->>>>>>> 9e929f90... chore: generate stubs & types
+ "internalType": "struct Tuple60[]",
"name": "permissions",
"type": "tuple[]"
}
@@ -835,20 +819,12 @@
},
{ "internalType": "bool", "name": "field_1", "type": "bool" }
],
-<<<<<<< HEAD
- "internalType": "struct Tuple56[]",
-=======
- "internalType": "struct Tuple53[]",
->>>>>>> 9e929f90... chore: generate stubs & types
+ "internalType": "struct Tuple58[]",
"name": "field_1",
"type": "tuple[]"
}
],
-<<<<<<< HEAD
- "internalType": "struct Tuple58[]",
-=======
- "internalType": "struct Tuple55[]",
->>>>>>> 9e929f90... chore: generate stubs & types
+ "internalType": "struct Tuple60[]",
"name": "",
"type": "tuple[]"
}
tests/src/eth/api/UniqueFungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -119,7 +119,7 @@
/// Return `false` if a limit not set.
/// @dev EVM selector for this function is: 0xf63bc572,
/// or in textual repr: collectionLimits()
- function collectionLimits() external view returns (Tuple19[] memory);
+ function collectionLimits() external view returns (Tuple21[] memory);
/// Set limits for the collection.
/// @dev Throws error if limit not found.
@@ -191,20 +191,12 @@
/// Returns nesting for a collection
/// @dev EVM selector for this function is: 0x22d25bfe,
/// or in textual repr: collectionNestingRestrictedCollectionIds()
-<<<<<<< HEAD
- function collectionNestingRestrictedCollectionIds() external view returns (Tuple24 memory);
-=======
- function collectionNestingRestrictedCollectionIds() external view returns (Tuple22 memory);
->>>>>>> 09f69700... chore: generate stubs
+ function collectionNestingRestrictedCollectionIds() external view returns (Tuple26 memory);
/// Returns permissions for a collection
/// @dev EVM selector for this function is: 0x5b2eaf4b,
/// or in textual repr: collectionNestingPermissions()
-<<<<<<< HEAD
- function collectionNestingPermissions() external view returns (Tuple27[] memory);
-=======
- function collectionNestingPermissions() external view returns (Tuple25[] memory);
->>>>>>> 09f69700... chore: generate stubs
+ function collectionNestingPermissions() external view returns (Tuple29[] memory);
/// Set the collection access method.
/// @param mode Access mode
@@ -319,11 +311,7 @@
}
/// @dev anonymous struct
-<<<<<<< HEAD
-struct Tuple27 {
-=======
-struct Tuple25 {
->>>>>>> 09f69700... chore: generate stubs
+struct Tuple29 {
CollectionPermissions field_0;
bool field_1;
}
@@ -334,11 +322,7 @@
}
/// @dev anonymous struct
-<<<<<<< HEAD
-struct Tuple24 {
-=======
-struct Tuple22 {
->>>>>>> 09f69700... chore: generate stubs
+struct Tuple26 {
bool field_0;
uint256[] field_1;
}
@@ -366,7 +350,7 @@
}
/// @dev anonymous struct
-struct Tuple19 {
+struct Tuple21 {
CollectionLimits field_0;
bool field_1;
uint256 field_2;
tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -30,20 +30,12 @@
/// @param permissions Permissions for keys.
/// @dev EVM selector for this function is: 0xbd92983a,
/// or in textual repr: setTokenPropertyPermissions((string,(uint8,bool)[])[])
-<<<<<<< HEAD
- function setTokenPropertyPermissions(Tuple52[] memory permissions) external;
-=======
- function setTokenPropertyPermissions(Tuple49[] memory permissions) external;
->>>>>>> 9e929f90... chore: generate stubs & types
+ function setTokenPropertyPermissions(Tuple53[] memory permissions) external;
/// @notice Get permissions for token properties.
/// @dev EVM selector for this function is: 0xf23d7790,
/// or in textual repr: tokenPropertyPermissions()
-<<<<<<< HEAD
- function tokenPropertyPermissions() external view returns (Tuple52[] memory);
-=======
- function tokenPropertyPermissions() external view returns (Tuple49[] memory);
->>>>>>> 9e929f90... chore: generate stubs & types
+ function tokenPropertyPermissions() external view returns (Tuple53[] memory);
// /// @notice Set token property value.
// /// @dev Throws error if `msg.sender` has no permission to edit the property.
@@ -105,23 +97,13 @@
}
/// @dev anonymous struct
-<<<<<<< HEAD
-struct Tuple52 {
+struct Tuple53 {
string field_0;
- Tuple50[] field_1;
+ Tuple51[] field_1;
}
/// @dev anonymous struct
-struct Tuple50 {
-=======
-struct Tuple49 {
- string field_0;
- Tuple47[] field_1;
-}
-
-/// @dev anonymous struct
-struct Tuple47 {
->>>>>>> 9e929f90... chore: generate stubs & types
+struct Tuple51 {
EthTokenPermissions field_0;
bool field_1;
}
@@ -233,7 +215,7 @@
/// Return `false` if a limit not set.
/// @dev EVM selector for this function is: 0xf63bc572,
/// or in textual repr: collectionLimits()
- function collectionLimits() external view returns (Tuple30[] memory);
+ function collectionLimits() external view returns (Tuple31[] memory);
/// Set limits for the collection.
/// @dev Throws error if limit not found.
@@ -305,20 +287,12 @@
/// Returns nesting for a collection
/// @dev EVM selector for this function is: 0x22d25bfe,
/// or in textual repr: collectionNestingRestrictedCollectionIds()
-<<<<<<< HEAD
- function collectionNestingRestrictedCollectionIds() external view returns (Tuple35 memory);
-=======
- function collectionNestingRestrictedCollectionIds() external view returns (Tuple32 memory);
->>>>>>> 09f69700... chore: generate stubs
+ function collectionNestingRestrictedCollectionIds() external view returns (Tuple36 memory);
/// Returns permissions for a collection
/// @dev EVM selector for this function is: 0x5b2eaf4b,
/// or in textual repr: collectionNestingPermissions()
-<<<<<<< HEAD
- function collectionNestingPermissions() external view returns (Tuple38[] memory);
-=======
- function collectionNestingPermissions() external view returns (Tuple35[] memory);
->>>>>>> 09f69700... chore: generate stubs
+ function collectionNestingPermissions() external view returns (Tuple39[] memory);
/// Set the collection access method.
/// @param mode Access mode
@@ -433,11 +407,7 @@
}
/// @dev anonymous struct
-<<<<<<< HEAD
-struct Tuple38 {
-=======
-struct Tuple35 {
->>>>>>> 09f69700... chore: generate stubs
+struct Tuple39 {
CollectionPermissions field_0;
bool field_1;
}
@@ -448,16 +418,11 @@
}
/// @dev anonymous struct
-<<<<<<< HEAD
-struct Tuple35 {
-=======
-struct Tuple32 {
->>>>>>> 09f69700... chore: generate stubs
+struct Tuple36 {
bool field_0;
uint256[] field_1;
}
-<<<<<<< HEAD
/// @dev [`CollectionLimits`](up_data_structs::CollectionLimits) representation for EVM.
enum CollectionLimits {
/// @dev How many tokens can a user have on one account.
@@ -481,22 +446,12 @@
}
/// @dev anonymous struct
-struct Tuple30 {
+struct Tuple31 {
CollectionLimits field_0;
bool field_1;
uint256 field_2;
-}
-
-/// @dev anonymous struct
-struct Tuple27 {
- address field_0;
- uint256 field_1;
}
-=======
->>>>>>> 0bf15e6f... fixed tests&tuple instead of struct, refactored `refungible` pallet
-=======
->>>>>>> 09f69700... chore: generate stubs
/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension
/// @dev See https://eips.ethereum.org/EIPS/eip-721
/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
tests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -30,20 +30,12 @@
/// @param permissions Permissions for keys.
/// @dev EVM selector for this function is: 0xbd92983a,
/// or in textual repr: setTokenPropertyPermissions((string,(uint8,bool)[])[])
-<<<<<<< HEAD
- function setTokenPropertyPermissions(Tuple51[] memory permissions) external;
-=======
- function setTokenPropertyPermissions(Tuple48[] memory permissions) external;
->>>>>>> 9e929f90... chore: generate stubs & types
+ function setTokenPropertyPermissions(Tuple52[] memory permissions) external;
/// @notice Get permissions for token properties.
/// @dev EVM selector for this function is: 0xf23d7790,
/// or in textual repr: tokenPropertyPermissions()
-<<<<<<< HEAD
- function tokenPropertyPermissions() external view returns (Tuple51[] memory);
-=======
- function tokenPropertyPermissions() external view returns (Tuple48[] memory);
->>>>>>> 9e929f90... chore: generate stubs & types
+ function tokenPropertyPermissions() external view returns (Tuple52[] memory);
// /// @notice Set token property value.
// /// @dev Throws error if `msg.sender` has no permission to edit the property.
@@ -105,23 +97,13 @@
}
/// @dev anonymous struct
-<<<<<<< HEAD
-struct Tuple51 {
+struct Tuple52 {
string field_0;
- Tuple49[] field_1;
+ Tuple50[] field_1;
}
/// @dev anonymous struct
-struct Tuple49 {
-=======
-struct Tuple48 {
- string field_0;
- Tuple46[] field_1;
-}
-
-/// @dev anonymous struct
-struct Tuple46 {
->>>>>>> 9e929f90... chore: generate stubs & types
+struct Tuple50 {
EthTokenPermissions field_0;
bool field_1;
}
@@ -233,7 +215,7 @@
/// Return `false` if a limit not set.
/// @dev EVM selector for this function is: 0xf63bc572,
/// or in textual repr: collectionLimits()
- function collectionLimits() external view returns (Tuple29[] memory);
+ function collectionLimits() external view returns (Tuple30[] memory);
/// Set limits for the collection.
/// @dev Throws error if limit not found.
@@ -305,20 +287,12 @@
/// Returns nesting for a collection
/// @dev EVM selector for this function is: 0x22d25bfe,
/// or in textual repr: collectionNestingRestrictedCollectionIds()
-<<<<<<< HEAD
- function collectionNestingRestrictedCollectionIds() external view returns (Tuple34 memory);
-=======
- function collectionNestingRestrictedCollectionIds() external view returns (Tuple31 memory);
->>>>>>> 09f69700... chore: generate stubs
+ function collectionNestingRestrictedCollectionIds() external view returns (Tuple35 memory);
/// Returns permissions for a collection
/// @dev EVM selector for this function is: 0x5b2eaf4b,
/// or in textual repr: collectionNestingPermissions()
-<<<<<<< HEAD
- function collectionNestingPermissions() external view returns (Tuple37[] memory);
-=======
- function collectionNestingPermissions() external view returns (Tuple34[] memory);
->>>>>>> 09f69700... chore: generate stubs
+ function collectionNestingPermissions() external view returns (Tuple38[] memory);
/// Set the collection access method.
/// @param mode Access mode
@@ -433,11 +407,7 @@
}
/// @dev anonymous struct
-<<<<<<< HEAD
-struct Tuple37 {
-=======
-struct Tuple34 {
->>>>>>> 09f69700... chore: generate stubs
+struct Tuple38 {
CollectionPermissions field_0;
bool field_1;
}
@@ -448,16 +418,11 @@
}
/// @dev anonymous struct
-<<<<<<< HEAD
-struct Tuple34 {
-=======
-struct Tuple31 {
->>>>>>> 09f69700... chore: generate stubs
+struct Tuple35 {
bool field_0;
uint256[] field_1;
}
-<<<<<<< HEAD
/// @dev [`CollectionLimits`](up_data_structs::CollectionLimits) representation for EVM.
enum CollectionLimits {
/// @dev How many tokens can a user have on one account.
@@ -481,22 +446,12 @@
}
/// @dev anonymous struct
-struct Tuple29 {
+struct Tuple30 {
CollectionLimits field_0;
bool field_1;
uint256 field_2;
-}
-
-/// @dev anonymous struct
-struct Tuple26 {
- address field_0;
- uint256 field_1;
}
-=======
->>>>>>> 0bf15e6f... fixed tests&tuple instead of struct, refactored `refungible` pallet
-=======
->>>>>>> 09f69700... chore: generate stubs
/// @dev the ERC-165 identifier for this interface is 0x5b5e139f
interface ERC721Metadata is Dummy, ERC165 {
// /// @notice A descriptive name for a collection of NFTs in this contract