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

feat: json metadata checker. #14

Merged
merged 1 commit into from
Aug 14, 2024
Merged

feat: json metadata checker. #14

merged 1 commit into from
Aug 14, 2024

Conversation

matiwinnetou
Copy link
Collaborator

@matiwinnetou matiwinnetou commented Aug 13, 2024

Putting transactions on chain without some sanity check is spooky, let's run the code via json metadata checker.

{
  "metadata": {
    "creation_slot": "10278",
    "version": "1.0"
  },
  "org": {
    "country_code": "CH",
    "name": "Cardano Foundation",
    "tax_id_number": "CHE-184477354",
    "id": "75f95560c1d883ee7628993da5adf725a5d97a13929fd4f477be0faf5020ca94",
    "currency_id": "ISO_4217:CHF"
  },
  "txs": [
    {
      "date": "2023-10-03",
      "number": "TRANSFER3",
      "batch_id": "2c45663f4ab1b7b709ecdf9a6376f9caf0ebce5ebe21a4917519f1af24dd4852",
      "id": "48335c2b63cffcef2a3cd0678b65c4fb16420f51110033024209957fbd58ec4e",
      "type": "Transfer",
      "items": [
        {
          "amount": "2000000.00",
          "event_code": {
            "code": "99001100",
            "name": "Payment to Transit Clearing"
          },
          "project": {
            "cust_code": "AN 000002 2023",
            "name": "Accounting Ledger on the Blockchain"
          },
          "cost_center": {
            "cust_code": "3000",
            "name": "Operations"
          },
          "document": {
            "number": "TRX-0003",
            "vat": {
                "cust_code": "CH-VH-3.8",
                "rate": "3.8"
            },
            "currency": {
              "cust_code": "USD",
              "id": "ISO_4217:USD"
            },
            "counterparty": {
                "cust_code": "test_vendor1",
                "type": "VENDOR"
            }
          },
          "id": "9c6e241e1136e20e3b5033861156a1e453dce463575ebbebaa813e2af73fa95c",
          "fx_rate": "0.91277"
        }
      ],
      "accounting_period": "2023-10"
    },
    {
      "date": "2023-10-09",
      "number": "TRANSFER5",
      "batch_id": "2c45663f4ab1b7b709ecdf9a6376f9caf0ebce5ebe21a4917519f1af24dd4852",
      "id": "012ae0309054b03a3bd2d3dee3741d88a89b6ea55cadb9da7f7e9c6158eaf93a",
      "type": "Transfer",
      "items": [
        {
          "amount": "1000000.00",
          "event_code": {
            "code": "11001100",
            "name": "Bank Transfer"
          },
          "document": {
            "number": "TRX-0005",
            "currency": {
              "cust_code": "ADA",
              "id": "ISO_24165:ADA"
            }
          },
          "id": "f0fc7b88b6288bdd248f9db932c6a14ea7d28cef234d11ae91ca07f9bfa3c440",
          "fx_rate": "0.85805"
        }
      ],
      "accounting_period": "2023-10"
    }
  ]
}

@matiwinnetou matiwinnetou force-pushed the json-metadata-checker branch 3 times, most recently from 775dd56 to 37cdc18 Compare August 14, 2024 09:06
@matiwinnetou matiwinnetou marked this pull request as ready for review August 14, 2024 09:07
@matiwinnetou matiwinnetou force-pushed the json-metadata-checker branch from 37cdc18 to 8698208 Compare August 14, 2024 09:28
@matiwinnetou matiwinnetou force-pushed the json-metadata-checker branch from 8698208 to 0457871 Compare August 14, 2024 10:12
@matiwinnetou matiwinnetou merged commit 0c315b0 into main Aug 14, 2024
2 of 3 checks passed
@matiwinnetou matiwinnetou deleted the json-metadata-checker branch August 14, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant