https://github.com/smartcontractkit/workshop-distributed-news
https://github.com/smartcontractkit/workshop-distributed-news
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/smartcontractkit/workshop-distributed-news
- Owner: smartcontractkit
- License: mit
- Created: 2023-11-08T19:55:45.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-14T05:47:34.000Z (over 2 years ago)
- Last Synced: 2025-07-08T17:49:00.096Z (12 months ago)
- Language: Solidity
- Size: 63.5 KB
- Stars: 9
- Watchers: 6
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Based On: Astro Starter Kit: Minimal
```sh
npm create astro@latest -- --template minimal
```
## π Project Structure
Inside of your project, you'll see the following folders and files:
```text
/
βββ public/
βββ ref/
βββ newsArchive.sol
βββ src/
βββ lib/
βββ newsArchive.js
βββ newsArchiveABI.json
βββ newsArchive.sol
β βββ pages/
β βββ index.astro
βββ package.json
```
Files in the `ref/` directory are intended as reference. In this example `newArchive.sol` will need to be deployed separately.
Files in the `src/lib/` directory are used as imports.
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
## βοΈ Setup
To run this project locally please clone it to your machine.
Next, `npm install` and install dependencies.
Rename `example.env` to `.env` and fill in the contract address.
**NOTE** The RPC url provided in `example.env` is for Etherum Sepolia, if you are using a different network you will need to change this value.
## π§ Commands
All commands are run from the root of the project, from a terminal:
| Command | Action |
| :------------ | :------------------------------------------ |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
## DISCLAIMER
This tutorial represents an educational example to use a Chainlink system, product, or service and is provided to demonstrate how to interact with Chainlinkβs systems, products, and services to integrate them into your own. This template is provided βAS ISβ and βAS AVAILABLEβ without warranties of any kind, it has not been audited, and it may be missing key checks or error handling to make the usage of the system, product or service more clear. Do not use the code in this example in a production environment without completing your own audits and application of best practices. Neither Chainlink Labs, the Chainlink Foundation, nor Chainlink node operators are responsible for unintended outputs that are generated due to errors in code.