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

difftreelog

path: add stubs

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

3 files changed

modifiedpallets/evm-contract-helpers/src/stubs/ContractHelpers.soldiffbeforeafterboth
--- a/pallets/evm-contract-helpers/src/stubs/ContractHelpers.sol
+++ b/pallets/evm-contract-helpers/src/stubs/ContractHelpers.sol
@@ -21,8 +21,16 @@
 	}
 }
 
+<<<<<<< HEAD
 /// @title Magic contract, which allows users to reconfigure other contracts
 /// @dev the ERC-165 identifier for this interface is 0xd77fab70
+=======
+<<<<<<< HEAD
+// Selector: 6073d917
+=======
+// Selector: 06fc42e9
+>>>>>>> path: add stubs
+>>>>>>> path: add stubs
 contract ContractHelpers is Dummy, ERC165 {
 	/// Get user, which deployed specified contract
 	/// @dev May return zero address in case if contract is deployed
@@ -44,11 +52,23 @@
 		return 0x0000000000000000000000000000000000000000;
 	}
 
+<<<<<<< HEAD
 	/// Set sponsor.
 	/// @param contractAddress Contract for which a sponsor is being established.
 	/// @param sponsor User address who set as pending sponsor.
 	/// @dev EVM selector for this function is: 0xf01fba93,
 	///  or in textual repr: setSponsor(address,address)
+=======
+<<<<<<< HEAD
+	// Set sponsor.
+	//
+	// @param contract_address Contract for which a sponsor is being established.
+	// @param sponsor User address who set as pending sponsor.
+	//
+=======
+>>>>>>> path: add stubs
+	// Selector: setSponsor(address,address) f01fba93
+>>>>>>> path: add stubs
 	function setSponsor(address contractAddress, address sponsor) public {
 		require(false, stub_error);
 		contractAddress;
@@ -56,22 +76,44 @@
 		dummy = 0;
 	}
 
+<<<<<<< HEAD
 	/// Set contract as self sponsored.
 	///
 	/// @param contractAddress Contract for which a self sponsoring is being enabled.
 	/// @dev EVM selector for this function is: 0x89f7d9ae,
 	///  or in textual repr: selfSponsoredEnable(address)
+=======
+<<<<<<< HEAD
+	// Set contract as self sponsored.
+	//
+	// @param contract_address Contract for which a self sponsoring is being enabled.
+	//
+	// Selector: selfSponsoredEnable(address) 89f7d9ae
+>>>>>>> path: add stubs
 	function selfSponsoredEnable(address contractAddress) public {
+=======
+	// Selector: confirmSponsorship(address) abc00001
+	function confirmSponsorship(address contractAddress) public {
+>>>>>>> path: add stubs
 		require(false, stub_error);
 		contractAddress;
 		dummy = 0;
 	}
 
+<<<<<<< HEAD
 	/// Remove sponsor.
 	///
 	/// @param contractAddress Contract for which a sponsorship is being removed.
 	/// @dev EVM selector for this function is: 0xef784250,
 	///  or in textual repr: removeSponsor(address)
+=======
+<<<<<<< HEAD
+	// Remove sponsor.
+	//
+	// @param contract_address Contract for which a sponsorship is being removed.
+	//
+	// Selector: removeSponsor(address) ef784250
+>>>>>>> path: add stubs
 	function removeSponsor(address contractAddress) public {
 		require(false, stub_error);
 		contractAddress;
@@ -98,6 +140,9 @@
 	/// @dev EVM selector for this function is: 0x743fc745,
 	///  or in textual repr: getSponsor(address)
 	function getSponsor(address contractAddress)
+=======
+	// Selector: getSponsor(address) 743fc745
+	function getSponsor(address contractAddress)
 		public
 		view
 		returns (Tuple0 memory)
@@ -108,6 +153,27 @@
 		return Tuple0(0x0000000000000000000000000000000000000000, 0);
 	}
 
+	// Selector: hasSponsor(address) 97418603
+	function hasSponsor(address contractAddress) public view returns (bool) {
+		require(false, stub_error);
+		contractAddress;
+		dummy;
+		return false;
+	}
+
+	// Selector: hasPendingSponsor(address) 39b9b242
+	function hasPendingSponsor(address contractAddress)
+>>>>>>> path: add stubs
+		public
+		view
+		returns (Tuple0 memory)
+	{
+		require(false, stub_error);
+		contractAddress;
+		dummy;
+		return Tuple0(0x0000000000000000000000000000000000000000, 0);
+	}
+
 	/// Check tat contract has confirmed sponsor.
 	///
 	/// @param contractAddress The contract for which the presence of a confirmed sponsor is checked.
@@ -121,13 +187,27 @@
 		return false;
 	}
 
+<<<<<<< HEAD
 	/// Check tat contract has pending sponsor.
 	///
 	/// @param contractAddress The contract for which the presence of a pending sponsor is checked.
 	/// @return **true** if contract has pending sponsor.
 	/// @dev EVM selector for this function is: 0x39b9b242,
 	///  or in textual repr: hasPendingSponsor(address)
+=======
+<<<<<<< HEAD
+	// Check tat contract has pending sponsor.
+	//
+	// @param contract_address The contract for which the presence of a pending sponsor is checked.
+	// @return **true** if contract has pending sponsor.
+	//
+	// Selector: hasPendingSponsor(address) 39b9b242
+>>>>>>> path: add stubs
 	function hasPendingSponsor(address contractAddress)
+=======
+	// Selector: sponsoringEnabled(address) 6027dc61
+	function sponsoringEnabled(address contractAddress)
+>>>>>>> path: add stubs
 		public
 		view
 		returns (bool)
@@ -136,6 +216,7 @@
 		contractAddress;
 		dummy;
 		return false;
+<<<<<<< HEAD
 	}
 
 	/// @dev EVM selector for this function is: 0x6027dc61,
@@ -149,6 +230,8 @@
 		contractAddress;
 		dummy;
 		return false;
+=======
+>>>>>>> path: add stubs
 	}
 
 	/// @dev EVM selector for this function is: 0xfde8a560,
modifiedtests/src/eth/api/ContractHelpers.soldiffbeforeafterboth
--- a/tests/src/eth/api/ContractHelpers.sol
+++ b/tests/src/eth/api/ContractHelpers.sol
@@ -12,8 +12,16 @@
 	function supportsInterface(bytes4 interfaceID) external view returns (bool);
 }
 
+<<<<<<< HEAD
 /// @title Magic contract, which allows users to reconfigure other contracts
 /// @dev the ERC-165 identifier for this interface is 0xd77fab70
+=======
+<<<<<<< HEAD
+// Selector: 6073d917
+=======
+// Selector: 06fc42e9
+>>>>>>> path: add stubs
+>>>>>>> path: add stubs
 interface ContractHelpers is Dummy, ERC165 {
 	/// Get user, which deployed specified contract
 	/// @dev May return zero address in case if contract is deployed
@@ -29,11 +37,21 @@
 		view
 		returns (address);
 
+<<<<<<< HEAD
 	/// Set sponsor.
 	/// @param contractAddress Contract for which a sponsor is being established.
 	/// @param sponsor User address who set as pending sponsor.
 	/// @dev EVM selector for this function is: 0xf01fba93,
 	///  or in textual repr: setSponsor(address,address)
+=======
+<<<<<<< HEAD
+	// Set sponsor.
+	//
+	// @param contract_address Contract for which a sponsor is being established.
+	// @param sponsor User address who set as pending sponsor.
+	//
+	// Selector: setSponsor(address,address) f01fba93
+>>>>>>> path: add stubs
 	function setSponsor(address contractAddress, address sponsor) external;
 
 	/// Set contract as self sponsored.
@@ -59,17 +77,35 @@
 	///  or in textual repr: confirmSponsorship(address)
 	function confirmSponsorship(address contractAddress) external;
 
+<<<<<<< HEAD
 	/// Get current sponsor.
 	///
 	/// @param contractAddress The contract for which a sponsor is requested.
 	/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
 	/// @dev EVM selector for this function is: 0x743fc745,
 	///  or in textual repr: getSponsor(address)
+=======
+	// Get current sponsor.
+	//
+	// @param contract_address The contract for which a sponsor is requested.
+	// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
+	//
+=======
+	// Selector: setSponsor(address,address) f01fba93
+	function setSponsor(address contractAddress, address sponsor) external;
+
+	// Selector: confirmSponsorship(address) abc00001
+	function confirmSponsorship(address contractAddress) external;
+
+>>>>>>> path: add stubs
+	// Selector: getSponsor(address) 743fc745
+>>>>>>> path: add stubs
 	function getSponsor(address contractAddress)
 		external
 		view
 		returns (Tuple0 memory);
 
+<<<<<<< HEAD
 	/// Check tat contract has confirmed sponsor.
 	///
 	/// @param contractAddress The contract for which the presence of a confirmed sponsor is checked.
@@ -84,6 +120,28 @@
 	/// @return **true** if contract has pending sponsor.
 	/// @dev EVM selector for this function is: 0x39b9b242,
 	///  or in textual repr: hasPendingSponsor(address)
+=======
+<<<<<<< HEAD
+	// Check tat contract has confirmed sponsor.
+	//
+	// @param contract_address The contract for which the presence of a confirmed sponsor is checked.
+	// @return **true** if contract has confirmed sponsor.
+	//
+	// Selector: hasSponsor(address) 97418603
+	function hasSponsor(address contractAddress) external view returns (bool);
+
+	// Check tat contract has pending sponsor.
+	//
+	// @param contract_address The contract for which the presence of a pending sponsor is checked.
+	// @return **true** if contract has pending sponsor.
+	//
+=======
+	// Selector: hasSponsor(address) 97418603
+	function hasSponsor(address contractAddress) external view returns (bool);
+
+>>>>>>> path: add stubs
+	// Selector: hasPendingSponsor(address) 39b9b242
+>>>>>>> path: add stubs
 	function hasPendingSponsor(address contractAddress)
 		external
 		view
modifiedtests/src/eth/util/contractHelpersAbi.jsondiffbeforeafterboth
before · tests/src/eth/util/contractHelpersAbi.json
1[2  {3    "inputs": [4      {5        "internalType": "address",6        "name": "contractAddress",7        "type": "address"8      },9      { "internalType": "address", "name": "user", "type": "address" }10    ],11    "name": "allowed",12    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],13    "stateMutability": "view",14    "type": "function"15  },16  {17    "inputs": [18      {19        "internalType": "address",20        "name": "contractAddress",21        "type": "address"22      }23    ],24    "name": "allowlistEnabled",25    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],26    "stateMutability": "view",27    "type": "function"28  },29  {30    "inputs": [31      {32        "internalType": "address",33        "name": "contractAddress",34        "type": "address"35      }36    ],37    "name": "confirmSponsorship",38    "outputs": [],39    "stateMutability": "nonpayable",40    "type": "function"41  },42  {43    "inputs": [44      {45        "internalType": "address",46        "name": "contractAddress",47        "type": "address"48      }49    ],50    "name": "contractOwner",51    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],52    "stateMutability": "view",53    "type": "function"54  },55  {56    "inputs": [57      {58        "internalType": "address",59        "name": "contractAddress",60        "type": "address"61      }62    ],63    "name": "getSponsor",64    "outputs": [65      {66        "components": [67          { "internalType": "address", "name": "field_0", "type": "address" },68          { "internalType": "uint256", "name": "field_1", "type": "uint256" }69        ],70        "internalType": "struct Tuple0",71        "name": "",72        "type": "tuple"73      }74    ],75    "stateMutability": "view",76    "type": "function"77  },78  {79    "inputs": [80      {81        "internalType": "address",82        "name": "contractAddress",83        "type": "address"84      }85    ],86    "name": "getSponsoringRateLimit",87    "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }],88    "stateMutability": "view",89    "type": "function"90  },91  {92    "inputs": [93      {94        "internalType": "address",95        "name": "contractAddress",96        "type": "address"97      }98    ],99    "name": "hasPendingSponsor",100    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],101    "stateMutability": "view",102    "type": "function"103  },104  {105    "inputs": [106      {107        "internalType": "address",108        "name": "contractAddress",109        "type": "address"110      }111    ],112    "name": "hasSponsor",113    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],114    "stateMutability": "view",115    "type": "function"116  },117  {118    "inputs": [119      {120        "internalType": "address",121        "name": "contractAddress",122        "type": "address"123      }124    ],125    "name": "removeSponsor",126    "outputs": [],127    "stateMutability": "nonpayable",128    "type": "function"129  },130  {131    "inputs": [132      {133        "internalType": "address",134        "name": "contractAddress",135        "type": "address"136      }137    ],138    "name": "selfSponsoredEnable",139    "outputs": [],140    "stateMutability": "nonpayable",141    "type": "function"142  },143  {144    "inputs": [145      {146        "internalType": "address",147        "name": "contractAddress",148        "type": "address"149      },150      { "internalType": "address", "name": "sponsor", "type": "address" }151    ],152    "name": "setSponsor",153    "outputs": [],154    "stateMutability": "nonpayable",155    "type": "function"156  },157  {158    "inputs": [159      {160        "internalType": "address",161        "name": "contractAddress",162        "type": "address"163      },164      { "internalType": "uint8", "name": "mode", "type": "uint8" }165    ],166    "name": "setSponsoringMode",167    "outputs": [],168    "stateMutability": "nonpayable",169    "type": "function"170  },171  {172    "inputs": [173      {174        "internalType": "address",175        "name": "contractAddress",176        "type": "address"177      },178      { "internalType": "uint32", "name": "rateLimit", "type": "uint32" }179    ],180    "name": "setSponsoringRateLimit",181    "outputs": [],182    "stateMutability": "nonpayable",183    "type": "function"184  },185  {186    "inputs": [187      {188        "internalType": "address",189        "name": "contractAddress",190        "type": "address"191      }192    ],193    "name": "sponsoringEnabled",194    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],195    "stateMutability": "view",196    "type": "function"197  },198  {199    "inputs": [200      { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }201    ],202    "name": "supportsInterface",203    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],204    "stateMutability": "view",205    "type": "function"206  },207  {208    "inputs": [209      {210        "internalType": "address",211        "name": "contractAddress",212        "type": "address"213      },214      { "internalType": "address", "name": "user", "type": "address" },215      { "internalType": "bool", "name": "isAllowed", "type": "bool" }216    ],217    "name": "toggleAllowed",218    "outputs": [],219    "stateMutability": "nonpayable",220    "type": "function"221  },222  {223    "inputs": [224      {225        "internalType": "address",226        "name": "contractAddress",227        "type": "address"228      },229      { "internalType": "bool", "name": "enabled", "type": "bool" }230    ],231    "name": "toggleAllowlist",232    "outputs": [],233    "stateMutability": "nonpayable",234    "type": "function"235  }236]
after · tests/src/eth/util/contractHelpersAbi.json
1[2  {3    "inputs": [4      {5        "internalType": "address",6        "name": "contractAddress",7        "type": "address"8      },9      { "internalType": "address", "name": "user", "type": "address" }10    ],11    "name": "allowed",12    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],13    "stateMutability": "view",14    "type": "function"15  },16  {17    "inputs": [18      {19        "internalType": "address",20        "name": "contractAddress",21        "type": "address"22      }23    ],24    "name": "allowlistEnabled",25    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],26    "stateMutability": "view",27    "type": "function"28  },29  {30    "inputs": [31      {32        "internalType": "address",33        "name": "contractAddress",34        "type": "address"35      }36    ],37    "name": "confirmSponsorship",38    "outputs": [],39    "stateMutability": "nonpayable",40    "type": "function"41  },42  {43    "inputs": [44      {45        "internalType": "address",46        "name": "contractAddress",47        "type": "address"48      }49    ],50    "name": "contractOwner",51    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],52    "stateMutability": "view",53    "type": "function"54  },55  {56    "inputs": [57      {58        "internalType": "address",59        "name": "contractAddress",60        "type": "address"61      }62    ],63    "name": "getSponsor",64    "outputs": [65      {66        "components": [67          { "internalType": "address", "name": "field_0", "type": "address" },68          { "internalType": "uint256", "name": "field_1", "type": "uint256" }69        ],70        "internalType": "struct Tuple0",71        "name": "",72        "type": "tuple"73      }74    ],75    "stateMutability": "view",76    "type": "function"77  },78  {79    "inputs": [80      {81        "internalType": "address",82        "name": "contractAddress",83        "type": "address"84      }85    ],86    "name": "getSponsoringRateLimit",87    "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }],88    "stateMutability": "view",89    "type": "function"90  },91  {92    "inputs": [93      {94        "internalType": "address",95        "name": "contractAddress",96        "type": "address"97      }98    ],99    "name": "hasPendingSponsor",100    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],101    "stateMutability": "view",102    "type": "function"103  },104  {105    "inputs": [106      {107        "internalType": "address",108        "name": "contractAddress",109        "type": "address"110      }111    ],112    "name": "hasSponsor",113    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],114    "stateMutability": "view",115    "type": "function"116  },117  {118    "inputs": [119      {120        "internalType": "address",121        "name": "contractAddress",122        "type": "address"123<<<<<<< HEAD124      }125    ],126    "name": "removeSponsor",127    "outputs": [],128    "stateMutability": "nonpayable",129    "type": "function"130  },131  {132    "inputs": [133      {134        "internalType": "address",135        "name": "contractAddress",136        "type": "address"137      }138    ],139    "name": "selfSponsoredEnable",140    "outputs": [],141    "stateMutability": "nonpayable",142    "type": "function"143  },144  {145    "inputs": [146      {147        "internalType": "address",148        "name": "contractAddress",149        "type": "address"150=======151>>>>>>> path: add stubs152      },153      { "internalType": "address", "name": "sponsor", "type": "address" }154    ],155    "name": "setSponsor",156    "outputs": [],157    "stateMutability": "nonpayable",158    "type": "function"159  },160  {161    "inputs": [162      {163        "internalType": "address",164        "name": "contractAddress",165        "type": "address"166      },167      { "internalType": "uint8", "name": "mode", "type": "uint8" }168    ],169    "name": "setSponsoringMode",170    "outputs": [],171    "stateMutability": "nonpayable",172    "type": "function"173  },174  {175    "inputs": [176      {177        "internalType": "address",178        "name": "contractAddress",179        "type": "address"180      },181      { "internalType": "uint32", "name": "rateLimit", "type": "uint32" }182    ],183    "name": "setSponsoringRateLimit",184    "outputs": [],185    "stateMutability": "nonpayable",186    "type": "function"187  },188  {189    "inputs": [190      {191        "internalType": "address",192        "name": "contractAddress",193        "type": "address"194      }195    ],196    "name": "sponsoringEnabled",197    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],198    "stateMutability": "view",199    "type": "function"200  },201  {202    "inputs": [203      { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }204    ],205    "name": "supportsInterface",206    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],207    "stateMutability": "view",208    "type": "function"209  },210  {211    "inputs": [212      {213        "internalType": "address",214        "name": "contractAddress",215        "type": "address"216      },217      { "internalType": "address", "name": "user", "type": "address" },218      { "internalType": "bool", "name": "isAllowed", "type": "bool" }219    ],220    "name": "toggleAllowed",221    "outputs": [],222    "stateMutability": "nonpayable",223    "type": "function"224  },225  {226    "inputs": [227      {228        "internalType": "address",229        "name": "contractAddress",230        "type": "address"231      },232      { "internalType": "bool", "name": "enabled", "type": "bool" }233    ],234    "name": "toggleAllowlist",235    "outputs": [],236    "stateMutability": "nonpayable",237    "type": "function"238  }239]