Skip to content

Commit f480656

Browse files
committed
deploy on Goerli
1 parent a9aac70 commit f480656

File tree

7 files changed

+88
-5
lines changed

7 files changed

+88
-5
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ To deploy the contracts on Rinkeby -
7474
truffle migrate --network rinkeby
7575
```
7676

77+
To deploy the contracts on Goerli -
78+
79+
```bash
80+
truffle migrate --network goerli
81+
```
82+
7783
### Frontend
7884

7985
Go to the client folder -

client/src/App.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ function App() {
170170
<Typography variant="h5" align="center">Loading Web3, accounts, and contract...</Typography>
171171
</Box>
172172
<Box mt="1.5rem">
173-
<Typography variant="h5" align="center">Please use the rinkeby testnet. If you are using another network, then please switch over to rinkeby and refresh the page!</Typography>
173+
<Typography variant="h5" align="center">Please use the Goerli testnet. If you are using another network, then please switch over to Goerli and refresh the page!</Typography>
174174
</Box>
175175
<Box mt="2rem" component="span">
176176
<Typography variant="h6" align="center">If you do not have an etherum wallet, you can install it from here: </Typography>

client/src/contracts/Exchange.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -15324,6 +15324,12 @@
1532415324
"address": "0xd57018342B19Bc74dD6f5Fa8B73c934694b3aC10",
1532515325
"transactionHash": "0x6641d8bff9633d2c94f453b26f553737bc30e08211b533929d1f099afe6282d9"
1532615326
},
15327+
"5": {
15328+
"events": {},
15329+
"links": {},
15330+
"address": "0xf5b092DD70319CB640766637f60860249871a69A",
15331+
"transactionHash": "0x1b201b02348f821a3bc11ae3e2d8a71b65587228e24dd5a07d11d2b1a94b109a"
15332+
},
1532715333
"5777": {
1532815334
"events": {},
1532915335
"links": {},
@@ -15332,7 +15338,7 @@
1533215338
}
1533315339
},
1533415340
"schemaVersion": "3.4.3",
15335-
"updatedAt": "2021-09-23T16:50:38.546Z",
15341+
"updatedAt": "2022-12-29T16:44:13.887Z",
1533615342
"networkType": "ethereum",
1533715343
"devdoc": {
1533815344
"kind": "dev",

client/src/contracts/Migrations.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -1856,6 +1856,12 @@
18561856
"address": "0x19F59a29Bdadec00321435857334155b9e2e6212",
18571857
"transactionHash": "0xcb15a7f24781eb0174162eeda0fc2258c806928f9a7bdb447a2df940d9921d26"
18581858
},
1859+
"5": {
1860+
"events": {},
1861+
"links": {},
1862+
"address": "0xeE24fCeB806FF23b139B1Cab807abaDaf7b407d1",
1863+
"transactionHash": "0x4fd96de7cb4c0eb1e5d34449c3d7422a1a1dc5af977419733d1920be8b9224b3"
1864+
},
18591865
"5777": {
18601866
"events": {},
18611867
"links": {},
@@ -1864,7 +1870,7 @@
18641870
}
18651871
},
18661872
"schemaVersion": "3.4.3",
1867-
"updatedAt": "2021-09-23T16:50:38.552Z",
1873+
"updatedAt": "2022-12-29T16:44:13.893Z",
18681874
"networkType": "ethereum",
18691875
"devdoc": {
18701876
"kind": "dev",

client/src/contracts/Token.json

+58-1
Original file line numberDiff line numberDiff line change
@@ -12387,6 +12387,63 @@
1238712387
"address": "0xc2377d54bc64250b0D44B372AA8a1283117A5112",
1238812388
"transactionHash": "0x611a3bcac813f75ff831e1a50e11f1fdf61f54220d39353414e1061ce8927d9e"
1238912389
},
12390+
"5": {
12391+
"events": {
12392+
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
12393+
"anonymous": false,
12394+
"inputs": [
12395+
{
12396+
"indexed": true,
12397+
"internalType": "address",
12398+
"name": "owner",
12399+
"type": "address"
12400+
},
12401+
{
12402+
"indexed": true,
12403+
"internalType": "address",
12404+
"name": "spender",
12405+
"type": "address"
12406+
},
12407+
{
12408+
"indexed": false,
12409+
"internalType": "uint256",
12410+
"name": "value",
12411+
"type": "uint256"
12412+
}
12413+
],
12414+
"name": "Approval",
12415+
"type": "event"
12416+
},
12417+
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
12418+
"anonymous": false,
12419+
"inputs": [
12420+
{
12421+
"indexed": true,
12422+
"internalType": "address",
12423+
"name": "from",
12424+
"type": "address"
12425+
},
12426+
{
12427+
"indexed": true,
12428+
"internalType": "address",
12429+
"name": "to",
12430+
"type": "address"
12431+
},
12432+
{
12433+
"indexed": false,
12434+
"internalType": "uint256",
12435+
"name": "value",
12436+
"type": "uint256"
12437+
}
12438+
],
12439+
"name": "Transfer",
12440+
"type": "event"
12441+
}
12442+
},
12443+
"links": {},
12444+
"address": "0x919E60bCC4179878F7c72933Af1e4A7d78d78f08",
12445+
"transactionHash": "0x8e5301166de733439a43f31d5fd817fa27ba5a771b07ca08505cbbddec7c4fb2"
12446+
},
1239012447
"5777": {
1239112448
"events": {
1239212449
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
@@ -12446,7 +12503,7 @@
1244612503
}
1244712504
},
1244812505
"schemaVersion": "3.4.3",
12449-
"updatedAt": "2021-09-23T16:50:38.534Z",
12506+
"updatedAt": "2022-12-29T16:44:13.877Z",
1245012507
"networkType": "ethereum",
1245112508
"devdoc": {
1245212509
"kind": "dev",

migrations/2_token_migration.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ module.exports = async function (deployer, network, accounts) {
1010
const exchangeInstance = await Exchange.deployed();
1111

1212
await tokenInstance.approve(exchangeInstance.address, "100000000000000000000000", { from: accounts[0] });
13-
await exchangeInstance.addLiquidity("100000", { from: accounts[0], value: web3.utils.toWei("10", "ether") });
13+
await exchangeInstance.addLiquidity("1000", { from: accounts[0], value: web3.utils.toWei("0.1", "ether") });
1414
};

truffle-config.js

+8
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ module.exports = {
2929
timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50)
3030
skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
3131
},
32+
goerli: {
33+
provider: () => new HDWalletProvider(mnemonic, `wss://goerli.infura.io/ws/v3/${process.env.INFURA_KEY}`),
34+
network_id: 5,
35+
gas: 5500000,
36+
confirmations: 2, // # of confs to wait between deployments. (default: 0)
37+
timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50)
38+
skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
39+
},
3240
},
3341
compilers: {
3442
solc: {

0 commit comments

Comments
 (0)