From b771819e7e5ded8a9eb4a4928e03884eb5b7f472 Mon Sep 17 00:00:00 2001 From: kemuru <102478601+kemuru@users.noreply.github.com> Date: Mon, 8 Jan 2024 12:46:05 +0100 Subject: [PATCH 1/3] feat(contracts): escrow-v2-general-escrow-event-update --- contracts/src/arbitration/arbitrables/Escrow.sol | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/contracts/src/arbitration/arbitrables/Escrow.sol b/contracts/src/arbitration/arbitrables/Escrow.sol index 47650d247..196b27630 100644 --- a/contracts/src/arbitration/arbitrables/Escrow.sol +++ b/contracts/src/arbitration/arbitrables/Escrow.sol @@ -89,9 +89,11 @@ contract Escrow is IArbitrableV2 { /// @param _amount The initial amount in the transaction. event TransactionCreated( uint256 indexed _transactionID, + string _transactionUri, address indexed _buyer, address indexed _seller, - uint256 _amount + uint256 _amount, + uint256 _deadline ); /// @dev To be emitted when a transaction is resolved, either by its @@ -172,6 +174,7 @@ contract Escrow is IArbitrableV2 { /// @return transactionID The index of the transaction. function createTransaction( uint256 _timeoutPayment, + string memory _transactionUri, address payable _seller, string memory _templateData, string memory _templateDataMappings @@ -186,7 +189,7 @@ contract Escrow is IArbitrableV2 { transactionID = transactions.length - 1; - emit TransactionCreated(transactionID, msg.sender, _seller, msg.value); + emit TransactionCreated(transactionID, _transactionUri, msg.sender, _seller, msg.value, transaction.deadline); } /// @dev Pay seller. To be called if the good or service is provided. From 15bd229c4a4a52997d2240d794aa61af677be73c Mon Sep 17 00:00:00 2001 From: kemuru <102478601+kemuru@users.noreply.github.com> Date: Wed, 10 Jan 2024 01:52:48 +0100 Subject: [PATCH 2/3] feat(web): add asset to event parameter and emit --- contracts/src/arbitration/arbitrables/Escrow.sol | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/contracts/src/arbitration/arbitrables/Escrow.sol b/contracts/src/arbitration/arbitrables/Escrow.sol index 196b27630..38a102d30 100644 --- a/contracts/src/arbitration/arbitrables/Escrow.sol +++ b/contracts/src/arbitration/arbitrables/Escrow.sol @@ -93,6 +93,7 @@ contract Escrow is IArbitrableV2 { address indexed _buyer, address indexed _seller, uint256 _amount, + string _asset, uint256 _deadline ); @@ -189,7 +190,15 @@ contract Escrow is IArbitrableV2 { transactionID = transactions.length - 1; - emit TransactionCreated(transactionID, _transactionUri, msg.sender, _seller, msg.value, transaction.deadline); + emit TransactionCreated( + transactionID, + _transactionUri, + msg.sender, + _seller, + msg.value, + "native", + transaction.deadline + ); } /// @dev Pay seller. To be called if the good or service is provided. From d803d98daf74a5d1e9e7147faae59d0b94732363 Mon Sep 17 00:00:00 2001 From: kemuru <102478601+kemuru@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:22:59 +0100 Subject: [PATCH 3/3] feat(contracts): update natspec escrow contract --- contracts/src/arbitration/arbitrables/Escrow.sol | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contracts/src/arbitration/arbitrables/Escrow.sol b/contracts/src/arbitration/arbitrables/Escrow.sol index 38a102d30..aee794a65 100644 --- a/contracts/src/arbitration/arbitrables/Escrow.sol +++ b/contracts/src/arbitration/arbitrables/Escrow.sol @@ -84,9 +84,12 @@ contract Escrow is IArbitrableV2 { /// @dev Emitted when a transaction is created. /// @param _transactionID The index of the transaction. + /// @param _transactionUri The IPFS Uri Hash of the transaction. /// @param _buyer The address of the buyer. /// @param _seller The address of the seller. /// @param _amount The initial amount in the transaction. + /// @param _asset The asset used ("native" for native chain token). + /// @param _deadline The deadline of the transaction. event TransactionCreated( uint256 indexed _transactionID, string _transactionUri, @@ -169,6 +172,7 @@ contract Escrow is IArbitrableV2 { /// @dev Create a transaction. /// @param _timeoutPayment Time after which a party can automatically execute the arbitrable transaction. + /// @param _transactionUri The IPFS Uri Hash of the transaction. /// @param _seller The recipient of the transaction. /// @param _templateData The dispute template data. /// @param _templateDataMappings The dispute template data mappings.