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

Unable to submit transactions #9

Open
shep-analytics opened this issue May 20, 2022 · 1 comment
Open

Unable to submit transactions #9

shep-analytics opened this issue May 20, 2022 · 1 comment

Comments

@shep-analytics
Copy link

  • secret_sdk version:
  • Python version: 3.7
  • Operating System: OSX

Description

I am trying to submit a transaction to the blockchain, but no matter how I do it I get an error in the sdk.

I am trying to do this through two different ways:

  1. create_and_sign_tx()
  2. unsigned_tx()

What I Did

  1. create_and_sign_tx()
tx = wallet.create_and_sign_tx(
    msgs=[MsgSend(
        wallet.key.acc_address,
        RECIPIENT,
        "1000000uscrt" # send 1 scrt
    )],
    memo="test transaction!",
    fee=StdFee(200000, "120000uscrt")
)
result = secret.tx.broadcast(tx)
print(result)

produces a result of:

  File "/Users/my_username/opt/miniconda3/lib/python3.9/site-packages/secret_sdk/core/auth/data/account.py", line 48, in from_data
    address=data["address"],
KeyError: 'address'
  1. unsigned_tx()
# create tx
unsigned_tx = StdSignMsg(
    chain_id="secret-4",
    account_number=23982,
    sequence=12,
    fee=StdFee(200000, "120000uscrt"),
    msgs=[MsgSend(
        mk.acc_address,
        RECIPIENT,
        "1000000uscrt" # send 1 scrt
    )],
    memo="test transaction!"
)

# get signature
sig = mk.create_signature(unsigned_tx)

# prepopulate stdtx with details
tx = unsigned_tx.to_stdtx()

# apply signature
tx.signature = [sig]

print(sig)
print(tx.signature)

# broadcast tx
result = secret.tx.broadcast(tx)
print(result)

creates a result of:
BlockTxBroadcastResult(height=0, txhash='hash', raw_log='no signatures supplied', gas_wanted=200000, gas_used=0, logs=None, code=15, codespace='sdk')

where no signatures were applied!

No matter what I do I can't get a transaction to send on the secret network. I think it's an issue with the sdk, any support would be greatly welcomed!

@Zagrebelin
Copy link

Zagrebelin commented Jun 10, 2022

I received an error "KeyError: 'address'" when i submit a transaction from non-existing account.

update: oh, there is an issue about that #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants