Git Product home page Git Product logo

auction-demo's People

Contributors

einlar avatar jasonpaulos avatar jasonweathersby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

auction-demo's Issues

Connection refused when running example.py, tests

Hello! Trying to follow the example project here: https://developer.algorand.org/docs/get-started/dapps/pyteal/

When I ran example.py (and pytest) I got the following issue. Any idea what might be happening? Thanks!

Traceback (most recent call last):
  File "/Users//opt/anaconda3/envs/algo/lib/python3.9/urllib/request.py", line 1346, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/Users//opt/anaconda3/envs/algo/lib/python3.9/http/client.py", line 1279, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/Users//opt/anaconda3/envs/algo/lib/python3.9/http/client.py", line 1325, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/Users//opt/anaconda3/envs/algo/lib/python3.9/http/client.py", line 1274, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/Users//opt/anaconda3/envs/algo/lib/python3.9/http/client.py", line 1034, in _send_output
    self.send(msg)
  File "/Users//opt/anaconda3/envs/algo/lib/python3.9/http/client.py", line 974, in send
    self.connect()
  File "/Users//opt/anaconda3/envs/algo/lib/python3.9/http/client.py", line 945, in connect
    self.sock = self._create_connection(
  File "/Users//opt/anaconda3/envs/algo/lib/python3.9/socket.py", line 844, in create_connection
    raise err
  File "/Users//opt/anaconda3/envs/algo/lib/python3.9/socket.py", line 832, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users//Programming/algo/auction-demo/example.py", line 108, in <module>
    simple_auction()
  File "/Users//Programming/algo/auction-demo/example.py", line 23, in simple_auction
    creator = getTemporaryAccount(client)
  File "/Users//Programming/algo/auction-demo/auction/testing/resources.py", line 48, in getTemporaryAccount
    genesisAccounts = getGenesisAccounts()
  File "/Users//Programming/algo/auction-demo/auction/testing/setup.py", line 36, in getGenesisAccounts
    wallets = kmd.list_wallets()
  File "/Users//opt/anaconda3/envs/algo/lib/python3.9/site-packages/algosdk/kmd.py", line 88, in list_wallets
    res = self.kmd_request("GET", req)
  File "/Users//opt/anaconda3/envs/algo/lib/python3.9/site-packages/algosdk/kmd.py", line 61, in kmd_request
    resp = urlopen(req)
  File "/Users//opt/anaconda3/envs/algo/lib/python3.9/urllib/request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "/Users//opt/anaconda3/envs/algo/lib/python3.9/urllib/request.py", line 517, in open
    response = self._open(req, data)
  File "/Users//opt/anaconda3/envs/algo/lib/python3.9/urllib/request.py", line 534, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/Users//opt/anaconda3/envs/algo/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/Users/opt/anaconda3/envs/algo/lib/python3.9/urllib/request.py", line 1375, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/Users//opt/anaconda3/envs/algo/lib/python3.9/urllib/request.py", line 1349, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 61] Connection refused>

Unable to get sandbox working

This is the result of using gitbash to run it.

$ ./sandbox up
Pulling sandbox...
fatal: Too many arguments.

usage: git clone [] [--] [

]

Error running the example

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

Issue running sandbox

Hi! Sorry I'm kind of new in this. When I'm trying to run sandbox ( ./sandbox up ), it asks me with program do I want to use to open it (btw, I'm in a Windows PC). What should I choose/install?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.