Unpermissioned example components

This directory contains a set of unpermissioned example compoents that are mainly used for testing purposes. The expose all the available functions of the component without requiring any permissions (and thereby setup) to use them.

Components that are built in such a way should never be used in production, as they expose functions that can move tokens or other assets without any authorization.

Contracts

SimpleDistribution

import "@etherisc/gif-next/contracts/examples/unpermissioned/SimpleDistribution.sol";
Functions
  • [constructor(registry, productNftId, authorization, initialOwner)]

  • [initialize(registry, productNftId, authorization, initialOwner, name)]

  • [approveTokenHandler(token, amount)]

  • [setLocked(locked)]

  • [setWallet(newWallet)]

  • [createReferral2(distributorNftId, code, discountPercentage, maxReferrals, expiryAt, data)]

BasicDistribution
  • [setFees(distributionFee, minDistributionOwnerFee)]

  • [createDistributorType(name, minDiscountPercentage, maxDiscountPercentage, commissionPercentage, maxReferralCount, maxReferralLifetime, allowSelfReferrals, allowRenewals, data)]

  • [createDistributor(distributor, distributorType, data)]

  • [changeDistributorType(distributorNftId, distributorType, data)]

  • [createReferral(distributorNftId, code, discountPercentage, maxReferrals, expiryAt, data)]

  • [_initializeBasicDistribution(registry, instanceNftId, authorization, initialOwner, name)]

Distribution
  • [processRenewal(referralId, feeAmount)]

  • [withdrawCommission(distributorNftId, amount)]

  • [getDiscountPercentage(referralCode)]

  • [getReferralId(referralCode)]

  • [calculateRenewalFeeAmount(, netPremiumAmount)]

  • [isVerifying()]

  • [__Distribution_init(registry, productNftId, authorization, isInterceptor, initialOwner, name)]

  • [_setFees(distributionFee, minDistributionOwnerFee)]

  • [_createDistributorType(name, minDiscountPercentage, maxDiscountPercentage, commissionPercentage, maxReferralCount, maxReferralLifetime, allowSelfReferrals, allowRenewals, data)]

  • [_createDistributor(distributor, distributorType, data)]

  • [_changeDistributorType(distributorNftId, distributorType, data)]

  • [_createReferral(distributorNftId, code, discountPercentage, maxReferrals, expiryAt, data)]

  • [_withdrawCommission(distributorNftId, amount)]

InstanceLinkedComponent
  • [getInstance()]

  • [getAuthorization()]

  • [withdrawFees(amount)]

  • [_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
  • [__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
  • [__Registerable_init(authority, registry, parentNftId, objectType, isInterceptor, initialOwner, data)]

  • [isActive()]

  • [getRelease()]

  • [getInitialInfo()]

NftOwnable
  • [_checkNftType(nftId, expectedObjectType)]

  • [__NftOwnable_init(registry, initialOwner)]

  • [linkToRegisteredNftId()]

  • [getNftId()]

  • [getOwner()]

  • [_linkToNftOwnable(nftOwnableAddress)]

RegistryLinked
  • [__RegistryLinked_init(registry)]

  • [getRegistry()]

InitializableERC165
  • [__ERC165_init()]

  • [_initializeERC165()]

  • [_registerInterface(interfaceId)]

  • [_registerInterfaceNotInitializing(interfaceId)]

  • [supportsInterface(interfaceId)]

AccessManagedUpgradeable
  • [__AccessManaged_init(initialAuthority)]

  • [__AccessManaged_init_unchained(initialAuthority)]

  • [authority()]

  • [setAuthority(newAuthority)]

  • [isConsumingScheduledOp()]

  • [_setAuthority(newAuthority)]

  • [_checkCanCall(caller, data)]

ContextUpgradeable
  • [__Context_init()]

  • [__Context_init_unchained()]

  • [_msgSender()]

  • [_msgData()]

  • [_contextSuffixLength()]

Initializable
  • [_checkInitializing()]

  • [_disableInitializers()]

  • [_getInitializedVersion()]

  • [_isInitializing()]

Events
IDistributionComponent
  • [LogDistributorUpdated(to, operator)]

IComponent
  • [LogComponentWalletAddressChanged(oldWallet, newWallet)]

  • [LogComponentWalletTokensTransferred(from, to, amount)]

  • [LogComponentTokenHandlerApproved(tokenHandler, token, limit, isMaxAmount)]

INftOwnable
  • [LogNftOwnableNftLinkedToAddress(nftId, owner)]

IAccessManaged
  • [AuthorityUpdated(authority)]

Initializable
  • [Initialized(version)]

constructor(address registry, NftId productNftId, contract IAuthorization authorization, address initialOwner) public

initialize(address registry, NftId productNftId, contract IAuthorization authorization, address initialOwner, string name) public

approveTokenHandler(contract IERC20Metadata token, Amount amount) external

setLocked(bool locked) external

setWallet(address newWallet) external

createReferral2(NftId distributorNftId, string code, UFixed discountPercentage, uint32 maxReferrals, Timestamp expiryAt, bytes data) → ReferralId referralId external

create referral codes. This is required for testing only to provide a distributor that is not the message sender.

SimpleOracle

import "@etherisc/gif-next/contracts/examples/unpermissioned/SimpleOracle.sol";
Functions
  • [constructor(registry, productNftId, authorization, initialOwner)]

  • [initialize(registry, productNftId, authorization, initialOwner, name)]

  • [_request(requestId, requesterId, requestData, expiryAt)]

  • [_cancel(requestId)]

  • [respondAsync(requestId, responseText, revertInCall, revertUntil)]

  • [_respondSync(requestId)]

BasicOracle
  • [respond(requestId, responseData)]

  • [_initializeBasicOracle(registry, instanceNftId, authorization, initialOwner, name)]

Oracle
  • [request(requestId, requesterId, requestData, expiryAt)]

  • [cancel(requestId)]

  • [isVerifying()]

  • [withdrawFees(amount)]

  • [__Oracle_init(registry, productNftId, authorization, initialOwner, name)]

  • [_respond(requestId, responseData)]

InstanceLinkedComponent
  • [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
  • [__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
  • [__Registerable_init(authority, registry, parentNftId, objectType, isInterceptor, initialOwner, data)]

  • [isActive()]

  • [getRelease()]

  • [getInitialInfo()]

NftOwnable
  • [_checkNftType(nftId, expectedObjectType)]

  • [__NftOwnable_init(registry, initialOwner)]

  • [linkToRegisteredNftId()]

  • [getNftId()]

  • [getOwner()]

  • [_linkToNftOwnable(nftOwnableAddress)]

RegistryLinked
  • [__RegistryLinked_init(registry)]

  • [getRegistry()]

InitializableERC165
  • [__ERC165_init()]

  • [_initializeERC165()]

  • [_registerInterface(interfaceId)]

  • [_registerInterfaceNotInitializing(interfaceId)]

  • [supportsInterface(interfaceId)]

AccessManagedUpgradeable
  • [__AccessManaged_init(initialAuthority)]

  • [__AccessManaged_init_unchained(initialAuthority)]

  • [authority()]

  • [setAuthority(newAuthority)]

  • [isConsumingScheduledOp()]

  • [_setAuthority(newAuthority)]

  • [_checkCanCall(caller, data)]

ContextUpgradeable
  • [__Context_init()]

  • [__Context_init_unchained()]

  • [_msgSender()]

  • [_msgData()]

  • [_contextSuffixLength()]

Initializable
  • [_checkInitializing()]

  • [_disableInitializers()]

  • [_getInitializedVersion()]

  • [_isInitializing()]

Events
  • [LogSimpleOracleRequestReceived(requestId, requesterId, synchronous, requestText)]

  • [LogSimpleOracleCancellingReceived(requestId)]

  • [LogSimpleOracleAsyncResponseSent(requestId, responseText)]

  • [LogSimpleOracleSyncResponseSent(requestId, responseText)]

IComponent
  • [LogComponentWalletAddressChanged(oldWallet, newWallet)]

  • [LogComponentWalletTokensTransferred(from, to, amount)]

  • [LogComponentTokenHandlerApproved(tokenHandler, token, limit, isMaxAmount)]

INftOwnable
  • [LogNftOwnableNftLinkedToAddress(nftId, owner)]

IAccessManaged
  • [AuthorityUpdated(authority)]

Initializable
  • [Initialized(version)]

constructor(address registry, NftId productNftId, contract IAuthorization authorization, address initialOwner) public

initialize(address registry, NftId productNftId, contract IAuthorization authorization, address initialOwner, string name) public

_request(RequestId requestId, NftId requesterId, bytes requestData, Timestamp expiryAt) internal

use case specific handling of oracle requests for now only log is emitted to verify that request has been received by oracle component

_cancel(RequestId requestId) internal

use case specific handling of oracle requests for now only log is emitted to verify that cancelling has been received by oracle component

respondAsync(RequestId requestId, string responseText, bool revertInCall, Timestamp revertUntil) external

_respondSync(RequestId requestId) internal

LogSimpleOracleRequestReceived(RequestId requestId, NftId requesterId, bool synchronous, string requestText) event

LogSimpleOracleCancellingReceived(RequestId requestId) event

LogSimpleOracleAsyncResponseSent(RequestId requestId, string responseText) event

LogSimpleOracleSyncResponseSent(RequestId requestId, string responseText) event

SimplePool

import "@etherisc/gif-next/contracts/examples/unpermissioned/SimplePool.sol";
Functions
  • [constructor(registry, productNftId, poolInfo, authorization, initialOwner)]

  • [initialize(registry, productNftId, poolInfo, authorization, initialOwner)]

  • [createBundle(fee, initialAmount, lifetime, filter)]

  • [fundPoolWallet(amount)]

  • [defundPoolWallet(amount)]

  • [approveTokenHandler(token, amount)]

  • [setLocked(locked)]

  • [setWallet(newWallet)]

BasicPool
  • [_initializeBasicPool(registry, productNftId, name, poolInfo, authorization, initialOwner)]

  • [stake(bundleNftId, amount)]

  • [unstake(bundleNftId, amount)]

  • [extend(bundleNftId, lifetimeExtension)]

  • [setBundleLocked(bundleNftId, locked)]

  • [closeBundle(bundleNftId)]

  • [setBundleFee(bundleNftId, fee)]

  • [withdrawBundleFees(bundleNftId, amount)]

  • [setMaxBalanceAmount(maxBalanceAmount)]

  • [setFees(poolFee, stakingFee, performanceFee)]

Pool
  • [getContractLocation(name)]

  • [verifyApplication(applicationNftId, bundleNftId, collateralizationAmount)]

  • [processConfirmedClaim(policyNftId, claimId, amount)]

  • [applicationMatchesBundle(applicationNftId, applicationData, bundleNftId, bundleFilter, collateralizationAmount)]

  • [getInitialPoolInfo()]

  • [__Pool_init(registry, productNftId, name, poolInfo, authorization, initialOwner)]

  • [_setPoolFees(poolFee, stakingFee, performanceFee)]

  • [_setMaxBalanceAmount(maxBalanceAmount)]

  • [_fundPoolWallet(amount)]

  • [_defundPoolWallet(amount)]

  • [_createBundle(bundleOwner, fee, lifetime, filter)]

  • [_setBundleFee(bundleNftId, fee)]

  • [_stake(bundleNftId, amount)]

  • [_unstake(bundleNftId, amount)]

  • [_extend(bundleNftId, lifetimeExtension)]

  • [_setBundleLocked(bundleNftId, locked)]

  • [_closeBundle(bundleNftId)]

  • [_withdrawBundleFees(bundleNftId, amount)]

  • [_processFundedClaim(policyNftId, claimId, availableAmount)]

InstanceLinkedComponent
  • [getInstance()]

  • [getAuthorization()]

  • [withdrawFees(amount)]

  • [_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
  • [__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
  • [__Registerable_init(authority, registry, parentNftId, objectType, isInterceptor, initialOwner, data)]

  • [isActive()]

  • [getRelease()]

  • [getInitialInfo()]

NftOwnable
  • [_checkNftType(nftId, expectedObjectType)]

  • [__NftOwnable_init(registry, initialOwner)]

  • [linkToRegisteredNftId()]

  • [getNftId()]

  • [getOwner()]

  • [_linkToNftOwnable(nftOwnableAddress)]

RegistryLinked
  • [__RegistryLinked_init(registry)]

  • [getRegistry()]

InitializableERC165
  • [__ERC165_init()]

  • [_initializeERC165()]

  • [_registerInterface(interfaceId)]

  • [_registerInterfaceNotInitializing(interfaceId)]

  • [supportsInterface(interfaceId)]

AccessManagedUpgradeable
  • [__AccessManaged_init(initialAuthority)]

  • [__AccessManaged_init_unchained(initialAuthority)]

  • [authority()]

  • [setAuthority(newAuthority)]

  • [isConsumingScheduledOp()]

  • [_setAuthority(newAuthority)]

  • [_checkCanCall(caller, data)]

ContextUpgradeable
  • [__Context_init()]

  • [__Context_init_unchained()]

  • [_msgSender()]

  • [_msgData()]

  • [_contextSuffixLength()]

Initializable
  • [_checkInitializing()]

  • [_disableInitializers()]

  • [_getInitializedVersion()]

  • [_isInitializing()]

Events
IPoolComponent
  • [LogPoolVerifiedByPool(pool, applicationNftId, collateralizationAmount)]

IComponent
  • [LogComponentWalletAddressChanged(oldWallet, newWallet)]

  • [LogComponentWalletTokensTransferred(from, to, amount)]

  • [LogComponentTokenHandlerApproved(tokenHandler, token, limit, isMaxAmount)]

INftOwnable
  • [LogNftOwnableNftLinkedToAddress(nftId, owner)]

IAccessManaged
  • [AuthorityUpdated(authority)]

Initializable
  • [Initialized(version)]

constructor(address registry, NftId productNftId, struct IComponents.PoolInfo poolInfo, contract IAuthorization authorization, address initialOwner) public

initialize(address registry, NftId productNftId, struct IComponents.PoolInfo poolInfo, contract IAuthorization authorization, address initialOwner) public

createBundle(struct Fee fee, uint256 initialAmount, Seconds lifetime, bytes filter) → NftId bundleNftId, uint256 netStakedAmountInt external

fundPoolWallet(Amount amount) external

defundPoolWallet(Amount amount) external

approveTokenHandler(contract IERC20Metadata token, Amount amount) external

setLocked(bool locked) external

setWallet(address newWallet) external

SimpleProduct

import "@etherisc/gif-next/contracts/examples/unpermissioned/SimpleProduct.sol";
Functions
  • [constructor(registry, instanceNftId, name, productInfo, feeInfo, authorization, initialOwner)]

  • [initialize(registry, instanceNftid, name, productInfo, feeInfo, authorization, initialOwner)]

  • [createRisk(id, data)]

  • [updateRisk(id, data)]

  • [setRiskLocked(id, locked)]

  • [closeRisk(id)]

  • [createApplication(applicationOwner, riskId, sumInsured, lifetime, applicationData, bundleNftId, referralId)]

  • [createApplication2(applicationOwner, riskId, sumInsuredAmount, premiumAmount, lifetime, applicationData, bundleNftId, referralId)]

  • [revoke(applicationNftId)]

  • [createPolicy(applicationNftId, requirePremiumPayment, activateAt)]

  • [createPolicy2(applicationNftId, requirePremiumPayment, activateAt, maxPremiumAmount)]

  • [decline(policyNftId)]

  • [expire(policyNftId, expireAt)]

  • [collectPremium(policyNftId, activateAt)]

  • [activate(policyNftId, activateAt)]

  • [adjustActivation(policyNftId, activateAt)]

  • [close(policyNftId)]

  • [submitClaim(policyNftId, claimAmount, submissionData)]

  • [revokeClaim(policyNftId, claimId)]

  • [confirmClaim(policyNftId, claimId, confirmedAmount, processData)]

  • [declineClaim(policyNftId, claimId, processData)]

  • [cancelConfirmedClaim(policyNftId, claimId)]

  • [createPayout(policyNftId, claimId, amount, data)]

  • [cancelPayout(policyNftId, payoutId)]

  • [createPayoutForBeneficiary(policyNftId, claimId, amount, beneficiary, data)]

  • [processPayout(policyNftId, payoutId)]

  • [createOracleRequest(oracleNftId, requestText, expiryAt, synchronous)]

  • [createOracleRequest2(oracleNftId, requestText, expiryAt, synchronous, callbackMethod)]

  • [cancelOracleRequest(requestId)]

  • [fulfillOracleRequestSync(requestId, responseData)]

  • [fulfillOracleRequestAsync(requestId, responseData)]

  • [resend(requestId)]

  • [doSomethingOnlyWhenActive()]

  • [getOracleService()]

  • [approveTokenHandler(token, amount)]

  • [setLocked(locked)]

  • [setWallet(newWallet)]

BasicProduct
  • [setFees(productFee, processingFee)]

  • [_initializeBasicProduct(registry, instanceNftId, name, productInfo, feeInfo, authorization, initialOwner)]

Product
  • [registerComponent(component)]

  • [processFundedClaim(policyNftId, claimId, availableAmount)]

  • [calculatePremium(sumInsuredAmount, riskId, lifetime, applicationData, bundleNftId, referralId)]

  • [calculateNetPremium(sumInsuredAmount, , , )]

  • [getInitialProductInfo()]

  • [getInitialFeeInfo()]

  • [__Product_init(registry, instanceNftId, name, productInfo, feeInfo, authorization, initialOwner)]

  • [_setFees(productFee, processingFee)]

  • [_createRisk(id, data)]

  • [_updateRisk(id, data)]

  • [_setRiskLocked(id, locked)]

  • [_closeRisk(id)]

  • [_createApplication(applicationOwner, riskId, sumInsuredAmount, premiumAmount, lifetime, bundleNftId, referralId, applicationData)]

  • [_revoke(applicationNftId)]

  • [_createPolicy(applicationNftId, activateAt, maxPremiumAmount)]

  • [_decline(policyNftId)]

  • [_expire(policyNftId, expireAt)]

  • [_adjustActivation(policyNftId, activateAt)]

  • [_collectPremium(policyNftId, activateAt)]

  • [_activate(policyNftId, activateAt)]

  • [_close(policyNftId)]

  • [_submitClaim(policyNftId, claimAmount, claimData)]

  • [_revokeClaim(policyNftId, claimId)]

  • [_confirmClaim(policyNftId, claimId, confirmedAmount, data)]

  • [_declineClaim(policyNftId, claimId, data)]

  • [_cancelConfirmedClaim(policyNftId, claimId)]

  • [_createPayout(policyNftId, claimId, amount, data)]

  • [_createPayoutForBeneficiary(policyNftId, claimId, amount, beneficiary, data)]

  • [_processPayout(policyNftId, payoutId)]

  • [_cancelPayout(policyNftId, payoutId)]

  • [_getProductStorage()]

InstanceLinkedComponent
  • [getInstance()]

  • [getAuthorization()]

  • [withdrawFees(amount)]

  • [_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
  • [__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
  • [__Registerable_init(authority, registry, parentNftId, objectType, isInterceptor, initialOwner, data)]

  • [isActive()]

  • [getRelease()]

  • [getInitialInfo()]

NftOwnable
  • [_checkNftType(nftId, expectedObjectType)]

  • [__NftOwnable_init(registry, initialOwner)]

  • [linkToRegisteredNftId()]

  • [getNftId()]

  • [getOwner()]

  • [_linkToNftOwnable(nftOwnableAddress)]

RegistryLinked
  • [__RegistryLinked_init(registry)]

  • [getRegistry()]

InitializableERC165
  • [__ERC165_init()]

  • [_initializeERC165()]

  • [_registerInterface(interfaceId)]

  • [_registerInterfaceNotInitializing(interfaceId)]

  • [supportsInterface(interfaceId)]

AccessManagedUpgradeable
  • [__AccessManaged_init(initialAuthority)]

  • [__AccessManaged_init_unchained(initialAuthority)]

  • [authority()]

  • [setAuthority(newAuthority)]

  • [isConsumingScheduledOp()]

  • [_setAuthority(newAuthority)]

  • [_checkCanCall(caller, data)]

ContextUpgradeable
  • [__Context_init()]

  • [__Context_init_unchained()]

  • [_msgSender()]

  • [_msgData()]

  • [_contextSuffixLength()]

Initializable
  • [_checkInitializing()]

  • [_disableInitializers()]

  • [_getInitializedVersion()]

  • [_isInitializing()]

Events
  • [LogSimpleProductRequestAsyncFulfilled(requestId, responseText, responseDataLength)]

  • [LogSimpleProductRequestSyncFulfilled(requestId, responseText, responseDataLength)]

IComponent
  • [LogComponentWalletAddressChanged(oldWallet, newWallet)]

  • [LogComponentWalletTokensTransferred(from, to, amount)]

  • [LogComponentTokenHandlerApproved(tokenHandler, token, limit, isMaxAmount)]

INftOwnable
  • [LogNftOwnableNftLinkedToAddress(nftId, owner)]

IAccessManaged
  • [AuthorityUpdated(authority)]

Initializable
  • [Initialized(version)]

constructor(address registry, NftId instanceNftId, string name, struct IComponents.ProductInfo productInfo, struct IComponents.FeeInfo feeInfo, contract IAuthorization authorization, address initialOwner) public

initialize(address registry, NftId instanceNftid, string name, struct IComponents.ProductInfo productInfo, struct IComponents.FeeInfo feeInfo, contract IAuthorization authorization, address initialOwner) public

createRisk(string id, bytes data) → RiskId public

updateRisk(RiskId id, bytes data) public

setRiskLocked(RiskId id, bool locked) public

closeRisk(RiskId id) public

createApplication(address applicationOwner, RiskId riskId, uint256 sumInsured, Seconds lifetime, bytes applicationData, NftId bundleNftId, ReferralId referralId) → NftId nftId public

createApplication2(address applicationOwner, RiskId riskId, Amount sumInsuredAmount, Amount premiumAmount, Seconds lifetime, bytes applicationData, NftId bundleNftId, ReferralId referralId) → NftId nftId public

revoke(NftId applicationNftId) public

createPolicy(NftId applicationNftId, bool requirePremiumPayment, Timestamp activateAt) public

createPolicy2(NftId applicationNftId, bool requirePremiumPayment, Timestamp activateAt, Amount maxPremiumAmount) public

decline(NftId policyNftId) public

expire(NftId policyNftId, Timestamp expireAt) → Timestamp public

collectPremium(NftId policyNftId, Timestamp activateAt) public

activate(NftId policyNftId, Timestamp activateAt) public

adjustActivation(NftId policyNftId, Timestamp activateAt) public

close(NftId policyNftId) public

submitClaim(NftId policyNftId, Amount claimAmount, bytes submissionData) → ClaimId public

revokeClaim(NftId policyNftId, ClaimId claimId) public

confirmClaim(NftId policyNftId, ClaimId claimId, Amount confirmedAmount, bytes processData) public

declineClaim(NftId policyNftId, ClaimId claimId, bytes processData) public

cancelConfirmedClaim(NftId policyNftId, ClaimId claimId) public

createPayout(NftId policyNftId, ClaimId claimId, Amount amount, bytes data) → PayoutId public

cancelPayout(NftId policyNftId, PayoutId payoutId) public

createPayoutForBeneficiary(NftId policyNftId, ClaimId claimId, Amount amount, address beneficiary, bytes data) → PayoutId public

processPayout(NftId policyNftId, PayoutId payoutId) → Amount netPayoutAmount, Amount processingFeeAmount public

createOracleRequest(NftId oracleNftId, string requestText, Timestamp expiryAt, bool synchronous) → RequestId public

createOracleRequest2(NftId oracleNftId, string requestText, Timestamp expiryAt, bool synchronous, string callbackMethod) → RequestId public

cancelOracleRequest(RequestId requestId) public

fulfillOracleRequestSync(RequestId requestId, bytes responseData) public

fulfillOracleRequestAsync(RequestId requestId, bytes responseData) public

resend(RequestId requestId) public

doSomethingOnlyWhenActive() → bool public

getOracleService() → contract IOracleService public

approveTokenHandler(contract IERC20Metadata token, Amount amount) external

setLocked(bool locked) external

setWallet(address newWallet) external

LogSimpleProductRequestAsyncFulfilled(RequestId requestId, string responseText, uint256 responseDataLength) event

LogSimpleProductRequestSyncFulfilled(RequestId requestId, string responseText, uint256 responseDataLength) event