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

proofs: Create task template for CHALLENGER to post claim in permissioned game #351

Open
ajsutton opened this issue Oct 23, 2024 · 1 comment
Assignees

Comments

@ajsutton
Copy link
Contributor

Create a task template for the CHALLENGER role to post a counter claim in a permissioned game. This would just involve calling the attack method with any claim value, but needs to be done from the permissioned account which is usually a multisig - hence the need for a superchain-op.

@ajsutton
Copy link
Contributor Author

https://github.com/ethereum-optimism/superchain-ops/compare/aj/challenge-game-template is a draft of the task, but it fails to execute because the value option in the transaction JSON is currently ignored. From @mds1:

superchain ops doesn't currently read in value, presumably because we've had no use case for this:

for (uint256 i = 0; i < transaction_count; i++) {
calls[i] = IMulticall3.Call3({
target: stdJson.readAddress(
jsonContent, string(abi.encodePacked("$.transactions[", vm.toString(i), "].to"))
),
allowFailure: false,
callData: stdJson.readBytes(
jsonContent, string(abi.encodePacked("$.transactions[", vm.toString(i), "].data"))
)
});
}

It's a bit tedious to support, but shouldn't hard. You'd have to:
Read in value in that loop,
which also requires changing all instances from IMulticall3.Call3 to IMulticall3.Call3Value,
then in the base-org/contracts dependency change all instances of aggregate3 to aggregate3Value, and again change from Call3 to Call3Value
and lastly update our base-org/contracts dep to the latest after the upstream change is merged
That ignores setting balance overrides, which you would do here and then make corresponding updates wherever that struct is used

I had a go at doing that and also discovered the post-state checks verify that no balances change so we'll need to have some way to set a list of addresses where the balance can change (and maybe by how much).

And something I did must have been wrong because the simulation still reverts with Multicall3: value mismatch because it expects msg.value = SUM(call[0...i].value). If I try to set a value on the simulated tx (with or without adding a balance override to ensure there are funds), GnosisSafe.execTransaction reverts without any explanation.

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

No branches or pull requests

1 participant