File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -8,3 +8,27 @@ The process of metering is [explained in its own chapter](./metering.md).
88
99The Sentinel is a system contract which means its code is fixed and is part of the genesis or hardfork ewasm is enabled on.
1010As a result, changing or updating it requires a hard fork.
11+
12+ The Sentinel contract has two interfaces:
13+ - raw interface
14+ - ABI encoded interface
15+
16+ ## Error handling
17+
18+ In both modes, the contract will use an invalid instruction (e.g. regular failure) when an unexpected issue occurs,
19+ or the ` revert ` operation if the supplied input is invalid.
20+
21+ ## Raw interface
22+
23+ In the raw interface it accepts any valid WebAssembly binary, applies the Sentinel steps, and returns the transformed
24+ WebAssembly binary. There is no encapsulation of any kind.
25+
26+ ## ABI encoded interface
27+
28+ The ABI encoded interface is demonstrated by the following Solidity interface:
29+ ``` solidity
30+ interface Sentinel {
31+ // Expects a WebAssembly binary and returns a transformed WebAssembly binary.
32+ function validateAndMeter(bytes) external view returns (bytes);
33+ }
34+ ```
You can’t perform that action at this time.
0 commit comments