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

difftreelog

source

tests/src/eth/api/ContractHelpers.sol8.5 KiBsourcehistory
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<<<<<<< HEAD16/// @title Magic contract, which allows users to reconfigure other contracts17/// @dev the ERC-165 identifier for this interface is 0xd77fab7018=======19<<<<<<< HEAD20// Selector: 6073d91721=======22// Selector: 06fc42e923>>>>>>> path: add stubs24>>>>>>> path: add stubs25interface ContractHelpers is Dummy, ERC165 {26	/// Get user, which deployed specified contract27	/// @dev May return zero address in case if contract is deployed28	///  using uniquenetwork evm-migration pallet, or using other terms not29	///  intended by pallet-evm30	/// @dev Returns zero address if contract does not exists31	/// @param contractAddress Contract to get owner of32	/// @return address Owner of contract33	/// @dev EVM selector for this function is: 0x5152b14c,34	///  or in textual repr: contractOwner(address)35	function contractOwner(address contractAddress)36		external37		view38		returns (address);3940<<<<<<< HEAD41	/// Set sponsor.42	/// @param contractAddress Contract for which a sponsor is being established.43	/// @param sponsor User address who set as pending sponsor.44	/// @dev EVM selector for this function is: 0xf01fba93,45	///  or in textual repr: setSponsor(address,address)46=======47<<<<<<< HEAD48	// Set sponsor.49	//50	// @param contract_address Contract for which a sponsor is being established.51	// @param sponsor User address who set as pending sponsor.52	//53	// Selector: setSponsor(address,address) f01fba9354>>>>>>> path: add stubs55	function setSponsor(address contractAddress, address sponsor) external;5657	/// Set contract as self sponsored.58	///59	/// @param contractAddress Contract for which a self sponsoring is being enabled.60	/// @dev EVM selector for this function is: 0x89f7d9ae,61	///  or in textual repr: selfSponsoredEnable(address)62	function selfSponsoredEnable(address contractAddress) external;6364	/// Remove sponsor.65	///66	/// @param contractAddress Contract for which a sponsorship is being removed.67	/// @dev EVM selector for this function is: 0xef784250,68	///  or in textual repr: removeSponsor(address)69	function removeSponsor(address contractAddress) external;7071	/// Confirm sponsorship.72	///73	/// @dev Caller must be same that set via [`setSponsor`].74	///75	/// @param contractAddress Сontract for which need to confirm sponsorship.76	/// @dev EVM selector for this function is: 0xabc00001,77	///  or in textual repr: confirmSponsorship(address)78	function confirmSponsorship(address contractAddress) external;7980<<<<<<< HEAD81	/// Get current sponsor.82	///83	/// @param contractAddress The contract for which a sponsor is requested.84	/// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.85	/// @dev EVM selector for this function is: 0x743fc745,86	///  or in textual repr: getSponsor(address)87=======88	// Get current sponsor.89	//90	// @param contract_address The contract for which a sponsor is requested.91	// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.92	//93=======94	// Selector: setSponsor(address,address) f01fba9395	function setSponsor(address contractAddress, address sponsor) external;9697	// Selector: confirmSponsorship(address) abc0000198	function confirmSponsorship(address contractAddress) external;99100>>>>>>> path: add stubs101	// Selector: getSponsor(address) 743fc745102>>>>>>> path: add stubs103	function getSponsor(address contractAddress)104		external105		view106		returns (Tuple0 memory);107108<<<<<<< HEAD109	/// Check tat contract has confirmed sponsor.110	///111	/// @param contractAddress The contract for which the presence of a confirmed sponsor is checked.112	/// @return **true** if contract has confirmed sponsor.113	/// @dev EVM selector for this function is: 0x97418603,114	///  or in textual repr: hasSponsor(address)115	function hasSponsor(address contractAddress) external view returns (bool);116117	/// Check tat contract has pending sponsor.118	///119	/// @param contractAddress The contract for which the presence of a pending sponsor is checked.120	/// @return **true** if contract has pending sponsor.121	/// @dev EVM selector for this function is: 0x39b9b242,122	///  or in textual repr: hasPendingSponsor(address)123=======124<<<<<<< HEAD125	// Check tat contract has confirmed sponsor.126	//127	// @param contract_address The contract for which the presence of a confirmed sponsor is checked.128	// @return **true** if contract has confirmed sponsor.129	//130	// Selector: hasSponsor(address) 97418603131	function hasSponsor(address contractAddress) external view returns (bool);132133	// Check tat contract has pending sponsor.134	//135	// @param contract_address The contract for which the presence of a pending sponsor is checked.136	// @return **true** if contract has pending sponsor.137	//138=======139	// Selector: hasSponsor(address) 97418603140	function hasSponsor(address contractAddress) external view returns (bool);141142>>>>>>> path: add stubs143	// Selector: hasPendingSponsor(address) 39b9b242144>>>>>>> path: add stubs145	function hasPendingSponsor(address contractAddress)146		external147		view148		returns (bool);149150	/// @dev EVM selector for this function is: 0x6027dc61,151	///  or in textual repr: sponsoringEnabled(address)152	function sponsoringEnabled(address contractAddress)153		external154		view155		returns (bool);156157	/// @dev EVM selector for this function is: 0xfde8a560,158	///  or in textual repr: setSponsoringMode(address,uint8)159	function setSponsoringMode(address contractAddress, uint8 mode) external;160161	/// Get current contract sponsoring rate limit162	/// @param contractAddress Contract to get sponsoring mode of163	/// @return uint32 Amount of blocks between two sponsored transactions164	/// @dev EVM selector for this function is: 0x610cfabd,165	///  or in textual repr: getSponsoringRateLimit(address)166	function getSponsoringRateLimit(address contractAddress)167		external168		view169		returns (uint32);170171	/// Set contract sponsoring rate limit172	/// @dev Sponsoring rate limit - is a minimum amount of blocks that should173	///  pass between two sponsored transactions174	/// @param contractAddress Contract to change sponsoring rate limit of175	/// @param rateLimit Target rate limit176	/// @dev Only contract owner can change this setting177	/// @dev EVM selector for this function is: 0x77b6c908,178	///  or in textual repr: setSponsoringRateLimit(address,uint32)179	function setSponsoringRateLimit(address contractAddress, uint32 rateLimit)180		external;181182	/// Is specified user present in contract allow list183	/// @dev Contract owner always implicitly included184	/// @param contractAddress Contract to check allowlist of185	/// @param user User to check186	/// @return bool Is specified users exists in contract allowlist187	/// @dev EVM selector for this function is: 0x5c658165,188	///  or in textual repr: allowed(address,address)189	function allowed(address contractAddress, address user)190		external191		view192		returns (bool);193194	/// Toggle user presence in contract allowlist195	/// @param contractAddress Contract to change allowlist of196	/// @param user Which user presence should be toggled197	/// @param isAllowed `true` if user should be allowed to be sponsored198	///  or call this contract, `false` otherwise199	/// @dev Only contract owner can change this setting200	/// @dev EVM selector for this function is: 0x4706cc1c,201	///  or in textual repr: toggleAllowed(address,address,bool)202	function toggleAllowed(203		address contractAddress,204		address user,205		bool isAllowed206	) external;207208	/// Is this contract has allowlist access enabled209	/// @dev Allowlist always can have users, and it is used for two purposes:210	///  in case of allowlist sponsoring mode, users will be sponsored if they exist in allowlist211	///  in case of allowlist access enabled, only users from allowlist may call this contract212	/// @param contractAddress Contract to get allowlist access of213	/// @return bool Is specified contract has allowlist access enabled214	/// @dev EVM selector for this function is: 0xc772ef6c,215	///  or in textual repr: allowlistEnabled(address)216	function allowlistEnabled(address contractAddress)217		external218		view219		returns (bool);220221	/// Toggle contract allowlist access222	/// @param contractAddress Contract to change allowlist access of223	/// @param enabled Should allowlist access to be enabled?224	/// @dev EVM selector for this function is: 0x36de20f5,225	///  or in textual repr: toggleAllowlist(address,bool)226	function toggleAllowlist(address contractAddress, bool enabled) external;227}228229/// @dev anonymous struct230struct Tuple0 {231	address field_0;232	uint256 field_1;233}