Skip to content

Commit 66e0333

Browse files
committed
Base Learn Readme
1 parent cf87ec4 commit 66e0333

File tree

1 file changed

+62
-1
lines changed

1 file changed

+62
-1
lines changed

README.md

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,71 @@ Learn to Build Smart Contracts and Onchain Apps.
8383
forge create --rpc-url $BASE_SEPOLIA_RPC --private-key $PRIVATE_KEY <src/"Your Deploy Files":"Your Contract">
8484
```
8585

86+
Example:
87+
88+
```
89+
forge create --rpc-url $BASE_SEPOLIA_RPC --private-key $PRIVATE_KEY src/BasicMath.sol:BasicMath
90+
```
91+
8692
- For Deploy With Constructor Arguments
8793

8894
```
89-
forge create --rpc-url $BASE_SEPOLIA_RPC --private-key $PRIVATE_KEY <src/"Your Deploy Files":"Your Contract"> --constructor-args "Arg 1" "Arg 2"
95+
forge create --rpc-url $BASE_SEPOLIA_RPC --private-key $PRIVATE_KEY <src/"Your Deploy Files":"Your Contract"> --constructor-args "value 1" "value 2"
96+
```
97+
98+
Example:
99+
100+
```
101+
forge create --rpc-url $BASE_SEPOLIA_RPC --private-key $PRIVATE_KEY src/EmployeeStorage.sol:EmployeeStorage --constructor-args 1000 Pat 50000 112358132134
102+
```
103+
104+
- For Basic Verify
105+
106+
```
107+
forge verify-contract <Your Contract Address> --chain $CHAIN <src/"Your Deploy Files":"Your Contract">
108+
```
109+
110+
Example:
111+
112+
```
113+
forge verify-contract 0xF1EaXXXXX --chain $CHAIN src/BasicMath.sol:BasicMath
114+
```
115+
116+
- For Verify With Constructor Arguments
117+
118+
```
119+
forge verify-contract <Your Contract Address> --chain $CHAIN <src/"Your Deploy Files":"Your Contract"> --constructor-args $(cast abi-encode "constructor(data type, data type)" "value 1" "value 2")
120+
```
121+
122+
Example:
123+
124+
```
125+
forge verify-contract 0xF1EaXXXXX --chain $CHAIN src/EmployeeStorage.sol:EmployeeStorage --constructor-args $(cast abi-encode "constructor(uint16,string,uint32,uint256)" 1000 Pat 50000 112358132134)
126+
```
127+
128+
## Other
129+
- Install The OpenZeppelin Library
130+
131+
```
132+
forge install OpenZeppelin/openzeppelin-contracts
133+
```
134+
135+
- Export a Remapping in Our Directory to Help Locate The Library
136+
137+
```
138+
forge remappings > remappings.txt
139+
```
140+
141+
- Flag Indicating Whether to Flatten The Source Code Before Verifying
142+
143+
```
144+
--flatten
145+
```
146+
147+
- Wait For Verification Result After Submission
148+
149+
```
150+
--watch
90151
```
91152

92153
## Follow Airdrop Infinity 🌐

0 commit comments

Comments
 (0)