Skip to content

Instantly share code, notes, and snippets.

View AbhayPatel98's full-sized avatar
🎯
Security

Abhay Patel AbhayPatel98

🎯
Security
View GitHub Profile
@AbhayPatel98
AbhayPatel98 / .deps...npm....resolution-index.json
Last active April 28, 2026 17:00
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.22+commit.4fc1097e.js&optimize=undefined&runs=200&gist=
{
"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