@t402/evm 2.0.1 → 2.1.0
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/index.js +9 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +16 -3
- package/dist/esm/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.mjs
CHANGED
|
@@ -1586,8 +1586,21 @@ function decodePaymasterAndData(paymasterAndData) {
|
|
|
1586
1586
|
};
|
|
1587
1587
|
}
|
|
1588
1588
|
|
|
1589
|
+
// src/erc4337/paymasters/pimlico.ts
|
|
1590
|
+
import { concat as concat3, pad as pad3, toHex as toHex3 } from "viem";
|
|
1591
|
+
|
|
1592
|
+
// src/erc4337/accounts/safe.ts
|
|
1593
|
+
import {
|
|
1594
|
+
encodeFunctionData as encodeFunctionData2,
|
|
1595
|
+
encodeAbiParameters as encodeAbiParameters2,
|
|
1596
|
+
concat as concat4,
|
|
1597
|
+
keccak256 as keccak2562,
|
|
1598
|
+
getContractAddress,
|
|
1599
|
+
hexToBytes
|
|
1600
|
+
} from "viem";
|
|
1601
|
+
|
|
1589
1602
|
// src/erc4337/t402.ts
|
|
1590
|
-
import { encodeFunctionData as
|
|
1603
|
+
import { encodeFunctionData as encodeFunctionData3 } from "viem";
|
|
1591
1604
|
var ERC20_TRANSFER_ABI = [
|
|
1592
1605
|
{
|
|
1593
1606
|
inputs: [
|
|
@@ -1718,7 +1731,7 @@ var GaslessT402Client = class {
|
|
|
1718
1731
|
* Build call data for a simple ERC20 transfer
|
|
1719
1732
|
*/
|
|
1720
1733
|
buildTransferCallData(params) {
|
|
1721
|
-
return
|
|
1734
|
+
return encodeFunctionData3({
|
|
1722
1735
|
abi: ERC20_TRANSFER_ABI,
|
|
1723
1736
|
functionName: "transfer",
|
|
1724
1737
|
args: [params.to, params.amount]
|
|
@@ -1735,7 +1748,7 @@ var GaslessT402Client = class {
|
|
|
1735
1748
|
const r = `0x${sig.slice(2, 66)}`;
|
|
1736
1749
|
const s = `0x${sig.slice(66, 130)}`;
|
|
1737
1750
|
const v = parseInt(sig.slice(130, 132), 16);
|
|
1738
|
-
return
|
|
1751
|
+
return encodeFunctionData3({
|
|
1739
1752
|
abi: EIP3009_TRANSFER_ABI,
|
|
1740
1753
|
functionName: "transferWithAuthorization",
|
|
1741
1754
|
args: [
|