Charged Settings Contract (V2)

Charged Particles Settings Contract. Used to view and update rules for how the Charged Particles contract functions.

Get Particle Settings

getCreatorAnnuities

Gets the creator of a Particle and the percentage of creator annuities for the specified Particle. Creator annuities can be reassigned from the original creator to a 3rd party using the setCreatorAnnuitiesRedirect function.

function getCreatorAnnuities(
  address contractAddress, 
  uint256 tokenId
  ) external returns (
    address creator, 
    uint256 annuityPct
  );

getCreatorAnnuitiesRedirect

Get the address that receives creator annuities for a given Particle/ Defaults to creator address if it has not been redirected via the setCreatorAnnuitiesRedirect function.

function getCreatorAnnuitiesRedirect(
  address contractAddress, 
  uint256 tokenId
  ) external view returns (address);

getTempLockExpiryBlocks

Get the unlock block of the temporary timelock associated with a Particle. The temporary timelock exists to prevent front-running.

function getTempLockExpiryBlocks () returns (uint256)

getTimelockApprovals

Gets the approvals for time locks.

function getTimelockApprovals(
  address operator
  ) external view returns (
    bool timelockAny, 
    bool timelockOwn
  );

getAssetRequirements

Get requirements for an asset token that determine whether it can be deposited into a Particle. Aave, Compound, etc. have different requirements for tokens, and this function returns those requirements for each type of wallet manager / ERC20 asset.

function getAssetRequirements(
    address contractAddress,
    address assetToken
  ) external view returns (
    string memory requiredWalletManager,
    bool energizeEnabled,
    bool restrictedAssets,
    bool validAsset,
    uint256 depositCap,
    uint256 depositMin,
    uint256 depositMax,
    bool invalidAsset
  );

getNftAssetRequirements

Get requirements for NFTs that can be deposited into a Particle

function getNftAssetRequirements(
    address contractAddress,
    address nftTokenAddress
  ) external view returns (
    string memory requiredBasketManager,
    bool basketEnabled,
    uint256 maxNfts
  );

Update Particle Settings

setCreatorAnnuities

Sets a custom percentage for the Creator Annuities of a Particle.

function setCreatorAnnuities(
  address contractAddress, 
  uint256 tokenId, 
  address creator, 
  uint256 annuityPercent
) external;

setCreatorAnnuitiesRedirect

Sets a custom receiver address for the Creator Annuities.

function setCreatorAnnuitiesRedirect(
  address contractAddress, 
  uint256 tokenId, 
  address receiver
) external;

Update Settings for Entire NFT Contracts

For the owner or admin of an NFT contract only

setRequiredWalletManager

Sets a required Wallet Manager for External NFT contracts (otherwise set to "none" to allow any Wallet Manager).

function setRequiredWalletManager(
  address contractAddress, 
  string calldata walletManager
) external;

setRequiredBasketManager

Sets a required Basket Manager for External NFT contracts (otherwise set to "none" to allow any Basket Manager).

function setRequiredBasketManager(
  address contractAddress, 
  string calldata basketManager
) external;

setAssetTokenRestrictions

Enables or disables asset token restrictions for External NFT contracts.

function setAssetTokenRestrictions(
  address contractAddress, 
  bool restrictionsEnabled
) external;

setAllowedAssetToken

Enables or disables allowed asset tokens for External NFT contracts.

function setAllowedAssetToken(
  address contractAddress, 
  address assetToken, 
  bool isAllowed
) external;

setAssetTokenLimits

Sets the custom configuration for External contracts.

function setAssetTokenLimits(
  address contractAddress, 
  address assetToken, 
  uint256 depositMin, 
  uint256 depositMax
) external;

setMaxNfts

Sets the maximum number of NFTs that can be held by a Particle, for a given contract. For example, if you wanted a Particle to only be able to hold one Bored Ape, you would use this function to set that restriction.

function setMaxNfts(
  address contractAddress, 
  address nftTokenAddress, 
  uint256 maxNfts
) external;

Other

Events

event Initialized(address indexed initiator);
  event ControllerSet(address indexed controllerAddress, string controllerId);
  event DepositCapSet(address assetToken, uint256 depositCap);
  event TempLockExpirySet(uint256 expiryBlocks);
  event RequiredWalletManagerSet(address indexed contractAddress, string walletManager);
  event RequiredBasketManagerSet(address indexed contractAddress, string basketManager);
  event AssetTokenRestrictionsSet(address indexed contractAddress, bool restrictionsEnabled);
  event AllowedAssetTokenSet(address indexed contractAddress, address assetToken, bool isAllowed);
  event AssetTokenLimitsSet(address indexed contractAddress, address assetToken, uint256 assetDepositMin, uint256 assetDepositMax);
  event MaxNftsSet(address indexed contractAddress, address indexed nftTokenAddress, uint256 maxNfts);
  event AssetInvaliditySet(address indexed assetToken, bool invalidity);
  event TokenCreatorConfigsSet(address indexed contractAddress, uint256 indexed tokenId, address indexed creatorAddress, uint256 annuityPercent);
  event TokenCreatorAnnuitiesRedirected(address indexed contractAddress, uint256 indexed tokenId, address indexed redirectAddress);
  event PermsSetForCharge(address indexed contractAddress, bool state);
  event PermsSetForBasket(address indexed contractAddress, bool state);
  event PermsSetForTimelockAny(address indexed contractAddress, bool state);
  event PermsSetForTimelockSelf(address indexed contractAddress, bool state);

Last updated