Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

add cleos set contract/code/abi --clear #5442

Merged
merged 1 commit into from
Aug 29, 2018
Merged

Conversation

firesWu
Copy link
Contributor

@firesWu firesWu commented Aug 27, 2018

Provide a way to remove contract from shell scripts or command line..
When using --clear, it will remove contract/abi/code.
for example:

cleos set code eosio.token --clear
Setting Code...
executed transaction: a34a611311f40f96560d836a3b3f6533bf48e2a9122859aa551b6af1ddc1b1fa  96 bytes  6853 us
#         eosio <= eosio::setcode               {"account":"eosio.token","vmtype":0,"vmversion":0,"code":""} 

cleos set abi eosio.token --clear
Setting ABI...
executed transaction: 0eb4ac374163fc12484e491ef839965af3d4e2b4830d3c549bfff11a9baccb23  96 bytes  5633 us
#         eosio <= eosio::setabi                {"account":"eosio.token","abi":""} 

cleos set contract  eosio.token --clear
Publishing contract...
executed transaction: e6747258e63153ef271f66032123ad444562d161987d4ed924fc6154fd404952  104 bytes  5210 us
#         eosio <= eosio::setcode               {"account":"eosio.token","vmtype":0,"vmversion":0,"code":""}
#         eosio <= eosio::setabi                {"account":"eosio.token","abi":""} 


@johnworthley
Copy link

johnworthley commented Sep 20, 2018

I am getting ERROR: ExtrasError: [--clear] after running cleos set contract aromaticbeer ./build/contracts/eosio.token --clear on eosio/eos-dev:v1.3.0

@firesWu
Copy link
Contributor Author

firesWu commented Sep 20, 2018

@johnworthley Are you use new cleos replace /usr/local/bin/cleos?

@johnworthley
Copy link

I found the problem. eosio/eos-dev:v1.3.0 is not updated after investigating eos/programs/cleos/main.cpp in the dev docker. Please verify

@johnworthley
Copy link

Command works in eosio/eos docker image

@johnworthley
Copy link

johnworthley commented Sep 20, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants