Skip to content

Commit d8c5ea0

Browse files
committed
autodeploy
1 parent edafa88 commit d8c5ea0

21 files changed

+15819
-124
lines changed

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@
44
55
## Usage
66

7-
1. Start [ganache](https://trufflesuite.com/ganache/) instance by running `npm start` in [ganache](./packages/ganache) folder
8-
2. Deploy [TestERC20.sol](./packages/client/src/contract/TestERC20.sol), [PaymentGatewayContract.sol](./packages/client/src/contract/PaymentGatewayContract.sol) by using [Remix IDE](https://remix-project.org/)
9-
3. Mint some tokens in `TestERC20` by calling `mint` method. The UI is using `18 digits` representation of token decimals, so you should pass an argument like `200000000000000000000`.
10-
4. Allow withdrawal in `TestERC20` by calling `approve` method (with `PaymentGatewayContract` **deployer address**). Pass **the same amount from the step 3**
11-
5. Update `PaymentGatewayContract` address in [params.ts](./packages/client/src/config/params.ts)
12-
6. Run this DApp by running `npm start` in [client](./packages/client) folder. Send some tokens
13-
7. Check admin menu by typing secret cheat-code `133337`
7+
1. Run `start:ganache` in separated terminal
8+
2. Run `deploy:contracts` to deploy contracts to ganache
9+
3. Run this DApp by running `npm start` in [client](./packages/client) folder. Send some tokens
10+
4. Check admin menu by typing secret cheat-code `133337`
1411

1512
## Contract source code
1613

packages/ganache/package-lock.json renamed to package-lock.json

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

package.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "erc20-payment-gateway",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"start:ganache": "node ./scripts/run-ganache.js",
8+
"deploy:contracts": "cd ./packages/truffle && npm start"
9+
},
10+
"repository": {
11+
"type": "git",
12+
"url": "git+https://github.com/react-declarative/erc20-payment-gateway.git"
13+
},
14+
"keywords": [],
15+
"author": "",
16+
"license": "ISC",
17+
"bugs": {
18+
"url": "https://github.com/react-declarative/erc20-payment-gateway/issues"
19+
},
20+
"homepage": "https://github.com/react-declarative/erc20-payment-gateway#readme",
21+
"dependencies": {
22+
"ganache-cli": "6.12.2",
23+
"glob": "8.0.3",
24+
"rimraf": "3.0.2"
25+
}
26+
}

packages/client/src/contract/ABI.json

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)