View Source: contracts/testhelpers/interfaces/IERC1820Registry.sol
Interface of the global ERC1820 Registry, as defined in the https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register implementers for interfaces in this registry, as well as query support.
- Implementers may be shared by multiple accounts, and can also implement more than a single interface for each account. Contracts can implement interfaces for themselves, but externally-owned accounts (EOA) must delegate this to a contract.
- {IERC165} interfaces can also be queried via the registry.
- For an in-depth explanation and source code analysis, see the EIP text.
Events
event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer);
event ManagerChanged(address indexed account, address indexed newManager);
- setManager(address account, address newManager)
- getManager(address account)
- setInterfaceImplementer(address account, bytes32 interfaceHash, address implementer)
- getInterfaceImplementer(address account, bytes32 interfaceHash)
- interfaceHash(string interfaceName)
- updateERC165Cache(address account, bytes4 interfaceId)
- implementsERC165Interface(address account, bytes4 interfaceId)
- implementsERC165InterfaceNoCache(address account, bytes4 interfaceId)
Sets newManager
as the manager for account
. A manager of an
account is able to set interface implementers for it.
* By default, each account is its own manager. Passing a value of 0x0
in
newManager
will reset the manager to this initial state.
* Emits a {ManagerChanged} event.
* Requirements:
* - the caller must be the current manager for account
.
function setManager(address account, address newManager) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
account | address | |
newManager | address |
Source Code
function setManager(address account, address newManager) external;
Returns the manager for account
.
* See {setManager}.
function getManager(address account) external view
returns(address)
Arguments
Name | Type | Description |
---|---|---|
account | address |
Source Code
function getManager(address account) external view returns (address);
Sets the implementer
contract as account
's implementer for
interfaceHash
.
* account
being the zero address is an alias for the caller's address.
The zero address can also be used in implementer
to remove an old one.
* See {interfaceHash} to learn how these are created.
* Emits an {InterfaceImplementerSet} event.
* Requirements:
* - the caller must be the current manager for account
.
interfaceHash
must not be an {IERC165} interface id (i.e. it must not end in 28 zeroes).implementer
must implement {IERC1820Implementer} and return true when queried for support, unlessimplementer
is the caller. See {IERC1820Implementer-canImplementInterfaceForAddress}.
function setInterfaceImplementer(address account, bytes32 interfaceHash, address implementer) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
account | address | |
interfaceHash | bytes32 | |
implementer | address |
Source Code
function setInterfaceImplementer(
address account,
bytes32 interfaceHash,
address implementer
) external;
Returns the implementer of interfaceHash
for account
. If no such
implementer is registered, returns the zero address.
* If interfaceHash
is an {IERC165} interface id (i.e. it ends with 28
zeroes), account
will be queried for support of it.
* account
being the zero address is an alias for the caller's address.
function getInterfaceImplementer(address account, bytes32 interfaceHash) external view
returns(address)
Arguments
Name | Type | Description |
---|---|---|
account | address | |
interfaceHash | bytes32 |
Source Code
function getInterfaceImplementer(address account, bytes32 interfaceHash)
external
view
returns (address);
Returns the interface hash for an interfaceName
, as defined in the
corresponding
https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP].
function interfaceHash(string interfaceName) external pure
returns(bytes32)
Arguments
Name | Type | Description |
---|---|---|
interfaceName | string |
Source Code
function interfaceHash(string calldata interfaceName) external pure returns (bytes32);
Updates the cache with whether the contract implements an ERC165 interface or not.
function updateERC165Cache(address account, bytes4 interfaceId) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
account | address | Address of the contract for which to update the cache. |
interfaceId | bytes4 | ERC165 interface for which to update the cache. |
Source Code
function updateERC165Cache(address account, bytes4 interfaceId) external;
Checks whether a contract implements an ERC165 interface or not. If the result is not cached a direct lookup on the contract address is performed. If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling {updateERC165Cache} with the contract address.
function implementsERC165Interface(address account, bytes4 interfaceId) external view
returns(bool)
Arguments
Name | Type | Description |
---|---|---|
account | address | Address of the contract to check. |
interfaceId | bytes4 | ERC165 interface to check. |
Returns
True if account
implements interfaceId
, false otherwise.
Source Code
function implementsERC165Interface(address account, bytes4 interfaceId)
external
view
returns (bool);
Checks whether a contract implements an ERC165 interface or not without using nor updating the cache.
function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view
returns(bool)
Arguments
Name | Type | Description |
---|---|---|
account | address | Address of the contract to check. |
interfaceId | bytes4 | ERC165 interface to check. |
Returns
True if account
implements interfaceId
, false otherwise.
Source Code
function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId)
external
view
returns (bool);
- Address
- Administered
- AdminRole
- AdvancedToken
- AdvancedTokenStorage
- Affiliates
- AffiliatesEvents
- ApprovalReceiver
- BProPriceFeed
- CheckpointsShared
- Constants
- Context
- DevelopmentFund
- DummyContract
- EnumerableAddressSet
- EnumerableBytes32Set
- EnumerableBytes4Set
- ERC20
- ERC20Detailed
- ErrorDecoder
- Escrow
- EscrowReward
- FeedsLike
- FeesEvents
- FeeSharingCollector
- FeeSharingCollectorProxy
- FeeSharingCollectorStorage
- FeesHelper
- FourYearVesting
- FourYearVestingFactory
- FourYearVestingLogic
- FourYearVestingStorage
- GenericTokenSender
- GovernorAlpha
- GovernorVault
- IApproveAndCall
- IChai
- IContractRegistry
- IConverterAMM
- IERC1820Registry
- IERC20_
- IERC20
- IERC777
- IERC777Recipient
- IERC777Sender
- IFeeSharingCollector
- IFourYearVesting
- IFourYearVestingFactory
- IFunctionsList
- ILiquidityMining
- ILiquidityPoolV1Converter
- ILoanPool
- ILoanToken
- ILoanTokenLogicBeacon
- ILoanTokenLogicModules
- ILoanTokenLogicProxy
- ILoanTokenModules
- ILoanTokenWRBTC
- ILockedSOV
- IMoCState
- IModulesProxyRegistry
- Initializable
- InterestUser
- IPot
- IPriceFeeds
- IPriceFeedsExt
- IProtocol
- IRSKOracle
- ISovryn
- ISovrynSwapNetwork
- IStaking
- ISwapsImpl
- ITeamVesting
- ITimelock
- IV1PoolOracle
- IVesting
- IVestingFactory
- IVestingRegistry
- IWrbtc
- IWrbtcERC20
- LenderInterestStruct
- LiquidationHelper
- LiquidityMining
- LiquidityMiningConfigToken
- LiquidityMiningProxy
- LiquidityMiningStorage
- LoanClosingsEvents
- LoanClosingsLiquidation
- LoanClosingsRollover
- LoanClosingsShared
- LoanClosingsWith
- LoanClosingsWithoutInvariantCheck
- LoanInterestStruct
- LoanMaintenance
- LoanMaintenanceEvents
- LoanOpenings
- LoanOpeningsEvents
- LoanParamsStruct
- LoanSettings
- LoanSettingsEvents
- LoanStruct
- LoanToken
- LoanTokenBase
- LoanTokenLogicBeacon
- LoanTokenLogicLM
- LoanTokenLogicProxy
- LoanTokenLogicStandard
- LoanTokenLogicStorage
- LoanTokenLogicWrbtc
- LoanTokenSettingsLowerAdmin
- LockedSOV
- MarginTradeStructHelpers
- Medianizer
- ModuleCommonFunctionalities
- ModulesCommonEvents
- ModulesProxy
- ModulesProxyRegistry
- MultiSigKeyHolders
- MultiSigWallet
- Mutex
- Objects
- OrderStruct
- OrigingVestingCreator
- OriginInvestorsClaim
- Ownable
- Pausable
- PausableOz
- PreviousLoanToken
- PreviousLoanTokenSettingsLowerAdmin
- PriceFeedRSKOracle
- PriceFeeds
- PriceFeedsLocal
- PriceFeedsMoC
- PriceFeedV1PoolOracle
- ProtocolAffiliatesInterface
- ProtocolLike
- ProtocolSettings
- ProtocolSettingsEvents
- ProtocolSettingsLike
- ProtocolSwapExternalInterface
- ProtocolTokenUser
- Proxy
- ProxyOwnable
- ReentrancyGuard
- RewardHelper
- RSKAddrValidator
- SafeERC20
- SafeMath
- SafeMath96
- setGet
- SharedReentrancyGuard
- SignedSafeMath
- SOV
- sovrynProtocol
- StakingAdminModule
- StakingGovernanceModule
- StakingInterface
- StakingProxy
- StakingRewards
- StakingRewardsProxy
- StakingRewardsStorage
- StakingShared
- StakingStakeModule
- StakingStorageModule
- StakingStorageShared
- StakingVestingModule
- StakingWithdrawModule
- State
- SwapsEvents
- SwapsExternal
- SwapsImplLocal
- SwapsImplSovrynSwap
- SwapsUser
- TeamVesting
- Timelock
- TimelockHarness
- TimelockInterface
- TokenSender
- UpgradableProxy
- USDTPriceFeed
- Utils
- VaultController
- Vesting
- VestingCreator
- VestingFactory
- VestingLogic
- VestingRegistry
- VestingRegistry2
- VestingRegistry3
- VestingRegistryLogic
- VestingRegistryProxy
- VestingRegistryStorage
- VestingStorage
- WeightedStakingModule
- WRBTC