-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
75 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"deno.enable": true, | ||
"deno.lint": true, | ||
"deno.unstable": true | ||
} | ||
"deno.enable": true, | ||
"deno.lint": true, | ||
"deno.unstable": true, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "denoland.vscode-deno" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,53 @@ | ||
# Fortuna | ||
|
||
Bitcoin style proof of work in smart contract form. | ||
|
||
## Mining $TUNA | ||
|
||
> The current miner is naive and a better implementation is coming soon. | ||
### Requirements | ||
|
||
- [Deno](https://deno.land/[email protected]/getting_started/installation) | ||
- [Kupo](https://cardanosolutions.github.io/kupo/) | ||
- [Ogmios](https://github.com/CardanoSolutions/ogmios) | ||
|
||
> You can easily get access to Kupo and Ogmios with | ||
> [Demeter](https://demeter.run). Once you have a project in Demeter you can | ||
> connect Ogmios and Kupo extensions for mainnet. Make sure to toggle | ||
> `Expose http port` in each extensions' settings. | ||
#### Environment variables | ||
|
||
Once you have URLs for Kupo and Ogmios, create a `.env` file in the root of the | ||
project with the following content: | ||
|
||
``` | ||
KUPO_URL="https://<Kupo URL>" | ||
OGMIOS_URL="wss://<Ogmios URL>" | ||
``` | ||
|
||
#### Wallet | ||
|
||
You'll need to create a wallet for the miner which can be done with the | ||
following command: | ||
|
||
```sh | ||
deno task cli init | ||
``` | ||
|
||
Then run the following command to get the miner address: | ||
|
||
```sh | ||
deno task cli address | ||
``` | ||
|
||
You'll need to fund this address with some $ADA to pay for transaction fees. | ||
|
||
### Running | ||
|
||
After everything is setup, you can run the miner with the following command: | ||
|
||
```sh | ||
deno task cli mine | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
"cli": "deno run --allow-all miner/main.ts", | ||
"e2e": "deno run --allow-all miner/e2e.ts" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ | |
"txHash": "0e1972174c6f0c9a57bb73f82ef2e490071aee921723c571ef507299e255403e", | ||
"index": 1 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters