Skip to content

Commit 01d005f

Browse files
andrejrakicvonum
andauthored
Milestone 1 - Compatibility with compiler optimizers (#1)
* Single commit * Update link to filecoin solidity docs * Add smoke tests to gh actions * Add dependencies in other jobs to smoke-tests * Update big number mappings * Update zondax mappings (#7) * Update mappings bignumber imports in contracts * Remove old bignumber mappings from makefile and smoke tests --------- Co-authored-by: vonum <vonum.mk@gmail.com>
1 parent e65c7aa commit 01d005f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+11345
-126
lines changed

Diff for: .github/workflows/main.yaml

+39-6
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,35 @@ on:
33
push:
44
branches:
55
- master
6+
- milestone-1
67
pull_request:
78
branches:
89
- master
10+
- milestone-1
911

1012
jobs:
13+
smoke-tests:
14+
name: "Run smoke tests"
15+
timeout-minutes: 30
16+
runs-on: ubuntu-22.04
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
with:
21+
submodules: 'true'
22+
- name: Install dependencies
23+
run: |
24+
sudo apt install zsh -y
25+
make install_solc_linux
26+
yarn install
27+
- name: Compile contracts
28+
run: ./testing/smoke_tests.sh
29+
1130
build-mock:
1231
name: "Build Mock API"
1332
timeout-minutes: 30
1433
runs-on: ubuntu-22.04
34+
needs: [smoke-tests]
1535
steps:
1636
- name: Checkout
1737
uses: actions/checkout@v2
@@ -34,6 +54,7 @@ jobs:
3454
name: "SimpleCoin: end-to-end tests"
3555
timeout-minutes: 30
3656
runs-on: ubuntu-22.04
57+
needs: [smoke-tests]
3758
steps:
3859
- name: Checkout
3960
uses: actions/checkout@v2
@@ -62,10 +83,12 @@ jobs:
6283
cd hardhat && yarn hardhat get-balance --contract $CONTRACT_ADDRESS --account $WALLET_ADDRESS
6384
env:
6485
PRIVATE_KEY: ${{ secrets.WALLET_PRIVATE_KEY }}
86+
6587
api-deploy:
6688
name: "Filecoin APIs: deploy"
6789
timeout-minutes: 30
6890
runs-on: ubuntu-22.04
91+
needs: [smoke-tests]
6992
steps:
7093
- name: Checkout
7194
uses: actions/checkout@v2
@@ -93,10 +116,12 @@ jobs:
93116
cat deploy_power.log
94117
env:
95118
PRIVATE_KEY: ${{ secrets.WALLET_PRIVATE_KEY }}
119+
96120
miner-integration:
97121
name: "Miner API: integration tests"
98122
timeout-minutes: 30
99123
runs-on: ubuntu-22.04
124+
needs: [smoke-tests]
100125
steps:
101126
- name: Checkout
102127
uses: actions/checkout@v2
@@ -158,6 +183,7 @@ jobs:
158183
name: "Market API: integration tests"
159184
timeout-minutes: 30
160185
runs-on: ubuntu-22.04
186+
needs: [smoke-tests]
161187
steps:
162188
- name: Checkout
163189
uses: actions/checkout@v2
@@ -215,12 +241,11 @@ jobs:
215241
name: gas_results_market.csv
216242
path: testing/gas_results_market.csv
217243

218-
219-
220244
power-integration:
221245
name: "Power API: integration tests"
222246
timeout-minutes: 30
223247
runs-on: ubuntu-22.04
248+
needs: [smoke-tests]
224249
steps:
225250
- name: Checkout
226251
uses: actions/checkout@v2
@@ -282,6 +307,7 @@ jobs:
282307
name: "VerifReg API: integration tests"
283308
timeout-minutes: 30
284309
runs-on: ubuntu-22.04
310+
needs: [smoke-tests]
285311
steps:
286312
- name: Checkout
287313
uses: actions/checkout@v2
@@ -343,6 +369,7 @@ jobs:
343369
name: "DataCap API: integration tests"
344370
timeout-minutes: 30
345371
runs-on: ubuntu-22.04
372+
needs: [smoke-tests]
346373
steps:
347374
- name: Checkout
348375
uses: actions/checkout@v2
@@ -404,6 +431,7 @@ jobs:
404431
name: "Account API: integration tests"
405432
timeout-minutes: 30
406433
runs-on: ubuntu-22.04
434+
needs: [smoke-tests]
407435
steps:
408436
- name: Checkout
409437
uses: actions/checkout@v2
@@ -465,6 +493,7 @@ jobs:
465493
name: "Precompiles API: integration tests"
466494
timeout-minutes: 30
467495
runs-on: ubuntu-22.04
496+
needs: [smoke-tests]
468497
steps:
469498
- name: Checkout
470499
uses: actions/checkout@v2
@@ -526,6 +555,7 @@ jobs:
526555
name: "Send API: integration tests"
527556
timeout-minutes: 30
528557
runs-on: ubuntu-22.04
558+
needs: [smoke-tests]
529559
steps:
530560
- name: Checkout
531561
uses: actions/checkout@v2
@@ -586,6 +616,7 @@ jobs:
586616
frc0042-check:
587617
name: "Check FRC0042 method number"
588618
runs-on: ubuntu-22.04
619+
needs: [smoke-tests]
589620
steps:
590621
- name: Checkout
591622
uses: actions/checkout@v2
@@ -605,6 +636,7 @@ jobs:
605636
name: "CBOR Decode Tests"
606637
timeout-minutes: 30
607638
runs-on: ubuntu-22.04
639+
needs: [smoke-tests]
608640
steps:
609641
- name: Checkout
610642
uses: actions/checkout@v2
@@ -657,13 +689,12 @@ jobs:
657689
cd testing
658690
rustup target add wasm32-unknown-unknown
659691
cargo test cbor_decode_test
660-
661-
662692
663693
bigints-integration:
664694
name: "BigInt Tests"
665695
timeout-minutes: 30
666696
runs-on: ubuntu-22.04
697+
needs: [smoke-tests]
667698
steps:
668699
- name: Checkout
669700
uses: actions/checkout@v2
@@ -721,6 +752,7 @@ jobs:
721752
name: "Leb128 Tests"
722753
timeout-minutes: 30
723754
runs-on: ubuntu-22.04
755+
needs: [smoke-tests]
724756
steps:
725757
- name: Checkout
726758
uses: actions/checkout@v2
@@ -778,6 +810,7 @@ jobs:
778810
name: "Address Tests"
779811
timeout-minutes: 30
780812
runs-on: ubuntu-22.04
813+
needs: [smoke-tests]
781814
steps:
782815
- name: Checkout
783816
uses: actions/checkout@v2
@@ -835,6 +868,7 @@ jobs:
835868
name: "Deserialize Params Tests"
836869
timeout-minutes: 30
837870
runs-on: ubuntu-22.04
871+
needs: [smoke-tests]
838872
steps:
839873
- name: Checkout
840874
uses: actions/checkout@v2
@@ -888,12 +922,11 @@ jobs:
888922
rustup target add wasm32-unknown-unknown
889923
cargo test deserialize_params_tests
890924
891-
892925
comment-result:
893926
name: "Comment the result on PR"
894927
runs-on: ubuntu-22.04
895928
if: github.event_name == 'pull_request'
896-
needs: [account-integration, datacap-integration, market-integration, miner-integration, power-integration, precompiles-integration, send-integration, verifreg-integration]
929+
needs: [smoke-tests, account-integration, datacap-integration, market-integration, miner-integration, power-integration, precompiles-integration, send-integration, verifreg-integration]
897930
steps:
898931
- name: "Get gas_results_account.csv"
899932
uses: actions/download-artifact@v3

Diff for: .gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@
99
node_modules/
1010
foundry-cache
1111
out/
12-
testing/*.csv
12+
testing/*.csv
13+
package-lock.json
14+
15+
vendor/solidity-BigNumber/cache/

Diff for: .gitmodules

-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,3 @@
77
[submodule "lib/buffer"]
88
path = lib/buffer
99
url = https://github.com/ensdomains/buffer
10-
[submodule "lib/solidity-bignumber"]
11-
path = lib/solidity-bignumber
12-
url = https://github.com/zondax/solidity-bignumber
13-
branch = v0.1.0

Diff for: .prettierrc

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"tabWidth": 4,
3-
"useTabs": false,
4-
"semi": false,
5-
"singleQuote": false,
6-
"printWidth": 160
7-
}
2+
"tabWidth": 4,
3+
"useTabs": false,
4+
"semi": false,
5+
"singleQuote": false,
6+
"printWidth": 160
7+
}

0 commit comments

Comments
 (0)