Skip to content

Implementation of the FDA's DSCSA regulation on an Ethereum Blockchain

License

Notifications You must be signed in to change notification settings

Lab-Data-Concepts/dscsa

Repository files navigation

LDC Logo Drug Supply Chain Security Act (DSCSA) Blockchain

built-with openzeppelin

Implementation of the FDA DSCSA supply chain regulation in a Consortium Blockchain implemented on Ethereum.

Overview

The DSCSA is a FDA regulation to track drug packages through the supply chain. The FDA completed a DSCSA blockchain pilot in 2020: FDA Blockchain Pilot Report.

Installation

Reference OpenZeppelin for details in setting up the development environment. A summary is provided in the 31_Installation.md.

Usage

Build Contract

Create Solidity code to inherit from DSCSAOwner:

pragma solidity 0.8.4;
import "./DSCSAOwner.sol";

contract DSCSAOwnerMock is DSCSAOwner {
    // Real use case would add custom logic here
}

Compile and Deploy

npx truffle compile ./contracts/DSCSAOwnerMock.sol
npx truffle migrate --network development

Test Contract

Launch Ganache for Blockchain testing and then run the test:

npx truffle test ./test/DSCSAOwnerMock.test.js

Truffle Testing Output

Truffle Testing Output

Ganache Testing Output Labeled

Ganache Testing Output

The Ganache blockchain explorer shows a contract being created and the holder being changed by the MAH.

Learn More & Next Steps

Visit OpenZeppelin for additional information.

Next steps for this repository: