Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(contracts): escrow-v2-general-escrow-event-update #1396

Merged
merged 5 commits into from
Jan 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions contracts/src/arbitration/arbitrables/Escrow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,20 @@ 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,
address indexed _buyer,
address indexed _seller,
uint256 _amount
uint256 _amount,
string _asset,
uint256 _deadline
);

/// @dev To be emitted when a transaction is resolved, either by its
Expand Down Expand Up @@ -166,12 +172,14 @@ 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.
/// @return transactionID The index of the transaction.
function createTransaction(
uint256 _timeoutPayment,
string memory _transactionUri,
address payable _seller,
string memory _templateData,
string memory _templateDataMappings
Expand All @@ -186,7 +194,15 @@ 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,
"native",
transaction.deadline
);
}

/// @dev Pay seller. To be called if the good or service is provided.
Expand Down