Skip to content

Commit

Permalink
feat: absolute tx deadline
Browse files Browse the repository at this point in the history
  • Loading branch information
jaybuidl committed Jun 11, 2024
1 parent 81af42e commit 0b03dc2
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 76 deletions.
2 changes: 1 addition & 1 deletion contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments

- [Escrow](https://sepolia.arbiscan.io/address/0x250AB0477346aDFC010585b58FbF61cff1d8f3ea)
- [EscrowToken](https://sepolia.arbiscan.io/address/0xe7B52a7Bc50cb4Ff13d057629082844780b6E28D)
- [EscrowUniversal](https://sepolia.arbiscan.io/address/0x5c4B2Cff2998529f9d405A9b6EbB44BC537c8D7F)
- [EscrowUniversal](https://sepolia.arbiscan.io/address/0xBa2cC03e2e34C5DEDaEbC481b2531e06946353De)

#### Sepolia

Expand Down
120 changes: 60 additions & 60 deletions contracts/deployments/arbitrumSepoliaDevnet/EscrowUniversal.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions contracts/src/Escrow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ contract Escrow is IEscrow, IArbitrableV2 {

/// @inheritdoc IEscrow
function createNativeTransaction(
uint256 _timeoutPayment,
uint256 _deadline,
string memory _transactionUri,
address payable _seller,
string memory _templateData,
Expand All @@ -124,7 +124,7 @@ contract Escrow is IEscrow, IArbitrableV2 {
transaction.buyer = payable(msg.sender);
transaction.seller = _seller;
transaction.amount = msg.value;
transaction.deadline = block.timestamp + _timeoutPayment;
transaction.deadline = _deadline;
transaction.templateData = _templateData;
transaction.templateDataMappings = _templateDataMappings;

Expand Down
4 changes: 2 additions & 2 deletions contracts/src/EscrowToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ contract EscrowToken is IEscrow, IArbitrableV2 {
function createERC20Transaction(
uint256 _amount,
IERC20 _token,
uint256 _timeoutPayment,
uint256 _deadline,
string memory _transactionUri,
address payable _seller,
string memory _templateData,
Expand All @@ -149,7 +149,7 @@ contract EscrowToken is IEscrow, IArbitrableV2 {
transaction.amount = _amount;
transaction.token = _token;
// transaction.paymentType = PaymentType.ERC20;
transaction.deadline = block.timestamp + _timeoutPayment;
transaction.deadline = _deadline;
transaction.templateData = _templateData;
transaction.templateDataMappings = _templateDataMappings;

Expand Down
8 changes: 4 additions & 4 deletions contracts/src/EscrowUniversal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ contract EscrowUniversal is IEscrow, IArbitrableV2 {

/// @inheritdoc IEscrow
function createNativeTransaction(
uint256 _timeoutPayment,
uint256 _deadline,
string memory _transactionUri,
address payable _seller,
string memory _templateData,
Expand All @@ -134,7 +134,7 @@ contract EscrowUniversal is IEscrow, IArbitrableV2 {
transaction.seller = _seller;
transaction.amount = msg.value;
transaction.token = NATIVE;
transaction.deadline = block.timestamp + _timeoutPayment;
transaction.deadline = _deadline;
transaction.templateData = _templateData;
transaction.templateDataMappings = _templateDataMappings;

Expand All @@ -154,7 +154,7 @@ contract EscrowUniversal is IEscrow, IArbitrableV2 {
function createERC20Transaction(
uint256 _amount,
IERC20 _token,
uint256 _timeoutPayment,
uint256 _deadline,
string memory _transactionUri,
address payable _seller,
string memory _templateData,
Expand All @@ -167,7 +167,7 @@ contract EscrowUniversal is IEscrow, IArbitrableV2 {
transaction.seller = _seller;
transaction.amount = _amount;
transaction.token = _token;
transaction.deadline = block.timestamp + _timeoutPayment;
transaction.deadline = _deadline;
transaction.templateData = _templateData;
transaction.templateDataMappings = _templateDataMappings;

Expand Down
8 changes: 4 additions & 4 deletions contracts/src/interfaces/IEscrow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ interface IEscrow {
// ************************************* //

/// @dev Create a transaction.
/// @param _timeoutPayment Time after which a party can automatically execute the arbitrable transaction.
/// @param _deadline 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 createNativeTransaction(
uint256 _timeoutPayment,
uint256 _deadline,
string memory _transactionUri,
address payable _seller,
string memory _templateData,
Expand All @@ -91,7 +91,7 @@ interface IEscrow {
/// @dev Create a transaction.
/// @param _amount The amount of tokens in this transaction.
/// @param _token The ERC20 token contract.
/// @param _timeoutPayment Time after which a party can automatically execute the arbitrable transaction.
/// @param _deadline 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.
Expand All @@ -100,7 +100,7 @@ interface IEscrow {
function createERC20Transaction(
uint256 _amount,
IERC20 _token,
uint256 _timeoutPayment,
uint256 _deadline,
string memory _transactionUri,
address payable _seller,
string memory _templateData,
Expand Down
2 changes: 1 addition & 1 deletion subgraph/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kleros/escrow-v2-subgraph",
"version": "2.0.0",
"version": "2.0.1",
"license": "MIT",
"scripts": {
"update:arbitrum-sepolia-devnet": "./scripts/update.sh arbitrumSepoliaDevnet arbitrum-sepolia",
Expand Down
4 changes: 2 additions & 2 deletions subgraph/subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ dataSources:
name: EscrowUniversal
network: arbitrum-sepolia
source:
address: '0x5c4B2Cff2998529f9d405A9b6EbB44BC537c8D7F'
address: '0xBa2cC03e2e34C5DEDaEbC481b2531e06946353De'
abi: EscrowUniversal
startBlock: 42653663
startBlock: 53588833
mapping:
kind: ethereum/events
apiVersion: 0.0.6
Expand Down

0 comments on commit 0b03dc2

Please sign in to comment.