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

difftreelog

chore update evm stubs

Grigoriy Simonov2022-09-13parent: #781ae2a.patch.diff
in: master

3 files changed

modifiedpallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterboth

binary blob — no preview

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
@@ -171,7 +171,7 @@
 	}
 
 	/// Get current contract sponsoring rate limit
-	/// @param contractAddress Contract to get sponsoring mode of
+	/// @param contractAddress Contract to get sponsoring rate limit of
 	/// @return uint32 Amount of blocks between two sponsored transactions
 	/// @dev EVM selector for this function is: 0x610cfabd,
 	///  or in textual repr: getSponsoringRateLimit(address)
@@ -203,6 +203,12 @@
 		dummy = 0;
 	}
 
+	/// Set contract sponsoring fee limit
+	/// @dev Sponsoring fee limit - is maximum fee that could be spent by
+	///  single transaction
+	/// @param contractAddress Contract to change sponsoring fee limit of
+	/// @param feeLimit Fee limit
+	/// @dev Only contract owner can change this setting
 	/// @dev EVM selector for this function is: 0x03aed665,
 	///  or in textual repr: setSponsoringFeeLimit(address,uint256)
 	function setSponsoringFeeLimit(address contractAddress, uint256 feeLimit)
@@ -214,6 +220,10 @@
 		dummy = 0;
 	}
 
+	/// Get current contract sponsoring fee limit
+	/// @param contractAddress Contract to get sponsoring fee limit of
+	/// @return uint256 Maximum amount of fee that could be spent by single
+	///  transaction
 	/// @dev EVM selector for this function is: 0xc3fdc9ee,
 	///  or in textual repr: getSponsoringFeeLimit(address)
 	function getSponsoringFeeLimit(address contractAddress)
modifiedtests/src/eth/api/ContractHelpers.soldiffbeforeafterboth
before · tests/src/eth/api/ContractHelpers.sol
1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56/// @dev common stubs holder7interface Dummy {89}1011interface ERC165 is Dummy {12	function supportsInterface(bytes4 interfaceID) external view returns (bool);13}1415/// @dev inlined interface16interface ContractHelpersEvents {17	event ContractSponsorSet(address indexed contractAddress, address sponsor);18	event ContractSponsorshipConfirmed(19		address indexed contractAddress,20		address sponsor21	);22	event ContractSponsorRemoved(address indexed contractAddress);23}2425/// @title Magic contract, which allows users to reconfigure other contracts26/// @dev the ERC-165 identifier for this interface is 0x172cb4fb27interface ContractHelpers is Dummy, ERC165, ContractHelpersEvents {28	/// Get user, which deployed specified contract29	/// @dev May return zero address in case if contract is deployed30	///  using uniquenetwork evm-migration pallet, or using other terms not31	///  intended by pallet-evm32	/// @dev Returns zero address if contract does not exists33	/// @param contractAddress Contract to get owner of34	/// @return address Owner of contract35	/// @dev EVM selector for this function is: 0x5152b14c,36	///  or in textual repr: contractOwner(address)37	function contractOwner(address contractAddress)38		external39		view40		returns (address);4142	/// Set sponsor.43	/// @param contractAddress Contract for which a sponsor is being established.44	/// @param sponsor User address who set as pending sponsor.45	/// @dev EVM selector for this function is: 0xf01fba93,46	///  or in textual repr: setSponsor(address,address)47	function setSponsor(address contractAddress, address sponsor) external;4849	/// Set contract as self sponsored.50	///51	/// @param contractAddress Contract for which a self sponsoring is being enabled.52	/// @dev EVM selector for this function is: 0x89f7d9ae,53	///  or in textual repr: selfSponsoredEnable(address)54	function selfSponsoredEnable(address contractAddress) external;5556	/// Remove sponsor.57	///58	/// @param contractAddress Contract for which a sponsorship is being removed.59	/// @dev EVM selector for this function is: 0xef784250,60	///  or in textual repr: removeSponsor(address)61	function removeSponsor(address contractAddress) external;6263	/// Confirm sponsorship.64	///65	/// @dev Caller must be same that set via [`setSponsor`].66	///67	/// @param contractAddress Сontract for which need to confirm sponsorship.68	/// @dev EVM selector for this function is: 0xabc00001,69	///  or in textual repr: confirmSponsorship(address)70	function confirmSponsorship(address contractAddress) external;7172	/// Get current sponsor.73	///74	/// @param contractAddress The contract for which a sponsor is requested.75	/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.76	/// @dev EVM selector for this function is: 0x743fc745,77	///  or in textual repr: getSponsor(address)78	function getSponsor(address contractAddress)79		external80		view81		returns (Tuple0 memory);8283	/// Check tat contract has confirmed sponsor.84	///85	/// @param contractAddress The contract for which the presence of a confirmed sponsor is checked.86	/// @return **true** if contract has confirmed sponsor.87	/// @dev EVM selector for this function is: 0x97418603,88	///  or in textual repr: hasSponsor(address)89	function hasSponsor(address contractAddress) external view returns (bool);9091	/// Check tat contract has pending sponsor.92	///93	/// @param contractAddress The contract for which the presence of a pending sponsor is checked.94	/// @return **true** if contract has pending sponsor.95	/// @dev EVM selector for this function is: 0x39b9b242,96	///  or in textual repr: hasPendingSponsor(address)97	function hasPendingSponsor(address contractAddress)98		external99		view100		returns (bool);101102	/// @dev EVM selector for this function is: 0x6027dc61,103	///  or in textual repr: sponsoringEnabled(address)104	function sponsoringEnabled(address contractAddress)105		external106		view107		returns (bool);108109	/// @dev EVM selector for this function is: 0xfde8a560,110	///  or in textual repr: setSponsoringMode(address,uint8)111	function setSponsoringMode(address contractAddress, uint8 mode) external;112113	/// Get current contract sponsoring rate limit114	/// @param contractAddress Contract to get sponsoring mode of115	/// @return uint32 Amount of blocks between two sponsored transactions116	/// @dev EVM selector for this function is: 0x610cfabd,117	///  or in textual repr: getSponsoringRateLimit(address)118	function getSponsoringRateLimit(address contractAddress)119		external120		view121		returns (uint32);122123	/// Set contract sponsoring rate limit124	/// @dev Sponsoring rate limit - is a minimum amount of blocks that should125	///  pass between two sponsored transactions126	/// @param contractAddress Contract to change sponsoring rate limit of127	/// @param rateLimit Target rate limit128	/// @dev Only contract owner can change this setting129	/// @dev EVM selector for this function is: 0x77b6c908,130	///  or in textual repr: setSponsoringRateLimit(address,uint32)131	function setSponsoringRateLimit(address contractAddress, uint32 rateLimit)132		external;133134	/// @dev EVM selector for this function is: 0x03aed665,135	///  or in textual repr: setSponsoringFeeLimit(address,uint256)136	function setSponsoringFeeLimit(address contractAddress, uint256 feeLimit)137		external;138139	/// @dev EVM selector for this function is: 0xc3fdc9ee,140	///  or in textual repr: getSponsoringFeeLimit(address)141	function getSponsoringFeeLimit(address contractAddress)142		external143		view144		returns (uint256);145146	/// Is specified user present in contract allow list147	/// @dev Contract owner always implicitly included148	/// @param contractAddress Contract to check allowlist of149	/// @param user User to check150	/// @return bool Is specified users exists in contract allowlist151	/// @dev EVM selector for this function is: 0x5c658165,152	///  or in textual repr: allowed(address,address)153	function allowed(address contractAddress, address user)154		external155		view156		returns (bool);157158	/// Toggle user presence in contract allowlist159	/// @param contractAddress Contract to change allowlist of160	/// @param user Which user presence should be toggled161	/// @param isAllowed `true` if user should be allowed to be sponsored162	///  or call this contract, `false` otherwise163	/// @dev Only contract owner can change this setting164	/// @dev EVM selector for this function is: 0x4706cc1c,165	///  or in textual repr: toggleAllowed(address,address,bool)166	function toggleAllowed(167		address contractAddress,168		address user,169		bool isAllowed170	) external;171172	/// Is this contract has allowlist access enabled173	/// @dev Allowlist always can have users, and it is used for two purposes:174	///  in case of allowlist sponsoring mode, users will be sponsored if they exist in allowlist175	///  in case of allowlist access enabled, only users from allowlist may call this contract176	/// @param contractAddress Contract to get allowlist access of177	/// @return bool Is specified contract has allowlist access enabled178	/// @dev EVM selector for this function is: 0xc772ef6c,179	///  or in textual repr: allowlistEnabled(address)180	function allowlistEnabled(address contractAddress)181		external182		view183		returns (bool);184185	/// Toggle contract allowlist access186	/// @param contractAddress Contract to change allowlist access of187	/// @param enabled Should allowlist access to be enabled?188	/// @dev EVM selector for this function is: 0x36de20f5,189	///  or in textual repr: toggleAllowlist(address,bool)190	function toggleAllowlist(address contractAddress, bool enabled) external;191}192193/// @dev anonymous struct194struct Tuple0 {195	address field_0;196	uint256 field_1;197}