Algodot

An asset by lucasvanmol
The page banner background of a mountain and forest
Algodot hero image

Quick Information

0 ratings
Algodot icon image
lucasvanmol
Algodot

Algorand integration in Godot

Supported Engine Version
3.4
Version String
0.3
License Version
MIT
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL

algodot

Algorand integration in Godot

Download the addon

Link coming soon!

Usage

Initializing the Algod object

algod = Algod.new()
algod.url = "http://localhost:4001"
algod.token = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
add_child(algod)

Test connections using .health()

assert(yield(algod.health(), "completed") == OK)

Sending transactions

var from_mnemonic = "your twenty five word mnemonic ..."
var from_address = algod.get_address(from_mnemonic)

# Get suggested parameters
var params = yield(algod.suggested_transaction_params(), "completed")

# Generate a new account
var to_account = algod.generate_key()

# Create and sign transaction
var tx = algod.construct_payment(params, from_address, account[0], 123456789)
var stx = algod.sign_transaction(tx, from_mnemonic)
var txid = yield(algod.send_transaction(stx), "completed")

# Wait for confirmation
yield(algod.wait_for_transaction(txid), "completed")
var info = yield(algod.account_information(account[0]), "completed")

assert(info.amount == 123456789)

For more examples, check out the test script.

Algorand integration in Godot

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Algodot icon image
lucasvanmol
Algodot

Algorand integration in Godot

Supported Engine Version
3.4
Version String
0.3
License Version
MIT
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers