@wtflabs/x402 0.0.1-beta.13 → 0.0.1-beta.14

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.
@@ -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.getBytecode({ address: tokenAddress });
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.getBytecode({ address: implAddress });
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.getBytecode({ address: tokenAddress });
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.getBytecode({ address: implAddress });
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.getBytecode({ address: PERMIT2_ADDRESS2 });
3094
+ const permit2Code = await client.getCode({ address: PERMIT2_ADDRESS2 });
3095
3095
  if (!permit2Code) return false;
3096
3096
  return true;
3097
3097
  } catch (error) {