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 executeBatch with values and tests and update ERC1271 support docs #2

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

fangting-alchemy
Copy link
Collaborator

No description provided.

@fangting-alchemy fangting-alchemy requested review from dphilipson and jaypaik and removed request for dphilipson and jaypaik September 8, 2023 20:24
Copy link
Contributor

@adam-alchemy adam-alchemy left a comment

Choose a reason for hiding this comment

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

LGTM, just have 1 request in a test

bytes[] memory func = new bytes[](1);
func[0] = abi.encodeCall(LightSwitch.turnOn, ());
account.executeBatch(dest, value, func);
assertTrue(lightSwitch.on());
Copy link
Contributor

Choose a reason for hiding this comment

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

could we add an assert here that the recipient contract's balance went up?

Copy link
Collaborator

@jaypaik jaypaik left a comment

Choose a reason for hiding this comment

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

🎉

@@ -47,6 +47,13 @@ contract LightAccountTest is Test {
assertTrue(lightSwitch.on());
}

function testExecuteWihValueCanBeCalledByOwner() public {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Super nit:

Suggested change
function testExecuteWihValueCanBeCalledByOwner() public {
function testExecuteWithValueCanBeCalledByOwner() public {

@fangting-alchemy fangting-alchemy merged commit aa8196b into main Sep 8, 2023
2 checks passed
@howydev howydev deleted the fangting/batch branch September 22, 2023 23:14
@howydev howydev restored the fangting/batch branch September 22, 2023 23:14
@howydev howydev deleted the fangting/batch branch September 22, 2023 23:14
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.

3 participants