Skip to content
No description, website, or topics provided.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
contracts
migrations
test
.gitignore
README.md
package-lock.json
package.json
truffle-config.js
yarn.lock

README.md

IPFS Pin Market

This repo is a Truffle project with IPFSPinMarket.sol and a complete test suite.

Production

Only IPFSPinContract.sol needs to be deployed for production.

Dev

To set up your dev environment, run yarn.

Tests

We will use ganache-cli to fork mainnet to run the full test suite.

First, set an ENV variable for your mainnet node. Edit ~/.profile and add at the bottom:

export ETHEREUM_NODE=https://mainnet.infura.io/v3/YOUR-PROJECT-ID

Then reload it with:

source ~/.profile

Then in this directory run:

yarn ganache

Then in a separate terminal run:

yarn bridge

Wait for the oracle contracts to deploy, then find the line that says:

Please add this line to your contract constructor:

OAR = OracleAddrResolverI(0x221A12eB30D238aBcFb7C6c9e5985bA9B5ab1CdA);

And add it to contracts/IPFSPinMarket.sol as the last line in the IPFSPinMarket contract constructor().

Finally in a new terminal run:

yarn test

Be sure to remove the added OAR line from the contract before committing back to the repo so the master contract remains prepared for mainnet deployment.

You can’t perform that action at this time.