@reyaxyz/common 0.260.1 → 0.260.2
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.
|
@@ -14,8 +14,8 @@ exports.SBT_ROOT_EXTRA_OGS = (_b = {},
|
|
|
14
14
|
_b);
|
|
15
15
|
var getSbtRoot = function (reyaChainId, isSpecialRoot) {
|
|
16
16
|
return isSpecialRoot
|
|
17
|
-
? exports.
|
|
18
|
-
: exports.
|
|
17
|
+
? exports.SBT_ROOT[reyaChainId]
|
|
18
|
+
: exports.SBT_ROOT_EXTRA_OGS[reyaChainId];
|
|
19
19
|
};
|
|
20
20
|
exports.getSbtRoot = getSbtRoot;
|
|
21
21
|
exports.SBT_MINT_DEADLINE = 1743508800; // Tue Apr 01 2025 12:00:00 GMT+0000
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sbt-helpers.js","sourceRoot":"/","sources":["utils/sbt-helpers.ts"],"names":[],"mappings":";;;;AAAA,iCAA8C;AAC9C,kCAAuC;AAE1B,QAAA,QAAQ;IACnB,GAAC,mBAAW,CAAC,WAAW,IACtB,oEAAoE;IACtE,GAAC,mBAAW,CAAC,UAAU,IACrB,oEAAoE;QACtE;AAEW,QAAA,kBAAkB;IAC7B,GAAC,mBAAW,CAAC,WAAW,IACtB,oEAAoE;IACtE,GAAC,mBAAW,CAAC,UAAU,IACrB,oEAAoE;QACtE;AAEK,IAAM,UAAU,GAAG,UACxB,WAAwB,EACxB,aAAsB;IAEtB,OAAO,aAAa;QAClB,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"sbt-helpers.js","sourceRoot":"/","sources":["utils/sbt-helpers.ts"],"names":[],"mappings":";;;;AAAA,iCAA8C;AAC9C,kCAAuC;AAE1B,QAAA,QAAQ;IACnB,GAAC,mBAAW,CAAC,WAAW,IACtB,oEAAoE;IACtE,GAAC,mBAAW,CAAC,UAAU,IACrB,oEAAoE;QACtE;AAEW,QAAA,kBAAkB;IAC7B,GAAC,mBAAW,CAAC,WAAW,IACtB,oEAAoE;IACtE,GAAC,mBAAW,CAAC,UAAU,IACrB,oEAAoE;QACtE;AAEK,IAAM,UAAU,GAAG,UACxB,WAAwB,EACxB,aAAsB;IAEtB,OAAO,aAAa;QAClB,CAAC,CAAC,gBAAQ,CAAC,WAAW,CAAC;QACvB,CAAC,CAAC,0BAAkB,CAAC,WAAW,CAAC,CAAC;AACtC,CAAC,CAAC;AAPW,QAAA,UAAU,cAOrB;AAEW,QAAA,iBAAiB,GAAG,UAAU,CAAC,CAAC,oCAAoC;AAO1E,IAAM,OAAO,GAAG,UAAC,OAAe,EAAE,gBAAwB;IAC/D,IAAM,WAAW,GAAG,eAAM,CAAC,SAAS,CAClC,eAAM,CAAC,cAAc,CACnB,CAAC,SAAS,EAAE,SAAS,CAAC,EACtB,CAAC,OAAO,EAAE,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CACvC,CACF,CAAC;IACF,OAAO,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AAClD,CAAC,CAAC;AARW,QAAA,OAAO,WAQlB;AAEK,IAAM,aAAa,GAAG,UAC3B,OAAe,EACf,UAAkB,EAClB,gBAAwB;IAExB,OAAO,eAAM,CAAC,QAAQ,CACpB,eAAM,CAAC,SAAS,CACd,eAAM,CAAC,cAAc,CACnB,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,EACjC,CAAC,OAAO,EAAE,UAAU,EAAE,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CACnD,CACF,CACF,CAAC;AACJ,CAAC,CAAC;AAbW,QAAA,aAAa,iBAaxB","sourcesContent":["import { ethers, BigNumberish } from 'ethers';\nimport { ReyaChainId } from '../types';\n\nexport const SBT_ROOT: Record<ReyaChainId, string> = {\n [ReyaChainId.reyaNetwork]:\n '0x7d8254a884c4e1e8040d592fdbe3ce8986fb6c5c4f7dee3ce7b7f823fa127c52',\n [ReyaChainId.reyaCronos]:\n '0x01f4d29a3aca5cb40663851d2d40d605636dd6448f251d77765dd0e40c422136',\n};\n\nexport const SBT_ROOT_EXTRA_OGS: Record<ReyaChainId, string> = {\n [ReyaChainId.reyaNetwork]:\n '0xbc6264e25255e1b3d456ec287615879c2525828345a3d4d4c09eb11baa2d201f',\n [ReyaChainId.reyaCronos]:\n '0xdb3908dd08c4ccc9a39a3699999ff7043780ce76b245fffc4d551dc903594b61',\n};\n\nexport const getSbtRoot = (\n reyaChainId: ReyaChainId,\n isSpecialRoot: boolean,\n) => {\n return isSpecialRoot\n ? SBT_ROOT[reyaChainId]\n : SBT_ROOT_EXTRA_OGS[reyaChainId];\n};\n\nexport const SBT_MINT_DEADLINE = 1743508800; // Tue Apr 01 2025 12:00:00 GMT+0000\n\nexport type SbtLeafInfo = {\n account: string;\n tokenRootCounter: number;\n};\n\nexport const getLeaf = (address: string, tokenRootCounter: number): Buffer => {\n const messageHash = ethers.keccak256(\n ethers.solidityPacked(\n ['address', 'uint256'],\n [address, tokenRootCounter.toString()],\n ),\n );\n return Buffer.from(messageHash.slice(2), 'hex');\n};\n\nexport const getSbtTokenId = (\n account: string,\n merkleRoot: string,\n tokenRootCounter: number,\n): BigNumberish => {\n return ethers.toBigInt(\n ethers.keccak256(\n ethers.solidityPacked(\n ['address', 'bytes32', 'uint256'],\n [account, merkleRoot, tokenRootCounter.toString()],\n ),\n ),\n );\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reyaxyz/common",
|
|
3
|
-
"version": "0.260.
|
|
3
|
+
"version": "0.260.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"generate:coverage-badges": "npx istanbul-badges-readme --silent"
|
|
45
45
|
},
|
|
46
46
|
"packageManager": "pnpm@8.3.1",
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "13f9c19c2296f39003c21563c2497e04c9fdc217"
|
|
48
48
|
}
|
package/src/utils/sbt-helpers.ts
CHANGED
|
@@ -20,8 +20,8 @@ export const getSbtRoot = (
|
|
|
20
20
|
isSpecialRoot: boolean,
|
|
21
21
|
) => {
|
|
22
22
|
return isSpecialRoot
|
|
23
|
-
?
|
|
24
|
-
:
|
|
23
|
+
? SBT_ROOT[reyaChainId]
|
|
24
|
+
: SBT_ROOT_EXTRA_OGS[reyaChainId];
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export const SBT_MINT_DEADLINE = 1743508800; // Tue Apr 01 2025 12:00:00 GMT+0000
|