From 028e9ccc2a22dd645ae0ce1a3e78aed2492467dd Mon Sep 17 00:00:00 2001 From: Bumblefudge Date: Fri, 7 Jun 2024 16:37:14 +0200 Subject: [PATCH 1/2] Add eip155/caip2.json and section on machine-readable supplements to Contributing.md --- CONTRIBUTING.md | 20 ++++++++++++++++++++ eip155/caip2.json | 9 +++++++++ 2 files changed, 29 insertions(+) create mode 100644 eip155/caip2.json diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a4d3c0e6..7492bfc8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,6 +18,26 @@ When linking to an image in the CAN, use relative links such as `../assets/names It is greatly appreciated if you can render your PR locally to check the Jekyll syntax; to do so, run `bundle exec jekyll serve`. +## Machine-readable Supplements + +To facilitate validation and multi-chain registries, you may choose to include (or editors may include) a secondary copy of each profile's validation sections and test cases in the form of a `.json` file, with the following format: + +### Example: eip155/caip2.json + +```json +{ + "standard":"caip2", + "validation":"[0-9]{1-32}", + "test cases" { + "Ethereum mainnet": "eip155:1", + "Görli": "eip155:5", + "Auxilium Network Mainnet": "eip155:28945486" + } +} +``` + +These machine-readable records are for illustrative purposes only, and any time they contradict or grow out-of-date with their corresponding specifications, the latter should be considered authoritative. + ## Style Guide Github-flavored Markdown is encouraged for all CAIP documents, with the following conventions observed: diff --git a/eip155/caip2.json b/eip155/caip2.json new file mode 100644 index 00000000..25c179f6 --- /dev/null +++ b/eip155/caip2.json @@ -0,0 +1,9 @@ +{ + "standard":"caip2", + "validation":"[0-9]{1-32}", + "test cases": [ + "Ethereum mainnet": "eip155:1", + "Görli": "eip155:5", + "Auxilium Network Mainnet": "eip155:28945486" + ] +} From f252961c014509a321179e8b83b8c65b22c7eb09 Mon Sep 17 00:00:00 2001 From: Bumblefudge Date: Fri, 7 Jun 2024 16:50:36 +0200 Subject: [PATCH 2/2] JSON typos in Contributing.md --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7492bfc8..c5fe329d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,11 +28,11 @@ To facilitate validation and multi-chain registries, you may choose to include ( { "standard":"caip2", "validation":"[0-9]{1-32}", - "test cases" { + "test cases": [ "Ethereum mainnet": "eip155:1", "Görli": "eip155:5", "Auxilium Network Mainnet": "eip155:28945486" - } + ] } ```