https://github.com/gr8h/message-storage
The purpose of this smart contract to retrieves a text from a real-world API and stores it on the Ethereum blockchain.
https://github.com/gr8h/message-storage
chainlink hardhat oracles smart-contracts solidity
Last synced: 2 months ago
JSON representation
The purpose of this smart contract to retrieves a text from a real-world API and stores it on the Ethereum blockchain.
- Host: GitHub
- URL: https://github.com/gr8h/message-storage
- Owner: gr8h
- Created: 2022-08-05T08:50:09.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-07T14:28:37.000Z (almost 4 years ago)
- Last Synced: 2025-04-11T03:18:17.434Z (about 1 year ago)
- Topics: chainlink, hardhat, oracles, smart-contracts, solidity
- Language: JavaScript
- Homepage:
- Size: 201 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Message Storage
The purpose of this smart contract to retrieves a text from a real-world API and stores it on the Ethereum blockchain.
- [Assumptions](#assumptions)
- [Enviroment variables](#enviroment-variables)
- [Interact with the deployed smart-contract](#interact-with-the-deployed-smart-contract)
- [Run Tests](#run-tests)
- [Run Deploy](#run-deploy)
- [Tools](#tools)
## Assumptions
* Using https://www.quicknode.com/ to call the ETH Rinkeby testnet.
## Enviroment variables
* DEV_RINKEBY_KEY=`[Rinkeby test network key]`
* PROD_MAINNET_KEY=`[Mainnet network key]`
* PRIVATE_KEY=`[Private Key]`
* CHAINLINK_TOKEN_ADDRESS=`[Chainlink LINK token address]`
* CHAINLINK_ORACLE_ADDRESS=`[Chainlink Oracle address]`
* CHAINLINK_JOBID=`[Chainlink Job ID]`
* EXTERNAL_API_URL=`[External API URL]`
* EXTERNAL_API_PATH=`[External API Path]`
## Interact with the deployed smart-contract
* Smart-contract [address](https://rinkeby.etherscan.io/address/0xD841b6e9479E708735C51dea7EC5Ba165EA523c9)
* Get balance
* Update message
```bash
npm run execute
```
## Run Tests
* Run unit-test cases aginist the moked smart-contracts
* [MockLink](contracts/mocks/MockLink.sol) [Ref](https://github.com/pappas999/chainlink-hardhat-box/blob/main/contracts/test/MockLink.sol)
* [MockMessageStorage](contracts/mocks/MockMessageStorage.sol)
```bash
npm run test
```
## Run Deploy
* Deploy the contract to Rinkeby test network
## Tools
* Solidity
* Hardhat
* Chainlink [Get > Bytes](https://github.com/translucent-link/chainlink-node-jobs/tree/main/ethereum-rinkeby/Get%20%3E%20Bytes)