Charged State Contract (V2)
Charged Particles State Contract. For viewing and setting permissions, approvals, and time locks on Particles.
Get State Data
Get info on time locks, approvals, and permissions.
getDischargeTimelockExpiry
Gets unlock block for Discharge time lock.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
Return Value | Description | Type |
---|---|---|
lockExpiry | unlock block for Particle's Charge (interest) | uint256 |
getReleaseTimelockExpiry
Gets unlock block for Release time lock.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
Return Value | Description | Type |
---|---|---|
lockExpiry | unlock block for Particle's Mass (principal + interest) | uint256 |
getBreakBondTimelockExpiry
Gets unlock block for restrictions on withdrawing NFTs (Covalent Bonds) from a Particle.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
Return Value | Description | Type |
---|---|---|
lockExpiry | unlock block for Particle's Covalent Bonds (nested NFTs) | uint256 |
isApprovedForDischarge
Checks if an operator is allowed to Discharge a specific token (Particle).
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
operator | address of the operator to check approval for | address |
Return Value | Description | Type |
---|---|---|
isApproved | true if operator approved, false if not approved | bool |
isApprovedForRelease
Checks if an operator is allowed to Release a specific token (Particle).
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
operator | address of the operator to check approval for | address |
Return Value | Description | Type |
---|---|---|
isApproved | true if operator approved, false if not approved | bool |
isApprovedForBreakBond
Checks if an operator is allowed to break Covalent Bonds on a specific token (Particle).
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
operator | address of the operator to check approval for | address |
Return Value | Description | Type |
---|---|---|
isApproved | true if operator approved, false if not approved | bool |
isApprovedForTimelock
Checks if an operator is allowed to Timelock a specific token (Particle).
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
operator | address of the operator to check approval for | address |
Return Value | Description | Type |
---|---|---|
isApproved | true if operator approved, false if not approved | bool |
isEnergizeRestricted
Checks if energizing a specific Particle is restricted.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
Return Value | Description | Type |
---|---|---|
isApproved | true if operator approved, false if not approved | bool |
isCovalentBondRestricted
Checks if covalent bonding (depositing NFTs into a Particle) for a specific Particle is restricted.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
Return Value | Description | Type |
---|---|---|
isApproved | true if operator approved, false if not approved | bool |
getDischargeState
Gets state of discharge settings / permissions for a Particle.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
sender | ||
address of transaction sender | address |
Return Value | Description | Type |
---|---|---|
allowFromAll | whether or not any address can release a Particle | bool |
isApproved | true if operator approved, false if not approved | bool |
timelock | unlock block for Particle's Charge (interest only) | uint256 |
tempLockExpiry | unlock block for temporary time lock | uint256 |
getReleaseState
Gets state of release settings / permissions for a Particle.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
sender | ||
address of transaction sender | address |
Return Value | Description | Type |
---|---|---|
allowFromAll | whether or not any address can release a Particle | bool |
isApproved | true if operator approved, false if not approved | bool |
timelock | unlock block for Particle's Mass (principal + interest) | uint256 |
tempLockExpiry | unlock block for temporary time lock | uint256 |
getBreakBondState
Gets state of covalent bond breaking (releasing an NFT) settings / permissions for a Particle.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
sender | ||
address of transaction sender | address |
Return Value | Description | Type |
---|---|---|
allowFromAll | whether or not any address can release a Particle | bool |
isApproved | true if operator approved, false if not approved | bool |
timelock | unlock block for Particle's Covalent Bonds (nested NFTs) | uint256 |
tempLockExpiry | unlock block for temporary time lock | uint256 |
Set Permissions + Approvals
Update a Particle's permissions and approvals. Only the owner or operator of an NFT can call these functions.
setDischargeApproval
Sets an operator as approved to Discharge a specific token (Particle); This allows an operator to withdraw the interest-portion only.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
operator | ||
Particle's operator | address |
setReleaseApproval
Sets an operator as approved to Release a specific token (Particle); This allows an operator to withdraw the principal + interest.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
operator | ||
Particle's operator | address |
setBreakBondApproval
Sets an operator as approved to break Covalent Bonds on a specific token (Particle); This allows an operator to withdraw NFTs.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
operator | ||
Particle's operator | address |
setTimelockApproval
Sets an operator as approved to Timelock a specific token (Particle); This allows an operator to timelock the principal or interest.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
operator | ||
Particle's operator | address | |
## setApprovalForAll |
Sets an operator as approved to Discharge/Release/Timelock a specific token (Particle).
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
operator | ||
Particle's operator | address |
setPermsForRestrictCharge
Updates restrictions on Energizing an NFT.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
state | ||
state of permissions for action | bool |
setPermsForAllowDischarge
Updates allowance on Discharging an NFT by anyone.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
state | ||
state of permissions for action | bool |
setPermsForAllowRelease
Updates allowance on Discharging an NFT by anyone.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
state | ||
state of permissions for action | bool |
setPermsForRestrictBond
Updates restrictions on Covalent Bonds on an NFT.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
state | ||
state of permissions for action | bool |
setPermsForAllowBreakBond
Updates allowance on Breaking Covalent Bonds on an NFT by anyone.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
state | ||
state of permissions for action | bool |
setDischargeTimelock
Sets a Timelock on the ability to Discharge the interest of a Particle.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
unlockBlock | ||
unlock block for Discharge time lock (interest only) | uint256 |
setReleaseTimelock
Sets a Timelock on the ability to Release the assets of a Particle.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
unlockBlock | ||
unlock block for Release time lock (principal + interest) | uint256 |
setBreakBondTimelock
Sets a Timelock on the ability to break the Covalent Bond of a Particle.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
unlockBlock | ||
unlock block for Covalent Bonds (nested NFTs) time lock | uint256 |
setTemporaryLock
Sets a temporary Timelock on the ability to Release/Discharge the assets of a Particle.
Parameter | Description | Type |
---|---|---|
contractAddress | The address to the contract of the token (Particle) | address |
tokenId | The ID of the token (Particle) | uint256 |
isLocked | ||
state of time lock | bool |
Other
Events
Last updated