-
Notifications
You must be signed in to change notification settings - Fork 33
/
Makefile
60 lines (50 loc) · 1.52 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
## Running compile to generate the abi's and the type-chain types.
compile:
yarn compile
## Please specify which network following the available ones in hardhat.config.ts.
network=localhost
## Deploying Swaplace contract to the desired network.
swaplace:
yarn deploy:swaplace ${network}
## The mocks are essential to run the tests. We will be swapping token assets.
mocks:
yarn deploy:mocks ${network}
## Mock deployments are a requirement to run the mint script, which will fund the signer's wallet.
mint:
yarn mint ${network}
## Mock deployments are a requirement to run the mint script, which will fund the signer's wallet.
approve:
yarn approve ${network}
## Create a swap on the swaplace contract and save the swap id in the .env file.
swap:
yarn create-swap ${network}
## Accept a swap on the swaplace contract based on the swap id in the .env file.
accept:
yarn accept-swap ${network}
## Cancel a swap on the swaplace contract based on the swap id in the .env file.
cancel:
make compile
yarn cancel-swap ${network}
## Run the entire test suite.
## Running a local node by using `npx hardhat node` in a separated terminal is
## a requirement to run the tests in the localhost network.
test-suite-runner:
yarn clean
yarn compile
make swaplace
make mocks
make mint
make approve
make swap
make accept
make swap
make cancel
## Feed existing Swaplace contract with some transactions.
## Requires a deployed Swaplace contract and mocks.
transactions:
make mint
make approve
make swap
make accept
make swap
make cancel