diff --git a/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol b/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol index 2b436afbd..6a8f5ebac 100644 --- a/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +++ b/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol @@ -543,7 +543,7 @@ abstract contract LSP0ERC725AccountCore is // notify the pending owner through LSP1 pendingNewOwner.notifyUniversalReceiver( _TYPEID_LSP0_OwnershipTransferStarted, - "" + abi.encode(currentOwner, pendingNewOwner) ); // reset the transfer ownership lock @@ -563,7 +563,7 @@ abstract contract LSP0ERC725AccountCore is // notify the pending owner through LSP1 pendingNewOwner.notifyUniversalReceiver( _TYPEID_LSP0_OwnershipTransferStarted, - "" + abi.encode(currentOwner, pendingNewOwner) ); // reset the transfer ownership lock @@ -598,6 +598,7 @@ abstract contract LSP0ERC725AccountCore is _setOwner(pendingOwnerAddress); delete _pendingOwner; + delete _renounceOwnershipStartedAt; } else { _acceptOwnership(); } @@ -605,13 +606,13 @@ abstract contract LSP0ERC725AccountCore is // notify the previous owner if supports LSP1 previousOwner.notifyUniversalReceiver( _TYPEID_LSP0_OwnershipTransferred_SenderNotification, - "" + abi.encode(previousOwner, pendingOwnerAddress) ); // notify the pending owner if supports LSP1 pendingOwnerAddress.notifyUniversalReceiver( _TYPEID_LSP0_OwnershipTransferred_RecipientNotification, - "" + abi.encode(previousOwner, pendingOwnerAddress) ); // If msg.sender != pendingOwnerAddress & verifyAfter is true, Call {lsp20VerifyCallResult} on the new owner @@ -644,7 +645,7 @@ abstract contract LSP0ERC725AccountCore is if (owner() == address(0)) { previousOwner.notifyUniversalReceiver( _TYPEID_LSP0_OwnershipTransferred_SenderNotification, - "" + abi.encode(accountOwner, address(0)) ); } } else { @@ -658,7 +659,7 @@ abstract contract LSP0ERC725AccountCore is if (owner() == address(0)) { previousOwner.notifyUniversalReceiver( _TYPEID_LSP0_OwnershipTransferred_SenderNotification, - "" + abi.encode(accountOwner, address(0)) ); } diff --git a/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol b/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol index a5a593803..561e27c83 100644 --- a/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol +++ b/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol @@ -99,7 +99,7 @@ abstract contract LSP14Ownable2Step is ILSP14Ownable2Step, OwnableUnset { newOwner.notifyUniversalReceiver( _TYPEID_LSP14_OwnershipTransferStarted, - "" + abi.encode(currentOwner, newOwner) ); // reset the transfer ownership lock @@ -118,12 +118,12 @@ abstract contract LSP14Ownable2Step is ILSP14Ownable2Step, OwnableUnset { previousOwner.notifyUniversalReceiver( _TYPEID_LSP14_OwnershipTransferred_SenderNotification, - "" + abi.encode(previousOwner, msg.sender) ); msg.sender.notifyUniversalReceiver( _TYPEID_LSP14_OwnershipTransferred_RecipientNotification, - "" + abi.encode(previousOwner, msg.sender) ); } @@ -144,7 +144,7 @@ abstract contract LSP14Ownable2Step is ILSP14Ownable2Step, OwnableUnset { if (owner() == address(0)) { previousOwner.notifyUniversalReceiver( _TYPEID_LSP14_OwnershipTransferred_SenderNotification, - "" + abi.encode(previousOwner, address(0)) ); } } diff --git a/contracts/LSP9Vault/LSP9VaultCore.sol b/contracts/LSP9Vault/LSP9VaultCore.sol index 0f1281117..6731325ea 100644 --- a/contracts/LSP9Vault/LSP9VaultCore.sol +++ b/contracts/LSP9Vault/LSP9VaultCore.sol @@ -440,7 +440,7 @@ contract LSP9VaultCore is newOwner.notifyUniversalReceiver( _TYPEID_LSP9_OwnershipTransferStarted, - "" + abi.encode(currentOwner, newOwner) ); // reset the transfer ownership lock @@ -462,12 +462,12 @@ contract LSP9VaultCore is previousOwner.notifyUniversalReceiver( _TYPEID_LSP9_OwnershipTransferred_SenderNotification, - "" + abi.encode(previousOwner, msg.sender) ); msg.sender.notifyUniversalReceiver( _TYPEID_LSP9_OwnershipTransferred_RecipientNotification, - "" + abi.encode(previousOwner, msg.sender) ); } @@ -490,7 +490,7 @@ contract LSP9VaultCore is if (owner() == address(0)) { previousOwner.notifyUniversalReceiver( _TYPEID_LSP9_OwnershipTransferred_SenderNotification, - "" + abi.encode(previousOwner, address(0)) ); } } diff --git a/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts b/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts index f5b241ff1..036d0e187 100644 --- a/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts +++ b/tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts @@ -1573,7 +1573,10 @@ export const shouldBehaveLikeLSP1Delegate = ( vault.address, 0, LSP1_TYPE_IDS.LSP9OwnershipTransferred_SenderNotification, - '0x', + abiCoder.encode( + ['address', 'address'], + [context.universalProfile1.address, context.accounts.owner1.address], + ), lsp1ReturnedData, ); }); @@ -1649,7 +1652,10 @@ export const shouldBehaveLikeLSP1Delegate = ( vault.address, 0, LSP1_TYPE_IDS.LSP9OwnershipTransferred_SenderNotification, - '0x', + abiCoder.encode( + ['address', 'address'], + [context.universalProfile1.address, context.accounts.owner1.address], + ), lsp1ReturnedData, ); }); @@ -1732,7 +1738,10 @@ export const shouldBehaveLikeLSP1Delegate = ( vault.address, 0, LSP1_TYPE_IDS.LSP9OwnershipTransferred_SenderNotification, - '0x', + abiCoder.encode( + ['address', 'address'], + [context.universalProfile1.address, context.accounts.owner1.address], + ), lsp1ReturnedData, ); }); @@ -2882,7 +2891,10 @@ export const shouldBehaveLikeLSP1Delegate = ( vault.address, 0, LSP1_TYPE_IDS.LSP9OwnershipTransferred_SenderNotification, - '0x', + abiCoder.encode( + ['address', 'address'], + [testContext.universalProfile.address, newVaultOwner.address], + ), expectedReturnedValues, ); @@ -3004,7 +3016,10 @@ export const shouldBehaveLikeLSP1Delegate = ( vault.address, 0, LSP1_TYPE_IDS.LSP9OwnershipTransferred_RecipientNotification, - '0x', + abiCoder.encode( + ['address', 'address'], + [vaultOwner.address, context.universalProfile1.address], + ), expectedReturnedValues, ); diff --git a/tests/LSP20CallVerification/LSP20CallVerification.behaviour.ts b/tests/LSP20CallVerification/LSP20CallVerification.behaviour.ts index 3298975a8..712194e87 100644 --- a/tests/LSP20CallVerification/LSP20CallVerification.behaviour.ts +++ b/tests/LSP20CallVerification/LSP20CallVerification.behaviour.ts @@ -26,6 +26,7 @@ import { // constants import { LSP1_TYPE_IDS, LSP20_SUCCESS_VALUES, OPERATION_TYPES } from '../../constants'; +import { abiCoder } from './..//utils/helpers'; export type LSP20TestContext = { accounts: SignerWithAddress[]; @@ -237,7 +238,10 @@ export const shouldBehaveLikeLSP20 = (buildContext: () => Promise