## 5 Implementation
### Integration  
The Remix IDE (remix.ethereum.org accessed on 3 March 2024) was used to develop this contract, and the Ropsten test network, which is a test blockchain network, was used for deployment. An Application Binary Interface (ABI) and a contract address are formed following the smart contract's successful compilation, and they are copied and used. The contract is then initialized in the NodeJS code using the ABI and contract address, making it possible to call the subsequent methods that were explained. The project as a whole is tested on a local network before the smart contract is released to the Ropsten test network. Users  
\begin{table}
\begin{tabular}{l l l} \hline \hline
**Method** & **Function Used** & **Explanation** \\ \hline \multirow{7}{*}{Ordering Seeds} & addOrder() & This is called to store the order placed by a farmer. \\  & acceptOrder() & Authorized warehouses call this to accept the placed order. \\  & reqTransit() & This is called to request the transit of the order shipment, and as a result, the status of the order shifts to “REQ-TRANSIT”. \\  & acTransit() & An authorized logistic company calls this function and updates the status to “TRANSIT ACKNOWLEDGMCD”. \\  & reqDelievery() & Transit calls this method to request admission of delivery and simultaneously change the status to “REQUESTING DELIVERY”. \\  & acDelievery() & Once the status is changed to “DELIVERYACKNOWLEDGED”, this is the final payable method that can only be called by the farmer. \\ \hline \multirow{7}{*}{Seeds Approval} & addSubmission() & This adds a new submission for the breeder to the chain and updates the status of the process to “SUBMITTED”. \\  & acceptSubmission() & FCI calls this to accept the submission, which updates the status to the “ACCEPTED” state. \\  & approveSubmission() & FCI calls this to mint an NFT for seeds with the seed name, timestamp, and approved quality standards. \\ \hline \multirow{2}{*}{Warehouse} & addWarehouse() & FCI calls this to add a new warehouse to the list of approved warehouses. \\  & remWarehouse() & FCI calls this to remove a warehouse from the list of approved warehouses. \\ \hline \hline \end{tabular}
\end{table}
Table 1: Methods employed for smart contracts.  
connect to Metamask using the front end of a web browser like Chrome, and whenever a transaction needs to be made that will modify the blockchain or a user-end method needs to be called that will modify the blockchain, a Metamask popup will appear to request permission and display the gas price that will be used to execute the transaction. Accessing data stored on the blockchain is free, but gas fees are incurred only when altering data. Each time that any user changes the state of the blockchain, a gas fee in Ether has to be paid. The time taken by the transaction is inversely proportional to the gas price entered by the user. Sometimes, the transaction can be canceled, too. When the DApp loads, a contract instance is created and gets stored in the state of that particular React class component, which gets passed to its child components, and the contract methods can be used from there.  
The successful execution of our blockchain-based seed supply chain proved to be an effective strategy for reducing the need for middlemen in the seed distribution process. The gas fees paid for transactions are significantly less than the charges in the current system and may be further optimized by using better smart contracts. The implementation successfully provides the proof of concept that a decentralized solution can be used for seed distribution. The proposed system is faster and provides traceability and immutability at a reasonable cost. Every action on the blockchain that involves adding new data requires a transaction and comes with a small transaction cost called a gas fee, and it is imperative when considering the running costs for the widespread and prolonged functionality of a fundamental system like the proposed one. Figure 13 depicts the gas fees used for our implementation.