Open
Description
- 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:
- create_and_sign_tx()
- unsigned_tx()
What I Did
- 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'
- 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
Labels
No labels