-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Delegation Signing Script #28
base: main
Are you sure you want to change the base?
Conversation
import "forge-std/Script.sol"; | ||
import { console2 } from "forge-std/console2.sol"; | ||
import { IEntryPoint } from "@account-abstraction/interfaces/IEntryPoint.sol"; | ||
import { MessageHashUtils } from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; | ||
|
||
import { Delegation, Caveat } from "../src/utils/Types.sol"; | ||
import { DelegationManager } from "../src/DelegationManager.sol"; | ||
import { SigningUtilsLib } from "../test/utils/SigningUtilsLib.t.sol"; | ||
import { EncoderLib } from "../src/libraries/EncoderLib.sol"; | ||
import { MultiSigDeleGator } from "../src/MultiSigDeleGator.sol"; | ||
import { HybridDeleGator } from "../src/HybridDeleGator.sol"; | ||
import { IDelegationManager } from "../src/interfaces/IDelegationManager.sol"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some unused imports
import "forge-std/Script.sol"; | |
import { console2 } from "forge-std/console2.sol"; | |
import { IEntryPoint } from "@account-abstraction/interfaces/IEntryPoint.sol"; | |
import { MessageHashUtils } from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; | |
import { Delegation, Caveat } from "../src/utils/Types.sol"; | |
import { DelegationManager } from "../src/DelegationManager.sol"; | |
import { SigningUtilsLib } from "../test/utils/SigningUtilsLib.t.sol"; | |
import { EncoderLib } from "../src/libraries/EncoderLib.sol"; | |
import { MultiSigDeleGator } from "../src/MultiSigDeleGator.sol"; | |
import { HybridDeleGator } from "../src/HybridDeleGator.sol"; | |
import { IDelegationManager } from "../src/interfaces/IDelegationManager.sol"; | |
import "forge-std/Script.sol"; | |
import { console2 } from "forge-std/console2.sol"; | |
import { MessageHashUtils } from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; | |
import { Delegation, Caveat } from "../src/utils/Types.sol"; | |
import { DelegationManager } from "../src/DelegationManager.sol"; | |
import { SigningUtilsLib } from "../test/utils/SigningUtilsLib.t.sol"; | |
import { EncoderLib } from "../src/libraries/EncoderLib.sol"; |
Domain memory domain = Domain({ | ||
name: "DelegationManager", | ||
version: "1", | ||
chainId: 31337, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better to use block.chainid or pass the chainId as part of .env, or some initial configuration section in this file
name: "DelegationManager", | ||
version: "1", | ||
chainId: 31337, | ||
verifyingContract: address(0x687137B4C3C05F90c2e372DCd7700f088d1De708) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better to pass it as part of .env or some initial configuration section in this file
What?
.env.example
file