@seljs/checker 1.4.0-beta.24 → 1.4.0-beta.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -178,6 +178,7 @@ const registerSolidityTypes = (env) => {
|
|
|
178
178
|
ctor: SelNamespace,
|
|
179
179
|
fields: selFields
|
|
180
180
|
});
|
|
181
|
+
env.registerFunction("SelNamespace.namehash(string): bytes", (_sel, name) => (0, _seljs_types.hexToBytes)((0, viem.namehash)(name)));
|
|
181
182
|
env.registerConstant("sel", "SelNamespace", Object.assign(new SelNamespace(), selValues));
|
|
182
183
|
};
|
|
183
184
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SELEvaluationError } from "@seljs/common";
|
|
2
2
|
import { EVM_CONSTANTS, SOLIDITY_TYPES, SolidityAddressTypeWrapper, SolidityIntTypeWrapper, formatUnitsValue, hexToBytes, parseUnitsValue, toAddress, toBigInt } from "@seljs/types";
|
|
3
|
-
import { keccak256, toBytes } from "viem";
|
|
3
|
+
import { keccak256, namehash, toBytes } from "viem";
|
|
4
4
|
//#region src/environment/register-types.ts
|
|
5
5
|
/**
|
|
6
6
|
* Try to register an operator, silently ignoring "already registered" errors.
|
|
@@ -177,6 +177,7 @@ const registerSolidityTypes = (env) => {
|
|
|
177
177
|
ctor: SelNamespace,
|
|
178
178
|
fields: selFields
|
|
179
179
|
});
|
|
180
|
+
env.registerFunction("SelNamespace.namehash(string): bytes", (_sel, name) => hexToBytes(namehash(name)));
|
|
180
181
|
env.registerConstant("sel", "SelNamespace", Object.assign(new SelNamespace(), selValues));
|
|
181
182
|
};
|
|
182
183
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seljs/checker",
|
|
3
|
-
"version": "1.4.0-beta.
|
|
3
|
+
"version": "1.4.0-beta.27",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "https://github.com/abinnovision/seljs"
|
|
6
6
|
},
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@marcbachmann/cel-js": "^7.5.3",
|
|
53
|
-
"@seljs/common": "1.
|
|
53
|
+
"@seljs/common": "1.4.0-beta.27",
|
|
54
54
|
"@seljs/schema": "1.3.0",
|
|
55
|
-
"@seljs/types": "1.
|
|
55
|
+
"@seljs/types": "1.4.0-beta.27",
|
|
56
56
|
"debug": "^4.4.3",
|
|
57
57
|
"viem": "^2.47.6"
|
|
58
58
|
},
|