Skip to content

Commit

Permalink
Bump CSL for Conway hard fork
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfarrelly committed Aug 23, 2024
1 parent 5f45896 commit e3b50b0
Show file tree
Hide file tree
Showing 10 changed files with 361 additions and 291 deletions.
4 changes: 4 additions & 0 deletions addons/@mlabs-haskell/godot-cardano/src/value/asset_name.gd
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ static func from_hex(hash: String) -> FromHexResult:
static func from_bytes(bytes: PackedByteArray) -> FromBytesResult:
return FromBytesResult.new(_AssetName._from_bytes(bytes))

## Try to parse an [AssetName] from a UTF-8 string.
static func from_utf8(str: String) -> FromBytesResult:
return FromBytesResult.new(_AssetName._from_bytes(str.to_utf8_buffer()))

func to_bytes() -> PackedByteArray:
return _asset_name.to_bytes()

Expand Down
11 changes: 9 additions & 2 deletions demo/main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ func _on_consume_script_input_pressed():
utxos_filtered,
BigInt.from_int(0)
)
tx.pay_to_address(
wallet.get_address(),
BigInt.from_int(5_000_000)
)
var result : TxBuilder.CompleteResult = await tx.complete()

if result.is_err():
Expand All @@ -262,8 +266,11 @@ func _on_consume_script_input_pressed():

if result.is_ok():
result.value.sign(password_input.text)
var hash := await result.value.submit()
print("Transaction hash:", hash.value.to_hex())
var submit_result := await result.value.submit()
if submit_result.is_ok():
print("Transaction hash:", submit_result.value.to_hex())
else:
push_error("Could not submit transaction: ", submit_result.error)


func _on_password_input_text_changed(new_text: String) -> void:
Expand Down
Loading

0 comments on commit e3b50b0

Please sign in to comment.