Skip to content

Commit

Permalink
Remove draft- prefixes (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestognw authored Dec 17, 2024
1 parent 7ff2225 commit 35e820e
Show file tree
Hide file tree
Showing 31 changed files with 53 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ pragma solidity ^0.8.20;

import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";
import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
import {ERC7739Signer} from "../utils/cryptography/draft-ERC7739Signer.sol";
import {AccountCore} from "./draft-AccountCore.sol";
import {ERC7739Signer} from "../utils/cryptography/ERC7739Signer.sol";
import {AccountCore} from "./AccountCore.sol";

/**
* @dev Extension of {AccountCore} with recommended feature that most account abstraction implementation will want:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pragma solidity ^0.8.20;

import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import {AccountCore} from "../draft-AccountCore.sol";
import {AccountCore} from "../AccountCore.sol";

/**
* @dev {Account} implementation whose low-level signature validation is done by an EOA.
Expand Down
2 changes: 1 addition & 1 deletion contracts/crosschain/axelar/AxelarGatewayDestination.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.27;

import {AxelarExecutable} from "@axelar-network/axelar-gmp-sdk-solidity/contracts/executable/AxelarExecutable.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {IERC7786Receiver} from "../../interfaces/draft-IERC7786.sol";
import {IERC7786Receiver} from "../../interfaces/IERC7786.sol";
import {AxelarGatewayBase} from "./AxelarGatewayBase.sol";

/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/crosschain/axelar/AxelarGatewaySource.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {CAIP2} from "@openzeppelin/contracts/utils/CAIP2.sol";
import {CAIP10} from "@openzeppelin/contracts/utils/CAIP10.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {AxelarGatewayBase} from "./AxelarGatewayBase.sol";
import {IERC7786GatewaySource} from "../../interfaces/draft-IERC7786.sol";
import {IERC7786GatewaySource} from "../../interfaces/IERC7786.sol";

/**
* @dev Implementation of an ERC-7786 gateway source adapter for the Axelar Network.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity ^0.8.27;

import {IERC7786Receiver} from "../../interfaces/draft-IERC7786.sol";
import {IERC7786Receiver} from "../../interfaces/IERC7786.sol";

/**
* @dev Base implementation of an ERC-7786 compliant cross-chain message receiver.
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion contracts/mocks/account/AccountBaseMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.20;

import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";
import {ERC4337Utils} from "@openzeppelin/contracts/account/utils/draft-ERC4337Utils.sol";
import {Account} from "../../account/draft-Account.sol";
import {Account} from "../../account/Account.sol";

abstract contract AccountBaseMock is Account {
/// Validates a user operation with a boolean signature.
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/account/AccountECDSAMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity ^0.8.20;

import {Account} from "../../account/draft-Account.sol";
import {Account} from "../../account/Account.sol";
import {SignerECDSA} from "../../utils/cryptography/SignerECDSA.sol";

abstract contract AccountECDSAMock is Account, SignerECDSA {
Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/account/AccountERC7702Mock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity ^0.8.20;

import {Account} from "../../account/draft-Account.sol";
import {AccountSignerERC7702} from "../../account/extensions/draft-AccountSignerERC7702.sol";
import {Account} from "../../account/Account.sol";
import {AccountSignerERC7702} from "../../account/extensions/AccountSignerERC7702.sol";

abstract contract AccountERC7702Mock is Account, AccountSignerERC7702 {}
2 changes: 1 addition & 1 deletion contracts/mocks/account/AccountP256Mock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity ^0.8.20;

import {Account} from "../../account/draft-Account.sol";
import {Account} from "../../account/Account.sol";
import {SignerP256} from "../../utils/cryptography/SignerP256.sol";

abstract contract AccountP256Mock is Account, SignerP256 {
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/account/AccountRSAMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity ^0.8.20;

import {Account} from "../../account/draft-Account.sol";
import {Account} from "../../account/Account.sol";
import {SignerRSA} from "../../utils/cryptography/SignerRSA.sol";

abstract contract AccountRSAMock is Account, SignerRSA {
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/crosschain/ERC7786GatewayMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {BitMaps} from "@openzeppelin/contracts/utils/structs/BitMaps.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {CAIP2} from "@openzeppelin/contracts/utils/CAIP2.sol";
import {CAIP10} from "@openzeppelin/contracts/utils/CAIP10.sol";
import {IERC7786GatewaySource, IERC7786Receiver} from "../../interfaces/draft-IERC7786.sol";
import {IERC7786GatewaySource, IERC7786Receiver} from "../../interfaces/IERC7786.sol";

contract ERC7786GatewayMock is IERC7786GatewaySource {
using BitMaps for BitMaps.BitMap;
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/crosschain/ERC7786ReceiverInvalidMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity ^0.8.0;

import {IERC7786Receiver} from "../../interfaces/draft-IERC7786.sol";
import {IERC7786Receiver} from "../../interfaces/IERC7786.sol";

contract ERC7786ReceiverInvalidMock is IERC7786Receiver {
function executeMessage(
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/crosschain/ERC7786ReceiverMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity ^0.8.0;

import {ERC7786Receiver} from "../../crosschain/utils/draft-ERC7786Receiver.sol";
import {ERC7786Receiver} from "../../crosschain/utils/ERC7786Receiver.sol";

contract ERC7786ReceiverMock is ERC7786Receiver {
address private immutable _gateway;
Expand Down
32 changes: 32 additions & 0 deletions contracts/mocks/docs/account/MyAccountCustom.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// contracts/MyAccountCustom.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
import {ERC4337Utils, PackedUserOperation} from "@openzeppelin/contracts/account/utils/draft-ERC4337Utils.sol";
import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import {Account} from "../../../account/Account.sol";

contract MyAccountCustom is Account, Initializable {
/**
* NOTE: EIP-712 domain is set at construction because each account clone
* will recalculate its domain separator based on their own address.
*/
constructor() EIP712("MyAccountCustom", "1") {
_disableInitializers();
}

/// @dev Set up the account (e.g. load public keys to storage).
function initialize() public virtual initializer {
// Custom initialization logic
}

/// @dev Receives a hash wrapped in an EIP-712 domain separator.
function _rawSignatureValidation(
bytes32 hash,
bytes calldata signature
) internal view virtual override returns (bool) {
// Custom signing logic
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity ^0.8.20;

import {ERC20, ERC20Bridgeable} from "../../token/ERC20/extensions/draft-ERC20Bridgeable.sol";
import {ERC20, ERC20Bridgeable} from "../../token/ERC20/extensions/ERC20Bridgeable.sol";

abstract contract ERC20BridgeableMock is ERC20Bridgeable {
address bridge;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.20;

import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
import {ERC7739Signer} from "../../../utils/cryptography/draft-ERC7739Signer.sol";
import {ERC7739Signer} from "../../../utils/cryptography/ERC7739Signer.sol";
import {SignerECDSA} from "../../../utils/cryptography/SignerECDSA.sol";

contract ERC7739SignerECDSAMock is ERC7739Signer, SignerECDSA {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pragma solidity ^0.8.20;

import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
import {ERC7739Signer} from "../../../utils/cryptography/draft-ERC7739Signer.sol";
import {ERC7739Signer} from "../../../utils/cryptography/ERC7739Signer.sol";
import {SignerP256} from "../../../utils/cryptography/SignerP256.sol";

contract ERC7739SignerP256Mock is ERC7739Signer, SignerP256 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pragma solidity ^0.8.20;

import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
import {ERC7739Signer} from "../../../utils/cryptography/draft-ERC7739Signer.sol";
import {ERC7739Signer} from "../../../utils/cryptography/ERC7739Signer.sol";
import {SignerRSA} from "../../../utils/cryptography/SignerRSA.sol";

contract ERC7739SignerRSAMock is ERC7739Signer, SignerRSA {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.20;

import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {ERC165, IERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import {IERC7802} from "../../../interfaces/draft-IERC7802.sol";
import {IERC7802} from "../../../interfaces/IERC7802.sol";

/**
* @dev ERC20 extension that implements the standard token interface according to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
import {MessageHashUtils} from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol";
import {ShortStrings} from "@openzeppelin/contracts/utils/ShortStrings.sol";
import {AbstractSigner} from "./AbstractSigner.sol";
import {ERC7739Utils} from "./draft-ERC7739Utils.sol";
import {ERC7739Utils} from "./ERC7739Utils.sol";

/**
* @dev Validates signatures wrapping the message hash in a nested EIP712 type. See {ERC7739Utils}.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 35e820e

Please sign in to comment.