Leveraging Blockchain-Based Smart Contracts To Develope Trustworthy Customer Agreements

. The With the advancement of computer, electronic, and telecommunications technology, there has been a significant change in the world of applications, which makes it easier for humans to carry out various activities, both at work and in interacting on social media.CV. Albahritech faces the challenge of not having a quick and easy office equipment maintenance application. This limitation can have a negative impact on company operations. Currently, the maintenance process still relies on communication via WhatsApp or phone, which causes customer appointments to be missed or forgotten due to the large number of calls for customer maintenance services that cannot be fulfilled. In addition, transactions and visit reports are not properly recorded, which can cause customers to experience delays in getting treatment services or even cause customers to look for other treatment services.The currently designed application uses a blockchain-like decentralized network model, known as a DApp. This DApp has several important features that utilize blockchain technology[1], including the ability to make payments using cryptocurrencies such as Ether and the feature to record service lists for customers. In this application, smart contracts are used to create a mechanism of trust and automation in agreements or deals between the parties involved. This ensures that agreements and transactions made within the app are transparent, secure, and without the need for a third party. In addition, the app also uses IPFS for customer data storage. IPFS is a peer-to-peer file distribution system that serves to store and distribute data on the interne[2]t. The use of IPFS in this application enables distributed and decentralized data storage, thereby improving data security and reliability.


INTRODUCTION
CV Albahritech is a business engaged in the field of Information Technology & Communication that provides maintenance services for IT devices.The quality of maintenance service is determined by the speed of resolving each device's damage report, which becomes a parameter to assess the efficiency of the service.Additionally, CV Albahritech focuses on providing convenience in the service process to all parties involved, including administrators, technicians, and customers.CV Albahritech also offers repair services for office devices such as Laptops, Computers, and Printers.They send technicians to the customer's location according to the promised schedule.The services and tasks offered include assistance in designing, developing, testing, as well as installing CCTV and queuing machines.Technicians are responsible for various tasks, such as evaluating new design sketches, replacing spare parts, engaging in discussions with customers, and reviewing frameworks as a basis for making policies, including setting service objectives and targets.
Additionally, technicians also have the responsibility to estimate the lifespan of machine equipment and determine the precise placement locations.In carrying out its business, CV Albahritech strives to provide efficient, reliable, and responsive services to customers, in order to fulfill the needs and expectations related to the maintenance and repair of IT and office devices.Repair is any activity aimed at providing satisfaction to customers by providing quality services that meet their desires and needs.The quality of repair can only be assessed from the customer's perspective.Customers evaluate the level of service provided in various ways, one of which is by observing and assessing the systems and procedures set by the service provider.Additionally, expertise in repair also includes how service providers use attitudes, behaviors, and oral communication skills in interacting with customers and delivering products and services relevant to their needs [3].Customer Service is a service that provides support and assistance to computer users, especially in the context of a company.The methods of customer service management can vary from one type of organization to another.In small-scale companies, customer service may be handled by just one person who has some knowledge in dealing with user issues, and users can reach out to them via telephone.[4] http://ijstm.inarah.co.id 1082

II. METHODS
Primary data is obtained through in-depth interviews with various relevant parties, such as technicians, admins, and the owner of CV.Albahritech.In these interviews, relevant information about customer service and procedures in the company is explained in detail by the respondents.Observation is conducted by directly observing the workflow at CV. Albahritech.Through this observation, the researcher can understand in detail how the customer service process and company operations are carried out in practice.The research also utilizes a literature review by referring to ten research journals related to the concept of Customer Support System.These journals are used for analysis, references, and discussions that enrich the research and distinguish it from previous studies.By using a combination of these three methods, this research aims to obtain comprehensive and in-depth data regarding the customer support system being studied at CV. Albahritech.The data collection method was conducted through the literature study technique, and the literature review was presented in Table 1 Manufacturing system is unable to provide complete forensic identities for the entire system.This results in limitations to authenticate equipment effectively.
A comprehensive identification mechanism with a trust chain has been implemented for the designed system.This trust chain is based on a private blockchain combined with a decentralized database system to enhance flexibility, tracking, and identification of IC-module-systems [5].(Zhao et al., 2022) 2023 Cases of copyright and infringement are related to issues of compliance with copyright laws and the actions taken when there is a violation of the copyright of a work or content.
Using security analysis, we have verified that there are no security vulnerabilities that can be exploited in our smart contract code.Furthermore, we have demonstrated that our methods are secure against widely employed techniques [6].(Zhao et al., 2022) 2023 Due to the current emphasis on privacy protection in existing blockchain systems, there is a lack of statistics and payment supervision.
The proposed system is a blockchain-based transaction system with a focus on statistics and payment monitoring.In this system, users utilize homomorphic encryption scheme to preserve the confidentiality of payment amounts [7].

(Kodavali & Kuppuswamy, 2022) 2022
Cloud storage is located far from us and is unable to handle large data bandwidth due to network latency.
The purpose of Fog computing is to reduce the amount of data that needs to be transferred to the cloud for data processing and improve efficiency.Fog computing enhances the quality of service (QoS) and also reduces network bandwidth [8].
(Haritsah et al., n.d.) 2022 File sharing indeed has significant benefits in communication and data sharing among users.The data that can be shared includes various types of information, such as numerical data, resources, scales, and other important information that needs to be kept confidential.
IPFS is a solution to address the problem through an approach as a secure peer-to-peer distributed file system.This system utilizes encrypted file system hash that connects all computing devices to the same file system [9].

(Azzopardi et al., 2022) 2022
Aspect-oriented programming tools aim to enhance code modularity by allowing programming of concerns that crosscut the main codebase.
AspectSol It is a tool that enables aspect-oriented programming for smart contracts written in the Solidity programming language.Additionally, the paper discusses design spaces for pointcuts and aspects within the context of using this tool [10].

(Shinde, 2023) 2023
At present, an enormous volume of data is generated on a daily basis.To address the increasing need for data storage capacity, centralized cloud storage systems have been extensively adopted for data storage and sharing purposes.
Transitioning from centralized storage to decentralized storage involves distributing data, applications, authority, individuals, or objects across a peer-to-peer network instead of relying on a central authority [11].
( Security in voting is crucial to ensure the integrity, confidentiality, and accuracy of the voting process.
The system used involves cryptography keys to help voters remain undetected or anonymous [13].
School is a formal educational institution that encompasses interactions between teachers, students, administrative staff, as well as the systems and procedures within its environment.
Blockchain is a large, decentralized, and distributed ledger that stores digital transaction records in a way that makes them accessible and visible to many members within the network while ensuring security [14].

III. RESULT AND DISCUSSION
Functional requirements describe the services, features, or functions that the system must provide to meet the needs of the Company, Customers, Admins, and Technicians.Some of the functional requirements that need to be prepared include : 1. Automatically process agreements through DApp Web-Based to interact with the smart contract (Simplestorage.sol).2. Customers make payment transactions for technician service visits through DApp.3. Customers upload files from filling out customer data forms to IPFS and obtain the CID Form. 4. Admin will check the Content Identifier of the customer data form on a web browser. 5. Technicians receive CID information through the admin for the purpose of visiting the customer's location.6. Admin will compile technician's work for one month and provide it to the technician through IPFS.7. Funds from customers will be stored in the smart contract and automatically deposited into the company's account address.8.The company will make payments to technicians through DApp using a specific crypto digital wallet, Metamask.Non-functional requirements describe the requirements used in building and implementing this blockchain-based electronic agreement service application.These requirements include both software and hardware-related needs for the system In Table 1 The proposed architecture for a reliable and trustworthy agreement service relies on smart contracts [14], which function as agreements executed automatically based on predefined rules and logic.When the payment process is conducted through the DApp, the smart contract will automatically manage and validate transactions according to the agreed-upon terms by the involved parties.By utilizing smart http://ijstm.inarah.co.id 1084 contracts, the payment process becomes more dependable as transactions are executed in accordance with the established agreement [15], eliminating the need to rely on third parties to oversee or guarantee the transactions in Figure 1.1.

Agreement Phase
The Agreement Phase includes steps 7 -14 as follows: Step 7 Connect Metamask E-wallet to DApp.
Step 8 DApp will fetch data from Metamask.
Step 9 Public key from Metamask will appear on the DApp interface.
Step 10 Customers will fill in the following data on the form: a. Date (for visitation records).b.Address (information about the place of visit).c.Phone Number (if the address is difficult to find).
Step 11 DApp will confirm the Gas Fee for the Agreement service.
Step 12 Metamask will validate the transaction with the smart contract.
Step 13 Validated transaction will be recorded and stored on the blockchain.
Step 14 DApp will display a successful payment notification for the transaction process on the blockchain network.

Verification Phase
The verification phase includes steps 15 -22 as follows: Step 15 Upload the agreement file performed by the customer to IPFS.
Step 16 IPFS will provide and return a file in the form of a CID to the customer.
Step 17 Customer will send the CID through a secure channel to the admin.
Step 18 Admin will check the CID from the customer through a web browser interacting with IPFS.
Step 19 IPFS will display the file.
Step 20 Admin will send the CID through a secure channel to the technician.
Step 21 Technician will check the CID through a web browser for the purpose of visiting the customer's location.
Step 22 IPFS will display the file accessed via the CID by the technician.http://ijstm.inarah.co.id 1086

Payment Phase
The payment phase includes steps 23 -45 as follows: Step 23 Admin will check the list of agreements for customer services from IPFS.
Step 24 IPFS will display the file via the CID by the admin.
Step 25 The admin will create a work report for the technician and send it to the company.
Step 26 Admin will create a summary of the list of customer services for the company.
Step 27 Company will check the list of technician work reports.
Step 28 Company will check the summary of the list of customer services.
Step 29 Company will generate invoices for the customers.
Step 30 Cdmin will upload the invoice file on IPFS.
Step 31 IPFS will provide and return a file in the form of a CID to the company.
Step 32 Admin will send the CID to the customers through a secure channel.
Step 33 Customer will check the CID from the admin through a web browser interacting with IPFS Desktop.
Step 34 IPFS will display the file accessed via the CID by the customers.
Step 35 Customer will connect their Metamask E-wallet to DApp Payment Menu.
Step 36 DApp will fetch data from the Metamask E-wallet.
Step 37 Public key from the Metamask E-wallet will appear on the DApp interface.
Step 38 Before customers proceed with the payment transaction, they need to provide the following information: a. Enter the payment amount according to the invoice using ETH as the transaction currency.b.Enter the payment destination to the company's public key.
Step 39 DApp will confirm the Gas Fee for the service payment transaction.
Step 40 Metamask will validate the transaction with the smart contract.
Step 41 Validated transaction will be recorded and stored on the blockchain.
Step 42 DApp will display a successful payment notification for the transaction process on the blockchain network.
Step 43 Company will check the technician's work report in the technician menu within DApp.
Step 44 DApp will provide information on the list of technician work.
Step 45 Company will connect their Metamask E-wallet to DApp Payment Menu.
Step 46 DApp will fetch data from the Metamask E-wallet.
Step 47 Public key from the Metamask E-wallet will appear on the DApp interface.
Step 48 Before the company proceeds with the payment transaction, they need to provide the following information: a. Enter the payment amount according to the technician's work using ETH as the transaction currency.b.Enter the payment destination to the technician's public key.
Step 49 DApp will confirm the Gas Fee for the technician's work payment transaction.
Step 50 Metamask will validate the transaction with the smart contract.
Step 51 Validated transaction will be recorded and stored on the blockchain.
Step 52 DApp will display a successful payment notification for the transaction process on the blockchain network.In Figure 1.3, smart contract that has been created using Truffle with the Solidity programming language.
http://ijstm.inarah.co.id 1087 Fig 1 .3.Deploy Smart Contract In Figure 1.4, the display of the Trusted Agreement DApp after the form is filled out by the customer is shown.The 'Submit' button is visible, and it is entered the account address 5f750, representing the customer.Additionally, there is information about the total amount, including the gas fee, which is the service fee used to execute a process on the blockchain network.

Fig 1.4. Display Menu
In Figure 1.5, the successfully completed transactions will be recorded on the blockchain network.It provides the transaction hash number and user address details for the completed transactions.Additionally, there is information about the gas used, which is commonly utilized during the transaction process.The customer then enters the payment amount using ETH and the public key as the destination for the payment transaction.The total amount, including the gas fee, is displayed as the service fee used to execute the billing payment process on the blockchain network.CONCLUSION Based on the results and discussions of the research on Trusted Agreement Service using Blockchain-based Smart Contract through Web-Based DApp, it can be concluded that this blockchain-based agreement system can be successfully implemented and works well, meeting the test bed scenarios.The entire process in this agreement service system is recorded on the blockchain network transparently, immutably, and automatically, ensuring prevention from data tampering and non-repudiation by customers, companies, technicians, or any other unauthorized parties.The analysis of the test results reveals the gas fee values for p1-t1 as 0.00052366, p1-t2 as 0.00091784, p2-t1 as 0.00060766, p2-t2 as 0.00091832, p3-t1 as 0.00053432, p3-t2 as 0.00061976, p4-t1 as 0.00053576, p4-t2 as 0.00060766, p5-t1 as 0.00091832, and p5-t2 as 0.00053432 for the agreement service.From the testing, it is observed that if a customer enters into a subsequent agreement, the gas fee will change from the gas fee value during the first agreement conducted on the DApp. V.

Fig 1 . 1 .
Fig 1.1.Application Architecture The proposed system design uses Sequence Diagram from preparation to payment phase as follows in Figure 1.2.

Fig 1 . 5 .
Fig 1.5.Transactions in the Blockchain NetworkIn Figure1.6, customer download filled form file and then sends it to IPFS for administrative purposes to the company.Afterward, IPFS will provide a CID oiobX for that file, which the customer will send to the admin for data verification.

Fig 1 . 6 .
Fig 1.6.Upload File IPFS In Figure 1.7, payment menu is accessed by the account address 5f750, which represents the customer.The customer then enters the payment amount using ETH and the public key as the destination for the payment transaction.The total amount, including the gas fee, is displayed as the service fee used to execute the billing payment process on the blockchain network.

Fig 1 . 7 .
Fig 1.7.Payment Menu IV.CONCLUSION Based on the results and discussions of the research on Trusted Agreement Service using Blockchain-based Smart Contract through Web-Based DApp, it can be concluded that this blockchain-based agreement system can be successfully implemented and works well, meeting the test bed scenarios.The entire process in this agreement service system is recorded on the blockchain network transparently, immutably, and automatically, ensuring prevention from data tampering and non-repudiation by customers, companies, technicians, or any other unauthorized parties.The analysis of the test results reveals the gas fee values for p1-t1 as 0.00052366, p1-t2 as 0.00091784, p2-t1 as 0.00060766, p2-t2 as 0.00091832, p3-t1 as 0.00053432, p3-t2 as 0.00061976, p4-t1 as 0.00053576, p4-t2 as 0.00060766, p5-t1 as 0.00091832, and p5-t2 as 0.00053432 for the agreement service.From the testing, it is observed that if a customer enters into a subsequent agreement, the gas fee will change from the gas fee value during the first agreement conducted on the DApp.