Charged Particles Contract (V2)
Charged Particles Contract. The primary contract for interfacing with the Charged Particles protocol.
Last updated
Charged Particles Contract. The primary contract for interfacing with the Charged Particles protocol.
Last updated
Get Info about the contract, its settings, and its state.
Gets the address of the ChargedState contract, which can be used for setting and retrieving additional information about a Particle (NFT) contract. E.g. time locks on particle mass (principal) or charge (interest).
Return Value | Description | Type |
---|---|---|
Gets the address of the ChargedSettings contract, which can be used for setting and retrieving the settings of the ChargedParticles contract. E.g. Creator annuity.
When Custom Contracts are registered, only the "owner" or operator of the Contract is allowed to register them and define custom rules for how their tokens are "Charged". Otherwise, any token can be "Charged" according to the default rules of Charged Particles.
Gets the address of the ChargedManagers contract. To learn more about how the ChargedManagers contract functions and what purpose it serves, look here. In V1 of the protocol, each manager had their own contract, but in V2, all are contained within a single ChargedManagers contract. In both versions of the protocol, the managers serve the same purpose.
Part of the ERC721 standard. Required for any contract that receives ERC-721 tokens. See Open Zeppelin for more detail.
Part of the ERC1155 standard. Required for any contract that receives ERC-1155 tokens. See Open Zeppelin for more detail.
Calculates the amount of fees to be paid for a specific deposit amount.
Gets the amount of asset tokens that have been deposited into the Particle, which represent the Mass of the Particle.
Gets the amount of interest that the Particle has generated representing the Charge of the Particle.
Gets the amount of LP Tokens that the Particle has generated representing the Kinetics of the Particle.
Gets the total amount of ERC721 Tokens that the Particle holds.
Interact with Particles
Fund a Particle with an asset token (ERC20). Must be called by the account providing the asset. The account must approve THIS (ChargedParticles.sol) contract as operator of the asset.
Allows the owner or operator of the token (Particle) to collect or transfer the interest generated from the token without removing the underlying asset.
Allows the owner or operator of the token (Particle) to collect or transfer a specific amount of the interest generated from the token without removing the principal.
Allows the creator of the token (Particle) to collect or transfer a their portion of the interest generated from the token without removing the principal.
Releases the full amount of asset + interest held within the Particle by LP of the assets.
Releases a partial amount of principal + interest held within the Particle by LP of the assets.
Deposit other NFTs into the Particle. Must be called by the account providing the NFT.Depositing account must approve this (ChargedParticles.sol) contract as NFT's operator.
Withdraw an NFT from a Particle.
Return Value | Description | Type |
---|---|---|
Return Value | Description | Type |
---|---|---|
Return Value | Description | Type |
---|---|---|
Parameter | Description | Type |
---|---|---|
Return Value | Description | Type |
---|---|---|
Parameter | Description | Type |
---|---|---|
Return Value | Description | Type |
---|---|---|
Parameter | Description | Type |
---|---|---|
Return Value | Description | Type |
---|---|---|
Parameter | Description | Type |
---|---|---|
Return Value | Description | Type |
---|---|---|
Parameter | Description | Type |
---|---|---|
Return Value | Description | Type |
---|---|---|
Parameter | Description | Type |
---|---|---|
Return Value | Description | Type |
---|---|---|
Parameter | Description | Type |
---|---|---|
Return Value | Description | Type |
---|---|---|
Parameter | Description | Type |
---|---|---|
Return Value | Description | Type |
---|---|---|
Parameter | Description | Type |
---|---|---|
Return Value | Description | Type |
---|---|---|
Parameter | Description | Type |
---|---|---|
Return Value | Description | Type |
---|---|---|
Parameter | Description | Type |
---|---|---|
Return Value | Description | Type |
---|---|---|
Parameter | Description | Type |
---|---|---|
Return Value | Description | Type |
---|---|---|
stateAddress
address of Charged State contract
address
settingsAddress
address of Charged Settings contract
address
managersAddress
address of Charged Settings contract
address
protocolFee
protocol fees in amount of token
uint256
contractAddress
The address to the contract of the token (Particle)
address
tokenId
The ID of the token (Particle)
uint256
walletManagerId
The liquidity provider ID to check the asset balance of
string
assetToken
The address of the asset token to check
address
amount
The amount of underlying asset held within the token
uint256
contractAddress
The address to the contract of the token (Particle)
address
tokenId
The ID of the token (Particle)
uint256
walletManagerId
The liquidity provider ID to check the asset balance of
string
assetToken
The address of the asset token to check
address
amount
The amount of interest the token (Particle) has generated (for a given asset token)
uint256
contractAddress
The address to the contract of the token (Particle)
address
tokenId
The ID of the token (Particle)
uint256
walletManagerId
The liquidity provider ID to check the asset balance of
string
assetToken
The address of the asset token to check
address
amount
The amount of LP tokens that have been generated
uint256
contractAddress
The address to the contract of the token (Particle)
address
tokenId
The ID of the token (Particle)
uint256
basketManagerId
The ID of the Basket Manager to check the token balance of
string
amount
The total amount of NFTs that are held within the Particle
uint256
contractAddress
The address to the contract of the token (Particle)
address
tokenId
The ID of the token (Particle)
uint256
walletManagerId
The ID of the Wallet Manager to check the token balance of
string
assetToken
The address of the asset token to deposite
address
assetAmount
The amount of asset token to deposit
uint256
referrer
*used for an internal feature that has yet to be implemented -- ignore
address
yieldTokensAmount
The amount of tokens added to the Particle
uint256
receiver
The address to receive the Discharged asset tokens
address
contractAddress
The address to the contract of the token (Particle)
address
tokenId
The ID of the token (Particle)
uint256
walletManagerId
The ID of the Wallet Manager to Discharge from
string
assetToken
The address of the asset token to Discharge
address
receiverAmount
the amount of asset token discharged to the receiver
uint256
creatorAmount
the amount of asset token discharged to its creator
uint256
receiver
The address to receive the Discharged asset tokens
address
contractAddress
The address to the contract of the token (Particle)
address
tokenId
The ID of the token (Particle)
uint256
walletManagerId
The ID of the Wallet Manager to Discharge from
string
assetToken
The address of the asset token to Discharge
address
receiverAmount
the amount of asset token discharged to the receiver
uint256
creatorAmount
the amount of asset token discharged to its creator
uint256
receiver
The address to receive the Discharged asset tokens
address
contractAddress
The address to the contract of the token (Particle)
address
tokenId
The ID of the token (Particle)
uint256
walletManagerId
The ID of the Wallet Manager to Discharge from
string
assetToken
The address of the asset token to Discharge
address
receiverAmount
the amount of asset token discharged to the receiver
uint256
receiver
The address to receive the Released asset tokens
address
contractAddress
The address to the contract of the token (Particle)
address
tokenId
The ID of the token (Particle)
uint256
walletManagerId
The Wallet Manager of the assets to Release from the Particle
string
assetToken
The address of the asset token to Release
address
receiverAmount
the amount of asset token Released to the receiver
uint256
creatorAmount
the amount of asset token Released to its creator
uint256
receiver
The address to receive the Released asset tokens
address
contractAddress
The address to the contract of the token (Particle)
address
tokenId
The ID of the token (Particle)
uint256
walletManagerId
The Wallet Manager of the assets to Release from the Particle
string
assetToken
The address of the asset token to deposited
address
receiverAmount
the amount of asset token Released to the receiver
uint256
creatorAmount
the amount of asset token Released to its creator
uint256
contractAddress
The contract address of the token (Particle) to deposit into
address
tokenId
The ID of the token (Particle)
uint256
basketManagerId
The Basket Manager to deposit the NFT into
string
nftTokenAddress
The address of the NFT being deposited
address
nftTokenId
The ID of the NFT being deposited
address
success
true or false
bool
receiver
The address to receive the withdrawn NFTs
address
contractAddress
The contract address of the token (Particle)
address
tokenId
The ID of the token (Particle)
uint256
basketManagerId
The Basket Mananger to Withdraw the NFT from
string
nftTokenAddress
The address of the NFT being withdrawn
address
nftTokenId
The ID of the NFT being withdrawn
address
success
true or false
bool