Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dylandesrosier
Copy link
Contributor

What?

  • Adds a simple delegation signing script for quick validation of external SDKs
  • Adds more definition to .env.example file

@dylandesrosier dylandesrosier requested a review from a team as a code owner October 7, 2024 18:07
Comment on lines +4 to +15
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";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some unused imports

Suggested change
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,
Copy link
Contributor

@hanzel98 hanzel98 Oct 15, 2024

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)
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants