https://github.com/pontem-network/dia
Dia Contracts
https://github.com/pontem-network/dia
Last synced: about 2 months ago
JSON representation
Dia Contracts
- Host: GitHub
- URL: https://github.com/pontem-network/dia
- Owner: pontem-network
- Created: 2021-10-28T21:10:09.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-02T13:32:26.000Z (about 3 years ago)
- Last Synced: 2025-02-05T20:07:54.306Z (3 months ago)
- Homepage:
- Size: 26.4 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dia Smart Contracts
[Dia Protocol](https://www.diadata.org/) smart contracts rewritten in Move language.
Requirements:
* [Dove 1.5.x-1.6.x](https://github.com/pontem-network/move-tools/releases)
* [Polkadot JS CLI](https://www.npmjs.com/package/@polkadot/api-cli)Checklist:
* ✅ Contracts: Dia and test currencies.
* ✅ Tests.
* ✅ Events - still in progress.## Build
dove package build
After, see `artifacts` folder for compiled files.
### Tests
dove package test
See [tests](./tests/DiaTests.move) for details.
### Deployment
You should have PONT tokens on your account.
Replace/add your Pontem address in Dove.toml with address of your own account:
account_address = "your address"
Build modules:
dove package build
Create your account inside Diem Standard Library, if you haven't created one yet:
dove tx 'create_account(tr, )'
Replace `` with the correct one, it's important to use the same account address you are going to use to update oracle values.
Execute transaction:
polkadot-js-api tx.mvm.execute @./artifacts/transactions/create_account.mvt 100000 --seed "" --ws
Where:
* `seed` - seed from your account.
* `ws` - address of Websocket endpoint. In case of Pontem testnet it's `wss://testnet.pontem.network/ws`.Deploy Dia.move module:
polkadot-js-api tx.mvm.publishModule @./artifacts/modules/1_Dia.mv 100000 --seed "" --ws
Where:
* `seed` - seed from your account.
* `ws` - address of Websocket endpoint. In case of Pontem testnet it's `wss://testnet.pontem.network/ws`.The contracts should be available on `your_address::Dia`.
### LICENSE
MIT.