Skip to content

Commit

Permalink
Merge pull request #182 from bcnmy/fix/cantina-62
Browse files Browse the repository at this point in the history
Fix/cantina 62
  • Loading branch information
livingrockrises authored Sep 25, 2024
2 parents 63f76d1 + d87cef9 commit 2adae86
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 5 additions & 3 deletions contracts/base/BaseAccount.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ pragma solidity ^0.8.27;
// Learn more at https://biconomy.io. To report security issues, please contact us at: [email protected]

import { IEntryPoint } from "account-abstraction/contracts/interfaces/IEntryPoint.sol";

import { Storage } from "./Storage.sol";
import { IBaseAccount } from "../interfaces/base/IBaseAccount.sol";

/// @title Nexus - BaseAccount
Expand All @@ -25,10 +23,14 @@ import { IBaseAccount } from "../interfaces/base/IBaseAccount.sol";
/// @author @filmakarov | Biconomy | [email protected]
/// @author @zeroknots | Rhinestone.wtf | zeroknots.eth
/// Special thanks to the Solady team for foundational contributions: https://github.com/Vectorized/solady
contract BaseAccount is Storage, IBaseAccount {
contract BaseAccount is IBaseAccount {
/// @notice Identifier for this implementation on the network
string internal constant _ACCOUNT_IMPLEMENTATION_ID = "biconomy.nexus.1.0.0-beta";

/// @notice The canonical address for the ERC4337 EntryPoint contract, version 0.7.
/// This address is consistent across all supported networks.
address internal immutable _ENTRYPOINT;

/// @dev Ensures the caller is either the EntryPoint or this account itself.
/// Reverts with AccountAccessUnauthorized if the check fails.
modifier onlyEntryPointOrSelf() {
Expand Down
4 changes: 0 additions & 4 deletions contracts/base/Storage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ contract Storage is IStorage {
/// ERC-7201 namespaced via `keccak256(abi.encode(uint256(keccak256(bytes("biconomy.storage.Nexus"))) - 1)) & ~bytes32(uint256(0xff));`
bytes32 private constant _STORAGE_LOCATION = 0x0bb70095b32b9671358306b0339b4c06e7cbd8cb82505941fba30d1eb5b82f00;

/// @notice The canonical address for the ERC4337 EntryPoint contract, version 0.7.
/// This address is consistent across all supported networks.
address internal immutable _ENTRYPOINT;

/// @dev Utilizes ERC-7201's namespaced storage pattern for isolated storage access. This method computes
/// the storage slot based on a predetermined location, ensuring collision-resistant storage for contract states.
/// @custom:storage-location ERC-7201 formula applied to "biconomy.storage.Nexus", facilitating unique
Expand Down

0 comments on commit 2adae86

Please sign in to comment.