seal: Change prefix and module name from "ext_" to "seal_" for contract callable functions (#6798)

* seal: Change prefix "ext_" to "seal_" for contract callable functions

The word Ext is a overloaded term in the context of substrate. It usually
is a trait which abstracts away access to external resources usually in order
to mock them away for the purpose of tests. The contract module has its own
`Ext` trait in addition the the substrate `Ext` which makes things even more
confusing.

In order to differentiate the contract callable functions more clearly from
this `Ext` concept we rename them to use the "seal_" prefix instead.

This should change no behaviour at all. This is a pure renaming commit.

* seal: Rename import module from "env" to "seal0"

* seal: Fixup integration test

* seal: Add more tests for new import module names
This commit is contained in:
Alexander Theißen
2020-08-10 15:14:34 +02:00
committed by GitHub
parent f9f8262303
commit 04b185e3d4
29 changed files with 355 additions and 303 deletions
+2 -2
View File
@@ -358,7 +358,7 @@ fn account_removal_does_not_remove_storage() {
//
// This does not remove the contract storage as we are not notified about a
// account removal. This cannot happen in reality because a contract can only
// remove itself by `ext_terminate`. There is no external event that can remove
// remove itself by `seal_terminate`. There is no external event that can remove
// the account appart from that.
assert_ok!(Balances::transfer(Origin::signed(ALICE), BOB, 20));
@@ -1546,7 +1546,7 @@ fn cannot_self_destruct_in_constructor() {
let _ = Balances::deposit_creating(&ALICE, 1_000_000);
assert_ok!(Contracts::put_code(Origin::signed(ALICE), wasm));
// Fail to instantiate the BOB because the contructor calls ext_terminate.
// Fail to instantiate the BOB because the contructor calls seal_terminate.
assert_err_ignore_postinfo!(
Contracts::instantiate(
Origin::signed(ALICE),