The LC smart contract will serve as an interface for the LC Master contract so that we can create and deploy a new contract. The smart contract will consist of the following components:
- Data structure
- LCNew: To capture and store the LC details
- viewLCDetails: To view the LC details
- settleLC: To invoke a settlement request to the LC
- onlyAuth: Only permits buyer, seller, and the bank to access to the method
- onlySeller: Only permits the seller to access the method
- SettleLCSuccessful: Triggered after a successful settlement request
Now, let's start creating the LC smart contract by following these steps:
- Start by creating a file called LC.sol.
- We will first declare the compiler ...