Skip to content

Latest commit

 

History

History
162 lines (95 loc) · 3.27 KB

README.md

File metadata and controls

162 lines (95 loc) · 3.27 KB

agora-smart-contracts

Agora.sol

The video/music nft minting contract

agoraMarket.sol

This is the decentralized marketplace for selling nft tokens

agoraShare.sol

This contract allows you to split an agora Nft into shareable and purchasable bits(token)

paymentsplitting.sol.

  • This contract is
  • This contract splits payment amongs investors/ token owners of an Agora Nft after a huge buyout
  • This splitter is re-deployed everytime by a method from the frontend, and burns 100% sharedDrops of an Agora NFT

stream payment.sol

This streams payment to the content creator to ensure they don't runaway with investor's funding

create a token

share the token or auction at marketplace

share token

  • Investor Buyout
  • checkout line 140 to 143 and 145 agoraSharetests.js to implement buyout on the frontEnd

Agora Market

  • Investor Executes Order

SET-UP

  • install node.js on your local system here
  • run npm i to install dependencies

check that hardhat works as expected

 npx hardhat
  • Don't override config files

RUN a node

npx hardhat node --fork https://api.avax.network/ext/bc/C/rpc

Compile and test solidity file

 npx hardhat compile
 npx hardhat test

Deploy

 npx hardhat run scripts/deployAgora.js

FUNCTION MOCKUP'S

Agora SETTERS

Agora.

create(string memory hash)

Agora getters

baseTokenURI(hash) { returns the external Url which could the ipfs.io link }

formatTokenURI(tokenURL) { returns the token metadata }

AGORA MARKET SETTERS

AgoraMarket.

openOrder(uint256 _tokenId, uint256 _price){ emits event }

executeOrder(uint256 _orderId){ emits event }

cancelOrder(uint256 _orderId){ emits event }

AgoraShare Setters

function shareAgoraNft(uint _tokenId, uint priceinWei) { emits event }

function buyShares(uint16 _sharedId, uint16 amount) external payable { emits event }

function redeem ( uint _sharedId ) external {}

AgoraNFT getters

function getInvestorNShares(uint16 _sharedId) external returns (address [] memory, uint [] memory) {}