1

Using command line i am deploying smart contract "eosio.token".

cleos -u http://127.0.0.1:8888 set contract eosio.token ./eosio.token -p eosio.token

Is it possible to deploy smart contract using curl library. something like this

curl -X POST -u http://127.0.0.1:8888 set contract eosio.token ./eosio.token -p eosio.token

Thanks in advance.

0

It's not possible because to set contract you need to give authorization to that action and it won't be possible without private key. Because here we have the private key stored in wallet and cleos uses these keys for giving authorization to actions performed by cleos command line.

  • Technically he could use the private key and serialize and sign his transaction and submit it to as a POST request to http://nodeos_ip:8888/v1/chain/push_transaction. The thing is that he will have to pack the TX and sign it and attach that data to the curl request. He just cannot do what he wishes in the format he put above. – netuoso - EOS Titan Jul 24 '19 at 19:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.