This article shows the functional application of this set of smart contracts
The contract provides the functions of adding a company, adding a bank, getting company information, getting bank information, getting all company addresses, getting all bank addresses, and getting digital invoice receipts.
In terms of certificate deposit transactions, the contract implements three types of transactions: bank-to-company transactions, company-to-company transactions, and company-to-bank transactions. Each transaction type includes information such as the sender's address, the recipient's address, the transaction amount, and the certificate type. After each transaction is completed, a corresponding digital invoice receipt is generated and the asset balance of the relevant account is updated.
The total page of successful deployment is as follows:
Entity Description
The invoice types and transaction types in this contract are as follows
The following will demonstrate each function step by step
1. Supervisor information deployment and querysuperviosrlns
Remember this address ox5b3.....
2. Add bank and company information
(To add a bank, you need to use the supervisor 0x5b3... account to execute)
Two banks have been added: WeBank and China Construction Bank
Two companies were added; Minghua Company and Xigua Company
3. Check the bank getBank and company getCompany information based on the address
4. Use the index to view bank and company addresses
5. Bank transactions to companies
Onlythe recipient's account can create this transaction, that is, the recipient acknowledges the existence of this transaction
WeBank trades 10,000 to Minghua Company
View the transaction index and view the transaction based on the index
View bank information at this time
6. Company to Company Transactions
Minghua Company trades 5,000 to Xigua Company
Onlythe recipient can create this transaction, that is, the recipient acknowledges the existence of this transaction
7. The company transfers money to the bank
Minghua Company transfers 3,000 to WeBank
At this point, the contract function is completed. If you want the complete code, send me a private message