git.delta.rocks / unique-network / refs/commits / 4fbe604fc85f

difftreelog

updated evm stubs

Grigoriy Simonov2022-07-22parent: #898c743.patch.diff
in: master

4 files changed

modifiedpallets/refungible/src/stubs/UniqueRefungibleToken.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/refungible/src/stubs/UniqueRefungibleToken.soldiffbeforeafterboth
before · pallets/refungible/src/stubs/UniqueRefungibleToken.sol
1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56// Common stubs holder7contract Dummy {8	uint8 dummy;9	string stub_error = "this contract is implemented in native";10}1112contract ERC165 is Dummy {13	function supportsInterface(bytes4 interfaceID)14		external15		view16		returns (bool)17	{18		require(false, stub_error);19		interfaceID;20		return true;21	}22}2324// Inline25contract ERC20Events {26	event Transfer(address indexed from, address indexed to, uint256 value);27	event Approval(28		address indexed owner,29		address indexed spender,30		uint256 value31	);32}3334// Selector: 79cc679035contract ERC20UniqueExtensions is Dummy, ERC165 {36	// Selector: burnFrom(address,uint256) 79cc679037	function burnFrom(address from, uint256 amount) public returns (bool) {38		require(false, stub_error);39		from;40		amount;41		dummy = 0;42		return false;43	}44}4546// Selector: 7d9262e647contract Collection is Dummy, ERC165 {48	// Selector: setCollectionProperty(string,bytes) 2f073f6649	function setCollectionProperty(string memory key, bytes memory value)50		public51	{52		require(false, stub_error);53		key;54		value;55		dummy = 0;56	}5758	// Selector: deleteCollectionProperty(string) 7b7debce59	function deleteCollectionProperty(string memory key) public {60		require(false, stub_error);61		key;62		dummy = 0;63	}6465	// Throws error if key not found66	//67	// Selector: collectionProperty(string) cf24fd6d68	function collectionProperty(string memory key)69		public70		view71		returns (bytes memory)72	{73		require(false, stub_error);74		key;75		dummy;76		return hex"";77	}7879	// Selector: setCollectionSponsor(address) 7623402e80	function setCollectionSponsor(address sponsor) public {81		require(false, stub_error);82		sponsor;83		dummy = 0;84	}8586	// Selector: confirmCollectionSponsorship() 3c50e97a87	function confirmCollectionSponsorship() public {88		require(false, stub_error);89		dummy = 0;90	}9192	// Selector: setCollectionLimit(string,uint32) 6a3841db93	function setCollectionLimit(string memory limit, uint32 value) public {94		require(false, stub_error);95		limit;96		value;97		dummy = 0;98	}99100	// Selector: setCollectionLimit(string,bool) 993b7fba101	function setCollectionLimit(string memory limit, bool value) public {102		require(false, stub_error);103		limit;104		value;105		dummy = 0;106	}107108	// Selector: contractAddress() f6b4dfb4109	function contractAddress() public view returns (address) {110		require(false, stub_error);111		dummy;112		return 0x0000000000000000000000000000000000000000;113	}114115	// Selector: addCollectionAdminSubstrate(uint256) 5730062b116	function addCollectionAdminSubstrate(uint256 newAdmin) public view {117		require(false, stub_error);118		newAdmin;119		dummy;120	}121122	// Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9123	function removeCollectionAdminSubstrate(uint256 newAdmin) public view {124		require(false, stub_error);125		newAdmin;126		dummy;127	}128129	// Selector: addCollectionAdmin(address) 92e462c7130	function addCollectionAdmin(address newAdmin) public view {131		require(false, stub_error);132		newAdmin;133		dummy;134	}135136	// Selector: removeCollectionAdmin(address) fafd7b42137	function removeCollectionAdmin(address admin) public view {138		require(false, stub_error);139		admin;140		dummy;141	}142143	// Selector: setCollectionNesting(bool) 112d4586144	function setCollectionNesting(bool enable) public {145		require(false, stub_error);146		enable;147		dummy = 0;148	}149150	// Selector: setCollectionNesting(bool,address[]) 64872396151	function setCollectionNesting(bool enable, address[] memory collections)152		public153	{154		require(false, stub_error);155		enable;156		collections;157		dummy = 0;158	}159160	// Selector: setCollectionAccess(uint8) 41835d4c161	function setCollectionAccess(uint8 mode) public {162		require(false, stub_error);163		mode;164		dummy = 0;165	}166167	// Selector: addToCollectionAllowList(address) 67844fe6168	function addToCollectionAllowList(address user) public view {169		require(false, stub_error);170		user;171		dummy;172	}173174	// Selector: removeFromCollectionAllowList(address) 85c51acb175	function removeFromCollectionAllowList(address user) public view {176		require(false, stub_error);177		user;178		dummy;179	}180181	// Selector: setCollectionMintMode(bool) 00018e84182	function setCollectionMintMode(bool mode) public {183		require(false, stub_error);184		mode;185		dummy = 0;186	}187}188189// Selector: 942e8b22190contract ERC20 is Dummy, ERC165, ERC20Events {191	// Selector: name() 06fdde03192	function name() public view returns (string memory) {193		require(false, stub_error);194		dummy;195		return "";196	}197198	// Selector: symbol() 95d89b41199	function symbol() public view returns (string memory) {200		require(false, stub_error);201		dummy;202		return "";203	}204205	// Selector: totalSupply() 18160ddd206	function totalSupply() public view returns (uint256) {207		require(false, stub_error);208		dummy;209		return 0;210	}211212	// Selector: decimals() 313ce567213	function decimals() public view returns (uint8) {214		require(false, stub_error);215		dummy;216		return 0;217	}218219	// Selector: balanceOf(address) 70a08231220	function balanceOf(address owner) public view returns (uint256) {221		require(false, stub_error);222		owner;223		dummy;224		return 0;225	}226227	// Selector: transfer(address,uint256) a9059cbb228	function transfer(address to, uint256 amount) public returns (bool) {229		require(false, stub_error);230		to;231		amount;232		dummy = 0;233		return false;234	}235236	// Selector: transferFrom(address,address,uint256) 23b872dd237	function transferFrom(238		address from,239		address to,240		uint256 amount241	) public returns (bool) {242		require(false, stub_error);243		from;244		to;245		amount;246		dummy = 0;247		return false;248	}249250	// Selector: approve(address,uint256) 095ea7b3251	function approve(address spender, uint256 amount) public returns (bool) {252		require(false, stub_error);253		spender;254		amount;255		dummy = 0;256		return false;257	}258259	// Selector: allowance(address,address) dd62ed3e260	function allowance(address owner, address spender)261		public262		view263		returns (uint256)264	{265		require(false, stub_error);266		owner;267		spender;268		dummy;269		return 0;270	}271}272273contract UniqueRFT is Dummy, ERC165, Collection {}274275contract UniqueRefungibleToken is276	Dummy,277	ERC165,278	ERC20,279	ERC20UniqueExtensions,280	UniqueRFT281{}
after · pallets/refungible/src/stubs/UniqueRefungibleToken.sol
1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56// Common stubs holder7contract Dummy {8	uint8 dummy;9	string stub_error = "this contract is implemented in native";10}1112contract ERC165 is Dummy {13	function supportsInterface(bytes4 interfaceID)14		external15		view16		returns (bool)17	{18		require(false, stub_error);19		interfaceID;20		return true;21	}22}2324// Inline25contract ERC20Events {26	event Transfer(address indexed from, address indexed to, uint256 value);27	event Approval(28		address indexed owner,29		address indexed spender,30		uint256 value31	);32}3334// Selector: 79cc679035contract ERC20UniqueExtensions is Dummy, ERC165 {36	// Selector: burnFrom(address,uint256) 79cc679037	function burnFrom(address from, uint256 amount) public returns (bool) {38		require(false, stub_error);39		from;40		amount;41		dummy = 0;42		return false;43	}44}4546// Selector: 942e8b2247contract ERC20 is Dummy, ERC165, ERC20Events {48	// Selector: name() 06fdde0349	function name() public view returns (string memory) {50		require(false, stub_error);51		dummy;52		return "";53	}5455	// Selector: symbol() 95d89b4156	function symbol() public view returns (string memory) {57		require(false, stub_error);58		dummy;59		return "";60	}6162	// Selector: totalSupply() 18160ddd63	function totalSupply() public view returns (uint256) {64		require(false, stub_error);65		dummy;66		return 0;67	}6869	// Selector: decimals() 313ce56770	function decimals() public view returns (uint8) {71		require(false, stub_error);72		dummy;73		return 0;74	}7576	// Selector: balanceOf(address) 70a0823177	function balanceOf(address owner) public view returns (uint256) {78		require(false, stub_error);79		owner;80		dummy;81		return 0;82	}8384	// Selector: transfer(address,uint256) a9059cbb85	function transfer(address to, uint256 amount) public returns (bool) {86		require(false, stub_error);87		to;88		amount;89		dummy = 0;90		return false;91	}9293	// Selector: transferFrom(address,address,uint256) 23b872dd94	function transferFrom(95		address from,96		address to,97		uint256 amount98	) public returns (bool) {99		require(false, stub_error);100		from;101		to;102		amount;103		dummy = 0;104		return false;105	}106107	// Selector: approve(address,uint256) 095ea7b3108	function approve(address spender, uint256 amount) public returns (bool) {109		require(false, stub_error);110		spender;111		amount;112		dummy = 0;113		return false;114	}115116	// Selector: allowance(address,address) dd62ed3e117	function allowance(address owner, address spender)118		public119		view120		returns (uint256)121	{122		require(false, stub_error);123		owner;124		spender;125		dummy;126		return 0;127	}128}129130contract UniqueRefungibleToken is Dummy, ERC165, ERC20, ERC20UniqueExtensions {}
modifiedtests/src/eth/api/UniqueRefungibleToken.soldiffbeforeafterboth
--- a/tests/src/eth/api/UniqueRefungibleToken.sol
+++ b/tests/src/eth/api/UniqueRefungibleToken.sol
@@ -28,70 +28,6 @@
 	function burnFrom(address from, uint256 amount) external returns (bool);
 }
 
-// Selector: 7d9262e6
-interface Collection is Dummy, ERC165 {
-	// Selector: setCollectionProperty(string,bytes) 2f073f66
-	function setCollectionProperty(string memory key, bytes memory value)
-		external;
-
-	// Selector: deleteCollectionProperty(string) 7b7debce
-	function deleteCollectionProperty(string memory key) external;
-
-	// Throws error if key not found
-	//
-	// Selector: collectionProperty(string) cf24fd6d
-	function collectionProperty(string memory key)
-		external
-		view
-		returns (bytes memory);
-
-	// Selector: setCollectionSponsor(address) 7623402e
-	function setCollectionSponsor(address sponsor) external;
-
-	// Selector: confirmCollectionSponsorship() 3c50e97a
-	function confirmCollectionSponsorship() external;
-
-	// Selector: setCollectionLimit(string,uint32) 6a3841db
-	function setCollectionLimit(string memory limit, uint32 value) external;
-
-	// Selector: setCollectionLimit(string,bool) 993b7fba
-	function setCollectionLimit(string memory limit, bool value) external;
-
-	// Selector: contractAddress() f6b4dfb4
-	function contractAddress() external view returns (address);
-
-	// Selector: addCollectionAdminSubstrate(uint256) 5730062b
-	function addCollectionAdminSubstrate(uint256 newAdmin) external view;
-
-	// Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9
-	function removeCollectionAdminSubstrate(uint256 newAdmin) external view;
-
-	// Selector: addCollectionAdmin(address) 92e462c7
-	function addCollectionAdmin(address newAdmin) external view;
-
-	// Selector: removeCollectionAdmin(address) fafd7b42
-	function removeCollectionAdmin(address admin) external view;
-
-	// Selector: setCollectionNesting(bool) 112d4586
-	function setCollectionNesting(bool enable) external;
-
-	// Selector: setCollectionNesting(bool,address[]) 64872396
-	function setCollectionNesting(bool enable, address[] memory collections)
-		external;
-
-	// Selector: setCollectionAccess(uint8) 41835d4c
-	function setCollectionAccess(uint8 mode) external;
-
-	// Selector: addToCollectionAllowList(address) 67844fe6
-	function addToCollectionAllowList(address user) external view;
-
-	// Selector: removeFromCollectionAllowList(address) 85c51acb
-	function removeFromCollectionAllowList(address user) external view;
-
-	// Selector: setCollectionMintMode(bool) 00018e84
-	function setCollectionMintMode(bool mode) external;
-}
-
 // Selector: 942e8b22
 interface ERC20 is Dummy, ERC165, ERC20Events {
 	// Selector: name() 06fdde03
@@ -128,13 +64,10 @@
 		view
 		returns (uint256);
 }
-
-interface UniqueRFT is Dummy, ERC165, Collection {}
 
 interface UniqueRefungibleToken is
 	Dummy,
 	ERC165,
 	ERC20,
-	ERC20UniqueExtensions,
-	UniqueRFT
+	ERC20UniqueExtensions
 {}
modifiedtests/src/eth/reFungibleTokenAbi.jsondiffbeforeafterboth
--- a/tests/src/eth/reFungibleTokenAbi.json
+++ b/tests/src/eth/reFungibleTokenAbi.json
@@ -51,33 +51,6 @@
   },
   {
     "inputs": [
-      { "internalType": "address", "name": "newAdmin", "type": "address" }
-    ],
-    "name": "addCollectionAdmin",
-    "outputs": [],
-    "stateMutability": "view",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "uint256", "name": "newAdmin", "type": "uint256" }
-    ],
-    "name": "addCollectionAdminSubstrate",
-    "outputs": [],
-    "stateMutability": "view",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "address", "name": "user", "type": "address" }
-    ],
-    "name": "addToCollectionAllowList",
-    "outputs": [],
-    "stateMutability": "view",
-    "type": "function"
-  },
-  {
-    "inputs": [
       { "internalType": "address", "name": "owner", "type": "address" },
       { "internalType": "address", "name": "spender", "type": "address" }
     ],
@@ -112,28 +85,7 @@
     ],
     "name": "burnFrom",
     "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],
-    "name": "collectionProperty",
-    "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],
-    "stateMutability": "view",
-    "type": "function"
-  },
-  {
-    "inputs": [],
-    "name": "confirmCollectionSponsorship",
-    "outputs": [],
     "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [],
-    "name": "contractAddress",
-    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
-    "stateMutability": "view",
     "type": "function"
   },
   {
@@ -141,121 +93,13 @@
     "name": "decimals",
     "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }],
     "stateMutability": "view",
-    "type": "function"
-  },
-  {
-    "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],
-    "name": "deleteCollectionProperty",
-    "outputs": [],
-    "stateMutability": "nonpayable",
     "type": "function"
   },
   {
     "inputs": [],
     "name": "name",
     "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
-    "stateMutability": "view",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "address", "name": "admin", "type": "address" }
-    ],
-    "name": "removeCollectionAdmin",
-    "outputs": [],
-    "stateMutability": "view",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "uint256", "name": "newAdmin", "type": "uint256" }
-    ],
-    "name": "removeCollectionAdminSubstrate",
-    "outputs": [],
-    "stateMutability": "view",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "address", "name": "user", "type": "address" }
-    ],
-    "name": "removeFromCollectionAllowList",
-    "outputs": [],
     "stateMutability": "view",
-    "type": "function"
-  },
-  {
-    "inputs": [{ "internalType": "uint8", "name": "mode", "type": "uint8" }],
-    "name": "setCollectionAccess",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "string", "name": "limit", "type": "string" },
-      { "internalType": "uint32", "name": "value", "type": "uint32" }
-    ],
-    "name": "setCollectionLimit",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "string", "name": "limit", "type": "string" },
-      { "internalType": "bool", "name": "value", "type": "bool" }
-    ],
-    "name": "setCollectionLimit",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [{ "internalType": "bool", "name": "mode", "type": "bool" }],
-    "name": "setCollectionMintMode",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [{ "internalType": "bool", "name": "enable", "type": "bool" }],
-    "name": "setCollectionNesting",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "bool", "name": "enable", "type": "bool" },
-      {
-        "internalType": "address[]",
-        "name": "collections",
-        "type": "address[]"
-      }
-    ],
-    "name": "setCollectionNesting",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "string", "name": "key", "type": "string" },
-      { "internalType": "bytes", "name": "value", "type": "bytes" }
-    ],
-    "name": "setCollectionProperty",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      { "internalType": "address", "name": "sponsor", "type": "address" }
-    ],
-    "name": "setCollectionSponsor",
-    "outputs": [],
-    "stateMutability": "nonpayable",
     "type": "function"
   },
   {