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

difftreelog

path: add stubs

Trubnikov Sergey2022-08-05parent: #ee664e3.patch.diff
in: master

3 files changed

modifiedpallets/evm-contract-helpers/src/stubs/ContractHelpers.soldiffbeforeafterboth
before · pallets/evm-contract-helpers/src/stubs/ContractHelpers.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// Selector: 7b4866f925contract ContractHelpers is Dummy, ERC165 {26	// Selector: contractOwner(address) 5152b14c27	function contractOwner(address contractAddress)28		public29		view30		returns (address)31	{32		require(false, stub_error);33		contractAddress;34		dummy;35		return 0x0000000000000000000000000000000000000000;36	}3738	// Selector: sponsoringEnabled(address) 6027dc6139	function sponsoringEnabled(address contractAddress)40		public41		view42		returns (bool)43	{44		require(false, stub_error);45		contractAddress;46		dummy;47		return false;48	}4950	// Deprecated51	//52	// Selector: toggleSponsoring(address,bool) fcac6d8653	function toggleSponsoring(address contractAddress, bool enabled) public {54		require(false, stub_error);55		contractAddress;56		enabled;57		dummy = 0;58	}5960	// Selector: setSponsoringMode(address,uint8) fde8a56061	function setSponsoringMode(address contractAddress, uint8 mode) public {62		require(false, stub_error);63		contractAddress;64		mode;65		dummy = 0;66	}6768	// Selector: sponsoringMode(address) b70c726769	function sponsoringMode(address contractAddress)70		public71		view72		returns (uint8)73	{74		require(false, stub_error);75		contractAddress;76		dummy;77		return 0;78	}7980	// Selector: setSponsoringRateLimit(address,uint32) 77b6c90881	function setSponsoringRateLimit(address contractAddress, uint32 rateLimit)82		public83	{84		require(false, stub_error);85		contractAddress;86		rateLimit;87		dummy = 0;88	}8990	// Selector: getSponsoringRateLimit(address) 610cfabd91	function getSponsoringRateLimit(address contractAddress)92		public93		view94		returns (uint32)95	{96		require(false, stub_error);97		contractAddress;98		dummy;99		return 0;100	}101102	// Selector: allowed(address,address) 5c658165103	function allowed(address contractAddress, address user)104		public105		view106		returns (bool)107	{108		require(false, stub_error);109		contractAddress;110		user;111		dummy;112		return false;113	}114115	// Selector: allowlistEnabled(address) c772ef6c116	function allowlistEnabled(address contractAddress)117		public118		view119		returns (bool)120	{121		require(false, stub_error);122		contractAddress;123		dummy;124		return false;125	}126127	// Selector: toggleAllowlist(address,bool) 36de20f5128	function toggleAllowlist(address contractAddress, bool enabled) public {129		require(false, stub_error);130		contractAddress;131		enabled;132		dummy = 0;133	}134135	// Selector: toggleAllowed(address,address,bool) 4706cc1c136	function toggleAllowed(137		address contractAddress,138		address user,139		bool allowed140	) public {141		require(false, stub_error);142		contractAddress;143		user;144		allowed;145		dummy = 0;146	}147}
modifiedtests/src/eth/api/ContractHelpers.soldiffbeforeafterboth
--- a/tests/src/eth/api/ContractHelpers.sol
+++ b/tests/src/eth/api/ContractHelpers.sol
@@ -3,6 +3,12 @@
 
 pragma solidity >=0.8.0 <0.9.0;
 
+// Anonymous struct
+struct Tuple0 {
+	address field_0;
+	uint256 field_1;
+}
+
 // Common stubs holder
 interface Dummy {
 
@@ -12,7 +18,7 @@
 	function supportsInterface(bytes4 interfaceID) external view returns (bool);
 }
 
-// Selector: 7b4866f9
+// Selector: 06fc42e9
 interface ContractHelpers is Dummy, ERC165 {
 	// Selector: contractOwner(address) 5152b14c
 	function contractOwner(address contractAddress)
@@ -20,16 +26,32 @@
 		view
 		returns (address);
 
+	// Selector: setSponsor(address,address) f01fba93
+	function setSponsor(address contractAddress, address sponsor) external;
+
+	// Selector: confirmSponsorship(address) abc00001
+	function confirmSponsorship(address contractAddress) external;
+
+	// Selector: getSponsor(address) 743fc745
+	function getSponsor(address contractAddress)
+		external
+		view
+		returns (Tuple0 memory);
+
+	// Selector: hasSponsor(address) 97418603
+	function hasSponsor(address contractAddress) external view returns (bool);
+
+	// Selector: hasPendingSponsor(address) 39b9b242
+	function hasPendingSponsor(address contractAddress)
+		external
+		view
+		returns (bool);
+
 	// Selector: sponsoringEnabled(address) 6027dc61
 	function sponsoringEnabled(address contractAddress)
 		external
 		view
 		returns (bool);
-
-	// Deprecated
-	//
-	// Selector: toggleSponsoring(address,bool) fcac6d86
-	function toggleSponsoring(address contractAddress, bool enabled) external;
 
 	// Selector: setSponsoringMode(address,uint8) fde8a560
 	function setSponsoringMode(address contractAddress, uint8 mode) external;
modifiedtests/src/eth/util/contractHelpersAbi.jsondiffbeforeafterboth
--- a/tests/src/eth/util/contractHelpersAbi.json
+++ b/tests/src/eth/util/contractHelpersAbi.json
@@ -34,6 +34,19 @@
         "type": "address"
       }
     ],
+    "name": "confirmSponsorship",
+    "outputs": [],
+    "stateMutability": "nonpayable",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      {
+        "internalType": "address",
+        "name": "contractAddress",
+        "type": "address"
+      }
+    ],
     "name": "contractOwner",
     "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
     "stateMutability": "view",
@@ -47,6 +60,29 @@
         "type": "address"
       }
     ],
+    "name": "getSponsor",
+    "outputs": [
+      {
+        "components": [
+          { "internalType": "address", "name": "field_0", "type": "address" },
+          { "internalType": "uint256", "name": "field_1", "type": "uint256" }
+        ],
+        "internalType": "struct Tuple0",
+        "name": "",
+        "type": "tuple"
+      }
+    ],
+    "stateMutability": "view",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      {
+        "internalType": "address",
+        "name": "contractAddress",
+        "type": "address"
+      }
+    ],
     "name": "getSponsoringRateLimit",
     "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }],
     "stateMutability": "view",
@@ -58,7 +94,47 @@
         "internalType": "address",
         "name": "contractAddress",
         "type": "address"
+      }
+    ],
+    "name": "hasPendingSponsor",
+    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
+    "stateMutability": "view",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      {
+        "internalType": "address",
+        "name": "contractAddress",
+        "type": "address"
+      }
+    ],
+    "name": "hasSponsor",
+    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
+    "stateMutability": "view",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      {
+        "internalType": "address",
+        "name": "contractAddress",
+        "type": "address"
       },
+      { "internalType": "address", "name": "sponsor", "type": "address" }
+    ],
+    "name": "setSponsor",
+    "outputs": [],
+    "stateMutability": "nonpayable",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      {
+        "internalType": "address",
+        "name": "contractAddress",
+        "type": "address"
+      },
       { "internalType": "uint8", "name": "mode", "type": "uint8" }
     ],
     "name": "setSponsoringMode",
@@ -140,20 +216,6 @@
       { "internalType": "bool", "name": "enabled", "type": "bool" }
     ],
     "name": "toggleAllowlist",
-    "outputs": [],
-    "stateMutability": "nonpayable",
-    "type": "function"
-  },
-  {
-    "inputs": [
-      {
-        "internalType": "address",
-        "name": "contractAddress",
-        "type": "address"
-      },
-      { "internalType": "bool", "name": "enabled", "type": "bool" }
-    ],
-    "name": "toggleSponsoring",
     "outputs": [],
     "stateMutability": "nonpayable",
     "type": "function"