API
Last updated
Was this helpful?
Last updated
Was this helpful?
params
ChargedConstructor Charged parameter object.
Charged class constructor object parameter.
Type:
Properties
signer
Signer? Needed to send signed transactions to the Ethereum Network to execute state changing operations.
config
ConfigurationParameters
Returns UtilsService
Get the address of the chargedState contract.
Get the address of the chargedSettings contract.
Get the address of the chargedManagers contract.
Get the deposit fee of the protocol.
Returns NftService Instance of the NFT connected to the charged particle protocol
Gets the amount of asset tokens that have been deposited into the Particle.
Parameters
walletManagerId
WalletManagerId The ID of the wallet manager to check.
Returns BigNumber The Amount of underlying assets held within the token.
Gets the amount of interest that the particle has generated.
Parameters
walletManagerId
WalletManagerId The ID of the Wallet Manager.
Returns BigNumber The amount of interest generated.
Gets the amount of LP Tokens that the Particle has generated.
Parameters
walletManagerId
WalletManagerId The ID of the Wallet Manager.
Returns BigNumber The amount of LP tokens that have been generated.
Gets the total amount of ERC721 tokens that the Particle holds.
Parameters
Returns BigNumber The total amount of ERC721 tokens that are held within the Particle.
Gets the amount of creator annuities reserved for the creator for the specified NFT.
Returns address The address of the creator.
Get the address that receives creator annuities for a given Particle/ Defaults to creator address if it has not been redirected.
Returns address The address of the creator.
Gets the tokenUri using the tokenId and contractAddress of the Particle.
Gets the Discharge timelock state of the Particle.
Parameters
Gets the Discharge timelock state of the Particle.
Parameters
Gets the Bonds Timelock state of the Particle.
Parameters
Returns BigNumber timelock
Returns BigNumber tempLockExpiry
Fund particle with asset token Must be called by the account providing the asset. Account must also approve THIS contract as operator as asset.
If you are getting gas limit errors this may be because you forgot to approve the contract as operator of asset
Parameters
walletManagerId
WalletManagerId The Asset-Pair to Energize the Token with
assetAmount
BigNumberish The Amount of Asset Token to Energize the Token with
Examples
Allows the owner or operator of the token to collect or transfer the interest generated from the token without removing the underlying asset that is held within the token.
Parameters
walletManagerId
WalletManagerId The wallet manager of that assets to discharge from the token.
Examples
Allows the owner or operator of the Token to collect or transfer a specific amount of the interest generated from the token without removing the underlying Asset that is held within the token.
Parameters
walletManagerId
WalletManagerId The wallet manager of the assets to discharge from the token.
assetAmount
BigNumberish The specific amount of asset token to discharge from the particle.
Allows the Creator of the Token to collect or transfer a their portion of the interest (if any) generated from the token without removing the underlying Asset that is held within the token.
Parameters
walletManagerId
WalletManagerId The wallet manager of the assets to discharge from the token
assetAmount
BigNumberish The specific amount of asset token to discharge from the particle
Releases the full amount of asset + interest held within the particle by LP of the assets. To release NFT assets from your particle, see break bond.
Parameters
walletManagerId
WalletManagerId The wallet manager of the assets to release from the token.
Examples
Releases a partial amount of asset + interest held within the particle by LP of the assets.
Parameters
walletManagerId
WalletManagerId The wallet manager of the assets to release from the token
assetAmount
BigNumberish The specific amount of asset token to release from the particle
Deposit other NFT assets into the particle. Must be called by the account providing the asset. Account must approve THIS contract as operator of asset.
Parameters
Examples
Release NFT assets from the particle.
Parameters
Examples
Sets a timelock on the ability to release the assets of a particle.
Parameters
Sets a timelock on the ability to discharge the assets of a particle
Parameters
Sets a timelock on the ability to break the covalent bond of a particle
Parameters
Sets the custom configuration for creators of proton-based NFTs Must be called by account that created and owns the particle
Parameters
annuityPercent
BigNumberish The percentage of interest-annuities to reserve for the creator. In decimal this can range from 0 - 10000. 5712 would be 57.12%..
Sets a custom receiver address for the creator annuities Must be called by account that created and owns the particle
Parameters
providers
(<NetworkProvider> | providers.Provider | providers.ExternalProvider)? Provider for connection to the Ethereum network.
Returns state contract address
Returns settings contract address
Returns manager contract address
Returns protocol fee amount.
contractAddress
tokenId
assetToken
The address of the asset token to check.
assetToken
The address of the asset Token to check.
assetToken
The Address of the Asset Token to check.
basketManagerId
The ID of the BasketManager to check.
Returns The percentage amount of annuities reserved for the creator.
Returns The percentage amount of annuities reserved for the creator.
Returns Token metadata URI.
sender
The address approved for Discharging assets from the Particle.
Returns [, , BigNumber, BigNumber] [allowFromAll, isApproved, timelock, empLockExpiry]
sender
The address approved for Releasing assets from the Particle.
Returns [, , BigNumber, BigNumber] [allowFromAll, isApproved, timelock, empLockExpiry]
sender
The address approved for removing Bond assets from the Particle.
Returns allowFromAll
Returns isApproved
assetToken
The Address of the Asset Token being used
chainId
? Optional parameter that allows for the user to specify which network to write to
referrer
?
Returns <ContractTransaction> - Details from the transaction.
receiver
The address to receive the discharged asset tokens.
assetToken
The address of the asset token being discharged.
chainId
? Optional parameter that allows for the user to specify which network to write to.j
Returns <ContractTransaction> - Details from the transaction.
receiver
The address to receive the discharged asset tokens.
assetToken
The address of the asset token being discharged.
chainId
? Optional parameter that allows for the user to specify which network to write to.
Returns <ContractTransaction> - Details from the transaction.
receiver
The address to receive the discharged asset tokens
assetToken
The address of the asset token being discharged
chainId
? Optional parameter that allows for the user to specify which network to write to
Returns <ContractTransaction> - Details from the transaction.
receiver
The address to receive the released asset tokens.
assetToken
The address of the asset token being released.
chainId
? Optional parameter that allows for the user to specify which network to write to.
Returns <ContractTransaction> - Details from the transaction.
receiver
The address to receive the released asset tokens
assetToken
The address of the asset token being released
chainId
? Optional parameter that allows for the user to specify which network to write to
Returns <ContractTransaction> - Details from the transaction.
basketManagerId
The basket to deposit the NFT into.
nftTokenAddress
The address of the NFT token being deposited.
nftTokenId
The ID of the NFT token being deposited.
nftTokenAmount
The amount of tokens to deposit (ERC1155-specific).
chainId
? Optional parameter that allows for the user to specify which network to write to.
Returns <ContractTransaction> - Details from the transaction.
receiver
The address to receive the released asset tokens.
basketManagerId
The basket to release the NFT from.
nftTokenAddress
The address of the NFT token being released.
nftTokenId
The ID of the NFT token being released.
nftTokenAmount
The amount of tokens to deposit (ERC1155-specific).
chainId
? Optional parameter that allows for the user to specify which network to write to.
Returns <ContractTransaction> - Details from the transaction
unlockBlock
The Ethereum block number to timelock until (~15 seconds per block).
chainId
? Optional parameter that allows for the user to specify which network to write to.
Returns <ContractTransaction> - Details from the transaction.
unlockBlock
The Ethereum block number to timelock until (~15 seconds per block).
chainId
? Optional parameter that allows for the user to specify which network to write to.
Returns <ContractTransaction> - Details from the transaction.
unlockBlock
The Ethereum block number to timelock until (~15 seconds per block).
chainId
? Optional parameter that allows for the user to specify which network to write to.
Returns <ContractTransaction> - Details from the transaction.
creator
The creator's address of the proton-based NFT.
chainId
? Optional parameter that allows for the user to specify which network to write to.
Returns <ContractTransaction> - Details from the transaction.
receiver
The receiver of the creator interest annuities.
chainId
? Optional parameter that allows for the user to specify which network to write to.
Returns <ContractTransaction> - Details from the transaction.