Skip to content

Commit 7bbc055

Browse files
committed
2 parents 1352198 + ac84cb9 commit 7bbc055

File tree

246 files changed

+194208
-247563
lines changed

Some content is hidden

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

246 files changed

+194208
-247563
lines changed

.eslintrc.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22
"parser": "@typescript-eslint/parser",
33
"parserOptions": {
44
"ecmaVersion": "latest",
5-
"sourceType": "module"
5+
"sourceType": "module",
6+
"project": "./tsconfig.json"
67
},
8+
"plugins": ["@typescript-eslint"],
79
"extends": ["plugin:@typescript-eslint/recommended"],
810
"env": {
911
"node": true
1012
},
11-
"ignorePatterns": ["dist", "cairo"]
13+
"rules": {
14+
"@typescript-eslint/no-floating-promises": "error"
15+
},
16+
"ignorePatterns": ["dist", "cairo", "examples"]
1217
}

.github/workflows/cairo-ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ jobs:
99
- name: Step 1 - Check out main branch
1010
uses: actions/checkout@v3
1111
- name: Step 2 - Getting scarb
12-
uses: software-mansion/setup-scarb@v1.3.2
12+
uses: software-mansion/setup-scarb@v1.5.0
1313
- name: Step 3 - Setting up snfoundry
1414
uses: foundry-rs/setup-snfoundry@v3
15-
- name: Step 4 - Running tests
15+
- name: Step 4 - Installing USC
16+
run: curl -L https://raw.githubusercontent.com/software-mansion/universal-sierra-compiler/master/scripts/install.sh | sh -s -- v2.4.0
17+
- name: Step 5 - Running tests
1618
run: scarb test
1719

1820
format:
@@ -21,6 +23,6 @@ jobs:
2123
- name: Step 1 - Check out main branch
2224
uses: actions/checkout@v3
2325
- name: Step 2 - Getting scarb
24-
uses: software-mansion/setup-scarb@v1.3.2
26+
uses: software-mansion/setup-scarb@v1.5.0
2527
- name: Step 3 - Checking format
2628
run: scarb fmt --check

.github/workflows/integration-ci.yml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,51 @@ jobs:
99
- name: Check out main branch
1010
uses: actions/checkout@v3
1111

12+
- name: Read .nvmrc
13+
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT
14+
id: nvm
15+
1216
- name: Setup Scarb
13-
uses: software-mansion/setup-scarb@v1.3.2
17+
uses: software-mansion/setup-scarb@v1.5.0
1418

1519
- name: Install project
1620
run: yarn install --frozen-lockfile
1721

1822
- name: Start devnet in background
19-
run: |
20-
scarb run start-devnet &
21-
./scripts/wait-devnet-ready.sh
23+
run: scarb run start-devnet
24+
25+
- name: Installing USC
26+
run: curl -L https://raw.githubusercontent.com/software-mansion/universal-sierra-compiler/master/scripts/install.sh | sh -s -- v2.4.0
2227

2328
- name: Run integration tests
24-
run: scarb --release build && tsc && yarn mocha tests-integration/*.test.ts --forbid-only --forbid-pending
29+
run: scarb run test-ts
2530

2631
gas-report:
2732
runs-on: ubuntu-latest
2833
steps:
2934
- name: Check out main branch
30-
uses: actions/checkout@v3
35+
uses: actions/checkout@v4
36+
37+
- name: Read .nvmrc
38+
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT
39+
id: nvm
40+
41+
- name: Use correct node version
42+
uses: actions/setup-node@v3
43+
with:
44+
node-version: '${{ steps.nvm.outputs.NVMRC }}'
3145

3246
- name: Setup Scarb
33-
uses: software-mansion/setup-scarb@v1.3.2
47+
uses: software-mansion/setup-scarb@v1.5.0
3448

3549
- name: Install project
3650
run: yarn install --frozen-lockfile
3751

3852
- name: Start devnet in background
39-
run: |
40-
scarb run start-devnet &
41-
./scripts/wait-devnet-ready.sh
53+
run: scarb run start-devnet
54+
55+
- name: Installing USC
56+
run: curl -L https://raw.githubusercontent.com/software-mansion/universal-sierra-compiler/master/scripts/install.sh | sh -s -- v2.4.0
4257

4358
- name: Gas report
4459
run: scarb run profile --check

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ package-lock.json
2525
/.svelte-kit
2626
vite.config.js.timestamp-*
2727
vite.config.ts.timestamp-*
28-
yarn-error.log
28+
yarn-error.log

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ dist
66
.github
77
tests-integration/fixtures
88
starknet-devnet-rs
9+
.svelte-kit
10+
docs

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
scarb 2.6.3
2-
starknet-foundry 0.20.0
1+
scarb 2.10.1
2+
starknet-foundry 0.38.3

CHANGELOG.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# Changelog
22

33
See here for the [Argent Account](./docs/CHANGELOG_argent_account.md)
4-
See here for the [Argent Multisig](./docs/CHANGELOG_multisig.md)
5-
6-
# Deployments
74

8-
See deployed class hashes can be found here for the [Argent Account](./deployments/account.txt), and here for the [Argent Multisig](./deployments/multisig.txt)
9-
10-
Other deployment artifacts are located in [/deployments/](./deployments/)
5+
See here for the [Argent Multisig](./docs/CHANGELOG_multisig.md)

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Use the base image
2+
FROM shardlabs/starknet-devnet-rs:0.3.0-rc.0-seed0
3+
4+
# Expose port 5050
5+
EXPOSE 5050
6+
7+
# Set default command to run the container
8+
CMD ["--gas-price", "6000000000", "--data-gas-price", "1", "--timeout", "320", "--lite-mode", "--gas-price-fri", "35000000000000", "--data-gas-price-fri", "1", "--initial-balance", "1000000000000000000000000"]

README.md

Lines changed: 8 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -4,104 +4,18 @@
44

55
See [Argent Account](./docs/argent_account.md) and [Argent Multisig](./docs/multisig.md) for more details.
66

7-
## Deployments
8-
9-
See deployed class hashes can be found here for the [Argent Account](./deployments/account.txt), and here for the [Argent Multisig](./deployments/multisig.txt)
10-
11-
Other deployment artifacts are located in [/deployments/](./deployments/)
12-
13-
Find the release notes for all versions in [CHANGELOG](./CHANGELOG.md)
14-
15-
## Development
16-
17-
### Setup
18-
19-
We recommend you to install scarb through ASDF. Please refer to [these instructions](https://docs.swmansion.com/scarb/download.html#install-via-asdf).
20-
Thanks to the [.tool-versions file](./.tool-versions), you don't need to install a specific scarb or starknet foundry version. The correct one will be automatically downloaded and installed.
21-
22-
## Test the contracts (Cairo)
23-
24-
```
25-
scarb test
26-
```
27-
28-
## Test the contracts (JavaScript)
29-
30-
### Install the devnet (run in project root folder)
31-
32-
You should have docker installed in your machine then you can start the devnet by running the following command:
33-
34-
```shell
35-
scarb run start-devnet
36-
```
37-
38-
### Install JS dependencies
7+
## Release Notes
398

40-
Install all packages:
9+
See here for the [Argent Account](./docs/CHANGELOG_argent_account.md)
4110

42-
```shell
43-
yarn
44-
```
11+
See here for the [Argent Multisig](./docs/CHANGELOG_multisig.md)
4512

46-
Run all integration tests:
47-
48-
```shell
49-
scarb run test-ts
50-
```
51-
52-
Run single integration test file (need to run previous command first):
53-
54-
```shell
55-
yarn mocha ./tests/accountEscape.test.ts
56-
```
57-
58-
You also have access to the linter and a code formatter:
59-
60-
```shell
61-
scarb run lint
62-
scarb run format
63-
```
64-
65-
### Contract fixtures
66-
67-
The [fixtures folder](./tests-integration/fixtures/) contains pre-compiled contracts used for tests (both json and casm).
68-
69-
### Interface IDs
70-
71-
For compatibility reasons we support legacy interface IDs. But new interface IDs will follow [SNIP-5](https://github.com/starknet-io/SNIPs/blob/main/SNIPS/snip-5.md#how-interfaces-are-identified)
72-
Tool to calculate interface IDs: https://github.com/ericnordelo/src5-rs
73-
74-
### Cairo Zero SHA256 contract
75-
76-
The Webauthn signer is designed to work with multiple possible SHA256 implementations. The Cairo Zero variant is implemented at class hash specified as constant in the signer's source code, which can be reproduced using:
77-
78-
```shell
79-
git clone https://github.com/cartridge-gg/cairo-sha256
80-
cd cairo-sha256
81-
git checkout 8d2ae51
82-
git apply ../lib/signers/cairo0-sha256.patch
83-
84-
python3.9 -m venv ./venv
85-
source ./venv/bin/activate
86-
pip install cairo-lang==0.12.1
13+
## Deployments
8714

88-
starknet-compile-deprecated --no_debug_info src/main.cairo > ../tests-integration/fixtures/argent_Sha256Cairo0.contract_class.json
15+
See deployed class hashes can be found here for the [Argent Account](./deployments/account.txt), and here for the [Argent Multisig](./deployments/multisig.txt)
8916

90-
# cleanup and clear whitespace diffs:
91-
deactivate
92-
cd ..
93-
rm -rf cairo-sha256
94-
scarb run format
95-
```
17+
Other deployment artifacts are located in [/deployments/](./deployments/)
9618

97-
## Release checklist
19+
## Full documentation
9820

99-
- Bump version if needed (new deployment in mainnet)
100-
- Set up your .env file with the deployer info and run `scarb run deploy-account` and `scarb run deploy-multisig` to declare the accounts
101-
- Verify the contracts if possible
102-
- Deploy to as many environments as possible: mainnet, sepolia and integration
103-
- Update the contents of the `deployments` folder with the new addresses
104-
- Copy relevant build artifacts from `target/release` to `deployments/artifacts`, include abi file.
105-
- Tag the commit used for the release (include the same name as in the `deployments` folder for easy tracking)
106-
- Create release in GitHub if needed
107-
- Make this checklist better if you learned something during the process
21+
We have documentation about many other topis in the [Full documentation](./docs/SUMMARY.md)

0 commit comments

Comments
 (0)