Instance

Contains the instance related contracts.

Contracts

InstanceAdmin

import "@etherisc/gif-next/contracts/instance/InstanceAdmin.sol";
Functions
  • [constructor(accessManager)]

  • [completeSetup(registry, authorization, release, instance)]

  • [_setupServices(authorization)]

  • [_createInstanceTargets(instanceTargetName)]

  • [_createInstanceTarget(target, name)]

  • [initializeComponentAuthorization(componentAddress, expectedType)]

  • [createRole(name, adminRoleId, maxMemberCount)]

  • [setRoleActive(roleId, active)]

  • [grantRole(roleId, account)]

  • [revokeRole(roleId, account)]

  • [createTarget(target, name)]

  • [authorizeFunctions(target, roleId, functions)]

  • [unauthorizeFunctions(target, functions)]

  • [setInstanceLocked(locked)]

  • [setTargetLocked(target, locked)]

  • [setContractLocked(target, locked)]

  • [getInstanceAuthorization()]

  • [_createTargetAuthorizations(authorization)]

AccessAdmin
  • [initialize(authority, adminName)]

  • [__AccessAdmin_init(authority, adminName)]

  • [getRelease()]

  • [getRegistry()]

  • [getLinkedNftId()]

  • [getAuthorization()]

  • [isLocked()]

  • [roles()]

  • [getRoleId(idx)]

  • [getAdminRole()]

  • [getPublicRole()]

  • [roleExists(roleId)]

  • [getRoleForName(name)]

  • [getRoleInfo(roleId)]

  • [isRoleActive(roleId)]

  • [isRoleCustom(roleId)]

  • [roleMembers(roleId)]

  • [getRoleMember(roleId, idx)]

  • [isRoleMember(roleId, account)]

  • [isRoleAdmin(roleId, account)]

  • [targetExists(target)]

  • [targets()]

  • [getTargetAddress(idx)]

  • [getTargetInfo(target)]

  • [getTargetForName(name)]

  • [isTargetLocked(target)]

  • [authorizedFunctions(target)]

  • [getAuthorizedFunction(target, idx)]

  • [getFunctionInfo(target, selector)]

  • [_linkToNftOwnable(registerable)]

  • [_createRoles(authorization)]

  • [_createRole(roleId, info, revertOnExistingRole)]

  • [_setRoleActive(roleId, active)]

  • [_grantRoleToAccount(roleId, account)]

  • [_revokeRoleFromAccount(roleId, account)]

  • [_getOrCreateTargetRoleIdAndName(target, targetName, targetType)]

  • [_createTarget(target, targetName, targetType, checkAuthority)]

  • [_createTargetUnchecked(target, targetName, targetType, managed)]

  • [_setTargetLocked(target, locked)]

  • [_authorizeFunctions(authorization, target, roleId)]

  • [_authorizeTargetFunctions(target, roleId, functions, onlyComponentOrContractTargets, addFunctions)]

  • [_updateFunctionAccess(target, roleId, func, addFunction)]

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
IAccessAdmin
  • [LogAccessAdminRoleCreated(admin, roleId, targetType, roleAdminId, name)]

  • [LogAccessAdminTargetCreated(admin, name, managed, target, roleId)]

  • [LogAccessAdminRoleActivatedSet(admin, roleId, active, lastUpdateIn)]

  • [LogAccessAdminRoleGranted(admin, account, roleName)]

  • [LogAccessAdminRoleRevoked(admin, account, roleName)]

  • [LogAccessAdminTargetLockedSet(admin, target, locked, lastUpdateIn)]

  • [LogAccessAdminFunctionGranted(admin, target, func, lastUpdateIn)]

IAccessManaged
  • [AuthorityUpdated(authority)]

Initializable
  • [Initialized(version)]

onlyInstanceService() modifier

constructor(address accessManager) public

Only used for master instance admin.

completeSetup(address registry, address authorization, VersionPart release, address instance) external

Completes the initialization of this instance admin using the provided instance, registry and version. Important: Initialization of instance admin is only complete after calling this function. Important: The instance MUST be registered and all instance supporting contracts must be wired to this instance.

_setupServices(contract IAuthorization authorization) internal

grants the service roles to the service addresses based on the authorization specification. Service addresses used for the granting are determined by the registry and the release of this instance.

_createInstanceTargets(string instanceTargetName) internal

_createInstanceTarget(address target, string name) internal

initializeComponentAuthorization(address componentAddress, ObjectType expectedType) external

Initializes the authorization for the specified component. Important: The component MUST be registered.

createRole(string name, RoleId adminRoleId, uint32 maxMemberCount) → RoleId roleId external

Creates a custom role.

setRoleActive(RoleId roleId, bool active) external

Activtes/pauses the specified role.

grantRole(RoleId roleId, address account) external

Grants the provided role to the specified account

revokeRole(RoleId roleId, address account) external

Revokes the provided role from the specified account

createTarget(address target, string name) → RoleId contractRoleId external

Create a new contract target. The target needs to be an access managed contract.

authorizeFunctions(address target, RoleId roleId, struct IAccess.FunctionInfo[] functions) external

Add function authorizations for the specified component or custom target.

unauthorizeFunctions(address target, struct IAccess.FunctionInfo[] functions) external

Removes function authorizations for the specified component or custom target.

setInstanceLocked(bool locked) external

locks the instance and all its releated targets including component and custom targets.

setTargetLocked(address target, bool locked) external

setContractLocked(address target, bool locked) external

getInstanceAuthorization() → contract IAuthorization instanceAuthorizaion external

Returns the instance authorization specification used to set up this instance admin.

_createTargetAuthorizations(contract IAuthorization authorization) internal

InstanceService

import "@etherisc/gif-next/contracts/instance/InstanceService.sol";
Modifiers
Functions
  • [createRole(roleName, adminRoleId, maxMemberCount)]

  • [setRoleActive(roleId, active)]

  • [grantRole(roleId, account)]

  • [revokeRole(roleId, account)]

  • [createTarget(target, name)]

  • [authorizeFunctions(target, roleId, functions)]

  • [unauthorizeFunctions(target, functions)]

  • [setTargetLocked(target, locked)]

  • [setInstanceLocked(locked)]

  • [createInstance(allowAnyToken)]

  • [setStakingLockingPeriod(stakeLockingPeriod)]

  • [setStakingRewardRate(rewardRate)]

  • [setStakingMaxAmount(maxStakedAmount)]

  • [refillInstanceRewardReserves(rewardProvider, dipAmount)]

  • [withdrawInstanceRewardReserves(dipAmount)]

  • [upgradeInstanceReader()]

  • [setAndRegisterMasterInstance(instanceAddress)]

  • [upgradeMasterInstanceReader(instanceReaderAddress)]

  • [getMasterInstanceReader()]

  • [_cloneNewInstanceAdmin()]

  • [_createInstance(instanceAdmin, instanceOwner, allowAnyToken)]

  • [_initialize(owner, data)]

  • [_checkInstance(instanceAddress, expectedRelease)]

  • [_getDomain()]

Service
  • [__Service_init(authority, registry, initialOwner)]

  • [getDomain()]

  • [getVersion()]

  • [getRoleId()]

  • [_getServiceAddress(domain)]

ReentrancyGuardUpgradeable
  • [__ReentrancyGuard_init()]

  • [__ReentrancyGuard_init_unchained()]

  • [_reentrancyGuardEntered()]

Versionable
  • [initializeVersionable(activatedBy, data)]

  • [upgradeVersionable(data)]

  • [_upgrade(data)]

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
IInstanceService
  • [LogInstanceServiceInstanceLocked(instanceNftId, locked)]

  • [LogInstanceServiceInstanceCreated(instanceNftId, instance)]

  • [LogInstanceServiceMasterInstanceReaderUpgraded(instanceNfId, newInstanceReader)]

  • [LogInstanceServiceInstanceReaderUpgraded(instanceNfId, newInstanceReader)]

INftOwnable
  • [LogNftOwnableNftLinkedToAddress(nftId, owner)]

IAccessManaged
  • [AuthorityUpdated(authority)]

Initializable
  • [Initialized(version)]

onlyInstance() modifier

createRole(string roleName, RoleId adminRoleId, uint32 maxMemberCount) → RoleId roleId external

Creates a new custom role for the calling instance.

setRoleActive(RoleId roleId, bool active) external

Sets the specified custom role as active or inactive for the calling instance.

grantRole(RoleId roleId, address account) external

Grants the specified custom role to the specified account for the calling instance.

revokeRole(RoleId roleId, address account) external

Revokes the specified custom role from the specified account for the calling instance.

createTarget(address target, string name) → RoleId contractRoleId external

Creates a new custom target for the calling instance. All custom trargets are created with a corresponding contract role.

authorizeFunctions(address target, RoleId roleId, struct IAccess.FunctionInfo[] functions) external

Authorizes the specified functions for the specified target.

unauthorizeFunctions(address target, struct IAccess.FunctionInfo[] functions) external

Removes any role authorization for the specified functions.

setTargetLocked(address target, bool locked) external

Locks/unlocks the specified target constrolled by the corresponding instance admin.

setInstanceLocked(bool locked) external

Locks the complete instance, including all its components.

createInstance(bool allowAnyToken) → contract IInstance instance, NftId instanceNftId external

Creates a new instance. The caller becomes the owner of the new instance. Creation of a new instance is achieved by this service through the creation and registration of a new clone of the master instance and then setting up the initial wiring and authorization of the necessary components.

setStakingLockingPeriod(Seconds stakeLockingPeriod) external

setStakingRewardRate(UFixed rewardRate) external

setStakingMaxAmount(Amount maxStakedAmount) external

refillInstanceRewardReserves(address rewardProvider, Amount dipAmount) → Amount newBalance external

withdrawInstanceRewardReserves(Amount dipAmount) → Amount newBalance external

Defunds the staking reward reserves for the specified target.

upgradeInstanceReader() external

setAndRegisterMasterInstance(address instanceAddress) → NftId masterInstanceNftId external

upgradeMasterInstanceReader(address instanceReaderAddress) external

getMasterInstanceReader() → address external

_cloneNewInstanceAdmin() → contract InstanceAdmin clonedAdmin internal

create new cloned instance admin function used to setup a new instance

_createInstance(contract InstanceAdmin instanceAdmin, address instanceOwner, bool allowAnyToken) → contract IInstance internal

create new cloned instance function used to setup a new instance

_initialize(address owner, bytes data) internal

top level initializer (upgradable contract)

_checkInstance(address instanceAddress, VersionPart expectedRelease) internal

_getDomain() → ObjectType internal

IInstanceService

import "@etherisc/gif-next/contracts/instance/IInstanceService.sol";
Functions
  • [createRole(roleName, adminRoleId, maxMemberCount)]

  • [setRoleActive(roleId, active)]

  • [grantRole(roleId, account)]

  • [revokeRole(roleId, account)]

  • [createTarget(target, name)]

  • [authorizeFunctions(target, roleId, functions)]

  • [unauthorizeFunctions(target, functions)]

  • [setTargetLocked(target, locked)]

  • [setInstanceLocked(locked)]

  • [createInstance(allowAnyToken)]

  • [upgradeInstanceReader()]

  • [upgradeMasterInstanceReader(instanceReaderAddress)]

  • [setStakingLockingPeriod(stakeLockingPeriod)]

  • [setStakingRewardRate(rewardRate)]

  • [setStakingMaxAmount(maxStakedAmount)]

  • [refillInstanceRewardReserves(rewardProvider, dipAmount)]

  • [withdrawInstanceRewardReserves(dipAmount)]

IService
  • [getDomain()]

  • [getRoleId()]

IVersionable
  • [initializeVersionable(activatedBy, activationData)]

  • [upgradeVersionable(upgradeData)]

  • [getVersion()]

IRegisterable
  • [isActive()]

  • [getInitialInfo()]

IRelease
  • [getRelease()]

INftOwnable
  • [linkToRegisteredNftId()]

  • [getNftId()]

  • [getOwner()]

IRegistryLinked
  • [getRegistry()]

IERC165
  • [supportsInterface(interfaceId)]

IAccessManaged
  • [authority()]

  • [setAuthority()]

  • [isConsumingScheduledOp()]

Events
  • [LogInstanceServiceInstanceLocked(instanceNftId, locked)]

  • [LogInstanceServiceInstanceCreated(instanceNftId, instance)]

  • [LogInstanceServiceMasterInstanceReaderUpgraded(instanceNfId, newInstanceReader)]

  • [LogInstanceServiceInstanceReaderUpgraded(instanceNfId, newInstanceReader)]

INftOwnable
  • [LogNftOwnableNftLinkedToAddress(nftId, owner)]

IAccessManaged
  • [AuthorityUpdated(authority)]

createRole(string roleName, RoleId adminRoleId, uint32 maxMemberCount) → RoleId roleId external

Creates a new custom role for the calling instance.

setRoleActive(RoleId roleId, bool active) external

Sets the specified custom role as active or inactive for the calling instance.

grantRole(RoleId roleId, address account) external

Grants the specified custom role to the specified account for the calling instance.

revokeRole(RoleId roleId, address account) external

Revokes the specified custom role from the specified account for the calling instance.

createTarget(address target, string name) → RoleId contractRoleId external

Creates a new custom target for the calling instance. All custom trargets are created with a corresponding contract role.

authorizeFunctions(address target, RoleId roleId, struct IAccess.FunctionInfo[] functions) external

Authorizes the specified functions for the specified target.

unauthorizeFunctions(address target, struct IAccess.FunctionInfo[] functions) external

Removes any role authorization for the specified functions.

setTargetLocked(address target, bool locked) external

Locks/unlocks the specified target constrolled by the corresponding instance admin.

setInstanceLocked(bool locked) external

Locks the complete instance, including all its components.

createInstance(bool allowAnyToken) → contract IInstance instance, NftId instanceNftId external

Creates a new instance. The caller becomes the owner of the new instance. Creation of a new instance is achieved by this service through the creation and registration of a new clone of the master instance and then setting up the initial wiring and authorization of the necessary components.

upgradeInstanceReader() external

upgradeMasterInstanceReader(address instanceReaderAddress) external

setStakingLockingPeriod(Seconds stakeLockingPeriod) external

setStakingRewardRate(UFixed rewardRate) external

setStakingMaxAmount(Amount maxStakedAmount) external

refillInstanceRewardReserves(address rewardProvider, Amount dipAmount) → Amount newBalance external

withdrawInstanceRewardReserves(Amount dipAmount) → Amount newBalance external

Defunds the staking reward reserves for the specified target.

LogInstanceServiceInstanceLocked(NftId instanceNftId, bool locked) event

LogInstanceServiceInstanceCreated(NftId instanceNftId, address instance) event

LogInstanceServiceMasterInstanceReaderUpgraded(NftId instanceNfId, address newInstanceReader) event

LogInstanceServiceInstanceReaderUpgraded(NftId instanceNfId, address newInstanceReader) event

InstanceReader

import "@etherisc/gif-next/contracts/instance/InstanceReader.sol";

Central reader contract for a specific instance. Provides reading functions for all instance data and related component data.

Functions
  • [initialize()]

  • [initializeWithInstance(instanceAddress)]

  • [getRegistry()]

  • [getInstanceNftId()]

  • [getInstance()]

  • [getComponentInfo(componentNftId)]

  • [getToken(componentNftId)]

  • [getWallet(componentNftId)]

  • [getTokenHandler(componentNftId)]

  • [getBalanceAmount(targetNftId)]

  • [getFeeAmount(targetNftId)]

  • [getLockedAmount(targetNftId)]

  • [products()]

  • [getProduct(idx)]

  • [getProductInfo(productNftId)]

  • [getFeeInfo(productNftId)]

  • [risks(productNftId)]

  • [activeRisks(productNftId)]

  • [getRiskId(productNftId, idx)]

  • [getActiveRiskId(productNftId, idx)]

  • [isProductRisk(productNftId, riskId)]

  • [getRiskInfo(riskId)]

  • [getRiskState(riskId)]

  • [policiesForRisk(riskId)]

  • [getPolicyForRisk(riskId, idx)]

  • [policiesForBundle(bundleNftId)]

  • [getPolicyForBundle(bundleNftId, idx)]

  • [getPolicyInfo(policyNftId)]

  • [getPolicyState(policyNftId)]

  • [policyIsActive(policyNftId)]

  • [claims(policyNftId)]

  • [getClaimId(idx)]

  • [getClaimInfo(policyNftId, claimId)]

  • [getClaimState(policyNftId, claimId)]

  • [getRemainingClaimableAmount(policyNftId)]

  • [payouts(policyNftId, claimId)]

  • [getPayoutId(claimId, idx)]

  • [getPayoutInfo(policyNftId, payoutId)]

  • [getPayoutState(policyNftId, payoutId)]

  • [getPremiumInfo(policyNftId)]

  • [getPremiumState(policyNftId)]

  • [getRequestInfo(requestId)]

  • [getRequestState(requestId)]

  • [getPoolInfo(poolNftId)]

  • [bundles(poolNftId)]

  • [activeBundles(poolNftId)]

  • [getBundleNftId(poolNftId, idx)]

  • [getActiveBundleNftId(poolNftId, idx)]

  • [getBundleInfo(bundleNftId)]

  • [getBundleState(bundleNftId)]

  • [getDistributorTypeInfo(distributorType)]

  • [getDistributorInfo(distributorNftId)]

  • [toReferralId(distributionNftId, referralCode)]

  • [isReferralValid(distributionNftId, referralId)]

  • [getReferralInfo(referralId)]

  • [getDiscountPercentage(referralId)]

  • [roles()]

  • [getRoleId(idx)]

  • [getRoleForName(name)]

  • [getInstanceOwnerRole()]

  • [getRoleInfo(roleId)]

  • [roleExists(roleId)]

  • [isRoleCustom(roleId)]

  • [isRoleActive(roleId)]

  • [roleMembers(roleId)]

  • [getRoleMember(roleId, idx)]

  • [isRoleMember(roleId, account)]

  • [isRoleAdmin(roleId, account)]

  • [targets()]

  • [getTargetAddress(idx)]

  • [getTargetInfo(target)]

  • [targetExists(target)]

  • [isLocked(target)]

  • [authorizedFunctions(target)]

  • [getAuthorizedFunction(target, idx)]

  • [toFunction(signature, name)]

  • [getInstanceAdmin()]

  • [getBundleSet()]

  • [getRiskSet()]

  • [getMetadata(key)]

  • [getState(key)]

  • [toInt(value)]

  • [toString(str)]

  • [toUFixed(value, exp)]

  • [_toPolicyKey(policyNftId)]

  • [_toPremiumKey(policyNftId)]

  • [_toBundleKey(poolNftId)]

  • [_toComponentKey(componentNftId)]

initialize() public

This initializer needs to be called from the instance itself.

initializeWithInstance(address instanceAddress) public

Initializer to upgrade instance reader via instance service

getRegistry() → contract IRegistry registry public

Returns the registry this instance is registered in.

getInstanceNftId() → NftId instanceNftid public

Returns the instance NFT ID.

getInstance() → contract IInstance instance public

Returns the instance contract.

getComponentInfo(NftId componentNftId) → struct IComponents.ComponentInfo info public

Returns the component info for the given component NFT ID.

getToken(NftId componentNftId) → contract IERC20Metadata token public

Returns the registered token for the given component NFT ID.

getWallet(NftId componentNftId) → address wallet public

Returns the current wallet address for the given component NFT ID. The wallet address is either the component’s own address or any other wallet address specified by the component owner. The wallet holds the component’s funds. Tokens collected by the component are transferred to the wallet and Tokens distributed from the component are transferred from this wallet.

getTokenHandler(NftId componentNftId) → contract TokenHandler tokenHandler public

Returns the token handler for the given component NFT ID. The token handler manages all transfers from/to the component’s wallet. To allow a component to collect funds from an account, it has to create a corresponding allowance from the account to the address of the component’s token handler.

getBalanceAmount(NftId targetNftId) → Amount external

Returns the current token balance amount for the given component NFT ID. The balance amount includes the fee amount.

getFeeAmount(NftId targetNftId) → Amount external

Returns the current fee amount for the given NFT ID. The target NFT ID may reference a component, a distributor or a bundle.

getLockedAmount(NftId targetNftId) → Amount external

Returns the currently locked amount for the given NFT ID. The target NFT ID may reference a pool or a bundle.

products() → uint256 productCount public

Returns the number of registered products.

getProduct(uint256 idx) → NftId productNftId public

Returns th product NFT ID for the given index.

getProductInfo(NftId productNftId) → struct IComponents.ProductInfo info public

Returns the product info for the given product NFT ID.

getFeeInfo(NftId productNftId) → struct IComponents.FeeInfo feeInfo public

Returns the current fee settings for the given product NFT ID.

risks(NftId productNftId) → uint256 riskCount public

Returns the total number of registered risks for the specified product.

activeRisks(NftId productNftId) → uint256 activeRiskCount public

Returns the number of active risks for the specified product.

getRiskId(NftId productNftId, uint256 idx) → RiskId riskId public

Returns the risk ID for the given product NFT ID and (registered) risk index.

getActiveRiskId(NftId productNftId, uint256 idx) → RiskId riskId public

Returns the active risk ID for the given product NFT ID and (active) risk index.

isProductRisk(NftId productNftId, RiskId riskId) → bool exists public

Returns true if the specified risk exists for the given product NFT ID.

getRiskInfo(RiskId riskId) → struct IRisk.RiskInfo info public

Returns the risk info for the given risk ID.

getRiskState(RiskId riskId) → StateId stateId public

Returns the risk state for the given risk ID.

policiesForRisk(RiskId riskId) → uint256 linkedPolicies public

Returns the number of linked policies for the given risk ID.

getPolicyForRisk(RiskId riskId, uint256 idx) → NftId linkedPolicyNftId public

Returns the linked policy NFT ID for the given risk ID and index.

policiesForBundle(NftId bundleNftId) → uint256 linkedPolicies public

Returns the number of linked policies for the given bundle NFT ID.

getPolicyForBundle(NftId bundleNftId, uint256 idx) → NftId linkedPolicyNftId public

Returns the linked policy NFT ID for the given risk ID and index.

getPolicyInfo(NftId policyNftId) → struct IPolicy.PolicyInfo info public

Returns the info for the given policy NFT ID.

getPolicyState(NftId policyNftId) → StateId state public

Returns the state for the given policy NFT ID.

policyIsActive(NftId policyNftId) → bool isCloseable public

Returns true iff policy is active.

claims(NftId policyNftId) → uint16 claimCount public

Returns the number of claims for the given policy NFT ID.

getClaimId(uint256 idx) → ClaimId claimId public

Returns the claim ID for the given policy NFT ID and index.

getClaimInfo(NftId policyNftId, ClaimId claimId) → struct IPolicy.ClaimInfo info public

Returns the claim info for the given policy NFT ID and claim ID.

getClaimState(NftId policyNftId, ClaimId claimId) → StateId state public

Returns the current claim state for the given policy NFT ID and claim ID.

getRemainingClaimableAmount(NftId policyNftId) → Amount remainingClaimableAmount public

Returns the remaining claimable amount for the given policy NFT ID. The remaining claimable amount is the difference between the sum insured amount and total approved claim amounts so far.

payouts(NftId policyNftId, ClaimId claimId) → uint24 payoutCount public

Returns the number of payouts for the given policy NFT ID and claim ID.

getPayoutId(ClaimId claimId, uint24 idx) → PayoutId payoutId public

Returns the payout ID for the given claim ID and index.

getPayoutInfo(NftId policyNftId, PayoutId payoutId) → struct IPolicy.PayoutInfo info public

Returns the payout info for the given policy NFT ID and payout ID.

getPayoutState(NftId policyNftId, PayoutId payoutId) → StateId state public

Returns the payout state for the given policy NFT ID and payout ID.

getPremiumInfo(NftId policyNftId) → struct IPolicy.PremiumInfo info public

Returns the premium info for the given policy NFT ID.

getPremiumState(NftId policyNftId) → StateId state public

Returns the premium state for the given policy NFT ID.

getRequestInfo(RequestId requestId) → struct IOracle.RequestInfo requestInfo public

Returns the request info for the given oracle request ID.

getRequestState(RequestId requestId) → StateId state public

Returns the request info for the given oracle request ID.

getPoolInfo(NftId poolNftId) → struct IComponents.PoolInfo info public

Returns the pool info for the given pool NFT ID.

bundles(NftId poolNftId) → uint256 bundleCount public

Returns the total number of registered bundles for the given pool.

activeBundles(NftId poolNftId) → uint256 bundleCount public

Returns the number of active bundles for the given pool.

getBundleNftId(NftId poolNftId, uint256 idx) → NftId bundleNftId public

Returns the bunde NFT ID for the given pool and index.

getActiveBundleNftId(NftId poolNftId, uint256 idx) → NftId bundleNftId public

Returns the active bunde NFT ID for the given pool and index.

getBundleInfo(NftId bundleNftId) → struct IBundle.BundleInfo info public

Returns the bundle info for the given bundle NFT ID.

getBundleState(NftId bundleNftId) → StateId state public

Returns the bundle state for the given bundle NFT ID.

getDistributorTypeInfo(DistributorType distributorType) → struct IDistribution.DistributorTypeInfo info public

getDistributorInfo(NftId distributorNftId) → struct IDistribution.DistributorInfo info public

toReferralId(NftId distributionNftId, string referralCode) → ReferralId referralId public

isReferralValid(NftId distributionNftId, ReferralId referralId) → bool isValid external

getReferralInfo(ReferralId referralId) → struct IDistribution.ReferralInfo info public

getDiscountPercentage(ReferralId referralId) → UFixed discountPercentage, ReferralStatus status public

roles() → uint256 public

Returns the number of defined roles.

getRoleId(uint256 idx) → RoleId roleId public

Returns the role ID for the given index.

getRoleForName(string name) → RoleId roleId, bool exists public

Returns the role ID for the given index.

getInstanceOwnerRole() → RoleId roleId public

Returns the role ID for the instance owner role. This role may be used as a "root" admin role for other custom roles defined for this instance.

getRoleInfo(RoleId roleId) → struct IAccess.RoleInfo roleInfo public

Returns the role info for the given role ID.

roleExists(RoleId roleId) → bool exists public

Returns true iff the provided role ID is defined for this instance.

isRoleCustom(RoleId roleId) → bool isCustom public

Returns true iff the provided role ID represents a custom role ID.

isRoleActive(RoleId roleId) → bool isActive public

Returns true iff the provided role ID is active.

roleMembers(RoleId roleId) → uint256 numberOfMembers public

Returns the number of members (accounts) for the given role ID.

getRoleMember(RoleId roleId, uint256 idx) → address account public

Returns the member (account address) for the given role ID and index.

isRoleMember(RoleId roleId, address account) → bool isMember public

Returns true iff the given account is a member of the specified role ID.

isRoleAdmin(RoleId roleId, address account) → bool isMember public

Returns true iff the given account is an admin of the specified role ID. Role admins may grant and revoke the role to other accounts.

targets() → uint256 targetCount public

Returns the number of targets (contracts) defined for this instance.

getTargetAddress(uint256 idx) → address target public

Returns the target address for the given index.

getTargetInfo(address target) → struct IAccess.TargetInfo targetInfo public

Returns the target info for the given target address.

targetExists(address target) → bool exists public

Returns true iff the given target is defined for this instance.

isLocked(address target) → bool public

Returns true iff the given target is locked.

authorizedFunctions(address target) → uint256 numberOfFunctions external

Returns the number of authorized functions for the given target.

getAuthorizedFunction(address target, uint256 idx) → struct IAccess.FunctionInfo func, RoleId roleId external

Returns the authorized function info for the given target and index.

toFunction(bytes4 signature, string name) → struct IAccess.FunctionInfo public

Returns a function info for the given function signature and function name. The function signature must not be zero and the function name must not be empty.

getInstanceAdmin() → contract InstanceAdmin instanceAdmin external

getBundleSet() → contract BundleSet bundleSet external

getRiskSet() → contract RiskSet riskSet external

getMetadata(Key32 key) → struct IBaseStore.Metadata metadata public

getState(Key32 key) → StateId state public

toInt(UFixed value) → uint256 public

toString(Str str) → string public

toUFixed(uint256 value, int8 exp) → UFixed public

_toPolicyKey(NftId policyNftId) → Key32 internal

_toPremiumKey(NftId policyNftId) → Key32 internal

_toBundleKey(NftId poolNftId) → Key32 internal

_toComponentKey(NftId componentNftId) → Key32 internal

Instance

import "@etherisc/gif-next/contracts/instance/Instance.sol";
Functions
  • [initialize(instanceContracts, registry, release, initialOwner, tokenRegistryDisabled)]

  • [setInstanceLocked(locked)]

  • [upgradeInstanceReader()]

  • [registerProduct(product, token)]

  • [setStakingLockingPeriod(stakeLockingPeriod)]

  • [setStakingRewardRate(rewardRate)]

  • [setStakingMaxAmount(maxStakedAmount)]

  • [refillStakingRewardReserves(dipAmount)]

  • [withdrawStakingRewardReserves(dipAmount)]

  • [createRole(roleName, adminRoleId, maxMemberCount)]

  • [setRoleActive(roleId, active)]

  • [grantRole(roleId, account)]

  • [revokeRole(roleId, account)]

  • [createTarget(target, name)]

  • [setTargetLocked(target, locked)]

  • [authorizeFunctions(target, roleId, functions)]

  • [unauthorizeFunctions(target, functions)]

  • [setInstanceReader(instanceReader)]

  • [isInstanceLocked()]

  • [isTargetLocked(target)]

  • [products()]

  • [getProduct(idx)]

  • [getInstanceReader()]

  • [getBundleSet()]

  • [getRiskSet()]

  • [getInstanceAdmin()]

  • [getInstanceStore()]

  • [getProductStore()]

  • [isTokenRegistryDisabled()]

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
IInstance
  • [LogInstanceCustomRoleCreated(roleId, roleName, adminRoleId, maxMemberCount)]

  • [LogInstanceCustomRoleActiveSet(roleId, active, caller)]

  • [LogInstanceCustomRoleGranted(roleId, account, caller)]

  • [LogInstanceCustomRoleRevoked(roleId, account, caller)]

  • [LogInstanceCustomTargetCreated(target, targetRoleId, name)]

  • [LogInstanceTargetLocked(target, locked)]

  • [LogInstanceCustomTargetFunctionRoleSet(target, selectors, roleId)]

INftOwnable
  • [LogNftOwnableNftLinkedToAddress(nftId, owner)]

IAccessManaged
  • [AuthorityUpdated(authority)]

Initializable
  • [Initialized(version)]

onlyCustomRoleAdmin(RoleId roleId) modifier

initialize(struct IInstance.InstanceContracts instanceContracts, contract IRegistry registry, VersionPart release, address initialOwner, bool tokenRegistryDisabled) external

setInstanceLocked(bool locked) external

Locks/unlocks the complete instance, including all its components.

upgradeInstanceReader() external

Upgrades the instance reader to the specified target.

registerProduct(address product, address token) → NftId productNftId external

Register a product with the instance.

setStakingLockingPeriod(Seconds stakeLockingPeriod) external

Sets the duration for locking new stakes on this instance..

setStakingRewardRate(UFixed rewardRate) external

Sets the staking reward rate [apr] for this instance.

setStakingMaxAmount(Amount maxStakedAmount) external

Sets the maximum staked amount for this instance.

refillStakingRewardReserves(Amount dipAmount) → Amount newRewardReserveBalance external

Refills the staking reward reserves for the specified target.

withdrawStakingRewardReserves(Amount dipAmount) → Amount newRewardReserveBalance external

Defunds the staking reward reserves for the specified target.

createRole(string roleName, RoleId adminRoleId, uint32 maxMemberCount) → RoleId roleId external

Creates a new custom role for the calling instance. Custom roles are intended to be used for access control of custom components and its helper contracts. Custom roles are not intended to be used as target roles for custom contracts.

setRoleActive(RoleId roleId, bool active) external

Activates/deactivates the specified role. Only instance owner or account with role admin role can call this function.

grantRole(RoleId roleId, address account) external

Grants the specified role to the account. Only active roles can be granted. Only instance owner or account with role admin role can call this function.

revokeRole(RoleId roleId, address account) external

Revokes the specified role from the account. Only instance owner or account with role admin role can call this function.

createTarget(address target, string name) → RoleId targetRoleId external

Creates a new custom target. Custom targets are intended to be used for access control helper contracts of components. Custom targets are not intended to be used for components.

setTargetLocked(address target, bool locked) external

Locks/unlocks the specified target.

authorizeFunctions(address target, RoleId roleId, struct IAccess.FunctionInfo[] functions) external

Authorizes the specified functions for the target and provided role.

unauthorizeFunctions(address target, struct IAccess.FunctionInfo[] functions) external

Removes any role authorization for the specified functions.

setInstanceReader(contract InstanceReader instanceReader) external

Sets the instance reader for the instance. Permissioned: only the instance service may call this function.

isInstanceLocked() → bool external

returns the overall locking state of the instance (including all components)

isTargetLocked(address target) → bool external

returns the locking state of the specified target

products() → uint256 productCount external

getProduct(uint256 idx) → NftId productNftId external

getInstanceReader() → contract InstanceReader external

getBundleSet() → contract BundleSet external

getRiskSet() → contract RiskSet external

getInstanceAdmin() → contract InstanceAdmin external

getInstanceStore() → contract InstanceStore external

getProductStore() → contract ProductStore external

isTokenRegistryDisabled() → bool external

IInstance

import "@etherisc/gif-next/contracts/instance/IInstance.sol";
Functions
  • [setInstanceLocked(locked)]

  • [upgradeInstanceReader()]

  • [setInstanceReader(instanceReader)]

  • [setStakingLockingPeriod(stakeLockingPeriod)]

  • [setStakingRewardRate(rewardRate)]

  • [setStakingMaxAmount(maxStakedAmount)]

  • [refillStakingRewardReserves(dipAmount)]

  • [withdrawStakingRewardReserves(dipAmount)]

  • [setTargetLocked(target, locked)]

  • [registerProduct(product, token)]

  • [createRole(roleName, adminRoleId, maxMemberCount)]

  • [setRoleActive(roleId, active)]

  • [grantRole(roleId, account)]

  • [revokeRole(roleId, account)]

  • [createTarget(target, name)]

  • [authorizeFunctions(target, roleId, functions)]

  • [unauthorizeFunctions(target, functions)]

  • [isInstanceLocked()]

  • [isTargetLocked(target)]

  • [products()]

  • [getProduct(idx)]

  • [getInstanceReader()]

  • [getBundleSet()]

  • [getRiskSet()]

  • [getInstanceAdmin()]

  • [getInstanceStore()]

  • [getProductStore()]

  • [isTokenRegistryDisabled()]

IRegisterable
  • [isActive()]

  • [getInitialInfo()]

IRelease
  • [getRelease()]

INftOwnable
  • [linkToRegisteredNftId()]

  • [getNftId()]

  • [getOwner()]

IRegistryLinked
  • [getRegistry()]

IERC165
  • [supportsInterface(interfaceId)]

IAccessManaged
  • [authority()]

  • [setAuthority()]

  • [isConsumingScheduledOp()]

Events
  • [LogInstanceCustomRoleCreated(roleId, roleName, adminRoleId, maxMemberCount)]

  • [LogInstanceCustomRoleActiveSet(roleId, active, caller)]

  • [LogInstanceCustomRoleGranted(roleId, account, caller)]

  • [LogInstanceCustomRoleRevoked(roleId, account, caller)]

  • [LogInstanceCustomTargetCreated(target, targetRoleId, name)]

  • [LogInstanceTargetLocked(target, locked)]

  • [LogInstanceCustomTargetFunctionRoleSet(target, selectors, roleId)]

INftOwnable
  • [LogNftOwnableNftLinkedToAddress(nftId, owner)]

IAccessManaged
  • [AuthorityUpdated(authority)]

setInstanceLocked(bool locked) external

Locks/unlocks the complete instance, including all its components.

upgradeInstanceReader() external

Upgrades the instance reader to the specified target.

setInstanceReader(contract InstanceReader instanceReader) external

Sets the instance reader for the instance. Permissioned: only the instance service may call this function.

setStakingLockingPeriod(Seconds stakeLockingPeriod) external

Sets the duration for locking new stakes on this instance..

setStakingRewardRate(UFixed rewardRate) external

Sets the staking reward rate [apr] for this instance.

setStakingMaxAmount(Amount maxStakedAmount) external

Sets the maximum staked amount for this instance.

refillStakingRewardReserves(Amount dipAmount) → Amount newBalance external

Refills the staking reward reserves for the specified target.

withdrawStakingRewardReserves(Amount dipAmount) → Amount newBalance external

Defunds the staking reward reserves for the specified target.

setTargetLocked(address target, bool locked) external

Locks/unlocks the specified target.

registerProduct(address product, address token) → NftId productNftId external

Register a product with the instance.

createRole(string roleName, RoleId adminRoleId, uint32 maxMemberCount) → RoleId roleId external

Creates a new custom role for the calling instance. Custom roles are intended to be used for access control of custom components and its helper contracts. Custom roles are not intended to be used as target roles for custom contracts.

setRoleActive(RoleId roleId, bool active) external

Activates/deactivates the specified role. Only instance owner or account with role admin role can call this function.

grantRole(RoleId roleId, address account) external

Grants the specified role to the account. Only active roles can be granted. Only instance owner or account with role admin role can call this function.

revokeRole(RoleId roleId, address account) external

Revokes the specified role from the account. Only instance owner or account with role admin role can call this function.

createTarget(address target, string name) → RoleId contractRoleId external

Creates a new custom target. Custom targets are intended to be used for access control helper contracts of components. Custom targets are not intended to be used for components.

authorizeFunctions(address target, RoleId roleId, struct IAccess.FunctionInfo[] functions) external

Authorizes the specified functions for the target and provided role.

unauthorizeFunctions(address target, struct IAccess.FunctionInfo[] functions) external

Removes any role authorization for the specified functions.

isInstanceLocked() → bool isLocked external

returns the overall locking state of the instance (including all components)

isTargetLocked(address target) → bool isLocked external

returns the locking state of the specified target

products() → uint256 productCount external

getProduct(uint256 idx) → NftId productNftId external

getInstanceReader() → contract InstanceReader external

getBundleSet() → contract BundleSet external

getRiskSet() → contract RiskSet external

getInstanceAdmin() → contract InstanceAdmin external

getInstanceStore() → contract InstanceStore external

getProductStore() → contract ProductStore external

isTokenRegistryDisabled() → bool external

LogInstanceCustomRoleCreated(RoleId roleId, string roleName, RoleId adminRoleId, uint32 maxMemberCount) event

LogInstanceCustomRoleActiveSet(RoleId roleId, bool active, address caller) event

LogInstanceCustomRoleGranted(RoleId roleId, address account, address caller) event

LogInstanceCustomRoleRevoked(RoleId roleId, address account, address caller) event

LogInstanceCustomTargetCreated(address target, RoleId targetRoleId, string name) event

LogInstanceTargetLocked(address target, bool locked) event

LogInstanceCustomTargetFunctionRoleSet(address target, bytes4[] selectors, RoleId roleId) event

InstanceServiceManager

import "@etherisc/gif-next/contracts/instance/InstanceServiceManager.sol";
Functions
  • [constructor(authority, registry, salt)]

  • [getInstanceService()]

ProxyManager
  • [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)]

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)]

Initializable
  • [_checkInitializing()]

  • [_disableInitializers()]

  • [_getInitializedVersion()]

  • [_isInitializing()]

Events
ProxyManager
  • [LogProxyManagerVersionableDeployed(proxy, initialImplementation)]

  • [LogProxyManagerVersionableUpgraded(proxy, upgradedImplementation)]

INftOwnable
  • [LogNftOwnableNftLinkedToAddress(nftId, owner)]

Initializable
  • [Initialized(version)]

constructor(address authority, address registry, bytes32 salt) public

initializes proxy manager with instance service implementation

getInstanceService() → contract InstanceService instanceService external

InstanceStore

import "@etherisc/gif-next/contracts/instance/InstanceStore.sol";
Functions
  • [initialize()]

  • [createComponent(componentNftId, componentInfo)]

  • [updateComponent(componentNftId, componentInfo, newState)]

  • [getComponentInfo(componentNftId)]

  • [createPool(poolNftId, info)]

  • [updatePool(poolNftId, info, newState)]

  • [getPoolInfo(poolNftId)]

  • [createDistributorType(distributorType, info)]

  • [updateDistributorType(distributorType, info, newState)]

  • [updateDistributorTypeState(distributorType, newState)]

  • [getDistributorTypeInfo(distributorType)]

  • [createDistributor(distributorNftId, info)]

  • [updateDistributor(distributorNftId, info, newState)]

  • [updateDistributorState(distributorNftId, newState)]

  • [getDistributorInfo(distributorNftId)]

  • [createReferral(referralId, referralInfo)]

  • [updateReferral(referralId, referralInfo, newState)]

  • [updateReferralState(referralId, newState)]

  • [getReferralInfo(referralId)]

  • [createBundle(bundleNftId, bundle)]

  • [updateBundle(bundleNftId, bundle, newState)]

  • [updateBundleState(bundleNftId, newState)]

  • [getBundleInfo(bundleNftId)]

  • [createRequest(request)]

  • [updateRequest(requestId, request, newState)]

  • [updateRequestState(requestId, newState)]

  • [getRequestInfo(requestId)]

  • [increaseBalance(targetNftId, amount)]

  • [decreaseBalance(targetNftId, amount)]

  • [increaseFees(targetNftId, amount)]

  • [decreaseFees(targetNftId, amount)]

  • [increaseLocked(targetNftId, amount)]

  • [decreaseLocked(targetNftId, amount)]

BaseStore
  • [_createMetadata(key32)]

  • [_updateState(key32, state)]

  • [exists(key32)]

  • [getMetadata(key32)]

  • [getState(key32)]

  • [toKey32(objectType, id)]

ObjectLifecycle
  • [_initializeLifecycle()]

  • [_setupLifecycle()]

ObjectCounter
  • [_createNextRequestId()]

BalanceStore
  • [getBalanceAmount(targetNftId)]

  • [getLockedAmount(targetNftId)]

  • [getFeeAmount(targetNftId)]

  • [getAmounts(targetNftId)]

  • [_registerBalanceTarget(targetNftId)]

  • [_increaseFees(targetNftId, amount)]

  • [_decreaseFees(targetNftId, amount)]

  • [_increaseLocked(targetNftId, amount)]

  • [_decreaseLocked(targetNftId, amount)]

  • [_increaseBalance(targetNftId, amount)]

  • [_decreaseBalance(targetNftId, amount)]

  • [_setLastUpdatedIn(targetNftId)]

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()]

Lifecycle
  • [setInitialState(ttype, state)]

  • [setStateTransition(ttype, oldState, newState)]

  • [hasLifecycle(objectType)]

  • [getInitialState(objectType)]

  • [checkTransition(stateId, objectType, expectedFromId, toId)]

  • [isValidTransition(objectType, fromId, toId)]

Events
  • [LogProductStoreComponentInfoCreated(componentNftId, state, createdby, txOrigin)]

  • [LogProductStoreComponentInfoUpdated(componentNftId, oldState, newState, updatedBy, txOrigin, lastUpdatedIn)]

  • [LogProductStorePoolInfoCreated(poolNftId, state, createdBy, txOrigin)]

  • [LogProductStorePoolInfoUpdated(poolNftId, oldState, newState, updatedBy, txOrigin, lastUpdatedIn)]

  • [LogProductStoreDistributorTypeInfoCreated(distributorType, state, createdBy, txOrigin)]

  • [LogProductStoreDistributorTypeInfoUpdated(distributorType, oldState, newState, updatedBy, txOrigin, lastUpdatedIn)]

  • [LogProductStoreDistributorInfoCreated(distributorNftId, state, createdBy, txOrigin)]

  • [LogProductStoreDistributorInfoUpdated(distributorNftId, oldState, newState, updatedBy, txOrigin, lastUpdatedIn)]

  • [LogProductStoreReferralInfoCreated(referralId, state, createdBy, txOrigin)]

  • [LogProductStoreReferralInfoUpdated(referralId, oldState, newState, updatedBy, txOrigin, lastUpdatedIn)]

  • [LogProductStoreBundleInfoCreated(bundleNftId, state, createdBy, txOrigin)]

  • [LogProductStoreBundleInfoUpdated(bundleNftId, oldState, newState, updatedBy, txOrigin, lastUpdatedIn)]

  • [LogProductStoreRequestInfoCreated(requestId, state, createdBy, txOrigin)]

  • [LogProductStoreRequestInfoUpdated(requestId, oldState, newState, updatedBy, txOrigin, lastUpdatedIn)]

BalanceStore
  • [LogBalanceStoreTargetRegistered(targetNftId)]

  • [LogBalanceStoreFeesIncreased(targetNftId, addedAmount, newBalance, lastUpdatedIn)]

  • [LogBalanceStoreFeesDecreased(targetNftId, addedAmount, newBalance, lastUpdatedIn)]

  • [LogBalanceStoreLockedIncreased(targetNftId, addedAmount, newBalance, lastUpdatedIn)]

  • [LogBalanceStoreLockedDecreased(targetNftId, addedAmount, newBalance, lastUpdatedIn)]

  • [LogBalanceStoreBalanceIncreased(targetNftId, addedAmount, newBalance, lastUpdatedIn)]

  • [LogBalanceStoreBalanceDecreased(targetNftId, addedAmount, newBalance, lastUpdatedIn)]

IAccessManaged
  • [AuthorityUpdated(authority)]

Initializable
  • [Initialized(version)]

initialize() public

This initializer needs to be called from the instance itself.

createComponent(NftId componentNftId, struct IComponents.ComponentInfo componentInfo) external

updateComponent(NftId componentNftId, struct IComponents.ComponentInfo componentInfo, StateId newState) external

getComponentInfo(NftId componentNftId) → struct IComponents.ComponentInfo componentInfo external

createPool(NftId poolNftId, struct IComponents.PoolInfo info) external

updatePool(NftId poolNftId, struct IComponents.PoolInfo info, StateId newState) external

getPoolInfo(NftId poolNftId) → struct IComponents.PoolInfo info external

createDistributorType(DistributorType distributorType, struct IDistribution.DistributorTypeInfo info) external

updateDistributorType(DistributorType distributorType, struct IDistribution.DistributorTypeInfo info, StateId newState) external

updateDistributorTypeState(DistributorType distributorType, StateId newState) external

getDistributorTypeInfo(DistributorType distributorType) → struct IDistribution.DistributorTypeInfo info external

createDistributor(NftId distributorNftId, struct IDistribution.DistributorInfo info) external

updateDistributor(NftId distributorNftId, struct IDistribution.DistributorInfo info, StateId newState) external

updateDistributorState(NftId distributorNftId, StateId newState) external

getDistributorInfo(NftId distributorNftId) → struct IDistribution.DistributorInfo info external

createReferral(ReferralId referralId, struct IDistribution.ReferralInfo referralInfo) external

updateReferral(ReferralId referralId, struct IDistribution.ReferralInfo referralInfo, StateId newState) external

updateReferralState(ReferralId referralId, StateId newState) external

getReferralInfo(ReferralId referralId) → struct IDistribution.ReferralInfo referralInfo external

createBundle(NftId bundleNftId, struct IBundle.BundleInfo bundle) external

updateBundle(NftId bundleNftId, struct IBundle.BundleInfo bundle, StateId newState) external

updateBundleState(NftId bundleNftId, StateId newState) external

getBundleInfo(NftId bundleNftId) → struct IBundle.BundleInfo bundle external

createRequest(struct IOracle.RequestInfo request) → RequestId requestId external

updateRequest(RequestId requestId, struct IOracle.RequestInfo request, StateId newState) external

updateRequestState(RequestId requestId, StateId newState) external

getRequestInfo(RequestId requestId) → struct IOracle.RequestInfo request external

increaseBalance(NftId targetNftId, Amount amount) → Amount newBalance external

decreaseBalance(NftId targetNftId, Amount amount) → Amount newBalance external

increaseFees(NftId targetNftId, Amount amount) → Amount newFeeBalance external

decreaseFees(NftId targetNftId, Amount amount) → Amount newFeeBalance external

increaseLocked(NftId targetNftId, Amount amount) → Amount newBalance external

decreaseLocked(NftId targetNftId, Amount amount) → Amount newBalance external

LogProductStoreComponentInfoCreated(NftId componentNftId, StateId state, address createdby, address txOrigin) event

LogProductStoreComponentInfoUpdated(NftId componentNftId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn) event

LogProductStorePoolInfoCreated(NftId poolNftId, StateId state, address createdBy, address txOrigin) event

LogProductStorePoolInfoUpdated(NftId poolNftId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn) event

LogProductStoreDistributorTypeInfoCreated(DistributorType distributorType, StateId state, address createdBy, address txOrigin) event

LogProductStoreDistributorTypeInfoUpdated(DistributorType distributorType, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn) event

LogProductStoreDistributorInfoCreated(NftId distributorNftId, StateId state, address createdBy, address txOrigin) event

LogProductStoreDistributorInfoUpdated(NftId distributorNftId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn) event

LogProductStoreReferralInfoCreated(ReferralId referralId, StateId state, address createdBy, address txOrigin) event

LogProductStoreReferralInfoUpdated(ReferralId referralId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn) event

LogProductStoreBundleInfoCreated(NftId bundleNftId, StateId state, address createdBy, address txOrigin) event

LogProductStoreBundleInfoUpdated(NftId bundleNftId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn) event

LogProductStoreRequestInfoCreated(RequestId requestId, StateId state, address createdBy, address txOrigin) event

LogProductStoreRequestInfoUpdated(RequestId requestId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn) event