Code Monkey home page Code Monkey logo

okarys's Introduction

Okarys

Okarys is an EIP 1155 collectibles collection, which restricts the mint of each id to 149 pieces for compliance matter.

It is compatible with EIP 2981 for on chain royalties (see EIP 2981) and with the polygon bridge.

It is a so called mintable contract. Meaning that the original collectibles are minted on the Polygon L2, and can then be bridged to mainnet. (see Polygon docs)

Constructor

string _name : name of the collection

string _uri : uri of the collection

address royaltyReceiver : address that will receive the royalties

uint256 royaltyPercentage : percentage of the price to be royalty

address childChainManager : address of Polygon's child manager contract (docs above)

Instalation

Run

npm i

Copy .env.example, rename it to .env and fill the fields.

Test

npx hardhat test

Deployment

Main Polygon contract:

npx hardhat run scripts/deployOkarys.js --network <polygon | mumbai>

Mainnet child token for bridge:

npx hardhat run scripts/deployRootToken.js --network <mainnet | goerli>

Etherscan/Polygonscan verification

Copy the deployment address and paste it in to replace DEPLOYED_CONTRACT_ADDRESS in this command:

npx hardhat verify --network <TARGETED_NETWORK> <DEPLOYED_CONTRACT_ADDRESS> "constructor argument 1" "constructor argument 2" "constructor argument 3" "constructor argument 4" "constructor argument 5"

Flatten contract

npx hardhat flatten > flatten/Okarys-flat.sol

okarys's People

Contributors

alexandrewolff avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.