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

Error running the example #6

Open
tonydspaniard opened this issue Nov 25, 2021 · 4 comments
Open

Error running the example #6

tonydspaniard opened this issue Nov 25, 2021 · 4 comments

Comments

@tonydspaniard
Copy link

Expected behavior

output

Alice is generating temporary accounts...
Alice is generating an example NFT...
The NFT ID is: 17
Alice is creating auction smart contract that lasts 30 seconds to auction off NFT...
Alice is setting up and funding NFT auction...
Alice's algo balance:  99998100  algos
The smart contract now holds the following: {0: 202000, 17: 1}
Carla wants to bid on NFT, her algo balance:  100000100  algos
Carla is placing bid for:  1000000  algos
Carla is opting into NFT with id: 17
Alice is closing out the auction....
The smart contract now holds the following: {0: 0}
Carla's NFT balance: 1  for NFT ID:  17
Alice's balances after auction:  {0: 101197100, 17: 0}  Algos
Carla's balances after auction:  {0: 98997100, 17: 1}  Algos

Actual Response

Alice is generating temporary accounts...
Alice is generating an example NFT...
The NFT ID is: 189
Alice is creating auction smart contract that lasts 30 seconds to auction off NFT...
Alice is setting up and funding NFT auction...
Alice's algo balance:  99998000  algos
Last round time:  1637845428
Start time:  1637876172
Sleeping time:  30749
Getting the balances
The smart contract now holds the following: {0: 202000, 189: 1}
Carla wants to bid on NFT, her algo balance:  100000000  algos
Carla is placing bid for:  1000000  algos
Traceback (most recent call last):
  File "/Users/tonydspaniard/PythonProjects/Algorand/auction-demo/venv/lib/python3.8/site-packages/algosdk/v2client/algod.py", line 82, in algod_request
    resp = urlopen(req)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "example.py", line 114, in <module>
    simple_auction()
  File "example.py", line 79, in simple_auction
    placeBid(client=client, appID=appID, bidder=bidder, bidAmount=bidAmount)
  File "/Users/tonydspaniard/PythonProjects/Algorand/auction-demo/auction/operations.py", line 228, in placeBid
    client.send_transactions([signedPayTxn, signedAppCallTxn])
  File "/Users/tonydspaniard/PythonProjects/Algorand/auction-demo/venv/lib/python3.8/site-packages/algosdk/v2client/algod.py", line 307, in send_transactions
    return self.send_raw_transaction(
  File "/Users/tonydspaniard/PythonProjects/Algorand/auction-demo/venv/lib/python3.8/site-packages/algosdk/v2client/algod.py", line 237, in send_raw_transaction
    return self.algod_request("POST", req, data=txn, **kwargs)["txId"]
  File "/Users/tonydspaniard/PythonProjects/Algorand/auction-demo/venv/lib/python3.8/site-packages/algosdk/v2client/algod.py", line 89, in algod_request
    raise error.AlgodHTTPError(e, code)
algosdk.error.AlgodHTTPError: TransactionPool.Remember: transaction 6D5XI4OFPUV3YPWW6HTCXQ57XYAWEKRNGXHUZSAEHDF3BJOV27VA: logic eval error: assert failed pc=335
@prince-hope1975
Copy link

Good day, were you able to fix the error? I'm having the exact same issue

@alirezapirgazi
Copy link

I'm having the exact same issue

@barnjamin
Copy link

The logic eval error happens when, during evaluation of the logic, given the transactions, there is some condition that fails. To see the full trace you can use something like dryrun to debug and figure out why its not working.

I'll say that trying to use dev mode sandbox for this will not work since the application relies on timestamps and dev mode does not keep track of time the same way as any of the !dev configs

@realhardworkingdeveloper

The logic eval error happens when, during evaluation of the logic, given the transactions, there is some condition that fails. To see the full trace you can use something like dryrun to debug and figure out why its not working.

I'll say that trying to use dev mode sandbox for this will not work since the application relies on timestamps and dev mode does not keep track of time the same way as any of the !dev configs

So what is the solution exactly?

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

5 participants