Skip to content

Commit 434407c

Browse files
authored
chore: Add Coinbase Smart Wallet ABIs (coinbase#489)
1 parent 6836025 commit 434407c

File tree

4 files changed

+38
-0
lines changed

4 files changed

+38
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export const abi = [
2+
{
3+
stateMutability: 'nonpayable',
4+
type: 'function',
5+
inputs: [{ name: 'to', type: 'address' }],
6+
name: 'safeMint',
7+
outputs: [],
8+
},
9+
] as const;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { baseSepolia } from 'viem/chains';
2+
import { SMART_WALLET_ENTRY_POINT_ADDRESS } from '../constants';
3+
import { abi } from './NewPaymasterBundlerABI';
4+
import { useNewPaymasterBundlerContract } from './useNewPaymasterBundlerContract';
5+
6+
describe('usePaymasterBundlerContract', () => {
7+
it('should return correct contract data', () => {
8+
const contract = useNewPaymasterBundlerContract();
9+
10+
expect(contract).toEqual({
11+
abi: abi,
12+
address: SMART_WALLET_ENTRY_POINT_ADDRESS,
13+
status: 'ready',
14+
supportedChains: [baseSepolia],
15+
});
16+
});
17+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { baseSepolia } from 'viem/chains';
2+
import { generateContractHook } from '@/hooks/contracts';
3+
import { abi } from './NewPaymasterBundlerABI';
4+
5+
export const useNewPaymasterBundlerContract = generateContractHook({
6+
abi: abi,
7+
[baseSepolia.id]: {
8+
chain: baseSepolia,
9+
address: '0x119Ea671030FBf79AB93b436D2E20af6ea469a19',
10+
},
11+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const SMART_WALLET_ENTRY_POINT_ADDRESS = '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789';

0 commit comments

Comments
 (0)