ProtonB Contract

Proton contract, the standard ERC721 token of the protocol. All Protons are Particles.

creatorOf

Gets the creator of a Proton.

function creatorOf(
  uint256 tokenId
) external view returns (address);

getSalePrice

Gets current sale price of a Proton.

function getSalePrice(
  uint256 tokenId
) external view returns (uint256);

getLastSellPrice

Gets most recent price that Proton sold for.

function getLastSellPrice(
  uint256 tokenId
) external view returns (uint256);

getCreatorRoyalties

Gets total royalties earned by a given creator. Royalties are how much of the sale price will be directed to the Proton's creator whenever a Proton is sold.

function getCreatorRoyalties(
  address account
) external view returns (uint256);

getCreatorRoyaltiesPct

Gets creator royalties for a given token. Royalties are how much of the sale price will be directed to the Proton's creator whenever a Proton is sold.

function getCreatorRoyaltiesPct(
  uint256 tokenId
) external view returns (uint256);

getCreatorRoyaltiesReceiver

Gets creator royalties receiver. Can be either the creator or a 3rd-party address.

function getCreatorRoyaltiesReceiver(
  uint256 tokenId
) external view returns (address);

claimCreatorRoyalties

Sends royalties to creator or delegated receiver.

function claimCreatorRoyalties() external returns (uint256);

createChargedParticle

Create a new Charged Particle (a Proton with ERC20 assets nested inside).

function createChargedParticle(
  address creator,
  address receiver,
  address referrer,
  string memory tokenMetaUri,
  string memory walletManagerId,
  address assetToken,
  uint256 assetAmount,
  uint256 annuityPercent
) external returns (uint256 newTokenId);

createBasicProton

Create a basic Proton without charge, and with annuityPercent, royaltiesPercent, and salePrice set to 0.

function createBasicProton(
  address creator,
  address receiver,
  string memory tokenMetaUri
) external returns (uint256 newTokenId);

createProton

Create a Proton, set its annuity percentage to a custom amount, and set royalties percentage and salePrice to 0.

function createProton(
  address creator,
  address receiver,
  string memory tokenMetaUri,
  uint256 annuityPercent
) external returns (uint256 newTokenId);

createProtonForSale

Create a Proton, set its annuity percentage to a custom amount, and set royalties percentage and sale price to custom amounts.

function createProtonForSale(
  address creator,
  address receiver,
  string memory tokenMetaUri,
  uint256 annuityPercent,
  uint256 royaltiesPercent,
  uint256 salePrice
) external returns (uint256 newTokenId);

batchProtonsForSale

To be updated

function batchProtonsForSale(
    address creator,
    uint256 annuityPercent,
    uint256 royaltiesPercent,
    string[] calldata tokenMetaUris,
    uint256[] calldata salePrices
) external;

To be updated

buyProton

Buy a Proton.

function buyProton(
  uint256 tokenId, 
  uint256 gasLimit
) external payable returns (bool);

setSalePrice

Set the sale price for a single Proton. In

function setSalePrice(uint256 tokenId, uint256 salePrice) external;

setRoyaltiesPct

Set the sale price for a Proton.

function setRoyaltiesPct(
  uint256 tokenId, 
  uint256 royaltiesPct
) external;

setCreatorRoyaltiesReceiver

Set a receiver for Proton royalties. Defaults to the creator of the Proton.

function setCreatorRoyaltiesReceiver(
  uint256 tokenId, 
  address receiver
) external;

Last updated