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

difftreelog

source

pallets/evm-contract-helpers/src/stubs/ContractHelpers.sol9.6 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<<<<<<< HEAD26/// @title Magic contract, which allows users to reconfigure other contracts27/// @dev the ERC-165 identifier for this interface is 0xd77fab7028=======29<<<<<<< HEAD30// Selector: 6073d91731=======32// Selector: 06fc42e933>>>>>>> path: add stubs34>>>>>>> path: add stubs35=======36// Selector: 6073d91737>>>>>>> misc: update stubs38contract ContractHelpers is Dummy, ERC165 {39	/// Get user, which deployed specified contract40	/// @dev May return zero address in case if contract is deployed41	///  using uniquenetwork evm-migration pallet, or using other terms not42	///  intended by pallet-evm43	/// @dev Returns zero address if contract does not exists44	/// @param contractAddress Contract to get owner of45	/// @return address Owner of contract46	/// @dev EVM selector for this function is: 0x5152b14c,47	///  or in textual repr: contractOwner(address)48	function contractOwner(address contractAddress)49		public50		view51		returns (address)52	{53		require(false, stub_error);54		contractAddress;55		dummy;56		return 0x0000000000000000000000000000000000000000;57	}5859<<<<<<< HEAD60<<<<<<< HEAD61	/// Set sponsor.62	/// @param contractAddress Contract for which a sponsor is being established.63	/// @param sponsor User address who set as pending sponsor.64	/// @dev EVM selector for this function is: 0xf01fba93,65	///  or in textual repr: setSponsor(address,address)66=======67<<<<<<< HEAD68=======69>>>>>>> misc: update stubs70	// Set sponsor.71	//72	// @param contract_address Contract for which a sponsor is being established.73	// @param sponsor User address who set as pending sponsor.74	//75	// Selector: setSponsor(address,address) f01fba9376>>>>>>> path: add stubs77	function setSponsor(address contractAddress, address sponsor) public {78		require(false, stub_error);79		contractAddress;80		sponsor;81		dummy = 0;82	}8384<<<<<<< HEAD85<<<<<<< HEAD86	/// Set contract as self sponsored.87	///88	/// @param contractAddress Contract for which a self sponsoring is being enabled.89	/// @dev EVM selector for this function is: 0x89f7d9ae,90	///  or in textual repr: selfSponsoredEnable(address)91=======92<<<<<<< HEAD93=======94>>>>>>> misc: update stubs95	// Set contract as self sponsored.96	//97	// @param contract_address Contract for which a self sponsoring is being enabled.98	//99	// Selector: selfSponsoredEnable(address) 89f7d9ae100>>>>>>> path: add stubs101	function selfSponsoredEnable(address contractAddress) public {102		require(false, stub_error);103		contractAddress;104		dummy = 0;105	}106107<<<<<<< HEAD108<<<<<<< HEAD109	/// Remove sponsor.110	///111	/// @param contractAddress Contract for which a sponsorship is being removed.112	/// @dev EVM selector for this function is: 0xef784250,113	///  or in textual repr: removeSponsor(address)114=======115<<<<<<< HEAD116=======117>>>>>>> misc: update stubs118	// Remove sponsor.119	//120	// @param contract_address Contract for which a sponsorship is being removed.121	//122	// Selector: removeSponsor(address) ef784250123>>>>>>> path: add stubs124	function removeSponsor(address contractAddress) public {125		require(false, stub_error);126		contractAddress;127		dummy = 0;128	}129130	/// Confirm sponsorship.131	///132	/// @dev Caller must be same that set via [`setSponsor`].133	///134	/// @param contractAddress Сontract for which need to confirm sponsorship.135	/// @dev EVM selector for this function is: 0xabc00001,136	///  or in textual repr: confirmSponsorship(address)137	function confirmSponsorship(address contractAddress) public {138		require(false, stub_error);139		contractAddress;140		dummy = 0;141	}142143	/// Get current sponsor.144	///145	/// @param contractAddress The contract for which a sponsor is requested.146	/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.147	/// @dev EVM selector for this function is: 0x743fc745,148	///  or in textual repr: getSponsor(address)149	function getSponsor(address contractAddress)150		public151		view152		returns (Tuple0 memory)153	{154		require(false, stub_error);155		contractAddress;156		dummy;157		return Tuple0(0x0000000000000000000000000000000000000000, 0);158	}159160	/// Check tat contract has confirmed sponsor.161	///162	/// @param contractAddress The contract for which the presence of a confirmed sponsor is checked.163	/// @return **true** if contract has confirmed sponsor.164	/// @dev EVM selector for this function is: 0x97418603,165	///  or in textual repr: hasSponsor(address)166	function hasSponsor(address contractAddress) public view returns (bool) {167		require(false, stub_error);168		contractAddress;169		dummy;170		return false;171	}172173<<<<<<< HEAD174<<<<<<< HEAD175	/// Check tat contract has pending sponsor.176	///177	/// @param contractAddress The contract for which the presence of a pending sponsor is checked.178	/// @return **true** if contract has pending sponsor.179	/// @dev EVM selector for this function is: 0x39b9b242,180	///  or in textual repr: hasPendingSponsor(address)181=======182<<<<<<< HEAD183=======184>>>>>>> misc: update stubs185	// Check tat contract has pending sponsor.186	//187	// @param contract_address The contract for which the presence of a pending sponsor is checked.188	// @return **true** if contract has pending sponsor.189	//190	// Selector: hasPendingSponsor(address) 39b9b242191>>>>>>> path: add stubs192	function hasPendingSponsor(address contractAddress)193		public194		view195		returns (bool)196	{197		require(false, stub_error);198		contractAddress;199		dummy;200		return false;201	}202203	/// @dev EVM selector for this function is: 0x6027dc61,204	///  or in textual repr: sponsoringEnabled(address)205	function sponsoringEnabled(address contractAddress)206		public207		view208		returns (bool)209	{210		require(false, stub_error);211		contractAddress;212		dummy;213		return false;214	}215216	/// @dev EVM selector for this function is: 0xfde8a560,217	///  or in textual repr: setSponsoringMode(address,uint8)218	function setSponsoringMode(address contractAddress, uint8 mode) public {219		require(false, stub_error);220		contractAddress;221		mode;222		dummy = 0;223	}224225	/// Get current contract sponsoring rate limit226	/// @param contractAddress Contract to get sponsoring mode of227	/// @return uint32 Amount of blocks between two sponsored transactions228	/// @dev EVM selector for this function is: 0x610cfabd,229	///  or in textual repr: getSponsoringRateLimit(address)230	function getSponsoringRateLimit(address contractAddress)231		public232		view233		returns (uint32)234	{235		require(false, stub_error);236		contractAddress;237		dummy;238		return 0;239	}240241	/// Set contract sponsoring rate limit242	/// @dev Sponsoring rate limit - is a minimum amount of blocks that should243	///  pass between two sponsored transactions244	/// @param contractAddress Contract to change sponsoring rate limit of245	/// @param rateLimit Target rate limit246	/// @dev Only contract owner can change this setting247	/// @dev EVM selector for this function is: 0x77b6c908,248	///  or in textual repr: setSponsoringRateLimit(address,uint32)249	function setSponsoringRateLimit(address contractAddress, uint32 rateLimit)250		public251	{252		require(false, stub_error);253		contractAddress;254		rateLimit;255		dummy = 0;256	}257258	/// Is specified user present in contract allow list259	/// @dev Contract owner always implicitly included260	/// @param contractAddress Contract to check allowlist of261	/// @param user User to check262	/// @return bool Is specified users exists in contract allowlist263	/// @dev EVM selector for this function is: 0x5c658165,264	///  or in textual repr: allowed(address,address)265	function allowed(address contractAddress, address user)266		public267		view268		returns (bool)269	{270		require(false, stub_error);271		contractAddress;272		user;273		dummy;274		return false;275	}276277	/// Toggle user presence in contract allowlist278	/// @param contractAddress Contract to change allowlist of279	/// @param user Which user presence should be toggled280	/// @param isAllowed `true` if user should be allowed to be sponsored281	///  or call this contract, `false` otherwise282	/// @dev Only contract owner can change this setting283	/// @dev EVM selector for this function is: 0x4706cc1c,284	///  or in textual repr: toggleAllowed(address,address,bool)285	function toggleAllowed(286		address contractAddress,287		address user,288		bool isAllowed289	) public {290		require(false, stub_error);291		contractAddress;292		user;293		isAllowed;294		dummy = 0;295	}296297	/// Is this contract has allowlist access enabled298	/// @dev Allowlist always can have users, and it is used for two purposes:299	///  in case of allowlist sponsoring mode, users will be sponsored if they exist in allowlist300	///  in case of allowlist access enabled, only users from allowlist may call this contract301	/// @param contractAddress Contract to get allowlist access of302	/// @return bool Is specified contract has allowlist access enabled303	/// @dev EVM selector for this function is: 0xc772ef6c,304	///  or in textual repr: allowlistEnabled(address)305	function allowlistEnabled(address contractAddress)306		public307		view308		returns (bool)309	{310		require(false, stub_error);311		contractAddress;312		dummy;313		return false;314	}315316	/// Toggle contract allowlist access317	/// @param contractAddress Contract to change allowlist access of318	/// @param enabled Should allowlist access to be enabled?319	/// @dev EVM selector for this function is: 0x36de20f5,320	///  or in textual repr: toggleAllowlist(address,bool)321	function toggleAllowlist(address contractAddress, bool enabled) public {322		require(false, stub_error);323		contractAddress;324		enabled;325		dummy = 0;326	}327}328329/// @dev anonymous struct330struct Tuple0 {331	address field_0;332	uint256 field_1;333}