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
## Deploy a contract in auto model and say “hello world”
175
+
176
+
很明显是要我们关注ERC 6860关于 解析模式(resolve mode)的定义了
177
+
178
+
```
179
+
Resolve Mode
180
+
Once the “To” address and chainid are determined, the protocol will check the resolver mode of contract by calling the resolveMode method of the “To” address. The Solidity signature of resolveMode is:
181
+
182
+
function resolveMode() external returns (bytes32);
183
+
The protocol currently supports two resolve modes: auto and manual.
184
+
185
+
The manual mode will be used if the resolveMode return value is 0x6d616e75616c0000000000000000000000000000000000000000000000000000, i.e., “manual” in bytes32
186
+
The auto mode will be used if :
187
+
the resolveMode return value is 0x6175746f00000000000000000000000000000000000000000000000000000000, i.e, “auto” in bytes32, or
188
+
the resolveMode return value is 0x0000000000000000000000000000000000000000000000000000000000000000, or
189
+
the call to resolveMode throws an error (method not implemented or error thrown from the method)
190
+
Otherwise, the protocol will fail the request with the error “unsupported resolve mode”.
191
+
```
192
+
193
+
合约地址:0xea100cb127d5547793172248e730e1b4b6524984
194
+
195
+
部署在sepolia
196
+
197
+
代码:
198
+
199
+
```
200
+
pragma solidity >=0.7.0 <0.9.0;
201
+
202
+
contract Hello_world_auto {
203
+
function sayHelloWorld() public pure returns (string memory) {
204
+
return "Hello World";
205
+
}
206
+
207
+
function resolveMode() pure external returns (bytes32) {
0 commit comments