Skip to content

Unable to submit transactions #9

Open
@shep-analytics

Description

@shep-analytics
  • 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions