Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 2024Q2 #128

Merged
merged 1,841 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1841 commits
Select commit Hold shift + click to select a range
b68f0cb
Prepend `webauthn/` to panic messages
delaaxe Apr 23, 2024
19ab119
Renames
delaaxe Apr 23, 2024
d6de8df
Add extra data
delaaxe Apr 24, 2024
6090c57
upgrade cost (to revert)
gaetbout Apr 24, 2024
deba5bc
Use more different values in unit test
delaaxe Apr 24, 2024
bee9b26
Add assert
delaaxe Apr 24, 2024
58fa7fc
many keys
gaetbout Apr 24, 2024
982f911
Update gas-report.txt
delaaxe Apr 24, 2024
bcfe829
Merge branch 'develop' into feat/multisig-upgrade-SignerLinked
sgc-code Apr 24, 2024
5a1d5f1
update OZ to 0.12.0
sgc-code Apr 24, 2024
a25037e
fix gas report
sgc-code Apr 24, 2024
72686f4
revert profiler
gaetbout Apr 24, 2024
ae9bde3
Update src/presets/multisig_account.cairo
gaetbout Apr 24, 2024
c5ef8e6
get last_signer from get_signers
gaetbout Apr 24, 2024
cf6d78d
.transfer instead of invoke(transfer)
gaetbout Apr 24, 2024
54006e4
Merge pull request #387 from argentlabs/execution-lock-0.12.0
sgc-code Apr 24, 2024
6fa78f8
formatting
sgc-code Apr 24, 2024
7767d06
formatting
sgc-code Apr 24, 2024
759c09c
Merge pull request #382 from argentlabs/execution-lock
sgc-code Apr 24, 2024
583d390
first draft
gaetbout Apr 24, 2024
03adc7e
Merge branch 'develop' into feat/multisig-upgrade-SignerLinked
sgc-code Apr 24, 2024
0758136
remove only
gaetbout Apr 24, 2024
aa7fd01
merge
Leonard-Pat Apr 24, 2024
fe22dbf
update gas
Leonard-Pat Apr 24, 2024
fceef72
Merge branch 'feat/multisig-upgrade-SignerLinked' into feat/multisig-…
sgc-code Apr 24, 2024
de7252f
Merge pull request #378 from argentlabs/feat/multisig-upgrade-SignerL…
sgc-code Apr 24, 2024
26f5e8c
Merge branch 'develop' into feat/session-caching
Leonard-Pat Apr 24, 2024
022b45a
Merge branch 'develop' into refactor/webauthn-client-data
delaaxe Apr 26, 2024
52d572e
Update interface.cairo
gaetbout Apr 26, 2024
02ffd08
Update gas-report.txt
delaaxe Apr 26, 2024
c5dad19
Merge pull request #383 from argentlabs/refactor/webauthn-client-data
delaaxe Apr 26, 2024
79ffd00
change name
Leonard-Pat Apr 26, 2024
d8c34cd
merge
Leonard-Pat Apr 26, 2024
5c2e558
gas
Leonard-Pat Apr 26, 2024
9ec1ae4
Merge branch 'develop' into gaetbout-patch-1
sgc-code Apr 26, 2024
ea7557c
Update sessions.md
Leonard-Pat Apr 26, 2024
2b93539
Merge pull request #379 from argentlabs/feat/session-caching
Leonard-Pat Apr 26, 2024
27011b9
Merge branch 'develop' into gaetbout-patch-1
sgc-code Apr 29, 2024
3338897
Merge pull request #389 from argentlabs/gaetbout-patch-1
sgc-code Apr 29, 2024
c2943ba
Merge branch 'develop' into test/gas-griefing-tx-v3
sgc-code Apr 29, 2024
16786b5
l1_gas compute
gaetbout Apr 29, 2024
cedd438
format
gaetbout Apr 29, 2024
c208fd3
Update interface.cairo
gaetbout Apr 29, 2024
63291d1
Update interface.cairo
gaetbout Apr 29, 2024
8e16292
Update interface.cairo
gaetbout Apr 29, 2024
6be4f49
Update src/recovery/interface.cairo
gaetbout Apr 29, 2024
daf320a
l1_gas not soncst
gaetbout Apr 29, 2024
b20d78e
Clarify is_valid_signature
sgc-code Apr 29, 2024
2ed8162
update formula
gaetbout Apr 29, 2024
aa48ae7
woopsie revert only
gaetbout Apr 29, 2024
cafa08a
Merge pull request #380 from argentlabs/test/gas-griefing-tx-v3
sgc-code Apr 30, 2024
e12a89c
Merge branch 'develop' into clarify-is_valid_signature
sgc-code Apr 30, 2024
1897c78
Merge branch 'develop' into gaetbout-patch-1
sgc-code Apr 30, 2024
d5ff900
Merge pull request #391 from argentlabs/clarify-is_valid_signature
sgc-code Apr 30, 2024
3767c87
Merge branch 'develop' into gaetbout-patch-1
sgc-code Apr 30, 2024
b91f278
Fix misleading imports Secp256k1Signature and Secp256r1Signature
sgc-code Apr 30, 2024
ff894ba
update missing places
sgc-code Apr 30, 2024
bec29fe
Merge pull request #390 from argentlabs/gaetbout-patch-1
sgc-code Apr 30, 2024
b6f83a1
Merge branch 'develop' into fix/misleading-imports
sgc-code Apr 30, 2024
beaa32a
more tests
Leonard-Pat Apr 30, 2024
bdaec75
new account with execution method
Leonard-Pat Apr 30, 2024
8baeaa9
add method to inject signature
Leonard-Pat May 1, 2024
9cc9cf6
more caching tests
Leonard-Pat May 1, 2024
f90b702
more guardian checks
Leonard-Pat May 1, 2024
c3fe1e6
proof tests
Leonard-Pat May 1, 2024
2603f49
lint and format
Leonard-Pat May 1, 2024
6cc7b50
Merge branch 'develop' into feat/ts-session-tests
Leonard-Pat May 1, 2024
ded3acf
Merge pull request #392 from argentlabs/fix/misleading-imports
sgc-code May 2, 2024
cec2ebc
Merge branch 'develop' into feat/ts-session-tests
sgc-code May 2, 2024
818b0f6
Update interface.cairo
gaetbout May 2, 2024
bd9bde3
Update array_ext.cairo
gaetbout May 2, 2024
455eb78
Update argent_account.cairo
gaetbout May 2, 2024
ed4f43d
cleaned up session
Leonard-Pat May 3, 2024
e752db9
lint
Leonard-Pat May 3, 2024
cdbe48d
more tidying
Leonard-Pat May 3, 2024
61ea7c5
Merge pull request #394 from argentlabs/gaetbout-patch-1
sgc-code May 3, 2024
7a82e6e
Merge branch 'develop' into feat/ts-session-tests
Leonard-Pat May 3, 2024
39e7838
first commit
gaetbout May 6, 2024
32b2ce6
first draft
gaetbout May 6, 2024
38744da
first draft
gaetbout May 6, 2024
e9ff7f1
Merge branch 'develop' into refactor/mixin-devnet
delaaxe May 6, 2024
e9faa31
fix ts tests
gaetbout May 6, 2024
c5eeccc
Merge branch 'refactor/mixin-devnet' into refactor/mixin-contracts
delaaxe May 6, 2024
fcd320d
Merge pull request #385 from argentlabs/refactor/mixin-devnet
delaaxe May 6, 2024
086939c
Compose TokenManager
delaaxe May 6, 2024
94318ec
Merge branch 'develop' into refactor/mixin-tokens
delaaxe May 6, 2024
e47ef2d
fix new_signers
gaetbout May 6, 2024
1b64c39
adding tests
gaetbout May 6, 2024
7f063ad
adding cairo tests
gaetbout May 6, 2024
b55ffd8
Merge branch 'develop' into feat/align-EscapeCancelled-v2
delaaxe May 6, 2024
9a01f01
Merge branch 'develop' into fix/external_recovery-EscapeCanceled
delaaxe May 6, 2024
f040721
Update tests/test_comp_recovery_external.cairo
gaetbout May 6, 2024
e48457b
first draft
gaetbout May 7, 2024
b6cb30c
Merge branch 'develop' into feat/ts-session-tests
Leonard-Pat May 7, 2024
0072b82
provider
Leonard-Pat May 7, 2024
63731da
txv3 test and tidying up
Leonard-Pat May 7, 2024
77fdfda
adding test
gaetbout May 7, 2024
ef23ea5
first draft
gaetbout May 8, 2024
349475d
Merge pull request #396 from argentlabs/feat/align-EscapeCancelled-v2
sgc-code May 8, 2024
352f363
Merge branch 'develop' into fix/external_recovery-EscapeCanceled
sgc-code May 8, 2024
d175c0a
adding min on expriy period
gaetbout May 8, 2024
dd36c61
Merge branch 'develop' into feat/multisig-toggle-escape-min-security-…
gaetbout May 8, 2024
842a38c
removing extra space
gaetbout May 8, 2024
a76d2f3
fix setTime
gaetbout May 8, 2024
43887bf
fix test_cancel_escape_expired
gaetbout May 8, 2024
e62902d
Merge pull request #397 from argentlabs/fix/external_recovery-EscapeC…
sgc-code May 8, 2024
2467d68
Merge branch 'develop' into feat/multisig-toggle-escape-min-security-…
sgc-code May 8, 2024
77d75ac
Merge branch 'develop' into fix/execute_escape-reentrancy-v2
sgc-code May 8, 2024
4cc3e81
adding test from the account
gaetbout May 8, 2024
7f41085
adding guardian != account check
gaetbout May 8, 2024
896f45c
fixing test
gaetbout May 8, 2024
051f652
Merge pull request #398 from argentlabs/feat/multisig-toggle-escape-m…
sgc-code May 8, 2024
040355f
Merge branch 'develop' into feat/ts-session-tests
sgc-code May 8, 2024
f84bda8
merge w/ develop
gaetbout May 8, 2024
13a504f
updated functions
Leonard-Pat May 9, 2024
fe85e75
simplify session setup
Leonard-Pat May 9, 2024
f793f74
better session setup
Leonard-Pat May 9, 2024
0c98bc0
cleanup
Leonard-Pat May 9, 2024
4966027
Merge branch 'develop' into refactor/mixin-tokens
delaaxe May 9, 2024
11a213c
Rename provider to manager
delaaxe May 9, 2024
eb051d7
Merge pull request #386 from argentlabs/refactor/mixin-tokens
delaaxe May 9, 2024
7ace766
Merge branch 'develop' into feat/ts-session-tests
Leonard-Pat May 10, 2024
52c786f
Merge branch 'develop' into doc/comment-not-audited-code
sgc-code May 10, 2024
e0add6f
mixins
Leonard-Pat May 10, 2024
9ea2284
first draft
gaetbout May 10, 2024
7b4315c
remove guardian != account
gaetbout May 10, 2024
f84eb10
remove test comment line
gaetbout May 10, 2024
7bea8e6
Merge branch 'develop' into fix/execute_escape-reentrancy-v2
sgc-code May 10, 2024
a85f6f8
Merge branch 'develop' into feat/external-recovery-guardian-not-account
gaetbout May 10, 2024
10d5fe1
fix test-ts
gaetbout May 10, 2024
239573a
use for loop for caching tests
Leonard-Pat May 10, 2024
8aea506
fix test
Leonard-Pat May 10, 2024
ddd81a1
Merge pull request #402 from argentlabs/feat/external-recovery-guardi…
sgc-code May 10, 2024
455f2c3
Merge branch 'develop' into fix/execute_escape-reentrancy-v2
sgc-code May 10, 2024
8ba8550
Merge branch 'develop' into feat/ts-session-tests
Leonard-Pat May 10, 2024
71b72f7
added test in loop
Leonard-Pat May 10, 2024
7974884
all test in loop
Leonard-Pat May 10, 2024
8a111e2
only
Leonard-Pat May 10, 2024
5167209
Merge branch 'develop' into doc/comment-not-audited-code
Leonard-Pat May 10, 2024
9ffd110
Merge pull request #401 from argentlabs/doc/comment-not-audited-code
sgc-code May 13, 2024
e076096
Merge branch 'develop' into fix/execute_escape-reentrancy-v2
sgc-code May 13, 2024
639dbb4
Merge pull request #400 from argentlabs/fix/execute_escape-reentrancy-v2
sgc-code May 13, 2024
46f3d9c
Merge branch 'develop' into feat/ts-session-tests
Leonard-Pat May 20, 2024
e3542a7
updated OE to use version 2
Leonard-Pat May 20, 2024
0a81250
gas
Leonard-Pat May 20, 2024
7ff0a87
Merge pull request #403 from argentlabs/fix/outside-execution-version
Leonard-Pat May 20, 2024
2c8be31
Merge branch 'develop' into feat/ts-session-tests
Leonard-Pat May 20, 2024
493840f
Add tests
delaaxe May 20, 2024
e85ad1c
Add test
delaaxe May 20, 2024
24a6544
malleability WIP
sgc-code May 21, 2024
8b19276
argent account fix
gaetbout May 21, 2024
622b5da
adding multisig dev
gaetbout May 21, 2024
f991a83
update gas report
gaetbout May 21, 2024
629b75a
style, fix tests
sgc-code May 21, 2024
a3749d4
fix ts
sgc-code May 21, 2024
cbce31c
adding tests
gaetbout May 22, 2024
186d87e
fix gas report
gaetbout May 22, 2024
67bc16c
remove comment
gaetbout May 22, 2024
5d2b98a
first draft
gaetbout May 22, 2024
f2141ff
Merge pull request #404 from argentlabs/test/webauthn
sgc-code May 22, 2024
00cf110
Merge branch 'develop' into audit/8.2
sgc-code May 22, 2024
fe13006
Merge branch 'develop' into audit/escape-security-period-with-escape-…
sgc-code May 22, 2024
dd8564a
first draft
gaetbout May 22, 2024
e7169c8
fix rename + comment
gaetbout May 22, 2024
3affb51
revert gas report
gaetbout May 22, 2024
a8cb4c1
revert sha256_cairo0
gaetbout May 22, 2024
fd3c47c
Update src/utils/bytes.cairo
gaetbout May 22, 2024
d77f6a3
Merge branch 'develop' into feat/ts-session-tests
Leonard-Pat May 22, 2024
461c1e0
Update tests-integration/sessionCaching.test.ts
Leonard-Pat May 22, 2024
fc09cb0
Update tests-integration/sessionCaching.test.ts
Leonard-Pat May 22, 2024
8af7fbd
format
Leonard-Pat May 22, 2024
bf69d2a
made a new transaction function
Leonard-Pat May 22, 2024
c735f41
remove assert_guardian_set() from `escape_owner` validation
sgc-code May 22, 2024
8eef938
Merge pull request #405 from argentlabs/audit/escape-security-period-…
sgc-code May 22, 2024
33b21f8
Merge branch 'develop' into audit/9.5
sgc-code May 22, 2024
d190815
Merge branch 'develop' into audit/8.2
sgc-code May 22, 2024
d95c4ea
Merge pull request #409 from argentlabs/audit/9.5
sgc-code May 22, 2024
ad82622
Merge branch 'develop' into audit/8.2
sgc-code May 22, 2024
b9426b1
Merge branch 'develop' into fix/escape-owner-validation
sgc-code May 22, 2024
a1dd7cb
update gas report
sgc-code May 22, 2024
3e03aea
Merge pull request #407 from argentlabs/audit/8.2
sgc-code May 22, 2024
b8d65c4
Merge branch 'develop' into audit/8.6
sgc-code May 22, 2024
c87598d
Merge branch 'develop' into fix/escape-owner-validation
sgc-code May 22, 2024
c704b12
Merge branch 'develop' into feat/ts-session-tests
sgc-code May 22, 2024
6bb4218
Extra validation on r1 signatures
sgc-code May 22, 2024
22c5091
Merge pull request #408 from argentlabs/audit/8.6
sgc-code May 22, 2024
8516746
Merge branch 'develop' into fix/escape-owner-validation
sgc-code May 22, 2024
935c1d1
Merge branch 'develop' into malleability
sgc-code May 22, 2024
018e656
Merge branch 'develop' into fix/extra-validation-on-r1-signatures
sgc-code May 22, 2024
bab8eac
simplify
sgc-code May 22, 2024
02861c2
alternative solution to malleability
sgc-code May 22, 2024
deaf3c3
Merge branch 'develop' into feat/ts-session-tests
Leonard-Pat May 22, 2024
80e8b40
Merge pull request #410 from argentlabs/fix/escape-owner-validation
sgc-code May 22, 2024
e6e24c1
fix tests
sgc-code May 22, 2024
dfdadf9
Merge branch 'develop' into fix/extra-validation-on-r1-signatures
sgc-code May 22, 2024
6a6fd52
Merge branch 'develop' into malleability
sgc-code May 22, 2024
75d72ed
Merge branch 'malleability' into malleabiltity-alternative
sgc-code May 22, 2024
649fd28
fix ts side
sgc-code May 22, 2024
5d5c02c
first draft
gaetbout May 23, 2024
a01c4e6
extra LB
gaetbout May 23, 2024
1692d50
Merge branch 'develop' into audit/8.2-fix
sgc-code May 23, 2024
61ebdfa
Merge pull request #414 from argentlabs/audit/8.2-fix
sgc-code May 23, 2024
c238c55
Merge branch 'develop' into malleability
sgc-code May 23, 2024
c5289f4
Merge branch 'develop' into fix/extra-validation-on-r1-signatures
sgc-code May 23, 2024
ebab45b
Merge branch 'develop' into feat/ts-session-tests
delaaxe May 23, 2024
a677ce3
Merge branch 'malleability' into malleabiltity-alternative
sgc-code May 23, 2024
c50f67e
change to asserts
sgc-code May 23, 2024
ef7bd82
Merge pull request #393 from argentlabs/feat/ts-session-tests
Leonard-Pat May 23, 2024
900b2be
Merge branch 'develop' into fix/extra-validation-on-r1-signatures
Leonard-Pat May 23, 2024
be98744
add tests
sgc-code May 23, 2024
f9b5b01
Update src/signer/signer_signature.cairo
sgc-code May 23, 2024
fdcbe31
Update src/signer/signer_signature.cairo
sgc-code May 23, 2024
d62f246
Merge pull request #413 from argentlabs/malleabiltity-alternative
sgc-code May 23, 2024
f863059
Merge branch 'fix/extra-validation-on-r1-signatures' into malleability
sgc-code May 23, 2024
3ad4237
Merge pull request #411 from argentlabs/fix/extra-validation-on-r1-si…
sgc-code May 23, 2024
0ab1b82
Merge branch 'develop' into malleability
sgc-code May 23, 2024
ac4b0c9
fixes
sgc-code May 23, 2024
4e8dd6f
add constants
sgc-code May 23, 2024
4181ffe
more tests
sgc-code May 23, 2024
980d124
style
sgc-code May 23, 2024
ac07860
format
sgc-code May 23, 2024
106e302
test r1 curve
sgc-code May 23, 2024
e90ba11
minimize changes
sgc-code May 23, 2024
1529764
update gas report
sgc-code May 23, 2024
ae8d119
style
sgc-code May 24, 2024
065bca1
test returns false when invalid
sgc-code May 24, 2024
e0ece20
Update src/signer/signer_signature.cairo
sgc-code May 24, 2024
30d2491
style
sgc-code May 24, 2024
1c4f396
more tests
sgc-code May 24, 2024
d5d8686
Merge pull request #406 from argentlabs/malleability
sgc-code May 24, 2024
995e59e
fix outdated comment
sgc-code May 24, 2024
e0deffe
Merge pull request #415 from argentlabs/fix/outdate-comment
sgc-code May 24, 2024
91ae0e0
Fix comment in outside execution
sgc-code May 28, 2024
0797df6
Merge pull request #416 from argentlabs/fix/comment-outside-execution
sgc-code May 29, 2024
5814820
first draft
gaetbout May 31, 2024
f924fea
Publish account 0.4.0 and multisig 0.2.0
sgc-code Jun 3, 2024
69f4c63
Update README.md
sgc-code Jun 3, 2024
332929e
Merge pull request #418 from argentlabs/release-0.4.0
sgc-code Jun 3, 2024
149c69a
Merge branch 'develop' into fix/webauthn-example-2
sgc-code Jun 3, 2024
7394f13
adapt to latest version
sgc-code Jun 4, 2024
2606d63
Update signers_and_signatures.md
dhruvkelawala Jun 4, 2024
33693fe
Merge pull request #419 from argentlabs/dhruvkelawala-patch-1
dhruvkelawala Jun 5, 2024
3ffc241
address issues found in review
sgc-code Jun 6, 2024
543e7a3
Merge branch 'develop' into fix/webauthn-example-2
sgc-code Jun 6, 2024
818fb19
add warning about sha256 contract not declared
sgc-code Jun 7, 2024
029dd4e
fix legacy signer key pair
Leonard-Pat Jun 12, 2024
9508af0
Merge pull request #420 from argentlabs/fix/legacy-signer
sgc-code Jun 12, 2024
79caef0
Merge branch 'develop' into fix/webauthn-example-2
sgc-code Jun 12, 2024
0eacf63
Merge pull request #417 from argentlabs/fix/webauthn-example-2
sgc-code Jun 12, 2024
5b61ee2
Merge branch 'main' of https://github.com/argentlabs/argent-contracts…
sgc-code Jun 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .cairofmtignore

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/cairo-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ jobs:
uses: actions/checkout@v3
- name: Step 2 - Getting scarb
uses: software-mansion/[email protected]
- name: Step 3 - Testing
- name: Step 3 - Setting up snfoundry
uses: foundry-rs/setup-snfoundry@v3
- name: Step 4 - Running tests
run: scarb test

format:
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ dist
target
node_modules
node.json
snfoundry_cache

cairo
account.json
dump
package-lock.json
.snfoundry_cache

/.svelte-kit
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
yarn-error.log
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"trailingComma": "all",
"singleQuote": false,
"semi": true,
"printWidth": 120
"printWidth": 120,
"plugins": ["prettier-plugin-organize-imports"]
}
3 changes: 2 additions & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
scarb 2.4.3
scarb 2.6.3
starknet-foundry 0.20.0
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

See here for the [Argent Account](./docs/CHANGELOG_argent_account.md)
See here for the [Argent Multisig](./docs/CHANGELOG_multisig.md)

# Deployments

See deployed class hashes can be found here for the [Argent Account](./deployments/account.txt), and here for the [Argent Multisig](./deployments/multisig.txt)

Other deployment artifacts are located in [/deployments/](./deployments/)
53 changes: 39 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@

## Specification

See [Argent Account](src/account/README.md) and [Argent Multisig](src/multisig/README.md) for more details.
See [Argent Account](./docs/argent_account.md) and [Argent Multisig](./docs/multisig.md) for more details.

## Development
## Deployments

See deployed class hashes can be found here for the [Argent Account](./deployments/account.txt), and here for the [Argent Multisig](./deployments/multisig.txt)

### Setup Rust
Other deployment artifacts are located in [/deployments/](./deployments/)

Please refer to [these instructions](https://docs.cairo-lang.org/getting_started/prerequisits.html).
You can skip cloning the Cairo repository, as this will be done automatically through the Makefile.
If you are a developer, we recommend that you install the Cairo extension. You can find it in the vscode Extensions Marketplace by looking for "Cairo 1.0".
Find the release notes for all versions in [CHANGELOG](./CHANGELOG.md)

## Development

### Setup scarb
### Setup

Refer to this documentation: https://docs.swmansion.com/scarb/download.html#install-via-asdf
Thanks to the [.tool-versions file](./.tool-versions), you don't need to install a specific scarb version. The correct one will be automatically downloaded and installed.
We recommend you to install scarb through ASDF. Please refer to [these instructions](https://docs.swmansion.com/scarb/download.html#install-via-asdf).
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.

## Test the contracts (Cairo)

Expand Down Expand Up @@ -62,21 +64,44 @@ scarb run format

### Contract fixtures

The [fixtures folder](./tests-integrations/fixtures/) contains pre-compiled contracts used for tests (both json and casm).
The [fixtures folder](./tests-integration/fixtures/) contains pre-compiled contracts used for tests (both json and casm).

### Interface IDs

For compatibility reasons we support legacy interface IDs. But new interface IDs will follow [SNIP-5](https://github.com/ericnordelo/SNIPs/blob/feat/standard-interface-detection/SNIPS/snip-5.md#how-interfaces-are-identified)
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)
Tool to calculate interface IDs: https://github.com/ericnordelo/src5-rs

### Cairo Zero SHA256 contract

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:

```shell
git clone https://github.com/cartridge-gg/cairo-sha256
cd cairo-sha256
git checkout 8d2ae51
git apply ../lib/signers/cairo0-sha256.patch

python3.9 -m venv ./venv
source ./venv/bin/activate
pip install cairo-lang==0.12.1

starknet-compile-deprecated --no_debug_info src/main.cairo > ../tests-integration/fixtures/argent_Sha256Cairo0.contract_class.json

# cleanup and clear whitespace diffs:
deactivate
cd ..
rm -rf cairo-sha256
scarb run format
```

## Release checklist

- Bump version if needed (new deployment in mainnet)
- Set up your .env file with the deployer info and run `yarn deploy` to declare the accounts
- Set up your .env file with the deployer info and run `scarb run deploy-account` and `scarb run deploy-multisig` to declare the accounts
- Verify the contracts if possible
- Deploy to as many environments as possible: mainnet, goerli, sepolia and integration
- Deploy to as many environments as possible: mainnet, sepolia and integration
- Update the contents of the `deployments` folder with the new addresses
- Copy relevant build artifacts from `target/release` to `deployments/artifacts`
- Copy relevant build artifacts from `target/release` to `deployments/artifacts`, include abi file.
- Tag the commit used for the release (include the same name as in the `deployments` folder for easy tracking)
- Create release in GitHub if needed
- Make this checklist better if you learned something during the process
55 changes: 55 additions & 0 deletions Scarb.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,61 @@
# Code generated by scarb DO NOT EDIT.
version = 1

[[package]]
name = "alexandria_data_structures"
version = "0.2.0"
source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=cairo-v2.6.0#946e6e2f9d390ad9f345882a352c0dd6f02ef3ad"
dependencies = [
"alexandria_encoding",
]

[[package]]
name = "alexandria_encoding"
version = "0.1.0"
source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=cairo-v2.6.0#946e6e2f9d390ad9f345882a352c0dd6f02ef3ad"
dependencies = [
"alexandria_math",
"alexandria_numeric",
]

[[package]]
name = "alexandria_math"
version = "0.2.0"
source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=cairo-v2.6.0#946e6e2f9d390ad9f345882a352c0dd6f02ef3ad"
dependencies = [
"alexandria_data_structures",
]

[[package]]
name = "alexandria_merkle_tree"
version = "0.1.0"
source = "git+https://github.com/keep-starknet-strange/alexandria.git?tag=cairo-v2.6.0#946e6e2f9d390ad9f345882a352c0dd6f02ef3ad"

[[package]]
name = "alexandria_numeric"
version = "0.1.0"
source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=cairo-v2.6.0#946e6e2f9d390ad9f345882a352c0dd6f02ef3ad"
dependencies = [
"alexandria_math",
]

[[package]]
name = "argent"
version = "0.1.0"
dependencies = [
"alexandria_encoding",
"alexandria_math",
"alexandria_merkle_tree",
"openzeppelin",
"snforge_std",
]

[[package]]
name = "openzeppelin"
version = "0.12.0"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.12.0#0697004db74502ce49900edef37331dd03531356"

[[package]]
name = "snforge_std"
version = "0.20.0"
source = "git+https://github.com/foundry-rs/starknet-foundry.git?tag=v0.20.0#423eecf7847469e353258321274394b9155d24eb"
17 changes: 13 additions & 4 deletions Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
[package]
name = "argent"
version = "0.1.0"

# See more keys and their definitions at https://docs.swmansion.com/scarb/docs/reference/manifest
cairo-version = "2.6.3"

[[target.starknet-contract]]
sierra = true
casm = true
allowed-libfuncs-list.name = "audited"
build-external-contracts = ["openzeppelin::presets::account::AccountUpgradeable"]

[dependencies]
starknet = "2.4.3"
starknet = "2.6.3"
alexandria_math = { git = "https://github.com/keep-starknet-strange/alexandria.git", rev = "cairo-v2.6.0" }
alexandria_encoding = { git = "https://github.com/keep-starknet-strange/alexandria.git", rev = "cairo-v2.6.0" }
alexandria_merkle_tree = { git = "https://github.com/keep-starknet-strange/alexandria.git", tag="cairo-v2.6.0" }
snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry.git", tag = "v0.20.0" }
openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v0.12.0" }

[tool.fmt]
max-line-length = 120
sort-module-level-items = true

[scripts]
test = "snforge test"
format = "scarb fmt && yarn prettier --write ."
lint = "yarn eslint ."
test-ts = "scarb --profile release build && yarn tsc && yarn mocha tests-integration/*.test.ts"
test-multisig = "scarb --profile release build && yarn tsc && yarn mocha tests-integration/multisig*.test.ts"
test-session = "scarb --profile release build && yarn tsc && yarn mocha tests-integration/session*.test.ts"
test-list = "scarb --profile release build && yarn tsc && yarn mocha --dry-run tests-integration/*.test.ts"
start-devnet = "./scripts/start-devnet.sh"
kill-devnet = "lsof -t -i tcp:5050 | xargs kill"
profile = "scarb --profile release build && node --loader ts-node/esm scripts/profile-account.ts"
deploy = "scarb --profile release build && node --loader ts-node/esm scripts/deploy-account.ts"
deploy-account = "scarb --profile release build && node --loader ts-node/esm scripts/deploy-account.ts"
deploy-multisig = "scarb --profile release build && node --loader ts-node/esm scripts/deploy-multisig.ts"
generate-signature = "node --loader ts-node/esm ./scripts/generate-signature.ts"
update-webauthn-dapp = "scarb --profile release build && cp target/release/*ArgentAccount* examples/webauthn/src/lib"
Binary file not shown.
11 changes: 8 additions & 3 deletions deployments/account.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
0x036078334509b514626504edc9fb252328d1a240e4e948bef8d0c08dff45927f: 0.4.0 (mainnet, sepolia)
0x29927c8af6bccf3f6fda035981e765a7bdbf18a2dc0d630494f8758aa908e2b: 0.3.1 (mainnet, goerli, sepolia, integration)
0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003: 0.3.0 (mainnet, goerli-1, goerli-2, integration)
0x45bb3b296122454fb31d45c48da6143df12bcf58311dcd75193df42d79f8dd2: 0.3.0-rc2 (goerli-1, goerli-2)
0x5ff858f178257126353d03db2e50410c7cb399d9fc68b67ffe127d9b8b2a33c: 0.3.0-rc2 tweaked with version 0.3.99 (goerli-1, goerli-2)

cairo 0 clash hashes stored here https://argenthq.notion.site/argenthq/11e1b194b0304124b05f6118e450e553?v=46e893ed521f4850ba801d1747cc84ef
Older cairo 0 clash hashes stored here https://argenthq.notion.site/argenthq/11e1b194b0304124b05f6118e450e553?v=46e893ed521f4850ba801d1747cc84ef


Internal Versions:
0x7f8ac221236add990375a03a03cb30f758535a1dcebe78692ee16ef265ebc14: 0.3.1 with 5 min escape (sepolia)
0x45bb3b296122454fb31d45c48da6143df12bcf58311dcd75193df42d79f8dd2: 0.3.0-rc2 (goerli-1, goerli-2)
0x5ff858f178257126353d03db2e50410c7cb399d9fc68b67ffe127d9b8b2a33c: 0.3.0-rc2 tweaked with version 0.3.99 (goerli-1, goerli-2)
Loading
Loading