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 rate limit 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 /// Set contract sponsoring fee limit135 /// @dev Sponsoring fee limit - is maximum fee that could be spent by136 /// single transaction137 /// @param contractAddress Contract to change sponsoring fee limit of138 /// @param feeLimit Fee limit139 /// @dev Only contract owner can change this setting140 /// @dev EVM selector for this function is: 0x03aed665,141 /// or in textual repr: setSponsoringFeeLimit(address,uint256)142 function setSponsoringFeeLimit(address contractAddress, uint256 feeLimit)143 external;144145 /// Get current contract sponsoring fee limit146 /// @param contractAddress Contract to get sponsoring fee limit of147 /// @return uint256 Maximum amount of fee that could be spent by single148 /// transaction149 /// @dev EVM selector for this function is: 0xc3fdc9ee,150 /// or in textual repr: getSponsoringFeeLimit(address)151 function getSponsoringFeeLimit(address contractAddress)152 external153 view154 returns (uint256);155156 /// Is specified user present in contract allow list157 /// @dev Contract owner always implicitly included158 /// @param contractAddress Contract to check allowlist of159 /// @param user User to check160 /// @return bool Is specified users exists in contract allowlist161 /// @dev EVM selector for this function is: 0x5c658165,162 /// or in textual repr: allowed(address,address)163 function allowed(address contractAddress, address user)164 external165 view166 returns (bool);167168 /// Toggle user presence in contract allowlist169 /// @param contractAddress Contract to change allowlist of170 /// @param user Which user presence should be toggled171 /// @param isAllowed `true` if user should be allowed to be sponsored172 /// or call this contract, `false` otherwise173 /// @dev Only contract owner can change this setting174 /// @dev EVM selector for this function is: 0x4706cc1c,175 /// or in textual repr: toggleAllowed(address,address,bool)176 function toggleAllowed(177 address contractAddress,178 address user,179 bool isAllowed180 ) external;181182 /// Is this contract has allowlist access enabled183 /// @dev Allowlist always can have users, and it is used for two purposes:184 /// in case of allowlist sponsoring mode, users will be sponsored if they exist in allowlist185 /// in case of allowlist access enabled, only users from allowlist may call this contract186 /// @param contractAddress Contract to get allowlist access of187 /// @return bool Is specified contract has allowlist access enabled188 /// @dev EVM selector for this function is: 0xc772ef6c,189 /// or in textual repr: allowlistEnabled(address)190 function allowlistEnabled(address contractAddress)191 external192 view193 returns (bool);194195 /// Toggle contract allowlist access196 /// @param contractAddress Contract to change allowlist access of197 /// @param enabled Should allowlist access to be enabled?198 /// @dev EVM selector for this function is: 0x36de20f5,199 /// or in textual repr: toggleAllowlist(address,bool)200 function toggleAllowlist(address contractAddress, bool enabled) external;201}202203/// @dev anonymous struct204struct Tuple0 {205 address field_0;206 uint256 field_1;207}