Skip to content

Commit 7efdbad

Browse files
reorganize folder structure, add toast and clean flows
1 parent bd277a5 commit 7efdbad

File tree

26 files changed

+14136
-3743
lines changed

26 files changed

+14136
-3743
lines changed

hardhat/package-lock.json

Lines changed: 7324 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hardhat/package.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "hardhat",
3+
"version": "1.0.0",
4+
"description": "This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a Hardhat Ignition module that deploys that contract.",
5+
"main": "index.js",
6+
"directories": {
7+
"test": "test"
8+
},
9+
"scripts": {
10+
"test": "echo \"Error: no test specified\" && exit 1"
11+
},
12+
"author": "",
13+
"license": "ISC",
14+
"dependencies": {
15+
"@openzeppelin/contracts": "^5.1.0",
16+
"hardhat": "^2.22.15"
17+
},
18+
"devDependencies": {
19+
"@nomicfoundation/hardhat-toolbox": "^5.0.0",
20+
"@nomicfoundation/hardhat-toolbox-viem": "^3.0.0",
21+
"ts-node": "^10.9.2",
22+
"typescript": "^5.6.3"
23+
}
24+
}

hardhat/scripts/deploy.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
import hre from 'hardhat'
22

3+
const METAMASK_WALLET_ADDRESS = '0x70997970C51812dc3A010C7d01b50e0d17dc79C8'
4+
35
async function main() {
46
const [account] = await hre.viem.getWalletClients()
57

68
const web3Token = await hre.viem.deployContract('Web3DevToken', [])
79

10+
const inviteTxnHash = await web3Token.write.invite([
11+
METAMASK_WALLET_ADDRESS,
12+
])
13+
814
console.log('Web3Token address', web3Token.address)
915
}
1016

hardhat/scripts/interact.ts

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import hre from 'hardhat'
22

3-
// quero um script para convidar o endereço 0xA9BC6d9681Ca08a90fe9b79c79D7660A6936F4c3
4-
53
const WEB3DEVTOKEN_ADDRESS = '0x5fbdb2315678afecb367f032d93f642f64180aa3'
6-
const METAMASK_WALLET_ADDRESS = '0x70997970C51812dc3A010C7d01b50e0d17dc79C8' //'0xA9BC6d9681Ca08a90fe9b79c79D7660A6936F4c3'
4+
const METAMASK_WALLET_ADDRESS = '0x70997970C51812dc3A010C7d01b50e0d17dc79C8'
75

86
async function main() {
97
const [account] = await hre.viem.getWalletClients()
@@ -13,38 +11,11 @@ async function main() {
1311
WEB3DEVTOKEN_ADDRESS,
1412
)
1513

16-
// const balance = await web3devToken.read.balanceOf([METAMASK_WALLET_ADDRESS])
17-
// console.log('Balance of 1', balance.toString())
18-
19-
// const inviteCount = await web3devToken.read.getInviteCount([
20-
// account.account.address,
21-
// ])
22-
23-
// console.log('Invite count', inviteCount.toString())
24-
2514
const inviteTxnHash = await web3devToken.write.invite([
2615
METAMASK_WALLET_ADDRESS,
2716
])
28-
console.log('hash', inviteTxnHash)
2917

30-
// const inviteTxnHash2 = await web3devToken.write.invite([
31-
// METAMASK_WALLET_ADDRESS,
32-
// ])
33-
34-
// const inviteTxnHash3 = await web3devToken.write.invite([
35-
// METAMASK_WALLET_ADDRESS,
36-
// ])
37-
38-
// const inviteTxnHash5 = await web3devToken.write.invite([
39-
// METAMASK_WALLET_ADDRESS,
40-
// ])
41-
42-
// const balance2 = await web3devToken.read.balanceOf([
43-
// METAMASK_WALLET_ADDRESS,
44-
// ])
45-
46-
// const web3Token = await hre.viem.deployContract('Web3DevToken', [])
47-
// console.log('Web3Token address', web3Token.address)
18+
console.log('hash', inviteTxnHash)
4819
}
4920

5021
main().catch(console.error)

0 commit comments

Comments
 (0)