Skip to content

Commit 2caceed

Browse files
authored
Update AccountCreated event to emit salt for account address computation. (#365)
* Make all top level functions virtual on ContractKit bases * pkg update * Make MAX_BPS private in Marketplace plugins * Emit salt in AccountCreated
1 parent ea1a044 commit 2caceed

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

contracts/smart-wallet/TWAccountFactory.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ contract TWAccountFactory is ITWAccountFactory, Multicall {
3636

3737
TWAccount(payable(account)).initialize(_admin);
3838

39-
emit AccountCreated(account, _admin);
39+
emit AccountCreated(account, _admin, _salt);
4040

4141
return account;
4242
}

contracts/smart-wallet/TWDynamicAccountFactory.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ contract TWDynamicAccountFactory is ITWAccountFactory, Multicall {
3636

3737
TWAccount(payable(account)).initialize(_admin);
3838

39-
emit AccountCreated(account, _admin);
39+
emit AccountCreated(account, _admin, _salt);
4040

4141
return account;
4242
}

contracts/smart-wallet/interfaces/ITWAccountFactory.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pragma solidity ^0.8.12;
33

44
interface ITWAccountFactory {
5-
event AccountCreated(address indexed account, address indexed accountAdmin);
5+
event AccountCreated(address indexed account, address indexed accountAdmin, bytes32 indexed salt);
66

77
/// @notice Returns the address of the Account implementation.
88
function accountImplementation() external view returns (address);

0 commit comments

Comments
 (0)