Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove truffle #2

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
Hardhat/.env
Hardhat/node_modules
Hardhat/cache
Hardhat/artifacts
Truffle/.env
Truffle/build
.env
node_modules
cache
artifacts
26 changes: 1 addition & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Initial setup

1. Add a `.env` file (in the hardhat/truffle folder of the project) that contains the PRIVATE_KEY of the wallet that will be used to deploy the contracts and API_KEY (if you want to verify using hardhat-etherscan)
1. Add a `.env` file that contains the PRIVATE_KEY of the wallet that will be used to deploy the contracts and API_KEY (if you want to verify using hardhat-etherscan)

```
PRIVATE_KEY = XXXXXXXXXX
Expand Down Expand Up @@ -39,27 +39,3 @@ npx hardhat run --network testnet scripts/sample-script.js
4. You should see the deployed contract address
<img width="452" alt="4" src="https://user-images.githubusercontent.com/38925737/157434102-43fdaa77-30a7-4b0e-9b6e-54eb7d055c2b.png">


## Truffle

1. Create a deployment script
<img width="965" alt="2" src="https://user-images.githubusercontent.com/38925737/157433811-ac1c626b-b433-42bc-807d-8fca4b9c000c.png">

2. Update the `truffle-config.js` file with these networks
<img width="857" alt="3" src="https://user-images.githubusercontent.com/38925737/157433998-407425a0-d2c6-4127-b869-55a77d5e4438.png">

3. Run the following command to deploy the contract

#### Mainnet
```
truffle migrate --network opera_mainnet
```


#### Testnet
```
truffle migrate --network opera_testnet
```

4. You should see the deployed contract address
<img width="713" alt="4" src="https://user-images.githubusercontent.com/38925737/157434205-49328fff-376d-494e-a2db-9e16c0dfd7b9.png">
Binary file removed Truffle/.DS_Store
Binary file not shown.
1 change: 0 additions & 1 deletion Truffle/.gitattributes

This file was deleted.

22 changes: 0 additions & 22 deletions Truffle/LICENSE

This file was deleted.

19 changes: 0 additions & 19 deletions Truffle/contracts/Migrations.sol

This file was deleted.

5 changes: 0 additions & 5 deletions Truffle/migrations/1_initial_migration.js

This file was deleted.

Loading