-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store ECDSA public key in private note in account contract and refact…
…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
1 parent
17476c2
commit c4ad54e
Showing
33 changed files
with
914 additions
and
649 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
yarn-project/aztec.js/src/abis/ecdsa_account_contract.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
96
yarn-project/aztec.js/src/abis/schnorr_account_contract.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
171
yarn-project/aztec.js/src/account_impl/account_contract.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.