git.delta.rocks / unique-network / refs/commits / 8684bc0f6fa5

difftreelog

source

pallets/evm-contract-helpers/src/stubs/ContractHelpers.sol10.2 KiBsourcehistory
1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56/// @dev 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<<<<<<< HEAD25/// @title Magic contract, which allows users to reconfigure other contracts26/// @dev the ERC-165 identifier for this interface is 0xd77fab7027=======28<<<<<<< HEAD29// Selector: 6073d91730=======31// Selector: 06fc42e932>>>>>>> path: add stubs33>>>>>>> path: add stubs34contract ContractHelpers is Dummy, ERC165 {35	/// Get user, which deployed specified contract36	/// @dev May return zero address in case if contract is deployed37	///  using uniquenetwork evm-migration pallet, or using other terms not38	///  intended by pallet-evm39	/// @dev Returns zero address if contract does not exists40	/// @param contractAddress Contract to get owner of41	/// @return address Owner of contract42	/// @dev EVM selector for this function is: 0x5152b14c,43	///  or in textual repr: contractOwner(address)44	function contractOwner(address contractAddress)45		public46		view47		returns (address)48	{49		require(false, stub_error);50		contractAddress;51		dummy;52		return 0x0000000000000000000000000000000000000000;53	}5455<<<<<<< HEAD56	/// Set sponsor.57	/// @param contractAddress Contract for which a sponsor is being established.58	/// @param sponsor User address who set as pending sponsor.59	/// @dev EVM selector for this function is: 0xf01fba93,60	///  or in textual repr: setSponsor(address,address)61=======62<<<<<<< HEAD63	// Set sponsor.64	//65	// @param contract_address Contract for which a sponsor is being established.66	// @param sponsor User address who set as pending sponsor.67	//68=======69>>>>>>> path: add stubs70	// Selector: setSponsor(address,address) f01fba9371>>>>>>> path: add stubs72	function setSponsor(address contractAddress, address sponsor) public {73		require(false, stub_error);74		contractAddress;75		sponsor;76		dummy = 0;77	}7879<<<<<<< HEAD80	/// Set contract as self sponsored.81	///82	/// @param contractAddress Contract for which a self sponsoring is being enabled.83	/// @dev EVM selector for this function is: 0x89f7d9ae,84	///  or in textual repr: selfSponsoredEnable(address)85=======86<<<<<<< HEAD87	// Set contract as self sponsored.88	//89	// @param contract_address Contract for which a self sponsoring is being enabled.90	//91	// Selector: selfSponsoredEnable(address) 89f7d9ae92>>>>>>> path: add stubs93	function selfSponsoredEnable(address contractAddress) public {94=======95	// Selector: confirmSponsorship(address) abc0000196	function confirmSponsorship(address contractAddress) public {97>>>>>>> path: add stubs98		require(false, stub_error);99		contractAddress;100		dummy = 0;101	}102103<<<<<<< HEAD104	/// Remove sponsor.105	///106	/// @param contractAddress Contract for which a sponsorship is being removed.107	/// @dev EVM selector for this function is: 0xef784250,108	///  or in textual repr: removeSponsor(address)109=======110<<<<<<< HEAD111	// Remove sponsor.112	//113	// @param contract_address Contract for which a sponsorship is being removed.114	//115	// Selector: removeSponsor(address) ef784250116>>>>>>> path: add stubs117	function removeSponsor(address contractAddress) public {118		require(false, stub_error);119		contractAddress;120		dummy = 0;121	}122123	/// Confirm sponsorship.124	///125	/// @dev Caller must be same that set via [`setSponsor`].126	///127	/// @param contractAddress Сontract for which need to confirm sponsorship.128	/// @dev EVM selector for this function is: 0xabc00001,129	///  or in textual repr: confirmSponsorship(address)130	function confirmSponsorship(address contractAddress) public {131		require(false, stub_error);132		contractAddress;133		dummy = 0;134	}135136	/// Get current sponsor.137	///138	/// @param contractAddress The contract for which a sponsor is requested.139	/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.140	/// @dev EVM selector for this function is: 0x743fc745,141	///  or in textual repr: getSponsor(address)142	function getSponsor(address contractAddress)143=======144	// Selector: getSponsor(address) 743fc745145	function getSponsor(address contractAddress)146		public147		view148		returns (Tuple0 memory)149	{150		require(false, stub_error);151		contractAddress;152		dummy;153		return Tuple0(0x0000000000000000000000000000000000000000, 0);154	}155156	// Selector: hasSponsor(address) 97418603157	function hasSponsor(address contractAddress) public view returns (bool) {158		require(false, stub_error);159		contractAddress;160		dummy;161		return false;162	}163164	// Selector: hasPendingSponsor(address) 39b9b242165	function hasPendingSponsor(address contractAddress)166>>>>>>> path: add stubs167		public168		view169		returns (Tuple0 memory)170	{171		require(false, stub_error);172		contractAddress;173		dummy;174		return Tuple0(0x0000000000000000000000000000000000000000, 0);175	}176177	/// Check tat contract has confirmed sponsor.178	///179	/// @param contractAddress The contract for which the presence of a confirmed sponsor is checked.180	/// @return **true** if contract has confirmed sponsor.181	/// @dev EVM selector for this function is: 0x97418603,182	///  or in textual repr: hasSponsor(address)183	function hasSponsor(address contractAddress) public view returns (bool) {184		require(false, stub_error);185		contractAddress;186		dummy;187		return false;188	}189190<<<<<<< HEAD191	/// Check tat contract has pending sponsor.192	///193	/// @param contractAddress The contract for which the presence of a pending sponsor is checked.194	/// @return **true** if contract has pending sponsor.195	/// @dev EVM selector for this function is: 0x39b9b242,196	///  or in textual repr: hasPendingSponsor(address)197=======198<<<<<<< HEAD199	// Check tat contract has pending sponsor.200	//201	// @param contract_address The contract for which the presence of a pending sponsor is checked.202	// @return **true** if contract has pending sponsor.203	//204	// Selector: hasPendingSponsor(address) 39b9b242205>>>>>>> path: add stubs206	function hasPendingSponsor(address contractAddress)207=======208	// Selector: sponsoringEnabled(address) 6027dc61209	function sponsoringEnabled(address contractAddress)210>>>>>>> path: add stubs211		public212		view213		returns (bool)214	{215		require(false, stub_error);216		contractAddress;217		dummy;218		return false;219<<<<<<< HEAD220	}221222	/// @dev EVM selector for this function is: 0x6027dc61,223	///  or in textual repr: sponsoringEnabled(address)224	function sponsoringEnabled(address contractAddress)225		public226		view227		returns (bool)228	{229		require(false, stub_error);230		contractAddress;231		dummy;232		return false;233=======234>>>>>>> path: add stubs235	}236237	/// @dev EVM selector for this function is: 0xfde8a560,238	///  or in textual repr: setSponsoringMode(address,uint8)239	function setSponsoringMode(address contractAddress, uint8 mode) public {240		require(false, stub_error);241		contractAddress;242		mode;243		dummy = 0;244	}245246	/// Get current contract sponsoring rate limit247	/// @param contractAddress Contract to get sponsoring mode of248	/// @return uint32 Amount of blocks between two sponsored transactions249	/// @dev EVM selector for this function is: 0x610cfabd,250	///  or in textual repr: getSponsoringRateLimit(address)251	function getSponsoringRateLimit(address contractAddress)252		public253		view254		returns (uint32)255	{256		require(false, stub_error);257		contractAddress;258		dummy;259		return 0;260	}261262	/// Set contract sponsoring rate limit263	/// @dev Sponsoring rate limit - is a minimum amount of blocks that should264	///  pass between two sponsored transactions265	/// @param contractAddress Contract to change sponsoring rate limit of266	/// @param rateLimit Target rate limit267	/// @dev Only contract owner can change this setting268	/// @dev EVM selector for this function is: 0x77b6c908,269	///  or in textual repr: setSponsoringRateLimit(address,uint32)270	function setSponsoringRateLimit(address contractAddress, uint32 rateLimit)271		public272	{273		require(false, stub_error);274		contractAddress;275		rateLimit;276		dummy = 0;277	}278279	/// Is specified user present in contract allow list280	/// @dev Contract owner always implicitly included281	/// @param contractAddress Contract to check allowlist of282	/// @param user User to check283	/// @return bool Is specified users exists in contract allowlist284	/// @dev EVM selector for this function is: 0x5c658165,285	///  or in textual repr: allowed(address,address)286	function allowed(address contractAddress, address user)287		public288		view289		returns (bool)290	{291		require(false, stub_error);292		contractAddress;293		user;294		dummy;295		return false;296	}297298	/// Toggle user presence in contract allowlist299	/// @param contractAddress Contract to change allowlist of300	/// @param user Which user presence should be toggled301	/// @param isAllowed `true` if user should be allowed to be sponsored302	///  or call this contract, `false` otherwise303	/// @dev Only contract owner can change this setting304	/// @dev EVM selector for this function is: 0x4706cc1c,305	///  or in textual repr: toggleAllowed(address,address,bool)306	function toggleAllowed(307		address contractAddress,308		address user,309		bool isAllowed310	) public {311		require(false, stub_error);312		contractAddress;313		user;314		isAllowed;315		dummy = 0;316	}317318	/// Is this contract has allowlist access enabled319	/// @dev Allowlist always can have users, and it is used for two purposes:320	///  in case of allowlist sponsoring mode, users will be sponsored if they exist in allowlist321	///  in case of allowlist access enabled, only users from allowlist may call this contract322	/// @param contractAddress Contract to get allowlist access of323	/// @return bool Is specified contract has allowlist access enabled324	/// @dev EVM selector for this function is: 0xc772ef6c,325	///  or in textual repr: allowlistEnabled(address)326	function allowlistEnabled(address contractAddress)327		public328		view329		returns (bool)330	{331		require(false, stub_error);332		contractAddress;333		dummy;334		return false;335	}336337	/// Toggle contract allowlist access338	/// @param contractAddress Contract to change allowlist access of339	/// @param enabled Should allowlist access to be enabled?340	/// @dev EVM selector for this function is: 0x36de20f5,341	///  or in textual repr: toggleAllowlist(address,bool)342	function toggleAllowlist(address contractAddress, bool enabled) public {343		require(false, stub_error);344		contractAddress;345		enabled;346		dummy = 0;347	}348}349350/// @dev anonymous struct351struct Tuple0 {352	address field_0;353	uint256 field_1;354}