Links

Contributing Data

How developers, platforms, protocols and users can interact with CCOP

Permissionless & Trustless

Anyone can help add data to the CCOP protocol, but the contract does not accept ownership data that it implicitly trusts. Instead, the protocol takes contractAddress and tokenId pairs, looks up the ownership on a compliant ERC721 contract, persists it on the Layer 1 protocol and then reports ownership to integrated chains via existing bridges. Rather than contributing data directly, addresses that interact with the protocol are paying the transaction costs of persisting and broadcasting ownership data. It is up to users to decide if the CCOP data is valuable, and whether it will be beneficial to arbitrage the transaction cost against the protocol rewards. We believe having L1 ownership data on other blockchains will prove to be incredibly valuable, but interested contributors should reach these conclusions on their own.
Please note that only new ownership data is rewarded. The CCOP contract provides getter functions to determine if the ownership data is out-of-date, but submitting transactions that fail to update ownership data will not reward the submitter.

Opportunities

CCOP offers rewards to users, protocol or platform developers, and NFT developers. Any user can manually submit a list or a single contractAddress + tokenId pair to the protocol. The protocol will determine on-chain ownership and broadcast that data cross-chain.

Users

Any Ethereum address can submit a transaction to the protocol. We offer a simple UI that allows non-technical users to select some NFTs and submit them to the protocol to earn rewards.

Platform & Protocol Devs

If you run a platform or protocol that handles NFT transfers on behalf of users, your platform or protocol is tightly tied to new ownership data. You can call the CCOP after you complete a transfer and be rewarded with $CCOP-G.

NFT Developers

If you're developing a new NFT project, you can implement CCOP reporting in your contract directly. You can report ownership of your NFTs in your minting functions and by overriding transfer functions to report new ownership automatically. This is the most accurate and up-to-date ownership data available, so rewards for calls from ERC721 contracts are 3x the typical rewards offered to other contributors.

ABI Functions

submitNFTOwnership

submitNFTOwnership(address contractAddress, uint256 tokenId)
Submit a transaction to persist and broadcast data for a single NFT. Submitting a list of tokens will be more performant in terms of transaction fees, but speed is rewarded, so this function might be called from a script that listens to a contract's Transfer events to earn rewards.
  • contractAddress: address - address of the ERC721 contract for NFT
  • tokenId: uint256 - tokenId of the NFT
const tx = await protocol.submitNFTOwnership(
'0xb3EA7Cbb180d834c279B06873b6A971CCe701468',
BigNumber.from('13'),
);

bulkSubmitNFTOwnership

bulkSubmitNFTOwnership(NFT[] calldata tokens)
Submit a transaction to persist and broadcast data for a list of NFTs. Submitting a list of tokens will be more performant in terms of transaction fees, but speed is rewarded, so batching calls in a cron task might earn you fewer rewards than submitting individually as close to transfer events as possible.
  • tokens: NFT[] - an array of NFT structs
struct NFT {
address contractAddress;
uint256 tokenId;
}
const tx = await protocol.bulkSubmitNFTOwnership(
[
[
'0xb3EA7Cbb180d834c279B06873b6A971CCe701468',
BigNumber.from('1'),
],
[
'0xb3EA7Cbb180d834c279B06873b6A971CCe701468',
BigNumber.from('2'),
],
[
'0xb3EA7Cbb180d834c279B06873b6A971CCe701468',
BigNumber.from('3'),
],
],
);

contractSubmitNFTOwnership

contractSubmitNFTOwnership(uint256 tokenId)
Make a call to persist and broadcast data for a single NFT from the contract that manages the NFT. This function is intended to be used only by ERC721 contracts who wish to report ownership data for the tokens created by that contract.
This represents the most up-to-date data, so rewards for these calls are 3x rewards for other submissions.
This function relies on an owner function being present on the ERC721 contract, such as through OpenZeppelin Ownable . Rewards will be provided to the owner of the contract. If an owner is not found, the reward will be sent to the contract address itself.
  • tokenId: uint256 - tokenId of the NFT
function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal override {
super._transfer(from, to, tokenId);
CCOP(ccopProxyAddress).contractSubmitNFTOwnership(tokenId);
}
Last modified 1yr ago