Skip to content

Unable to query contract #15

@SpencerMiller23

Description

@SpencerMiller23
  • secret_sdk version: 1.0
  • Python version: 3.10.4
  • Operating System: Windows

Description

I deployed the contract from the Intro to Secret Contracts tutorial and now I would like to query the value of the count variable. However, the request is returning the following error: Status 500 - rpc error: code = Unauthenticated desc = encrypted: E60OAT1rQWFRFS89f6SCeyAM3ARawFy8d55Lm73OPxuyDdZHTl/qrJWor2CtHfJCbxoRstHhtvVJ7Xo4HwM/G1+Hix4w1phbfW9y4tEqxoOY5i6JkSH/NNS7DoUpa4niejpwHanyKizoLz6UJOZY1FNbdVipjkVFfCol6E1le2tiHJ/Js+TPCbM7aQE=: query contract failed

What I Did

mk = MnemonicKey(mnemonic=my_mnemonic)
secret = LCDClient('http://testnet.securesecrets.org:1317', 'pulsar-2')
wallet = secret.wallet(mk)

def get_count():
    try:
        query_msg = {
            'get_count:': {}
        }

        count = secret.wasm.contract_query(contract_address='secret13uj6x7npak42gm9x8lqgsj4mjq6fpwphtwsp6f', query=query_msg, height=4046700)
        print(count)
    except Exception as e:
        print(f'Error: {e}')

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