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

SDK: data mappings (WIP) #1165

Merged
merged 45 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
5e35346
feat(sdk): draft of some actions in web utils
kemuru Aug 17, 2023
84bea91
feat: add contract calls, events
nhestrompia Aug 21, 2023
ae90a0a
Merge branch 'dev' into feat(sdk)/data-mappings
kemuru Sep 5, 2023
2ba5d0b
feat(sdk): added some data mappings action tests
kemuru Sep 6, 2023
4e80b8d
feat: tests for contract call and events
nhestrompia Sep 13, 2023
fe678ac
feat(web): function to search for nested keys in json, fetch, graphql…
kemuru Sep 15, 2023
7baec99
fix: contract read and event tests
nhestrompia Sep 15, 2023
3cd6e7a
docs(sdk): some info on how to run the tests
kemuru Sep 18, 2023
1af3f99
docs(sdk): readding some info lines
kemuru Sep 18, 2023
2177ced
refactor: data mappings implementation into front-end
nhestrompia Sep 27, 2023
09b430b
Merge branch 'dev' into feat(sdk)/data-mappings
kemuru Oct 9, 2023
1ce3e09
feat: making data mappings fetching dynamic
kemuru Oct 10, 2023
a41397c
feat(web): improved structures, dispute template view, case overview
kemuru Oct 11, 2023
be6661b
Merge branch 'dev' into feat(sdk)/data-mappings
kemuru Oct 11, 2023
1f1e6db
Merge branch 'dev' into feat(sdk)/data-mappings
kemuru Oct 11, 2023
7f990aa
docs: added a version field to the dispute template
jaybuidl Oct 12, 2023
49830da
feat: added mustache template rendering
jaybuidl Oct 12, 2023
d9406d5
feat(sdk): create more tests, better structuring of files, create kle…
kemuru Oct 12, 2023
4420918
feat(web): make graphql action dynamic, dont show data in case if sti…
kemuru Oct 12, 2023
ab608a5
fix(web): graphql test
kemuru Oct 12, 2023
0c18d75
feat(web): abstract alchemy api key in web3provider
kemuru Oct 12, 2023
33ba909
feat(sdk): modularization of utils, progress on reality dispute templ…
kemuru Oct 16, 2023
57d2e52
feat(web): add answers to dispute mappings for reality template id 0 …
kemuru Oct 16, 2023
db734a5
Merge branch 'dev' into feat(sdk)/data-mappings
jaybuidl Oct 16, 2023
060e58c
fix(web): import error from sdk
kemuru Oct 16, 2023
8d4a87c
fix(web): another import update
kemuru Oct 16, 2023
346a2b9
Merge branch 'dev' into feat(sdk)/data-mappings
kemuru Oct 19, 2023
399e98e
feat: escrow dispute template
jaybuidl Jan 4, 2024
e9fe1b3
feat(sdk): new fetch-ipfs-json data mappings action, common variable …
kemuru Jan 4, 2024
2cb3ec5
feat(sdk): data mappings modularization, redo tests, remove findneste…
kemuru Jan 5, 2024
8d72cc7
chore: providing the arbitrable address to the SDK executeAction()
jaybuidl Jan 5, 2024
d781232
feat(sdk): modify replaceplaceholder with results.-value-to-populate-
kemuru Jan 5, 2024
f7dc8f9
feat(web, sdk): parameter to include extra context in executeactions,…
kemuru Jan 10, 2024
3fc4468
fix(web): abstract arbitrable into the initialcontext for mappings
kemuru Jan 10, 2024
d281691
feat(sdk): reality mapping types
kemuru Jan 10, 2024
93c6aa3
fix: mapping example
jaybuidl Jan 10, 2024
67eda9f
Merge branch 'dev' into feat(sdk)/data-mappings
jaybuidl Jan 11, 2024
6fcd056
chore: lock file
jaybuidl Jan 11, 2024
ac22739
chore: dependency hell
jaybuidl Jan 11, 2024
0ef5d26
feat(sdk): zod validation and vitest testing
jaybuidl Jan 12, 2024
14d36d2
refactor(sdk): moved things around into a new src/ folder
jaybuidl Jan 12, 2024
ef42969
chore: web is not depending on the contracts package indirectly via t…
jaybuidl Jan 12, 2024
935ed57
Merge branch 'dev' into feat(sdk)/data-mappings
jaybuidl Jan 23, 2024
d91cab7
chore: lockfile
jaybuidl Jan 23, 2024
7001003
fix: linting
jaybuidl Jan 23, 2024
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
2 changes: 1 addition & 1 deletion bot-pinner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"node": ">=16.13.0"
},
"devDependencies": {
"@dappnode/dappnodesdk": "^0.3.8"
"@dappnode/dappnodesdk": "^0.3.11"
}
}
6 changes: 3 additions & 3 deletions contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"@typechain/hardhat": "^7.0.0",
"@types/chai": "^4.3.11",
"@types/mocha": "^10.0.6",
"@types/node": "^16.18.68",
"@types/node": "^16.18.70",
"@wagmi/cli": "^1.5.2",
"abitype": "^0.10.3",
"chai": "^4.3.10",
Expand All @@ -79,8 +79,8 @@
"graphql-request": "^6.1.0",
"hardhat": "2.15.0",
"hardhat-contract-sizer": "^2.10.0",
"hardhat-deploy": "^0.11.42",
"hardhat-deploy-ethers": "^0.4.0-next.1",
"hardhat-deploy": "0.11.42",
"hardhat-deploy-ethers": "0.4.0-next.1",
"hardhat-deploy-tenderly": "^0.2.0",
"hardhat-docgen": "^1.3.0",
"hardhat-gas-reporter": "^1.0.9",
Expand Down
8 changes: 4 additions & 4 deletions contracts/scripts/disputeCreatorBot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ export default async function main() {
"000000000000000000000000000000000000000000000000000000000000000B" + // minJurors 11
"0000000000000000000000000000000000000000000000000000000000000002"; // disputeKitId 2
const templates = [
`{"title":"A reality.eth question","description":"A reality.eth question has been raised to arbitration.","question":"**Kleros Moderate:** Did the user, **degenape6** (ID: 1554345080), break the Telegram group, ***[Kleros Trading Group]()*** (ID: -1001151472172), ***[rules](https://ipfs.kleros.io/ipfs/Qme3Qbj9rKUNHUe9vj9rqCLnTVUCWKy2YfveQF8HiuWQSu/Kleros%20Moderate%20Community%20Rules.pdf)*** due to conduct related to the ***[message](https://t.me/c/1151472172/116662)*** (***[backup](https://ipfs.kleros.io/ipfs/QmVbFrZR1bcyQzZjvLyXwL9ekDxrqHERykdreRxXrw4nqg/animations_file_23.mp4)***)?","answers":[{"id":"0x01","title":"Yes","reserved":false},{"id":"0x02","title":"No","reserved":false},{"id":"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF","title":"Answered Too Soon","reserved":true}],"policyURI":"/ipfs/QmZ5XaV2RVgBADq5qMpbuEwgCuPZdRgCeu8rhGtJWLV6yz","frontendUrl":"https://reality.eth.limo/app/#!/question/0xe78996a233895be74a66f451f1019ca9734205cc-0xe2a3bd38e3ad4e22336ac35b221bbbdd808d716209f84014c7bc3bf62f8e3b39","arbitrableChainID":"100","arbitrableAddress":"0x2e39b8f43d0870ba896f516f78f57cde773cf805","arbitratorChainID":"421614","arbitratorAddress":"0xD08Ab99480d02bf9C092828043f611BcDFEA917b","category":"Oracle","lang":"en_US","specification":"KIP99"}`,
`{"title":"Add an entry to Ledger Contract Domain Name registry v2","description":"Someone requested to add an entry to Ledger Contract Domain Name registry v2","question":"Does the entry comply with the required criteria?","answers":[{"title":"Yes, Add It","description":"Select this if you think the entry complies with the required criteria and should be added."},{"title":"No, Don't Add It","description":"Select this if you think the entry does not comply with the required criteria and should not be added."}],"policyURI":"/ipfs/QmW3nQcMW2adyqe6TujRTYkyq26PiDqcmmTjdgKiz9ynPV","frontendUrl":"https://curate.kleros.io/tcr/100/0x957a53a994860be4750810131d9c876b2f52d6e1/0xc2c1aa705632f53051f22a9f65967c0944370020a7489aba608bd0d755ca1234","arbitratorChainID":"421614","arbitratorAddress":"0x791812B0B9f2ba260B2DA432BB02Ee23BC1bB509","category":"Curation","specification":"KIP0X","lang":"en_US"}`,
`{"title":"Omen Question: News & Politics","description":"This reality dispute has been created by Omen, we advise you to read [the Omen Rules](https://cdn.kleros.link/ipfs/QmU1oZzsduGwtC7vCUQPw1QcBP6BDNDkg4t6zkowPucVcx) and consult the evidence provided in [the Market Comments](https://omen.eth.limo/#/0x95b2271039b020aba31b933039e042b60b063800).","question":"**Assuming that today is December 20th 2020, will Joe Biden win the 2020 United States presidential election?**","answers":[{"title":"Yes"},{"title":"No"}],"policyURI":"/ipfs/QmU1oZzsduGwtC7vCUQPw1QcBP6BDNDkg4t6zkowPucVcx","frontendUrl":"https://omen.eth.limo/#/0x95b2271039b020aba31b933039e042b60b063800","arbitratorChainID":"421614","arbitratorAddress":"0x791812B0B9f2ba260B2DA432BB02Ee23BC1bB509","category":"Oracle","specification":"KIP0X","lang":"en_US"}`,
`{"title":"Proof of Humanity Registration Request","description":"A request to register the specified entry to a list of provable humans.","question":"Should the request to register be accepted?","answers":[{"title":"Yes","description":"Accept the request to register the entry."},{"title":"No","description":"Deny the request."}],"policyURI":"/ipfs/QmYPf2fdSyr9BiSy6pJFUmB1oTUPwg6dhEuFqL1n4ZosgH","frontendUrl":"https://app.proofofhumanity.id/profile/0x00de4b13153673bcae2616b67bf822500d325fc3?network=mainnet","arbitratorChainID":"421614","arbitratorAddress":"0x791812B0B9f2ba260B2DA432BB02Ee23BC1bB509","category":"Curated List","specification":"KIP0X","lang":"en_US"}`,
`{"title":"A reality.eth question","description":"A reality.eth question has been raised to arbitration.","question":"**Kleros Moderate:** Did the user, **degenape6** (ID: 1554345080), break the Telegram group, ***[Kleros Trading Group]()*** (ID: -1001151472172), ***[rules](https://ipfs.kleros.io/ipfs/Qme3Qbj9rKUNHUe9vj9rqCLnTVUCWKy2YfveQF8HiuWQSu/Kleros%20Moderate%20Community%20Rules.pdf)*** due to conduct related to the ***[message](https://t.me/c/1151472172/116662)*** (***[backup](https://ipfs.kleros.io/ipfs/QmVbFrZR1bcyQzZjvLyXwL9ekDxrqHERykdreRxXrw4nqg/animations_file_23.mp4)***)?","answers":[{"id":"0x01","title":"Yes","reserved":false},{"id":"0x02","title":"No","reserved":false},{"id":"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF","title":"Answered Too Soon","reserved":true}],"policyURI":"/ipfs/QmZ5XaV2RVgBADq5qMpbuEwgCuPZdRgCeu8rhGtJWLV6yz","frontendUrl":"https://reality.eth.limo/app/#!/question/0xe78996a233895be74a66f451f1019ca9734205cc-0xe2a3bd38e3ad4e22336ac35b221bbbdd808d716209f84014c7bc3bf62f8e3b39","arbitrableChainID":"100","arbitrableAddress":"0x2e39b8f43d0870ba896f516f78f57cde773cf805","arbitratorChainID":"421614","arbitratorAddress":"0xD08Ab99480d02bf9C092828043f611BcDFEA917b","category":"Oracle","lang":"en_US","specification":"KIP99","version": "1.0"}`,
`{"title":"Add an entry to Ledger Contract Domain Name registry v2","description":"Someone requested to add an entry to Ledger Contract Domain Name registry v2","question":"Does the entry comply with the required criteria?","answers":[{"title":"Yes, Add It","description":"Select this if you think the entry complies with the required criteria and should be added."},{"title":"No, Don't Add It","description":"Select this if you think the entry does not comply with the required criteria and should not be added."}],"policyURI":"/ipfs/QmW3nQcMW2adyqe6TujRTYkyq26PiDqcmmTjdgKiz9ynPV","frontendUrl":"https://curate.kleros.io/tcr/100/0x957a53a994860be4750810131d9c876b2f52d6e1/0xc2c1aa705632f53051f22a9f65967c0944370020a7489aba608bd0d755ca1234","arbitratorChainID":"421614","arbitratorAddress":"0x791812B0B9f2ba260B2DA432BB02Ee23BC1bB509","category":"Curation","specification":"KIP0X","lang":"en_US","version": "1.0"}`,
`{"title":"Omen Question: News & Politics","description":"This reality dispute has been created by Omen, we advise you to read [the Omen Rules](https://cdn.kleros.link/ipfs/QmU1oZzsduGwtC7vCUQPw1QcBP6BDNDkg4t6zkowPucVcx) and consult the evidence provided in [the Market Comments](https://omen.eth.limo/#/0x95b2271039b020aba31b933039e042b60b063800).","question":"**Assuming that today is December 20th 2020, will Joe Biden win the 2020 United States presidential election?**","answers":[{"title":"Yes"},{"title":"No"}],"policyURI":"/ipfs/QmU1oZzsduGwtC7vCUQPw1QcBP6BDNDkg4t6zkowPucVcx","frontendUrl":"https://omen.eth.limo/#/0x95b2271039b020aba31b933039e042b60b063800","arbitratorChainID":"421614","arbitratorAddress":"0x791812B0B9f2ba260B2DA432BB02Ee23BC1bB509","category":"Oracle","specification":"KIP0X","lang":"en_US","version": "1.0"}`,
`{"title":"Proof of Humanity Registration Request","description":"A request to register the specified entry to a list of provable humans.","question":"Should the request to register be accepted?","answers":[{"title":"Yes","description":"Accept the request to register the entry."},{"title":"No","description":"Deny the request."}],"policyURI":"/ipfs/QmYPf2fdSyr9BiSy6pJFUmB1oTUPwg6dhEuFqL1n4ZosgH","frontendUrl":"https://app.proofofhumanity.id/profile/0x00de4b13153673bcae2616b67bf822500d325fc3?network=mainnet","arbitratorChainID":"421614","arbitratorAddress":"0x791812B0B9f2ba260B2DA432BB02Ee23BC1bB509","category":"Curated List","specification":"KIP0X","lang":"en_US","version": "1.0"}`,
];
const randomTemplate = templates[Math.floor(Math.random() * templates.length)];
const nbOfChoices = 2;
Expand Down
1 change: 1 addition & 0 deletions kleros-sdk/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALCHEMY_API_KEY=
7 changes: 6 additions & 1 deletion kleros-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

_Archon's successor_

\
Make sure to set the environment variables first by copying the file `.env.example`, pasting it, renaming it to `.env`, and then setting the variables.
To run the data mappings tests:

```bash
yarn run test-data-mappings
```

🚧 ⚖️ 🚧
39 changes: 39 additions & 0 deletions kleros-sdk/config/v1-metaevidence/escrow3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"subCategory": "General Service",
"arbitrableAddress": "0x0d67440946949fe293b45c52efd8a9b3d51e2522",
"title": "Liquidity Withdrawal Transfer Ownership Agreement ",
"description": "PARTIES:\nParty 1 (hereinafter referred to as the \"Seller\"):\n* Ethereum Address: 0xc4c4e8144823000d97310756d3237B305E967a09\n\nParty 2 (hereinafter referred to as the \"Buyer\"):\n* Ethereum Address: 0x213fea050A0dA676E97B4dc40e37E985008EA1a0\n\nRECITALS\n\nA. The Seller is the owner of an ERC-20 token contract, whose liquidity is locked on the UNCX.network platform.\nB. The \"Rights'' herein refer to the ability to demand liquidity withdrawal of the aforementioned ERC-20 token through the UNCX.network service by having the designated rights-holder's address assigned to the Gudetama in the contract 0x257EeF05f232B566cD0aF298Ec0B45C2C18d16c7 on the Ethereum chain.\n\nAGREEMENT\n\nTransfer of Rights:\n1.1. The transfer shall be completed by 12:00, Wednesday 20, December 2023 EDT, to the Buyer at the ETH wallet address: 0x8e6f7b23Cdf06db96FD96F4aF8369c0131FAf0F6.\n\nPayment:\n2.1. Upon successful fulfillment of 1.1, the Buyer shall transfer the full amount of 1,4 ETH to the Seller.\n\nNo Partial Payment:\n3.1. There shall be no conditions under which partial payment can be demanded by the Seller, unless the Buyer chooses to do so voluntarily through the Escrow contract.\n\nKleros Escrow:\n4.1. Any disputes arising from this Agreement shall be automatically escalated to the Court of Kleros after both parties fund the dispute resolution deposit. Should one side fail to do so in full, the other party will automatically win the dispute.",
"sender": "0x213fea050A0dA676E97B4dc40e37E985008EA1a0",
"receiver": "0xc4c4e8144823000d97310756d3237B305E967a09",
"amount": "1.4",
"timeout": 8640000000000000,
"token": {
"name": "Ethereum",
"ticker": "ETH",
"symbolURI": "/static/media/eth.33901ab6.png",
"address": null,
"decimals": 18
},
"extraData": {
"Contract Information": "PARTIES:\nParty 1 (hereinafter referred to as the \"Seller\"):\n* Ethereum Address: 0xc4c4e8144823000d97310756d3237B305E967a09\n\nParty 2 (hereinafter referred to as the \"Buyer\"):\n* Ethereum Address: 0x213fea050A0dA676E97B4dc40e37E985008EA1a0\n\nRECITALS\n\nA. The Seller is the owner of an ERC-20 token contract, whose liquidity is locked on the UNCX.network platform.\nB. The \"Rights'' herein refer to the ability to demand liquidity withdrawal of the aforementioned ERC-20 token through the UNCX.network service by having the designated rights-holder's address assigned to the Gudetama in the contract 0x257EeF05f232B566cD0aF298Ec0B45C2C18d16c7 on the Ethereum chain.\n\nAGREEMENT\n\nTransfer of Rights:\n1.1. The transfer shall be completed by 12:00, Wednesday 20, December 2023 EDT, to the Buyer at the ETH wallet address: 0x8e6f7b23Cdf06db96FD96F4aF8369c0131FAf0F6.\n\nPayment:\n2.1. Upon successful fulfillment of 1.1, the Buyer shall transfer the full amount of 1,4 ETH to the Seller.\n\nNo Partial Payment:\n3.1. There shall be no conditions under which partial payment can be demanded by the Seller, unless the Buyer chooses to do so voluntarily through the Escrow contract.\n\nKleros Escrow:\n4.1. Any disputes arising from this Agreement shall be automatically escalated to the Court of Kleros after both parties fund the dispute resolution deposit. Should one side fail to do so in full, the other party will automatically win the dispute."
},
"invoice": false,
"category": "Escrow",
"question": "Which party abided by terms of the contract?",
"rulingOptions": {
"type": "single-select",
"titles": [
"Refund Sender",
"Pay Receiver"
],
"descriptions": [
"Select to return funds to the Sender",
"Select to release funds to the Receiver"
]
},
"evidenceDisplayInterfaceURI": "/ipfs/QmfPnVdcCjApHdiCC8wAmyg5iR246JvVuQGQjQYgtF8gZU/index.html",
"aliases": {
"0x213fea050A0dA676E97B4dc40e37E985008EA1a0": "sender",
"0xc4c4e8144823000d97310756d3237B305E967a09": "receiver"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,6 @@
"type": "string",
"default": "NewDisputeTemplate.schema.json"
},
"category": {
"type": "string",
"default": "",
"title": "The category Schema",
"examples": [
"Oracle"
]
},
"lang": {
"type": "string",
"default": "",
"title": "The lang Schema",
"examples": [
"en_US"
]
},
"title": {
"type": "string",
"default": "",
Expand Down Expand Up @@ -302,6 +286,32 @@
"/ipfs/QmeTBY7jZe2ut5WjifNASADo3E4zBxkMd62WwBpXtwP9pg"
]
},
"attachment": {
"type": "object",
"default": {},
"title": "The attachment Schema",
"required": [
"uri"
],
"properties": {
"label": {
"type": "string",
"default": "",
"title": "The label Schema",
"examples": [
"Terms"
]
},
"uri": {
"type": "string",
"default": "",
"title": "The uri Schema",
"examples": [
"/ipfs//QmZ7R..7889/terms.json"
]
}
}
},
"arbitrableChainID": {
"type": "string",
"default": "",
Expand Down Expand Up @@ -335,6 +345,55 @@
"0xD08Ab99480d02bf9C092828043f611BcDFEA917b"
]
},
"metadata": {
"type": "object",
"default": {},
"title": "The metadata Schema",
"required": [],
"properties": {},
"examples": [
{}
]
},
"aliases": {
"type": "object",
"default": {},
"title": "The aliases Schema",
"properties": {
"Party1": {
"type": "string",
"default": "",
"title": "The Party1 Schema",
"examples": [
"0x1234...CDEF"
]
},
"Party2": {
"type": "string",
"default": "",
"title": "The Party2 Schema",
"examples": [
"0xFEDC...4321"
]
}
}
},
"category": {
"type": "string",
"default": "",
"title": "The category Schema",
"examples": [
"Oracle"
]
},
"lang": {
"type": "string",
"default": "",
"title": "The lang Schema",
"examples": [
"en_US"
]
},
"specification": {
"type": "string",
"default": "",
Expand All @@ -343,6 +402,14 @@
"KIP00",
"KIP99"
]
},
"version": {
"type": "string",
"default": "1.0",
"title": "The version Schema",
"examples": [
"1.0"
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
"arbitratorChainID": "421614",
"arbitratorAddress": "0xD08Ab99480d02bf9C092828043f611BcDFEA917b", // KlerosCore
"category": "Curated Lists",
"specification": "KIP88"
"specification": "KIP88",
"version": "1.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"category": "Curated Lists",
"lang": "en_US",
"specification": "KIP88",
"version": "1.0",
"metadata": {
"tcrTitle": "Ledger Contract Domain Name registry v2",
"tcrDescription": "A list of contract addresses and the domain names they are meant to be used from .",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[
{
"type": "abi/event",
"abi": "event TransactionCreated(uint256 indexed _transactionID, string _transactionUri, address indexed _buyer, address indexed _seller, uint256 _amount, string _asset, uint256 _deadline)",
"address": "[FIX AFTER DEPLOY]",
"eventFilter": {
"fromBlock": "[FIX AFTER DEPLOY]",
"toBlock": "latest",
"args": {
"_transactionID": "[FROM EXTERNAL DISPUTE ID]"
}
},
"seek": [
"transactionUri",
"buyer",
"seller",
"amount",
"asset",
"deadline"
],
"populate": [
"_transactionUri",
"_buyer",
"_seller",
"_amount",
"_asset",
"_deadline"
]
},
{
"type":"fetch/ipfsJson",
"todo": "get title, description, extraDescriptionUri from _transactionUri"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "../NewDisputeTemplate.schema.json",
"title": "{{title}}", // from the form
"description": "{{description}}", // from the contract terms form
"question": "Which party abided by the terms of the contract?",
"answers": [
{
"title": "Refund the Buyer",
"description": "Select this to return the funds to the Buyer."
},
{
"title": "Pay the Seller",
"description": "Select this to release the funds to the Seller."
}
],
"policyURI": "/ipfs/XxxxxXXX/escrow-general-policy.pdf", // not transaction-specific
"attachment": { // transaction-specific
"label": "Transaction Terms",
"uri": "{{extraDescriptionUri}}"
},
"frontendUrl": "https://escrow-v2.kleros.builders/#/myTransactions/%s", // deployment specific, might break over time
"arbitrableChainID": "421614",
"arbitrableAddress": "0x??", // Escrow, hardcode after deploy-time
"arbitratorChainID": "421614",
"arbitratorAddress": "0x??", // KlerosCore, hardcode after deploy-time
"metadata": {
"buyer": "{{buyer}}",
"seller": "{{seller}}",
"amount": "{{amount}}", // in Wei or ERC20 units
"asset": "{{asset}}", // "0" or "native" or "0x1234..." or "erc20:0x1234...", cf. CAIP-19,20,21
"deadline": "{{deadline}}",
"transactionUri": "{{transactionUri}}" // transaction-specific
},
"category": "Escrow",
"specification": "KIPXXX",
"aliases": {
"Buyer": "{{buyer}}",
"Seller": "{{seller}}"
},
"version": "1.0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type DisputeRequest = {
arbitrator: string; // klerosCore address
arbitrableDisputeID: number; // dispute id
externalDisputeID: number; // Escrow transaction id
templateId: number; // Escrow configuration
templateUri: string; // empty
};
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
"arbitratorChainID": "421614",
"arbitratorAddress": "0xD08Ab99480d02bf9C092828043f611BcDFEA917b", // KlerosCore
"category": "Translation",
"specification": "KIP999"
"specification": "KIP999",
"version": "1.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"category": "Translation",
"lang": "en_US",
"specification": "KIP999",
"version": "1.0",
"metadata": {
"linguoAddress": "0xe78996a233895be74a66f451f1019ca9734205cc",
"linguoTranslationID": "76",
Expand Down
Loading