This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "DLT/escrowpayment.sol": { | |
| "__sources__": { | |
| "DLT/escrowpayment.sol": { | |
| "content": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.20;\r\n\r\ncontract EscrowPayment {\r\n address public buyer;\r\n address public seller;\r\n address public arbitrator;\r\n\r\n uint256 public amount;\r\n\r\n enum State { CREATED, FUNDED, DELIVERED, DISPUTE, SETTLED, REFUNDED }\r\n\r\n State public currentState;\r\n\r\n constructor(address _seller, address _arbitrator) {\r\n buyer = msg.sender; //My account is the buyer\r\n seller = _seller;\r\n arbitrator = _arbitrator;\r\n currentState = State.CREATED;\r\n }\r\n\r\n modifier onlyBuyer() {\r\n require(msg.sender == buyer, \"Only buyer allowed\");\r\n _;\r\n }\r\n\r\n modifier onlySeller() {\r\n require(msg.sender == seller, \"Only seller allowed\");\r\n _;\r\n }\r\n\r\n modifier onlyArbitrator() {\r\n require(msg.sender == arbitrator, \"Only arbitra |