Skip to content
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

Fix dns register using relayed transaction #387

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions multiversx_sdk_cli/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from multiversx_sdk_cli.accounts import Account
from multiversx_sdk_cli.constants import ADDRESS_ZERO_BECH32, DEFAULT_HRP
from multiversx_sdk_cli.contracts import query_contract
from multiversx_sdk_cli.transactions import (
do_prepare_transaction, tx_to_dictionary_as_inner_for_relayed_V1)
from multiversx_sdk_cli.transactions import (compute_relayed_v1_data,
do_prepare_transaction)

MaxNumShards = 256
ShardIdentiferLen = 2
Expand Down Expand Up @@ -50,7 +50,7 @@ def register(args: Any):
tx = do_prepare_transaction(args)

if hasattr(args, "relay") and args.relay:
args.outfile.write(tx_to_dictionary_as_inner_for_relayed_V1(tx))
args.outfile.write(compute_relayed_v1_data(tx))
return

cli_shared.send_or_simulate(tx, args)
Expand Down
21 changes: 21 additions & 0 deletions multiversx_sdk_cli/tests/test_cli_dns.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from pathlib import Path

from multiversx_sdk_cli.cli import main

testdata_path = Path(__file__).parent / "testdata"


def test_prepare_relayed_dns_register_transaction():
alice = testdata_path / "alice.pem"

return_code = main([
"dns", "register",
"--pem", str(alice),
"--name", "alice.elrond",
"--nonce", "0",
"--gas-limit", "15000000",
"--chain", "T",
"--relay"
])

assert False if return_code else True
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "multiversx-sdk-cli"
version = "9.2.0"
version = "9.3.0"
authors = [
{ name="MultiversX" },
]
Expand Down
Loading