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 Argent account implementation #260

Merged
merged 3 commits into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ function deployAccount(accountType: AccountImplementationType, options?: DeployA

- `accountType` - the implementation of the Account that you want to use; currently supported implementations:
- `"OpenZeppelin"` - [v0.5.0](https://github.com/OpenZeppelin/cairo-contracts/releases/tag/v0.5.0)
- `"Argent"` - [unofficial v0.2.3](https://github.com/argentlabs/argent-contracts-starknet/tree/3e31c25843010149027ca1bdce251b8d63bdfd9c)
- `"Argent"` - Commit [780760e](https://github.com/argentlabs/argent-contracts-starknet/tree/780760e4156afe592bb1feff7e769cf279ae9831) of branch develop.
- `options` - optional deployment parameters:
- `salt` - for fixing the account address
- `privateKey` - if you don't provide one, it will be randomly generated
Expand Down

This file was deleted.

This file was deleted.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{ "members": [{ "name": "to", "offset": 0, "type": "felt" }, { "name": "selector", "offset": 1, "type": "felt" }, { "name": "data_offset", "offset": 2, "type": "felt" }, { "name": "data_len", "offset": 3, "type": "felt" }], "name": "CallArray", "size": 4, "type": "struct" }, { "data": [{ "name": "new_signer", "type": "felt" }], "keys": [], "name": "signer_changed", "type": "event" }, { "data": [{ "name": "new_guardian", "type": "felt" }], "keys": [], "name": "guardian_changed", "type": "event" }, { "data": [{ "name": "new_guardian", "type": "felt" }], "keys": [], "name": "guardian_backup_changed", "type": "event" }, { "data": [{ "name": "active_at", "type": "felt" }], "keys": [], "name": "escape_guardian_triggered", "type": "event" }, { "data": [{ "name": "active_at", "type": "felt" }], "keys": [], "name": "escape_signer_triggered", "type": "event" }, { "data": [], "keys": [], "name": "escape_canceled", "type": "event" }, { "data": [{ "name": "new_guardian", "type": "felt" }], "keys": [], "name": "guardian_escaped", "type": "event" }, { "data": [{ "name": "new_signer", "type": "felt" }], "keys": [], "name": "signer_escaped", "type": "event" }, { "data": [{ "name": "new_implementation", "type": "felt" }], "keys": [], "name": "account_upgraded", "type": "event" }, { "data": [{ "name": "account", "type": "felt" }, { "name": "key", "type": "felt" }, { "name": "guardian", "type": "felt" }], "keys": [], "name": "account_created", "type": "event" }, { "data": [{ "name": "hash", "type": "felt" }, { "name": "response_len", "type": "felt" }, { "name": "response", "type": "felt*" }], "keys": [], "name": "transaction_executed", "type": "event" }, { "inputs": [{ "name": "call_array_len", "type": "felt" }, { "name": "call_array", "type": "CallArray*" }, { "name": "calldata_len", "type": "felt" }, { "name": "calldata", "type": "felt*" }], "name": "__validate__", "outputs": [], "type": "function" }, { "inputs": [{ "name": "call_array_len", "type": "felt" }, { "name": "call_array", "type": "CallArray*" }, { "name": "calldata_len", "type": "felt" }, { "name": "calldata", "type": "felt*" }], "name": "__execute__", "outputs": [{ "name": "retdata_size", "type": "felt" }, { "name": "retdata", "type": "felt*" }], "type": "function" }, { "inputs": [{ "name": "class_hash", "type": "felt" }], "name": "__validate_declare__", "outputs": [], "type": "function" }, { "inputs": [{ "name": "selector", "type": "felt" }, { "name": "calldata_size", "type": "felt" }, { "name": "calldata", "type": "felt*" }], "name": "__validate_deploy__", "outputs": [], "type": "function" }, { "inputs": [{ "name": "hash", "type": "felt" }, { "name": "sig_len", "type": "felt" }, { "name": "sig", "type": "felt*" }], "name": "isValidSignature", "outputs": [{ "name": "isValid", "type": "felt" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "name": "interfaceId", "type": "felt" }], "name": "supportsInterface", "outputs": [{ "name": "success", "type": "felt" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "name": "signer", "type": "felt" }, { "name": "guardian", "type": "felt" }], "name": "initialize", "outputs": [], "type": "function" }, { "inputs": [{ "name": "implementation", "type": "felt" }, { "name": "calldata_len", "type": "felt" }, { "name": "calldata", "type": "felt*" }], "name": "upgrade", "outputs": [{ "name": "retdata_len", "type": "felt" }, { "name": "retdata", "type": "felt*" }], "type": "function" }, { "inputs": [{ "name": "call_array_len", "type": "felt" }, { "name": "call_array", "type": "CallArray*" }, { "name": "calldata_len", "type": "felt" }, { "name": "calldata", "type": "felt*" }], "name": "execute_after_upgrade", "outputs": [{ "name": "retdata_len", "type": "felt" }, { "name": "retdata", "type": "felt*" }], "type": "function" }, { "inputs": [{ "name": "newSigner", "type": "felt" }], "name": "changeSigner", "outputs": [], "type": "function" }, { "inputs": [{ "name": "newGuardian", "type": "felt" }], "name": "changeGuardian", "outputs": [], "type": "function" }, { "inputs": [{ "name": "newGuardian", "type": "felt" }], "name": "changeGuardianBackup", "outputs": [], "type": "function" }, { "inputs": [], "name": "triggerEscapeGuardian", "outputs": [], "type": "function" }, { "inputs": [], "name": "triggerEscapeSigner", "outputs": [], "type": "function" }, { "inputs": [], "name": "cancelEscape", "outputs": [], "type": "function" }, { "inputs": [{ "name": "newGuardian", "type": "felt" }], "name": "escapeGuardian", "outputs": [], "type": "function" }, { "inputs": [{ "name": "newSigner", "type": "felt" }], "name": "escapeSigner", "outputs": [], "type": "function" }, { "inputs": [], "name": "getSigner", "outputs": [{ "name": "signer", "type": "felt" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getGuardian", "outputs": [{ "name": "guardian", "type": "felt" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getGuardianBackup", "outputs": [{ "name": "guardianBackup", "type": "felt" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getEscape", "outputs": [{ "name": "activeAt", "type": "felt" }, { "name": "type", "type": "felt" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getVersion", "outputs": [{ "name": "version", "type": "felt" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getName", "outputs": [{ "name": "name", "type": "felt" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "name": "hash", "type": "felt" }, { "name": "sig_len", "type": "felt" }, { "name": "sig", "type": "felt*" }], "name": "is_valid_signature", "outputs": [{ "name": "is_valid", "type": "felt" }], "stateMutability": "view", "type": "function" }]
2 changes: 1 addition & 1 deletion scripts/set-devnet-vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export OZ_ACCOUNT_ADDRESS=0x347be35996a21f6bf0623e75dbce52baba918ad5ae8d83b6f416
export OZ_ACCOUNT_PRIVATE_KEY=0xbdd640fb06671ad11c80317fa3b1799d

export ARGENT_ACCOUNT_SALT=0x42
export ARGENT_ACCOUNT_ADDRESS=0x2f6954a333487a22ff609b3fe97c1179874f1a7a66c9b12d244aeb247df9a9e
export ARGENT_ACCOUNT_ADDRESS=0x023070cac06a4ca2fa3903154725db73c390dac7522921992b075e32826773a0
export ARGENT_ACCOUNT_PRIVATE_KEY=0x66826acbe6ab1e8612124c0cb413b17695119148aabfe010b1851a9b78ea295
2 changes: 1 addition & 1 deletion src/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ export class OpenZeppelinAccount extends Account {
export class ArgentAccount extends Account {
static readonly ACCOUNT_TYPE_NAME = "ArgentAccount";
static readonly ACCOUNT_ARTIFACTS_NAME = "ArgentAccount";
static readonly VERSION = "3e31c25843010149027ca1bdce251b8d63bdfd9c";
static readonly VERSION = "780760e4156afe592bb1feff7e769cf279ae9831";

public guardianPublicKey: string;
public guardianPrivateKey: string;
Expand Down