Oracle
Contains interfaces and contracts related to oracles.
Contracts
IOracleComponent
import "@etherisc/gif-next/contracts/oracle/IOracleComponent.sol";
-
[
request(requestId, requesterNftId, requestData, expiryAt)
] -
[
cancel(requestId)
] -
[
isVerifying()
]
-
[
withdrawFees(amount)
] -
[
getInstance()
]
-
[
getAuthorization()
]
-
[
getName()
] -
[
getToken()
] -
[
getTokenHandler()
] -
[
getWallet()
] -
[
isNftInterceptor()
] -
[
isRegistered()
] -
[
getComponentInfo()
] -
[
getInitialComponentInfo()
]
-
[
nftTransferFrom(from, to, tokenId, operator)
]
-
[
isActive()
] -
[
getInitialInfo()
]
-
[
getRelease()
]
-
[
linkToRegisteredNftId()
] -
[
getNftId()
] -
[
getOwner()
]
-
[
getRegistry()
]
-
[
supportsInterface(interfaceId)
]
-
[
authority()
] -
[
setAuthority()
] -
[
isConsumingScheduledOp()
]
-
[
LogComponentWalletAddressChanged(oldWallet, newWallet)
] -
[
LogComponentWalletTokensTransferred(from, to, amount)
] -
[
LogComponentTokenHandlerApproved(tokenHandler, token, limit, isMaxAmount)
]
-
[
LogNftOwnableNftLinkedToAddress(nftId, owner)
]
-
[
AuthorityUpdated(authority)
]
Oracle
import "@etherisc/gif-next/contracts/oracle/Oracle.sol";
-
[
request(requestId, requesterId, requestData, expiryAt)
] -
[
cancel(requestId)
] -
[
isVerifying()
] -
[
withdrawFees(amount)
] -
[
__Oracle_init(registry, productNftId, authorization, initialOwner, name)
] -
[
_request(requestId, requesterId, requestData, expiryAt)
] -
[
_cancel(requestId)
] -
[
_respond(requestId, responseData)
]
-
[
getInstance()
] -
[
getAuthorization()
] -
[
_sendRequest(oracleNftId, requestData, expiryAt, callbackMethod)
] -
[
_cancelRequest(requestId)
] -
[
_resendRequest(requestId)
] -
[
__InstanceLinkedComponent_init(registry, parentNftId, name, componentType, authorization, isInterceptor, initialOwner)
] -
[
_checkAndGetInstanceNftId(registryAddress, parentNftId, componentType)
] -
[
_checkAndGetRegistry(registryAddress, objectNftId, requiredType)
] -
[
_setWallet(newWallet)
] -
[
_getComponentInfo()
] -
[
_getInstanceReader()
] -
[
_withdrawFees(amount)
]
-
[
__Component_init(authority, registry, parentNftId, name, componentType, isInterceptor, initialOwner, registryData)
] -
[
nftTransferFrom(from, to, tokenId, operator)
] -
[
getWallet()
] -
[
getTokenHandler()
] -
[
getToken()
] -
[
getName()
] -
[
getVersion()
] -
[
getComponentInfo()
] -
[
getInitialComponentInfo()
] -
[
isNftInterceptor()
] -
[
isRegistered()
] -
[
_approveTokenHandler(token, amount)
] -
[
_nftTransferFrom(from, to, tokenId, operator)
] -
[
_setLocked(locked)
] -
[
_getServiceAddress(domain)
]
-
[
__Registerable_init(authority, registry, parentNftId, objectType, isInterceptor, initialOwner, data)
] -
[
isActive()
] -
[
getRelease()
] -
[
getInitialInfo()
]
-
[
_checkNftType(nftId, expectedObjectType)
] -
[
__NftOwnable_init(registry, initialOwner)
] -
[
linkToRegisteredNftId()
] -
[
getNftId()
] -
[
getOwner()
] -
[
_linkToNftOwnable(nftOwnableAddress)
]
-
[
__RegistryLinked_init(registry)
] -
[
getRegistry()
]
-
[
__ERC165_init()
] -
[
_initializeERC165()
] -
[
_registerInterface(interfaceId)
] -
[
_registerInterfaceNotInitializing(interfaceId)
] -
[
supportsInterface(interfaceId)
]
-
[
__AccessManaged_init(initialAuthority)
] -
[
__AccessManaged_init_unchained(initialAuthority)
] -
[
authority()
] -
[
setAuthority(newAuthority)
] -
[
isConsumingScheduledOp()
] -
[
_setAuthority(newAuthority)
] -
[
_checkCanCall(caller, data)
]
-
[
__Context_init()
] -
[
__Context_init_unchained()
] -
[
_msgSender()
] -
[
_msgData()
] -
[
_contextSuffixLength()
]
-
[
_checkInitializing()
] -
[
_disableInitializers()
] -
[
_getInitializedVersion()
] -
[
_isInitializing()
]
-
[
LogComponentWalletAddressChanged(oldWallet, newWallet)
] -
[
LogComponentWalletTokensTransferred(from, to, amount)
] -
[
LogComponentTokenHandlerApproved(tokenHandler, token, limit, isMaxAmount)
]
-
[
LogNftOwnableNftLinkedToAddress(nftId, owner)
]
-
[
AuthorityUpdated(authority)
]
-
[
Initialized(version)
]
__Oracle_init(address registry, NftId productNftId, contract IAuthorization authorization, address initialOwner, string name)
internal
_request(RequestId requestId, NftId requesterId, bytes requestData, Timestamp expiryAt)
internal
Internal function for handling requests. Empty implementation. Overwrite this function to implement use case specific handling for oracle calls.
BasicOracle
import "@etherisc/gif-next/contracts/oracle/BasicOracle.sol";
-
[
respond(requestId, responseData)
] -
[
_initializeBasicOracle(registry, instanceNftId, authorization, initialOwner, name)
]
-
[
request(requestId, requesterId, requestData, expiryAt)
] -
[
cancel(requestId)
] -
[
isVerifying()
] -
[
withdrawFees(amount)
] -
[
__Oracle_init(registry, productNftId, authorization, initialOwner, name)
] -
[
_request(requestId, requesterId, requestData, expiryAt)
] -
[
_cancel(requestId)
] -
[
_respond(requestId, responseData)
]
-
[
getInstance()
] -
[
getAuthorization()
] -
[
_sendRequest(oracleNftId, requestData, expiryAt, callbackMethod)
] -
[
_cancelRequest(requestId)
] -
[
_resendRequest(requestId)
] -
[
__InstanceLinkedComponent_init(registry, parentNftId, name, componentType, authorization, isInterceptor, initialOwner)
] -
[
_checkAndGetInstanceNftId(registryAddress, parentNftId, componentType)
] -
[
_checkAndGetRegistry(registryAddress, objectNftId, requiredType)
] -
[
_setWallet(newWallet)
] -
[
_getComponentInfo()
] -
[
_getInstanceReader()
] -
[
_withdrawFees(amount)
]
-
[
__Component_init(authority, registry, parentNftId, name, componentType, isInterceptor, initialOwner, registryData)
] -
[
nftTransferFrom(from, to, tokenId, operator)
] -
[
getWallet()
] -
[
getTokenHandler()
] -
[
getToken()
] -
[
getName()
] -
[
getVersion()
] -
[
getComponentInfo()
] -
[
getInitialComponentInfo()
] -
[
isNftInterceptor()
] -
[
isRegistered()
] -
[
_approveTokenHandler(token, amount)
] -
[
_nftTransferFrom(from, to, tokenId, operator)
] -
[
_setLocked(locked)
] -
[
_getServiceAddress(domain)
]
-
[
__Registerable_init(authority, registry, parentNftId, objectType, isInterceptor, initialOwner, data)
] -
[
isActive()
] -
[
getRelease()
] -
[
getInitialInfo()
]
-
[
_checkNftType(nftId, expectedObjectType)
] -
[
__NftOwnable_init(registry, initialOwner)
] -
[
linkToRegisteredNftId()
] -
[
getNftId()
] -
[
getOwner()
] -
[
_linkToNftOwnable(nftOwnableAddress)
]
-
[
__RegistryLinked_init(registry)
] -
[
getRegistry()
]
-
[
__ERC165_init()
] -
[
_initializeERC165()
] -
[
_registerInterface(interfaceId)
] -
[
_registerInterfaceNotInitializing(interfaceId)
] -
[
supportsInterface(interfaceId)
]
-
[
__AccessManaged_init(initialAuthority)
] -
[
__AccessManaged_init_unchained(initialAuthority)
] -
[
authority()
] -
[
setAuthority(newAuthority)
] -
[
isConsumingScheduledOp()
] -
[
_setAuthority(newAuthority)
] -
[
_checkCanCall(caller, data)
]
-
[
__Context_init()
] -
[
__Context_init_unchained()
] -
[
_msgSender()
] -
[
_msgData()
] -
[
_contextSuffixLength()
]
-
[
_checkInitializing()
] -
[
_disableInitializers()
] -
[
_getInitializedVersion()
] -
[
_isInitializing()
]
-
[
LogComponentWalletAddressChanged(oldWallet, newWallet)
] -
[
LogComponentWalletTokensTransferred(from, to, amount)
] -
[
LogComponentTokenHandlerApproved(tokenHandler, token, limit, isMaxAmount)
]
-
[
LogNftOwnableNftLinkedToAddress(nftId, owner)
]
-
[
AuthorityUpdated(authority)
]
-
[
Initialized(version)
]
BasicOracleAuthorization
import "@etherisc/gif-next/contracts/oracle/BasicOracleAuthorization.sol";
-
[
constructor(componentName, commitHash)
] -
[
_setupServiceTargets()
] -
[
_setupTargetAuthorizations()
]
-
[
getTokenHandlerName()
] -
[
getTokenHandlerTarget()
] -
[
getTarget(targetName)
] -
[
getTargets()
] -
[
targetExists(target)
] -
[
_setupTargets()
] -
[
_setupRoles()
] -
[
_setupTokenHandlerAuthorizations()
] -
[
_addCustomRole(roleId, adminRoleId, maxMemberCount, name)
] -
[
_addGifTarget(contractName)
] -
[
_addInstanceTarget(contractName)
] -
[
_addTarget(name)
] -
[
_toTargetRoleId(targetDomain)
] -
[
_toTargetRoleName(targetName)
]
-
[
getDomain()
] -
[
getRelease()
] -
[
getCommitHash()
] -
[
getMainTargetName()
] -
[
getMainTarget()
] -
[
getServiceDomains()
] -
[
getServiceDomain(idx)
] -
[
getServiceTarget(serviceDomain)
] -
[
getServiceRole(serviceDomain)
] -
[
getServiceAddress(serviceDomain)
] -
[
getTargetRole(target)
] -
[
roleExists(roleId)
] -
[
getRoles()
] -
[
getRoleInfo(roleId)
] -
[
getRoleName(roleId)
] -
[
getAuthorizedRoles(target)
] -
[
getAuthorizedFunctions(target, roleId)
] -
[
_setupDomains()
] -
[
_setupDomainAuthorizations()
] -
[
_authorizeServiceDomain(serviceDomain, serviceAddress)
] -
[
_addTargetWithRole(targetName, roleId, roleName)
] -
[
_addRole(roleId, info)
] -
[
_authorizeForService(serviceDomain, authorizedDomain)
] -
[
_authorizeForTarget(target, authorizedRoleId)
] -
[
_authorize(functions, selector, name)
]
-
[
__ERC165_init()
] -
[
_initializeERC165()
] -
[
_registerInterface(interfaceId)
] -
[
_registerInterfaceNotInitializing(interfaceId)
] -
[
supportsInterface(interfaceId)
]
-
[
_checkInitializing()
] -
[
_disableInitializers()
] -
[
_getInitializedVersion()
] -
[
_isInitializing()
]
-
[
Initialized(version)
]
OracleService
import "@etherisc/gif-next/contracts/oracle/OracleService.sol";
-
[
_initialize(owner, data)
] -
[
request(oracleNftId, requestData, expiryAt, callbackMethodName)
] -
[
respond(requestId, responseData)
] -
[
resend(requestId)
] -
[
cancel(requestId)
] -
[
_checkRequestParams(registry, oracleNftId, requesterInfo, expiryAt, callbackMethodName)
] -
[
_checkAndGetRequestInfo(instance, requestId, callerNftId, callerIsOracle)
] -
[
_getDomain()
]
-
[
__Service_init(authority, registry, initialOwner)
] -
[
getDomain()
] -
[
getVersion()
] -
[
getRoleId()
] -
[
_getServiceAddress(domain)
]
-
[
__ReentrancyGuard_init()
] -
[
__ReentrancyGuard_init_unchained()
] -
[
_reentrancyGuardEntered()
]
-
[
initializeVersionable(activatedBy, data)
] -
[
upgradeVersionable(data)
] -
[
_upgrade(data)
]
-
[
__Registerable_init(authority, registry, parentNftId, objectType, isInterceptor, initialOwner, data)
] -
[
isActive()
] -
[
getRelease()
] -
[
getInitialInfo()
]
-
[
_checkNftType(nftId, expectedObjectType)
] -
[
__NftOwnable_init(registry, initialOwner)
] -
[
linkToRegisteredNftId()
] -
[
getNftId()
] -
[
getOwner()
] -
[
_linkToNftOwnable(nftOwnableAddress)
]
-
[
__RegistryLinked_init(registry)
] -
[
getRegistry()
]
-
[
__ERC165_init()
] -
[
_initializeERC165()
] -
[
_registerInterface(interfaceId)
] -
[
_registerInterfaceNotInitializing(interfaceId)
] -
[
supportsInterface(interfaceId)
]
-
[
__AccessManaged_init(initialAuthority)
] -
[
__AccessManaged_init_unchained(initialAuthority)
] -
[
authority()
] -
[
setAuthority(newAuthority)
] -
[
isConsumingScheduledOp()
] -
[
_setAuthority(newAuthority)
] -
[
_checkCanCall(caller, data)
]
-
[
__Context_init()
] -
[
__Context_init_unchained()
] -
[
_msgSender()
] -
[
_msgData()
] -
[
_contextSuffixLength()
]
-
[
_checkInitializing()
] -
[
_disableInitializers()
] -
[
_getInitializedVersion()
] -
[
_isInitializing()
]
-
[
LogOracleServiceRequestCreated(requestId, requesterNftId, oracleNftId, expiryAt)
] -
[
LogOracleServiceResponseProcessed(requestId, oracleNftId)
] -
[
LogOracleServiceDeliveryFailed(requestId, requesterAddress, functionSignature)
] -
[
LogOracleServiceResponseResent(requestId, requesterNftId)
] -
[
LogOracleServiceRequestCancelled(requestId, requesterNftId)
]
-
[
LogNftOwnableNftLinkedToAddress(nftId, owner)
]
-
[
AuthorityUpdated(authority)
]
-
[
Initialized(version)
]
request(NftId oracleNftId, bytes requestData, Timestamp expiryAt, string callbackMethodName) → RequestId requestId
external
send an oracle request to the specified oracle component. the function returns the id of the newly created request. permissioned: only registered components may send requests to oracles.
respond(RequestId requestId, bytes responseData) → bool success
external
respond to oracle request by oracle compnent. permissioned: only the oracle component linked to the request id may call this method
resend(RequestId requestId)
external
Resend a failed response to the requester. Only requests in state FAILED may be resent. The request state changes to FULFILLED when calling the callback method of the requester is successful. Permissioned: only the receiving oracle may resend a request
cancel(RequestId requestId)
external
Notify the oracle component that the specified request has become invalid. Only requests in state ACTIVE may be cancelled. Permissioned: only the requester may cancel a request
_checkRequestParams(contract IRegistry registry, NftId oracleNftId, struct IRegistry.ObjectInfo requesterInfo, Timestamp expiryAt, string callbackMethodName) → NftId requesterNftId, contract IOracleComponent oracle
internal
OracleServiceManager
import "@etherisc/gif-next/contracts/oracle/OracleServiceManager.sol";
-
[
constructor(authority, registry, salt)
] -
[
getOracleService()
]
-
[
initialize(registry, implementation, data, salt)
] -
[
deploy(registry, initialImplementation, initializationData)
] -
[
deployDetermenistic(registry, initialImplementation, initializationData, salt)
] -
[
upgrade(newImplementation)
] -
[
upgrade(newImplementation, upgradeData)
] -
[
linkToProxy()
] -
[
getDeployData(proxyOwner, deployData)
] -
[
getUpgradeData(upgradeData)
] -
[
getProxy()
] -
[
getVersion()
] -
[
getVersionCount()
] -
[
getVersion(idx)
] -
[
getVersionInfo(_version)
]
-
[
_checkNftType(nftId, expectedObjectType)
] -
[
__NftOwnable_init(registry, initialOwner)
] -
[
linkToRegisteredNftId()
] -
[
getNftId()
] -
[
getOwner()
] -
[
_linkToNftOwnable(nftOwnableAddress)
]
-
[
__RegistryLinked_init(registry)
] -
[
getRegistry()
]
-
[
__ERC165_init()
] -
[
_initializeERC165()
] -
[
_registerInterface(interfaceId)
] -
[
_registerInterfaceNotInitializing(interfaceId)
] -
[
supportsInterface(interfaceId)
]
-
[
_checkInitializing()
] -
[
_disableInitializers()
] -
[
_getInitializedVersion()
] -
[
_isInitializing()
]
-
[
LogProxyManagerVersionableDeployed(proxy, initialImplementation)
] -
[
LogProxyManagerVersionableUpgraded(proxy, upgradedImplementation)
]
-
[
LogNftOwnableNftLinkedToAddress(nftId, owner)
]
-
[
Initialized(version)
]