tokenika / eosfactory

Python-based EOS smart-contract development & testing framework
http://eosfactory.io/
Other
243 stars 62 forks source link

Arguments out of order #135

Closed LukeDickerson19 closed 5 years ago

LukeDickerson19 commented 5 years ago

Hey, I'm going through the directions to connect EOSFactory to a public testnet here: https://github.com/tokenika/eosfactory/blob/master/docs/tutorials/05.InteractingWithPublicTestnet.md

After registering an account via Case 2 I ran: python3 test/unittest1.py myjungle and got the error: eosfactory.core.errors.Error: ERROR: REMOTE testnet is not running or is not responding @ 5HuMVDCSZP1PhNZWZ1zAjACcc1LMvXxfmPmYyAyxf1rG1jPXJXF.

I then noticed that the key:value pairs in testnet.json in my eosio-wallet were all mis-matched: { "myjungle": { "account_name": "http://bp4-d3.eos42.io:8888", "active_key": "5KEhViyRTeKKHncU6RjmtG1U7yN7orSjo8zCxoByHs8itLZNjwr", "name": "myjungle", "owner_key": "luke11112222", "url": "5HuMVDCSZP1PhNZWZ1zAjACcc1LMvXxfmPmYyAyxf1rG1jPXJXF" } }

I'm currently using the EOSFactory master branch. I backtracked and found that when you run:

python -m eosfactory.utils.register_testnet URL -a account_name owner_key active_key

it calls the fn. registertestnet(url, alias, account_name, owner_key, active_key) in register_testnet.py with: registertestnet(args.url, args.alias, account_name, owner_key, active_key)

this is done correctly.

registertestnet net calls the fn. add_to_mapping(account_name, owner_key, active_key, url, name=None) in testnet.py with: testnet.add_to_mapping( url, account_name if account_name else account.name, owner_key if owner_key else account.owner_key.key_private, active_key if active_key else account.active_key.key_private, alias)

and this has the arguments out of order. After changing this, reinstalling EOSFactory, and re-registering my testnet account, I could connect to testnet! Just thought I'd let you know.

rkintzi commented 5 years ago

@PopeyedLocket Thanks a lot for detailed investigation. I would appreciate, if you could prepare a PR fixing the problem?

LukeDickerson19 commented 5 years ago

PR prepared.

stefanzarembinski commented 5 years ago
Thank you for your contribution. We include it to the next edition of EOSFactory.