2

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.

1 Answer 1

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.

2
  • 1
    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. Jul 24, 2019 at 19:23
  • @netuoso-EOSTitan I have been trying to find documentation to do all those steps but I haven't been able to find any. Can you point me to the right direction?
    – StR
    Jul 13, 2021 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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