Skip to content

RocketNFT/rocket

Repository files navigation

Rocket-NFT

An experiment in NFT's and Ethereum 🚀


Usage

Frontend App

Run

Start Ganache-cli and deploy the contracts.

npm install
npm run network
# in new terminal
npm run migrate

Next open a new terminal in /client. Be sure to update the correct contract address in the client app.

# in /client
npm install
npm start

Smart Contract

These utilities rely on the truffle exec command. You first need to add your wallet's menmonic and your Infura API key to a new .env file.

MAINNET_MNEMONIC = '...';
TESTNET_MNEMONIC = '...';
INFURA_ENDPOINT_KEY = 'ebe4..';

Deployment

Deploy to the desired network (defaults to development/ganache).

truffle exec scripts/deploy-rocket.js --network mainnet

Inspection

Inspect a Rocket contract and get it's logic contract address.

 truffle exec scripts/get-logic-address.js --network kovan 0xC6EbF21FA70642235a22F3b627119A168884fACC
 # > PROXIABLE contract 0xC6EbF21FA70642235a22F3b627119A168884fACC has its logic address at 0x14c67b4596ca97f735ff2010b45e58ff5486f3a5

Upgrade

This contract uses a delegate-call proxy to allow updating the code. Specifically, the method used is EIP 1822 Universal Upgradeable Proxy Standard (UUPS). This standard is similar to Open Zeppelin EIP 1967, however it is thinner and more flexible. Read more here if you're curious.

🐉 Upgrading can have dangerous consequences, so ask an experienced friend for help.

First deploy a new logic contract.

truffle exec scripts/deploy-rocket-logic.js --network mainnet
# > ...
# > Rocket logic deployed at:  0xEd6A651058FEEDF569d19611fd3B6504F411AA81

Next, call updateCode() on the proxy contract and pass the new logic contract address you received from the previous step.

It is recommended you use OneClickDapp or Remix to perform this action, as you can use your hardware wallet (which is the admin account) via MetaMask.

Contributing

Guidelines

  1. One approval is required before merging.
  2. Devs must merge their own PRs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •