-
Notifications
You must be signed in to change notification settings - Fork 225
Added cardano connector plugin #1636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SupernaviX
wants to merge
48
commits into
hyperledger:main
Choose a base branch
from
SundaeSwap-finance:cardano
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
bf9b6c4
Add WIP cardano support
SupernaviX 0b47496
Fix WS connection to cardano connector
SupernaviX 7b9e934
Pass-through FFI validation
SupernaviX fb574c6
Fix signature of cardano plugin
SupernaviX b9b766a
Update tags for cardano images
SupernaviX 0238a58
feat: implement invoking cardano contracts
SupernaviX 2e9baf2
feat: support DeployContract
SupernaviX 67c8b1c
fix: pass namespace to HandleReceipt
SupernaviX ef68f8e
feat: support contract listeners
SupernaviX 89c1a24
fix: correct linter error
SupernaviX 1e5f445
fix: correct image paths
SupernaviX a95c7af
fix: correct copyright year
SupernaviX 07f4dbd
fix: fix documentation
SupernaviX dba31c7
test: add coverage
SupernaviX 89dd513
fix: use newer curl version
SupernaviX 8a1372f
fix: use same curl version everywhere
SupernaviX e992174
fix: downgrade to older curl version everywhere
SupernaviX b4e295f
test: add test on invalid input to reach 100% coverage
SupernaviX 1f4d2f9
feat: use different websockets for different namespaces
SupernaviX 4efbdd8
feat: copy event signature logic to error signatures
SupernaviX 581623f
fix: use proper i18n errors
SupernaviX 77b0e82
Merge branch 'main' into cardano
SupernaviX d219791
fix: remove unneeded dockerfile change
SupernaviX 0fbba39
Merge branch 'main' into cardano
SupernaviX 85486a8
Merge branch 'main' into cardano
SupernaviX 5bf7193
fix: correct OperationUpdate mock
SupernaviX 3bd61a9
Merge branch 'main' into cardano
SupernaviX bc93388
Merge branch 'main' into cardano
SupernaviX 96531e3
feat: remove fake websocket code from GetTransactionStatus
SupernaviX 710b94e
feat: expect receipts to arrive in batches
SupernaviX 1649d7c
fix: remove redundant Cardano in logs
SupernaviX 3b39818
fix: correct copyright on new files
SupernaviX d22629b
Merge branch 'main' into cardano
SupernaviX 976a0b1
fix: fix overflow warning
SupernaviX 995e2bf
feat: update manifest images
SupernaviX 0d3cc67
docs: add docs
SupernaviX a6d26e7
feat: support QueryContract
SupernaviX 18e6eec
Merge branch 'main' into cardano
SupernaviX 17bab49
fix: handle unchecked error
SupernaviX c177dcb
fix: pass full signature in listener
SupernaviX f424f72
feat: use synchronous bulk operation updates for receipt handling
SupernaviX 34390c6
docs: document contract creation
SupernaviX 6ef9ba7
fix: address captialization issues
SupernaviX e19609d
fix: update cardano images
SupernaviX 0c170a7
fix: finish sentences in docs
SupernaviX 725f706
fix: correct timing-out test
SupernaviX 05bab1b
feat: update docs and connector images
SupernaviX 7321ba9
Merge branch 'main' into cardano
SupernaviX File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,86 @@ | ||
--- | ||
title: Cardano | ||
--- | ||
|
||
This guide will walk you through the steps to create a local FireFly development environment running against the preview node. | ||
|
||
## Previous steps: Install the FireFly CLI | ||
|
||
If you haven't set up the FireFly CLI already, please go back to the Getting Started guide and read the section on how to [Install the FireFly CLI](../../gettingstarted/firefly_cli.md). | ||
|
||
[← ① Install the FireFly CLI](../../gettingstarted/firefly_cli.md){: .md-button .md-button--primary} | ||
|
||
## Create the stack | ||
|
||
A Cardano stack can be run in two different ways; using a local Cardano node, or a remote Blockfrost address. | ||
|
||
### Option 1: Use a local Cardano node | ||
|
||
> **NOTE**: The cardano-node communicates over a Unix socket, so this will not work on Windows. | ||
|
||
Start a local Cardano node. The fastest way to do this is to [use mithril](https://mithril.network/doc/manual/getting-started/bootstrap-cardano-node/) to bootstrap the node. | ||
|
||
For an example of how to bootstrap and run the Cardano node in Docker, see [the firefly-cardano repo](https://github.com/hyperledger/firefly-cardano/blob/1be3b08d301d6d6eeb5b79e40cf3dbf66181c3de/infra/docker-compose.node.yaml#L4). | ||
|
||
The cardano-node exposes a Unix socket named `node.socket`. Pass that to firefly-cli. The example below uses `firefly-cli` to | ||
- Create a new Cardano-based stack named `dev`. | ||
- Connect to the local Cardano node, which is running in the [preview network](https://preview.cexplorer.io/). | ||
|
||
```sh | ||
ff init cardano dev \ | ||
--network preview \ | ||
--socket /path/to/ipc/node.socket | ||
``` | ||
|
||
### Option 2: Use Blockfrost | ||
|
||
The Cardano connector can also use the [paid Blockfrost API](https://blockfrost.io/) in place of a local Cardano node. | ||
|
||
The example below uses firefly-cli to | ||
- Create a new Cardano-based stack named `dev` | ||
- Use the given blockfrost key for the preview network. | ||
|
||
```sh | ||
ff init cardano dev \ | ||
--network preview \ | ||
--blockfrost-key previewXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | ||
``` | ||
|
||
## Start the stack | ||
|
||
Now you should be able to start your stack by running: | ||
|
||
```sh | ||
ff start dev | ||
``` | ||
|
||
After some time it should print out the following: | ||
|
||
``` | ||
Web UI for member '0': http://127.0.0.1:5000/ui | ||
Sandbox UI for member '0': http://127.0.0.1:5109 | ||
|
||
|
||
To see logs for your stack run: | ||
|
||
ff logs dev | ||
``` | ||
|
||
## Get some ADA | ||
|
||
Now that you have a stack, you need some seed funds to get started. Your stack was created with a wallet already (these are free to create in Cardano). To get the address, you can run | ||
```sh | ||
ff accounts list dev | ||
``` | ||
|
||
The response will look like | ||
```json | ||
[ | ||
{ | ||
"address": "addr_test1...", | ||
"privateKey": "..." | ||
} | ||
] | ||
``` | ||
|
||
If you're developing against a testnet such as preview, you can receive funds from the [testnet faucet](https://docs.cardano.org/cardano-testnets/tools/faucet). Pass the `address` from that response to the faucet. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would recommend following this a Transaction either in this section or working with smart contracts section. I do see a gap of how do you create a simple transfer of ADA through the API