Skip to content

AMPDlabs/ampd-labs-hackathon-3-contract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hackathon-3-banner Hackathon-3-overview

AMPD Labs - Open Hackathon 3

Getting started with Solidity and Foundry. We will build a smart contract using a FactoryPattern, deploy it to the Base blockchain on the Sepolia testnet and interact with the smart contract through base scan.

⚙️ Prerequisites

Before we start there are a few things you need to do.

✨Notes (for Base Sepolia Testnet)

Setting up deployer

🚨 You will need the private key from your coinbase wallet (NEVER show this to anyone EVER!). 🔐 When you have your private key run the command below to store your private key in an encrypted state on your local machine.

cast wallet import deployer --interactive

To get your private key go to your CoinBase Wallet > Settings > Show Private Key. Paste it to the terminal after running the command and then set a password.

🚀 Deployment

forge create ./src/ProfileFactory.sol:ProfileFactory --rpc-url $BASE_SEPOLIA_RPC --account deployer --verify --etherscan-api-key $BASESCAN_API_KEY --broadcast

Verification of contract deployed by contract ✅

# Encode constructor args
cast abi-encode "constructor(string,string,string[])" "test" "test" '[]'

# Verify
forge verify-contract --rpc-url $BASE_SEPOLIA_RPC --compiler-version 0.8.24 \
  --optimizer-runs 200 --constructor-args 0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000047465737400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000474657374000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \
0x294c8bEAD4385040B61C079349609cbA0537614E src/Profile.sol:Profile --etherscan-api-key $BASESCAN_API_KEY

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published