Hot answers tagged

4

The set contract operation takes the account name as its first parameter (eosin.token in your example). If this account doesn't exist, if cannot set the contract. In your example above, you create a new account called myuser. You need to create an account called eosin.token in order to execute the set contract call you show.


3

What you are missing here is the chain ID of the network. Mainnet: aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906 Jungle Testnet: e70aaab8997e1dfce58fbfac80cbbb8fecec7b99cf982a9444273cbc64c41473 It has to be added in the " " field just after the key. Your request for Jungle Testnet should be: [{ "expiration": "2018-10-26T15:30:...


3

The api '/v1/wallet' is from the server keosd, not the nodeosd. You may change the port that keosd served.


3

I am trying to use EOS rpc APIs by python. So, I started with my own wrapper for python. This is the link. It is in very early stage. If you want to contribute, you are very welcome. When we push a transaction from command line, it requires only one command but while using rpc APIs you have to make multiple request to push a transaction. So, for that I ...


2

I would like to add to JavaHead1560's answer by recommending the use of shlex package, which correctly deals with cases with quoted contents inside command. import shlex, json import subprocess from subprocess def do_cmd(command): return subprocess.check_output(shlex.split(command)) info = json.loads(do_cmd("cleos system buyram account1 account2 '1 ...


2

You need 'account_name' instead of 'account', and json needs to be dumped. import requests, json url = "https://api.eosn.io/v1/chain/get_account" data = {"account_name": "yupcreators1"} r = requests.post(url, json.dumps(data)) print(r.status_code) print(r.text)


1

Please see the documentation here: https://developers.eos.io/manuals/eos/latest/nodeos/plugins/chain_api_plugin/api-reference/index#operation/get_account You must send the account name in POST request (not a GET) {"account_name": "nameofaccount"} Example: curl -d '{"account_name": "hackerdarwin"}' http://api.eosn.io/...


1

commands like cleos/nodeos/keosd can be run from a python script #!/usr/bin/python import subprocess import smtplib from subprocess import PIPE def do_cmd(command): return subprocess.check_output(command.split(" ")) do_cmd("cleos -u http://mainnet.genereos.io get info") Alternatively there's a handy API that uses POST requests. Check this out: https://...


1

It is/will be possible to generate smart contracts via Python and other languages, an example here. However, the mainstream method, especially in the early days, is with C++, as per the EOS Developer documentation "Other toolchains in development by 3rd parties include: Rust, Python, and Solidity. While these other languages might appear simpler, their ...


1

I ran into github to answer your question and found a very interesting project. https://github.com/learnforpractice/pyeos


1

you can run the different programs (cleos/nodeos/keosd) in python like you can run any other command: #!/usr/bin/python import subprocess import smtplib from subprocess import PIPE def do_cmd(command): return subprocess.check_output(command.split(" ")) do_cmd("cleos -u http://mainnet.genereos.io get info") Alternatively here's a link to the API ...


Only top voted, non community-wiki answers of a minimum length are eligible