Skip to content
Snippets Groups Projects
Commit cec594c2 authored by Pedro Pablo Cardona Arroyave's avatar Pedro Pablo Cardona Arroyave
Browse files

Update README.md with contract deployment instructions

parent ba263622
No related branches found
No related tags found
No related merge requests found
Pipeline #250961 passed with stages
in 58 seconds
......@@ -8,21 +8,30 @@ This project is connected to a EVM (Ethereum Virtual Machine) compatible test bl
A direct connection to the blockchain cannot be established through the internet alone. Instead, it is essential to utilize a middleware service known as 'Nodes' to facilitate communication with the blockchain. For this project, we use a node provided by 'Alchemy', which offers additional useful services such as traffic analysis graphs and transaction logs. This setup ensures a reliable and efficient connection to the blockchain, allowing for seamless interaction with the network while also providing valuable insights into network activity and transaction history.
## Functionalities
As name before this project will be use to create, test and deploy the contracts. It is also possible to run the contracts locally for test support.
- **Create:** The contracts are code by using their own programming language, Solidity.
- **Test:** For the testing of the contracts, The projects uses the library "Chai" that is included when a Hardhat project is installed. In addition a package called 'Gas-Reporter' is implemented in the project. This will generate a document with the estimate the gass price of the tested function. The estimate price will be represented in USD and ETH.
For run the test use the following commnad
To test the contract, use the command:
```bash
npm run test:unit
```
- **Deploy:** For the deployment of the contracts in the blockchain.
- **Deploy:** To facilitate the deployment of contracts on the blockchain, the project employs the 'deploy' command, powered by Hardhat. This command takes advantage of the project's node to publish the contracts onto the blockchain. Specific contracts and their parameters for deployment are determined by JavaScript files located in the 'deploy' folder. These files are prefixed with numbers indicating the order of deployment, an essential feature for larger projects that might deploy multiple independent contracts. However, in this project's case, there is only one primary contract, simplifying the process.
To deploy the contract locally, use the command:
```bash
npm run deploy
```
To deploy the contract on the Sepolia tesnet, use the command:
```bash
npm run deploy:sepolia
```
It's crucial to understand that contract deployment should only occur after thorough testing. This is to ensure that potential system errors, which could negatively impact users, are minimized. Careful testing before deployment not only enhances system reliability but also helps avoid the complexities and additional efforts associated with deploying a new, revised contract on the blockchain.
## Contracts
......@@ -37,3 +46,33 @@ npm run test:unit
### Libraries
- **TransactionStruct:** This library is essential for the TokenTrivia ecosystem, providing a standardized format for handling transaction data. It enables other contracts to efficiently manage and record various transactions, ensuring that all transactional information is consistently structured and easily accessible.
## Installation
To set up TokenTrivia web3 project on your local machine, follow these steps:
1. Clone the repository:
- Clone with SSH:
```bash
git clone git@gitlab.stud.idi.ntnu.no:triotech/idatt-2501-web3.git
```
- Clone with HTTPS:
```bash
git clone https://gitlab.stud.idi.ntnu.no/triotech/idatt-2501-web3.git
```
2. npm install:
```bash
npm install
```
## Future work and possible changes
## Contribution
## Contact information
For questions, suggestions, or issues, please contact:
### Pedro Cardona
- Email: pedropca@stud.ntnu.no
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment