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

Format e2e contracts and ci check #118

Merged
merged 3 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
- name: Lint
run: make lint

- name: Lint contracts
run: cd suave && forge fmt --check

- name: Build contracts
run: cd suave && forge build

Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,6 @@ devnet-up:

devnet-down:
docker-compose -f ./suave/devenv/docker-compose.yml down

fmt-contracts:
cd suave && forge fmt
1 change: 0 additions & 1 deletion suave/e2e/contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ var (
MevShareBundleSenderContract = newArtifact("bids.sol/MevShareBundleSenderContract.json")
buildEthBlockContract = newArtifact("bids.sol/EthBlockBidContract.json")
ethBlockBidSenderContract = newArtifact("bids.sol/EthBlockBidSenderContract.json")
suaveLibContract = newArtifact("SuaveAbi.sol/SuaveAbi.json")
exampleCallSourceContract = newArtifact("example.sol/ExampleEthCallSource.json")
exampleCallTargetContract = newArtifact("example.sol/ExampleEthCallTarget.json")
)
Expand Down
8 changes: 4 additions & 4 deletions suave/e2e/workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ func TestBlockBuildingPrecompiles(t *testing.T) {
require.NoError(t, err)

{ // Test the bundle simulation precompile through eth_call
calldata, err := suaveLibContract.Abi.Methods["simulateBundle"].Inputs.Pack(bundleBytes)
calldata, err := artifacts.SuaveAbi.Methods["simulateBundle"].Inputs.Pack(bundleBytes)
require.NoError(t, err)

var simResult hexutil.Bytes
Expand Down Expand Up @@ -785,7 +785,7 @@ func TestBlockBuildingPrecompiles(t *testing.T) {
FeeRecipient: common.Address{0x42},
}

packed, err := suaveLibContract.Abi.Methods["buildEthBlock"].Inputs.Pack(payloadArgsTuple, bid.Id, "")
packed, err := artifacts.SuaveAbi.Methods["buildEthBlock"].Inputs.Pack(payloadArgsTuple, bid.Id, "")
require.NoError(t, err)

var simResult hexutil.Bytes
Expand All @@ -799,7 +799,7 @@ func TestBlockBuildingPrecompiles(t *testing.T) {

require.NotNil(t, simResult)

unpacked, err := suaveLibContract.Abi.Methods["buildEthBlock"].Outputs.Unpack(simResult)
unpacked, err := artifacts.SuaveAbi.Methods["buildEthBlock"].Outputs.Unpack(simResult)
require.NoError(t, err)

// TODO: test builder bid
Expand Down Expand Up @@ -1446,7 +1446,7 @@ func requireNoRpcError(t *testing.T, rpcErr error) {
require.NoError(t, rpcErr, decodedError)
}

unpacked, err := suaveLibContract.Abi.Errors["PeekerReverted"].Inputs.Unpack(decodedError[4:])
unpacked, err := artifacts.SuaveAbi.Errors["PeekerReverted"].Inputs.Unpack(decodedError[4:])
if err != nil {
require.NoError(t, err, rpcErr.Error())
} else {
Expand Down
19 changes: 0 additions & 19 deletions suave/sol/libraries/SuaveAbi.sol

This file was deleted.

Loading
Loading