Coder Social home page Coder Social logo

aigenjs's Introduction

Aigenjs

Aigen's nodejs library containing scripts to upload/download files to/from NFT.Storage, mint AINFTs, download AINFTs, compile/deploy smart contracts, and other helper functions

create environment variables

create a .env file and put these variables

PROJECTS_DIR=/Users/apple/aigen
ACCOUNT_ADDRESS=0x0000000000000000000000000000000000000000
PRIVATE_KEY=000000000000000000000000000000000000000000000000000000000000000
AINFT_CONTRACT_ADDRESS=0x000000000000000000000000000000000000
PROVIDER_URL=http://0.0.0.0:8545
NFTSTORAGE_TOKEN=<NFTStorage Token>
AIGEN_LAUNCHPAD_CONTRACT_ADDRESS=0x000000000000000000000000000000000

install node dependencies

npm install

or 

yarn

compile & deploy smart contracts

The smart contracts can be found inside the contracts directory

  1. AINFTToken.sol
  2. AigenLaunchpad.sol
compile
npm run compileAINFTTokenContract

deploy

npm run deployAINFTTokenContract

this will automatically deploy the smart contract to 'PROVIDER_URL'

Note:

  • You can also use Remix IDE to deploy the smart contract to the local Ganache or Goerli testnet.
  • It is recommended that you test the smart contract before deploying it to the mainnet.

create AI project

npm run ainft --action="createAIProject" --project_name="test" --project_description="test project" 
--project_logo_path="<project_logo_path>" --project_banner_path="<project_banner_path>"

mint AINFTs

npm run ainft --action="createAINFT" --project_id="10" --project_name="test"

this step will deploy files to NFTStorage and mint AINFTs

download AINFTs

npm run ainft --action=downloadAINFT --project_id="10" --project_name="test"

this will automatically download and decrypt the content of AINFTs

License

This project is licensed under the MIT License - see the LICENSE file for details

aigenjs's People

Contributors

kailashahirwar 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.