Kickstarter Smart Contract
This is an example of how you can set up this project locally. To get a local copy up and running, follow these steps.
- Must have a MetaMask Wallet Account.
- We use Sepolia Network so we need to use a Sepolia faucet to obtain test ether. Make sure you have MetaMask balance on Sepolia Network.
- Clone the repo
git clone https://github.com/ras-24/kickstarter-contract.git
- Go to kickstarter contract directory
cd kickstarter-contract - Install NPM packages
npm install --legacy-peer-deps
- On ethereum/deploy.js file, please change to your MetaMask Seed Phrase and Infura Sepolia URL Endpoint
const provider = new HDWalletProvider( 'YOUR_METAMASK_SEED_PHRASE', // remember to change this to your own phrase! 'YOUR_INFURA_SEPOLIA_URL_ENDPOINT' // remember to change this to your own endpoint! );
- Go to ethereum directory
cd ethereum - Deploy kickstarter contract
node deploy.js
- Copy Contract Deployed Address to ethereum/factory.js file
const instance = new web3.eth.Contract( JSON.parse(CampaignFactory.interface), 'YOUR_CONTRACT_DEPLOYED_ADDRESS' // remember to change this to your own contract deployed address! );
- On ethereum/web3.js file, please change to your Infura Sepolia URL Endpoint
} else { // We are on the server *OR* the user is not running metamask const provider = new Web3.providers.HttpProvider( 'YOUR_INFURA_SEPOLIA_URL_ENDPOINT' // remember to change this to your own endpoint! ); web3 = new Web3(provider); }
- Run kickstarter contract
npm run dev
Distributed under the MIT License. See LICENSE for more information.