From 3a2ee5a86a69d375bf040117e4aa3fce42ff031b Mon Sep 17 00:00:00 2001 From: Oba Date: Mon, 19 Aug 2024 18:14:33 +0200 Subject: [PATCH] refactor: remove account version --- src/kakarot/accounts/account_contract.cairo | 11 ----------- src/kakarot/accounts/library.cairo | 3 --- src/kakarot/interfaces/interfaces.cairo | 3 --- tests/fixtures/uninitialized_account_fixture.cairo | 2 +- 4 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/kakarot/accounts/account_contract.cairo b/src/kakarot/accounts/account_contract.cairo index 58a289c90..1a6d2ea9a 100644 --- a/src/kakarot/accounts/account_contract.cairo +++ b/src/kakarot/accounts/account_contract.cairo @@ -50,17 +50,6 @@ func initialize{ return AccountContract.initialize(evm_address); } -// @notice Returns the version of the account class. -// @dev The version is a packed integer with the following format: XXX.YYY.ZZZ where XXX is the -// major version, YYY is the minor version and ZZZ is the patch version. -@view -func version{ - syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr, bitwise_ptr: BitwiseBuiltin* -}() -> (version: felt) { - let version = AccountContract.VERSION; - return (version=version); -} - // @notice Gets the evm address associated with the account. // @return address The EVM address of the account. @view diff --git a/src/kakarot/accounts/library.cairo b/src/kakarot/accounts/library.cairo index 28539f89f..d3bedfca9 100644 --- a/src/kakarot/accounts/library.cairo +++ b/src/kakarot/accounts/library.cairo @@ -82,9 +82,6 @@ const BYTES_PER_FELT = 31; // @notice This file contains the EVM account representation logic. // @dev: Both EOAs and Contract Accounts are represented by this contract. Owner is expected to be Kakarot. namespace AccountContract { - // 000.001.000 - const VERSION = 000001000; - // @notice This function is used to initialize the smart contract account. // @dev The `evm_address` and `kakarot_address` were set during the uninitialized_account creation. // Reading them from state ensures that they always match the ones the account was created for. diff --git a/src/kakarot/interfaces/interfaces.cairo b/src/kakarot/interfaces/interfaces.cairo index 4f2c7aa10..b6d73635c 100644 --- a/src/kakarot/interfaces/interfaces.cairo +++ b/src/kakarot/interfaces/interfaces.cairo @@ -42,9 +42,6 @@ namespace IAccount { func set_implementation(implementation: felt) { } - func version() -> (version: felt) { - } - func bytecode_len() -> (len: felt) { } diff --git a/tests/fixtures/uninitialized_account_fixture.cairo b/tests/fixtures/uninitialized_account_fixture.cairo index 0ce2cf495..d37ab1fae 100644 --- a/tests/fixtures/uninitialized_account_fixture.cairo +++ b/tests/fixtures/uninitialized_account_fixture.cairo @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// ! A fixture of the Account Contract class, used to test the upgradeability flow, where version = 001.000.000 +// ! A fixture of the Account Contract class, used to test the upgradeability flow %lang starknet from kakarot.accounts.uninitialized_account import (