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

difftreelog

source

tests/src/eth/api/ContractHelpers.sol8.3 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<<<<<<< HEAD17/// @title Magic contract, which allows users to reconfigure other contracts18/// @dev the ERC-165 identifier for this interface is 0xd77fab7019=======20<<<<<<< HEAD21// Selector: 6073d91722=======23// Selector: 06fc42e924>>>>>>> path: add stubs25>>>>>>> path: add stubs26=======27// Selector: 6073d91728>>>>>>> misc: update stubs29interface ContractHelpers is Dummy, ERC165 {30	/// Get user, which deployed specified contract31	/// @dev May return zero address in case if contract is deployed32	///  using uniquenetwork evm-migration pallet, or using other terms not33	///  intended by pallet-evm34	/// @dev Returns zero address if contract does not exists35	/// @param contractAddress Contract to get owner of36	/// @return address Owner of contract37	/// @dev EVM selector for this function is: 0x5152b14c,38	///  or in textual repr: contractOwner(address)39	function contractOwner(address contractAddress)40		external41		view42		returns (address);4344<<<<<<< HEAD45<<<<<<< HEAD46	/// Set sponsor.47	/// @param contractAddress Contract for which a sponsor is being established.48	/// @param sponsor User address who set as pending sponsor.49	/// @dev EVM selector for this function is: 0xf01fba93,50	///  or in textual repr: setSponsor(address,address)51=======52<<<<<<< HEAD53=======54>>>>>>> misc: update stubs55	// Set sponsor.56	//57	// @param contract_address Contract for which a sponsor is being established.58	// @param sponsor User address who set as pending sponsor.59	//60	// Selector: setSponsor(address,address) f01fba9361>>>>>>> path: add stubs62	function setSponsor(address contractAddress, address sponsor) external;6364	/// Set contract as self sponsored.65	///66	/// @param contractAddress Contract for which a self sponsoring is being enabled.67	/// @dev EVM selector for this function is: 0x89f7d9ae,68	///  or in textual repr: selfSponsoredEnable(address)69	function selfSponsoredEnable(address contractAddress) external;7071	/// Remove sponsor.72	///73	/// @param contractAddress Contract for which a sponsorship is being removed.74	/// @dev EVM selector for this function is: 0xef784250,75	///  or in textual repr: removeSponsor(address)76	function removeSponsor(address contractAddress) external;7778	/// Confirm sponsorship.79	///80	/// @dev Caller must be same that set via [`setSponsor`].81	///82	/// @param contractAddress Сontract for which need to confirm sponsorship.83	/// @dev EVM selector for this function is: 0xabc00001,84	///  or in textual repr: confirmSponsorship(address)85	function confirmSponsorship(address contractAddress) external;8687<<<<<<< HEAD88	/// Get current sponsor.89	///90	/// @param contractAddress 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	/// @dev EVM selector for this function is: 0x743fc745,93	///  or in textual repr: getSponsor(address)94=======95	// Get current sponsor.96	//97	// @param contract_address The contract for which a sponsor is requested.98	// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.99	//100	// Selector: getSponsor(address) 743fc745101>>>>>>> path: add stubs102	function getSponsor(address contractAddress)103		external104		view105		returns (Tuple0 memory);106107<<<<<<< HEAD108<<<<<<< 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=======126>>>>>>> misc: update stubs127	// Check tat contract has confirmed sponsor.128	//129	// @param contract_address The contract for which the presence of a confirmed sponsor is checked.130	// @return **true** if contract has confirmed sponsor.131	//132	// Selector: hasSponsor(address) 97418603133	function hasSponsor(address contractAddress) external view returns (bool);134135	// Check tat contract has pending sponsor.136	//137	// @param contract_address The contract for which the presence of a pending sponsor is checked.138	// @return **true** if contract has pending sponsor.139	//140	// Selector: hasPendingSponsor(address) 39b9b242141>>>>>>> path: add stubs142	function hasPendingSponsor(address contractAddress)143		external144		view145		returns (bool);146147	/// @dev EVM selector for this function is: 0x6027dc61,148	///  or in textual repr: sponsoringEnabled(address)149	function sponsoringEnabled(address contractAddress)150		external151		view152		returns (bool);153154	/// @dev EVM selector for this function is: 0xfde8a560,155	///  or in textual repr: setSponsoringMode(address,uint8)156	function setSponsoringMode(address contractAddress, uint8 mode) external;157158	/// Get current contract sponsoring rate limit159	/// @param contractAddress Contract to get sponsoring mode of160	/// @return uint32 Amount of blocks between two sponsored transactions161	/// @dev EVM selector for this function is: 0x610cfabd,162	///  or in textual repr: getSponsoringRateLimit(address)163	function getSponsoringRateLimit(address contractAddress)164		external165		view166		returns (uint32);167168	/// Set contract sponsoring rate limit169	/// @dev Sponsoring rate limit - is a minimum amount of blocks that should170	///  pass between two sponsored transactions171	/// @param contractAddress Contract to change sponsoring rate limit of172	/// @param rateLimit Target rate limit173	/// @dev Only contract owner can change this setting174	/// @dev EVM selector for this function is: 0x77b6c908,175	///  or in textual repr: setSponsoringRateLimit(address,uint32)176	function setSponsoringRateLimit(address contractAddress, uint32 rateLimit)177		external;178179	/// Is specified user present in contract allow list180	/// @dev Contract owner always implicitly included181	/// @param contractAddress Contract to check allowlist of182	/// @param user User to check183	/// @return bool Is specified users exists in contract allowlist184	/// @dev EVM selector for this function is: 0x5c658165,185	///  or in textual repr: allowed(address,address)186	function allowed(address contractAddress, address user)187		external188		view189		returns (bool);190191	/// Toggle user presence in contract allowlist192	/// @param contractAddress Contract to change allowlist of193	/// @param user Which user presence should be toggled194	/// @param isAllowed `true` if user should be allowed to be sponsored195	///  or call this contract, `false` otherwise196	/// @dev Only contract owner can change this setting197	/// @dev EVM selector for this function is: 0x4706cc1c,198	///  or in textual repr: toggleAllowed(address,address,bool)199	function toggleAllowed(200		address contractAddress,201		address user,202		bool isAllowed203	) external;204205	/// Is this contract has allowlist access enabled206	/// @dev Allowlist always can have users, and it is used for two purposes:207	///  in case of allowlist sponsoring mode, users will be sponsored if they exist in allowlist208	///  in case of allowlist access enabled, only users from allowlist may call this contract209	/// @param contractAddress Contract to get allowlist access of210	/// @return bool Is specified contract has allowlist access enabled211	/// @dev EVM selector for this function is: 0xc772ef6c,212	///  or in textual repr: allowlistEnabled(address)213	function allowlistEnabled(address contractAddress)214		external215		view216		returns (bool);217218	/// Toggle contract allowlist access219	/// @param contractAddress Contract to change allowlist access of220	/// @param enabled Should allowlist access to be enabled?221	/// @dev EVM selector for this function is: 0x36de20f5,222	///  or in textual repr: toggleAllowlist(address,bool)223	function toggleAllowlist(address contractAddress, bool enabled) external;224}225226/// @dev anonymous struct227struct Tuple0 {228	address field_0;229	uint256 field_1;230}