@wtflabs/x402 0.0.1-beta.13 → 0.0.1-beta.15
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.
- package/dist/cjs/schemes/index.js +5 -5
- package/dist/cjs/schemes/index.js.map +1 -1
- package/dist/esm/{chunk-KCTRIOXS.mjs → chunk-A6TSFIQP.mjs} +2 -2
- package/dist/esm/{chunk-H4GSYKL2.mjs → chunk-WCQCFJWV.mjs} +6 -6
- package/dist/esm/chunk-WCQCFJWV.mjs.map +1 -0
- package/dist/esm/facilitator/index.mjs +2 -2
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/schemes/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/esm/chunk-H4GSYKL2.mjs.map +0 -1
- /package/dist/esm/{chunk-KCTRIOXS.mjs.map → chunk-A6TSFIQP.mjs.map} +0 -0
|
@@ -3035,7 +3035,7 @@ async function getImplementationAddress(client, proxyAddress) {
|
|
|
3035
3035
|
}
|
|
3036
3036
|
async function hasMethod(client, tokenAddress, methodSelector) {
|
|
3037
3037
|
try {
|
|
3038
|
-
const code = await client.
|
|
3038
|
+
const code = await client.getCode({ address: tokenAddress });
|
|
3039
3039
|
if (!code) return false;
|
|
3040
3040
|
const hasMethodInProxy = code.toLowerCase().includes(methodSelector.slice(2).toLowerCase());
|
|
3041
3041
|
if (hasMethodInProxy) {
|
|
@@ -3043,7 +3043,7 @@ async function hasMethod(client, tokenAddress, methodSelector) {
|
|
|
3043
3043
|
}
|
|
3044
3044
|
const implAddress = await getImplementationAddress(client, tokenAddress);
|
|
3045
3045
|
if (implAddress) {
|
|
3046
|
-
const implCode = await client.
|
|
3046
|
+
const implCode = await client.getCode({ address: implAddress });
|
|
3047
3047
|
if (implCode) {
|
|
3048
3048
|
const hasMethodInImpl = implCode.toLowerCase().includes(methodSelector.slice(2).toLowerCase());
|
|
3049
3049
|
if (hasMethodInImpl) {
|
|
@@ -3060,7 +3060,7 @@ async function hasMethod(client, tokenAddress, methodSelector) {
|
|
|
3060
3060
|
}
|
|
3061
3061
|
async function hasAnyMethod(client, tokenAddress, methodSelectors) {
|
|
3062
3062
|
try {
|
|
3063
|
-
const code = await client.
|
|
3063
|
+
const code = await client.getCode({ address: tokenAddress });
|
|
3064
3064
|
if (!code) return false;
|
|
3065
3065
|
const codeLower = code.toLowerCase();
|
|
3066
3066
|
const hasMethodInProxy = methodSelectors.some(
|
|
@@ -3071,7 +3071,7 @@ async function hasAnyMethod(client, tokenAddress, methodSelectors) {
|
|
|
3071
3071
|
}
|
|
3072
3072
|
const implAddress = await getImplementationAddress(client, tokenAddress);
|
|
3073
3073
|
if (implAddress) {
|
|
3074
|
-
const implCode = await client.
|
|
3074
|
+
const implCode = await client.getCode({ address: implAddress });
|
|
3075
3075
|
if (implCode) {
|
|
3076
3076
|
const implCodeLower = implCode.toLowerCase();
|
|
3077
3077
|
const hasMethodInImpl = methodSelectors.some(
|
|
@@ -3091,7 +3091,7 @@ async function hasAnyMethod(client, tokenAddress, methodSelectors) {
|
|
|
3091
3091
|
}
|
|
3092
3092
|
async function checkPermit2Support(client) {
|
|
3093
3093
|
try {
|
|
3094
|
-
const permit2Code = await client.
|
|
3094
|
+
const permit2Code = await client.getCode({ address: PERMIT2_ADDRESS2 });
|
|
3095
3095
|
if (!permit2Code) return false;
|
|
3096
3096
|
return true;
|
|
3097
3097
|
} catch (error) {
|