Skip to content

Commit

Permalink
revert IAccount
Browse files Browse the repository at this point in the history
  • Loading branch information
gaetbout committed May 21, 2024
1 parent 3abd469 commit 41118ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
7 changes: 7 additions & 0 deletions src/library/account.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,11 @@ const ERC165_ACCOUNT_INTERFACE_ID_OLD_1: felt252 = 0xa66bd575;
const ERC165_ACCOUNT_INTERFACE_ID_OLD_2: felt252 = 0x3943f10f;
// InterfaceID: 0x2ceccef7f994940b3962a6c67e0ba4fcd37df7d131417c604f91e03caecc1cd

trait IAccount<TContractState> {
fn __validate__(ref self: TContractState, calls: Array<Call>) -> felt252;
fn __execute__(ref self: TContractState, calls: Array<Call>) -> Array<Span<felt252>>;
fn is_valid_signature(
self: @TContractState, hash: felt252, signature: Array<felt252>
) -> felt252;
}

11 changes: 2 additions & 9 deletions src/multisig/argent_multisig.cairo
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
use argent::library::account::IAccount;
#[starknet::contract]
mod ArgentMultisig {
trait IAccount<TContractState> {
fn __validate__(ref self: TContractState, calls: Array<Call>) -> felt252;
fn __execute__(ref self: TContractState, calls: Array<Call>) -> Array<Span<felt252>>;
fn is_valid_signature(
self: @TContractState, hash: felt252, signature: Array<felt252>
) -> felt252;
}

use argent::multisig::interface::IArgentMultisig; // For some reason (fn colliding with same name) I have to import it here and use super


Expand Down Expand Up @@ -138,7 +131,7 @@ mod ArgentMultisig {
}

#[external(v0)]
impl Account of IAccount<ContractState> {
impl Account of super::IAccount<ContractState> {
fn __validate__(ref self: ContractState, calls: Array<Call>) -> felt252 {
assert_caller_is_null();
let tx_info = get_tx_info().unbox();
Expand Down

0 comments on commit 41118ce

Please sign in to comment.