Skip to content

Commit

Permalink
Store ECDSA public key in private note in account contract and refact…
Browse files Browse the repository at this point in the history
…or (#1054)

* Store ECDSA public key in private note in account contract

* Default sender to wallet address instead of zero

* Fix undefined salt not being overridden with a random value

* Enable address check in Schnorr account

* Refactor account tests and enable them for Schnorr account

* Refactor Schnorr account contract

* Add AccountImpl for ECDSA and setup e2e test

* Pick up e2e account contracts in CI after rename and skip ecdsa test

* Update account contracts after rebase

* Copy account contracts ABI to aztec-js to avoid dependency on noir-contracts
  • Loading branch information
spalladino authored Jul 14, 2023
1 parent 17476c2 commit c4ad54e
Show file tree
Hide file tree
Showing 33 changed files with 914 additions and 649 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: cond_spot_run_tests end-to-end e2e_account_contract.test.ts
command: cond_spot_run_tests end-to-end e2e_account_contracts.test.ts

e2e-pending-commitments-contract:
docker:
Expand Down
103 changes: 103 additions & 0 deletions yarn-project/aztec.js/src/abis/ecdsa_account_contract.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{
"name": "EcdsaAccount",
"functions": [
{
"name": "constructor",
"functionType": "secret",
"parameters": [
{
"name": "signing_pub_key_x",
"type": {
"kind": "array",
"length": 32,
"type": {
"kind": "integer",
"sign": "unsigned",
"width": 8
}
},
"visibility": "public"
},
{
"name": "signing_pub_key_y",
"type": {
"kind": "array",
"length": 32,
"type": {
"kind": "integer",
"sign": "unsigned",
"width": 8
}
},
"visibility": "public"
}
],
"returnTypes": []
},
{
"name": "entrypoint",
"functionType": "secret",
"parameters": [
{
"name": "payload",
"type": {
"kind": "struct",
"fields": [
{
"name": "flattened_args_hashes",
"type": {
"kind": "array",
"length": 2,
"type": {
"kind": "field"
}
}
},
{
"name": "flattened_selectors",
"type": {
"kind": "array",
"length": 2,
"type": {
"kind": "field"
}
}
},
{
"name": "flattened_targets",
"type": {
"kind": "array",
"length": 2,
"type": {
"kind": "field"
}
}
},
{
"name": "nonce",
"type": {
"kind": "field"
}
}
]
},
"visibility": "public"
},
{
"name": "signature",
"type": {
"kind": "array",
"length": 64,
"type": {
"kind": "integer",
"sign": "unsigned",
"width": 8
}
},
"visibility": "public"
}
],
"returnTypes": []
}
]
}
96 changes: 96 additions & 0 deletions yarn-project/aztec.js/src/abis/schnorr_account_contract.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"name": "SchnorrAccount",
"functions": [
{
"name": "constructor",
"functionType": "secret",
"parameters": [],
"returnTypes": []
},
{
"name": "entrypoint",
"functionType": "secret",
"parameters": [
{
"name": "payload",
"type": {
"kind": "struct",
"fields": [
{
"name": "flattened_args_hashes",
"type": {
"kind": "array",
"length": 2,
"type": {
"kind": "field"
}
}
},
{
"name": "flattened_selectors",
"type": {
"kind": "array",
"length": 2,
"type": {
"kind": "field"
}
}
},
{
"name": "flattened_targets",
"type": {
"kind": "array",
"length": 2,
"type": {
"kind": "field"
}
}
},
{
"name": "nonce",
"type": {
"kind": "field"
}
}
]
},
"visibility": "public"
},
{
"name": "owner",
"type": {
"kind": "array",
"length": 64,
"type": {
"kind": "integer",
"sign": "unsigned",
"width": 8
}
},
"visibility": "public"
},
{
"name": "signature",
"type": {
"kind": "array",
"length": 64,
"type": {
"kind": "integer",
"sign": "unsigned",
"width": 8
}
},
"visibility": "public"
},
{
"name": "partial_address",
"type": {
"kind": "field"
},
"visibility": "public"
}
],
"returnTypes": []
}
]
}
171 changes: 0 additions & 171 deletions yarn-project/aztec.js/src/account_impl/account_contract.ts

This file was deleted.

Loading

0 comments on commit c4ad54e

Please sign in to comment.