Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/7i7o/warp-example
Basic Warp Contract example
https://github.com/7i7o/warp-example
Last synced: about 1 month ago
JSON representation
Basic Warp Contract example
- Host: GitHub
- URL: https://github.com/7i7o/warp-example
- Owner: 7i7o
- Created: 2023-10-09T14:29:46.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-09T14:53:39.000Z (about 1 year ago)
- Last Synced: 2024-04-16T09:06:31.354Z (9 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Basic Warp Contract example
## Install dependencies
```bash
yarn
```## Create a throwaway wallet
```bash
node -e "require('arweave').init({}).wallets.generate().then(JSON.stringify).then(console.log.bind(console))" > wallet.json
```## Deploy the contract
```bash
node scripts/deploy.js
```> This displays the transaction id of the contract deployed, take note of it and paste it in the `scripts/readState.js` and `scripts/add.js`files
## Read the state of the contract
Remember to copy the contract tx id before you call `readState` or `add` !
```bash
node scripts/readState.js
```## Call the `add` function
```bash
node scripts/add.js
```