You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement a self destruct function in the website SC. This should allow users to completely remove their SC from deployment and by extension remove it from the indexer list.
See function below.
Changes should also be propagated to:
cli add new Self_Destruct function
ui -> unclear what to do ? should be followed up
docs -> explain self destruct, differences with delete
More:
we should also think about adding a command in the cli that will allow users to upgrade their deployed smart contracts
The text was updated successfully, but these errors were encountered:
onlyowner();
if( !website_empty() ) {
raise "website not empty, please clear all files first";
// this check ensures that the self destruct function won't take an infinite amount of gas and fail if there are 10000000 files to delete
}
owner = get_owner();
// TODO delete the Owner datastore entry
// TODO delete all website-level metadata
if storage.has("DEWEB_VERSION") {
storage.del("DEWEB_VERSION");
}
set_bytecode("")
if(owner != "") {
transfer_coins(get_balance(), owner);
}
}
Implement a self destruct function in the website SC. This should allow users to completely remove their SC from deployment and by extension remove it from the indexer list.
See function below.
Changes should also be propagated to:
More:
The text was updated successfully, but these errors were encountered: