{"id":25743180,"url":"https://github.com/freight-trust/x12solidity","last_synced_at":"2026-05-12T21:16:15.477Z","repository":{"id":103603330,"uuid":"286498797","full_name":"freight-trust/X12solidity","owner":"freight-trust","description":"X12 Electronic Data Interchange Solidity Contracts, with support for 4010 and select manifests like 211, 850, 213, 856, 997 \u0026 more","archived":false,"fork":false,"pushed_at":"2020-08-10T16:14:57.000Z","size":757,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-10T11:35:27.591Z","etag":null,"topics":["211","besu","billoflading","edi","electronic-data-interchange","enterprise","ethereum","hyperledger","smart-contracts","solidity","warehouse-receipt","x12"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/freight-trust.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-10T14:33:07.000Z","updated_at":"2023-02-10T20:49:17.000Z","dependencies_parsed_at":"2023-03-13T15:07:11.806Z","dependency_job_id":null,"html_url":"https://github.com/freight-trust/X12solidity","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/freight-trust/X12solidity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freight-trust%2FX12solidity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freight-trust%2FX12solidity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freight-trust%2FX12solidity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freight-trust%2FX12solidity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/freight-trust","download_url":"https://codeload.github.com/freight-trust/X12solidity/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freight-trust%2FX12solidity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32957379,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T09:19:52.626Z","status":"ssl_error","status_checked_at":"2026-05-12T09:17:33.438Z","response_time":102,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["211","besu","billoflading","edi","electronic-data-interchange","enterprise","ethereum","hyperledger","smart-contracts","solidity","warehouse-receipt","x12"],"created_at":"2025-02-26T10:19:00.369Z","updated_at":"2026-05-12T21:16:15.470Z","avatar_url":"https://github.com/freight-trust.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# X12 Interchange Standard\n\n\u003e  i.e. an X12Interchange object through solidity, then to a raw X12 interchange and returnable as a **valid X12 stream.**\n\nThis is an implementation of the `interchangeSet` function form [X12](https://x12.org) and the Interchange Group functions from the X12  Electronic Data Interchange Standard.\n\n\u003e Note: You must have a commerical developers license to use this in production, or you mat transact through our deployments in which we have a commerical license for usage.\n\nThe `interchangeSet` implementation avoids data storage read and writes. Fits 8 function selectors in a single data storage slot. \n\nThe `contracts/InterchangeExample.sol` file shows an example of implementing X12 4010 850 EDI Data Interchange\n\nThe `test/interchangeExampleTest.js` file gives tests for the `interchangeSet` function and the Interchange Group functions.\n\nThe Implementaiton is the boilerplate code you need for a X12 Interchange Contract.\n\n\u003e The [InterchangeSegment.sol](./#) and [InterchangeGroupSegment.sol](./#) contracts implement the `interchangeSet` function and the TA1 (i.e. Acknowledgement) functions.\n\nThe [InterchangeExample.sol](./#)  This contract is the Interchange Proxy. It enables upgradability in the event of contract mishap.\n\nThe [InterchangeStorageContract.sol](./#) shows how to implement Interchange Transaction Data Storage. This contract includes contract ownership which can be updated should your `Trading Channel` conclude (e.g. you no longer do business with your counterparty).\n\n## Interchange Functions\n\nIn order to call a function that exists in an addressable  Interchange you need to use the ABI information of the segment that has the function.\n\nThis infromation is provided in the `TradingChannel` typically. Open ABI Information for \"Open Trading Channels\" are a phase 2 implementation. [See Roadmap](https://github.com/freight-trust/protocol)\n\nHere is an example that uses web3.js:\n\n```javascript\nlet GSGTPairingSegment = new web3.eth.Contract(\n  GSGTPairingSegment.abi,\n  interchangeAddress\n);\n```\n\nIn the code above we create a contract variable so we can call contract functions with it.\n\nIn this example we know we will use a interchange because we pass a interchange's address as the second argument. But we are using an ABI from the `GSGTPairingSegment` segment so we can call functions that are defined in that segment. `GSGTPairingSegment`'s functions must have been added to the interchange (using interchangeSet) in order for the interchange to use the function information provided by the ABI of course.\n\nSimilarly you need to use the ABI of a segment in Solidity code in order to call functions from a interchange. Here's an example of Solidity code that calls a function from a interchange:\n\n```solidity\nstring result = GSGTPairingSegment(interchangeAddress).getResult()\n```\n\n## Security\n\n## Contact\n\n## License\n\nMIT license for Solidity Code Only\nX12.org retains all copyright and rights to the X12 EDI Transaction Set under the Commerical License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreight-trust%2Fx12solidity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreight-trust%2Fx12solidity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreight-trust%2Fx12solidity/lists"}