Skip to content

Commit

Permalink
api, contract: support EntryPoint v0.6 & v0.7
Browse files Browse the repository at this point in the history
- DAv1 uses v0.6
- DAv2 uses v0.7
- also, delete bundle compression. not needed now + doesn't support v0.7 yet.
  • Loading branch information
dcposch committed Sep 6, 2024
1 parent 75b570f commit 5bf05e0
Show file tree
Hide file tree
Showing 12 changed files with 1,156 additions and 155 deletions.
18 changes: 1 addition & 17 deletions apps/scratchpad/src/checkAccount.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import {
entryPointABI,
erc20ABI,
nameRegistryProxyConfig,
} from "@daimo/contract";
import { erc20ABI, nameRegistryProxyConfig } from "@daimo/contract";
import { Constants } from "userop";
import {
Address,
Expand Down Expand Up @@ -66,19 +62,7 @@ export async function checkAccount() {
const balStr = formatUnits(bal, tokenDecimals) + " " + tokenSymbol;
console.log(`BAL - ${balStr}`);

// Get account info from the EntryPoint contract
const prefundBal = await publicClient.readContract({
abi: entryPointABI,
address: getAddress(Constants.ERC4337.EntryPoint),
functionName: "balanceOf",
args: [addr],
});
const prefundStr = formatUnits(prefundBal, 18) + " ETH";
console.log(`PREFUND - ${prefundStr}`);
console.log();

console.log(`...NameReg ${nameRegistryProxyConfig.address}`);
console.log(`... ERC20 ${chainConfig.tokenAddress}`);
console.log(`EntryPoint ${Constants.ERC4337.EntryPoint}`);
console.log();
}
Loading

0 comments on commit 5bf05e0

Please sign in to comment.