Skip to content

Commit 3eaa189

Browse files
committed
Small type fix
1 parent adc97ea commit 3eaa189

5 files changed

Lines changed: 9 additions & 8 deletions

File tree

contracts/core/managed/ManagedOpenfortFactory.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ contract ManagedOpenfortFactory is IBaseOpenfortFactory {
3131
/*
3232
* @notice Deploy a new account for _admin with a nonce.
3333
*/
34-
function createAccountWithNonce(address _admin, bytes calldata _nonce) external returns (address account) {
34+
function createAccountWithNonce(address _admin, bytes32 _nonce) external returns (address account) {
3535
bytes32 salt = keccak256(abi.encode(_admin, _nonce));
3636
account = getAddressWithNonce(_admin, _nonce);
3737

@@ -51,7 +51,7 @@ contract ManagedOpenfortFactory is IBaseOpenfortFactory {
5151
/*
5252
* @notice Return the address of an account that would be deployed with the given admin signer and nonce.
5353
*/
54-
function getAddressWithNonce(address _admin, bytes calldata _nonce) public view returns (address) {
54+
function getAddressWithNonce(address _admin, bytes32 _nonce) public view returns (address) {
5555
bytes32 salt = keccak256(abi.encode(_admin, _nonce));
5656
return Create2.computeAddress(
5757
salt,

contracts/core/static/StaticOpenfortFactory.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ contract StaticOpenfortFactory is IBaseOpenfortFactory {
3333
/*
3434
* @notice Deploy a new account for _admin and a given nonce.
3535
*/
36-
function createAccountWithNonce(address _admin, bytes calldata _nonce) external returns (address account) {
36+
function createAccountWithNonce(address _admin, bytes32 _nonce) external returns (address account) {
3737
address impl = accountImplementation;
3838
bytes32 salt = keccak256(abi.encode(_admin, _nonce));
3939
account = Clones.predictDeterministicAddress(impl, salt);
@@ -50,7 +50,7 @@ contract StaticOpenfortFactory is IBaseOpenfortFactory {
5050
/*
5151
* @notice Return the address of an account that would be deployed with the given admin signer and nonce.
5252
*/
53-
function getAddressWithNonce(address _admin, bytes calldata _nonce) public view returns (address) {
53+
function getAddressWithNonce(address _admin, bytes32 _nonce) public view returns (address) {
5454
bytes32 salt = keccak256(abi.encode(_admin, _nonce));
5555
return Clones.predictDeterministicAddress(accountImplementation, salt);
5656
}

contracts/core/upgradeable/UpgradeableOpenfortFactory.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ contract UpgradeableOpenfortFactory is IBaseOpenfortFactory {
3131
/*
3232
* @notice Deploy a new account for _admin with a nonce.
3333
*/
34-
function createAccountWithNonce(address _admin, bytes calldata _nonce) external returns (address account) {
34+
function createAccountWithNonce(address _admin, bytes32 _nonce) external returns (address account) {
3535
bytes32 salt = keccak256(abi.encode(_admin, _nonce));
3636
account = getAddressWithNonce(_admin, _nonce);
3737

@@ -51,7 +51,7 @@ contract UpgradeableOpenfortFactory is IBaseOpenfortFactory {
5151
/*
5252
* @notice Return the address of an account that would be deployed with the given admin signer and nonce.
5353
*/
54-
function getAddressWithNonce(address _admin, bytes calldata _nonce) public view returns (address) {
54+
function getAddressWithNonce(address _admin, bytes32 _nonce) public view returns (address) {
5555
bytes32 salt = keccak256(abi.encode(_admin, _nonce));
5656
return Create2.computeAddress(
5757
salt,

contracts/interfaces/IBaseOpenfortFactory.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ interface IBaseOpenfortFactory {
99
error ZeroAddressNotAllowed();
1010

1111
/// @notice Deploys a new Account for admin.
12-
function createAccountWithNonce(address _admin, bytes calldata _nonce) external returns (address account);
12+
function createAccountWithNonce(address _admin, bytes32 _nonce) external returns (address account);
1313

1414
/// @notice Returns the address of the Account implementation.
1515
function accountImplementation() external view returns (address);
1616

1717
/// @notice Returns the address of an Account that would be deployed with the given admin and nonce.
18-
function getAddressWithNonce(address _admin, bytes calldata _nonce) external view returns (address);
18+
function getAddressWithNonce(address _admin, bytes32 _nonce) external view returns (address);
1919
}

script/deployUpgradeableAccounts.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ contract UpgradeableOpenfortDeploy is Script {
1919

2020
UpgradeableOpenfortFactory upgradeableOpenfortFactory =
2121
new UpgradeableOpenfortFactory{salt: versionSalt}(address(entryPoint), address(upgradeableOpenfortAccount));
22+
(upgradeableOpenfortFactory);
2223
// address account1 = upgradeableOpenfortFactory.accountImplementation();
2324

2425
// The first call should create a new account, while the second will just return the corresponding account address

0 commit comments

Comments
 (0)