Skip to content

Commit

Permalink
Use suave-toolchain action (#24)
Browse files Browse the repository at this point in the history
* Use suave-toolchain action

* Do not checkout suave-geth

* Use the PATH binary

* Modify binary name

* test

* Try again

* Update registry

* Remove ci step
  • Loading branch information
ferranbt authored Jan 9, 2024
1 parent 414a6bd commit fd8574d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 deletions.
20 changes: 3 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,12 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Checkout suave-geth repo
uses: actions/checkout@v4
with:
repository: flashbots/suave-geth
path: suave-geth
persist-credentials: false
fetch-depth: 0

- name: Build suave
run: |
cd suave-geth
make suave
- name: Include the binary on $PATH
run: |
echo "$(pwd)/suave-geth/build/bin" >> $GITHUB_PATH
- name: Install suave-geth
uses: flashbots/[email protected]

- name: Run suave
run: |
./suave-geth/build/bin/suave --suave.dev &
suave-geth --suave.dev &
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand Down
2 changes: 1 addition & 1 deletion src/forge/Connector.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ contract Connector {
string memory dataHex = iToHex(data);

string[] memory inputs = new string[](4);
inputs[0] = "suave";
inputs[0] = "suave-geth";
inputs[1] = "forge";
inputs[2] = addrHex;
inputs[3] = dataHex;
Expand Down
2 changes: 1 addition & 1 deletion src/forge/Registry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ library Registry {
function enableLib(address addr) public {
// code for Wrapper
bytes memory code =
hex"608060405234801561001057600080fd5b506004361061002b5760003560e01c8063671ff786146100a1575b6040516bffffffffffffffffffffffff193060601b1660208201526000906100959060340160408051808303601f19018152602036601f8101829004820285018201909352828452909291600091819084018382808284376000920191909152506100ca92505050565b90508081518060208301f35b6100b46100af366004610482565b610259565b6040516100c19190610552565b60405180910390f35b606060006100d784610259565b905060006100e484610259565b60408051600480825260a0820190925291925060009190816020015b606081526020019060019003908161010057905050905060405180604001604052806005815260200164737561766560d81b815250816000815181106101485761014861056c565b602002602001018190525060405180604001604052806005815260200164666f72676560d81b815250816001815181106101845761018461056c565b602002602001018190525082816002815181106101a3576101a361056c565b602002602001018190525081816003815181106101c2576101c261056c565b6020908102919091010152604051638916046760e01b8152600090737109709ecfa91a80626ff3989d68f67f5b1dd12d90638916046790610207908590600401610582565b600060405180830381865afa158015610224573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261024c91908101906105e6565b9450505050505b92915050565b606060008251600261026b9190610673565b67ffffffffffffffff81111561028357610283610413565b6040519080825280601f01601f1916602001820160405280156102ad576020820181803683370190505b5060408051808201909152601081526f181899199a1a9b1b9c1cb0b131b232b360811b602082015290915060005b84518110156103e9578182518683815181106102f9576102f961056c565b016020015161030b919060f81c6106a0565b8151811061031b5761031b61056c565b01602001516001600160f81b03191683610336836002610673565b815181106103465761034661056c565b60200101906001600160f81b031916908160001a9053508182518683815181106103725761037261056c565b0160200151610384919060f81c6106b4565b815181106103945761039461056c565b01602001516001600160f81b031916836103af836002610673565b6103ba9060016106c8565b815181106103ca576103ca61056c565b60200101906001600160f81b031916908160001a9053506001016102db565b50816040516020016103fb91906106db565b60405160208183030381529060405292505050919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561045257610452610413565b604052919050565b600067ffffffffffffffff82111561047457610474610413565b50601f01601f191660200190565b60006020828403121561049457600080fd5b813567ffffffffffffffff8111156104ab57600080fd5b8201601f810184136104bc57600080fd5b80356104cf6104ca8261045a565b610429565b8181528560208385010111156104e457600080fd5b81602084016020830137600091810160200191909152949350505050565b60005b8381101561051d578181015183820152602001610505565b50506000910152565b6000815180845261053e816020860160208601610502565b601f01601f19169290920160200192915050565b6020815260006105656020830184610526565b9392505050565b634e487b7160e01b600052603260045260246000fd5b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b828110156105d957603f198886030184526105c7858351610526565b945092850192908501906001016105ab565b5092979650505050505050565b6000602082840312156105f857600080fd5b815167ffffffffffffffff81111561060f57600080fd5b8201601f8101841361062057600080fd5b805161062e6104ca8261045a565b81815285602083850101111561064357600080fd5b610654826020830160208601610502565b95945050505050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102535761025361065d565b634e487b7160e01b600052601260045260246000fd5b6000826106af576106af61068a565b500490565b6000826106c3576106c361068a565b500690565b808201808211156102535761025361065d565b61060f60f31b8152600082516106f8816002850160208701610502565b919091016002019291505056fea264697066735822122059ae496bcbd2ced9fbec0a08e12c546547a6f5be88964669c6db37d39d43d57e64736f6c63430008170033";
hex"608060405234801561001057600080fd5b506004361061002b5760003560e01c8063671ff786146100a1575b6040516bffffffffffffffffffffffff193060601b1660208201526000906100959060340160408051808303601f19018152602036601f8101829004820285018201909352828452909291600091819084018382808284376000920191909152506100ca92505050565b90508081518060208301f35b6100b46100af366004610491565b61025e565b6040516100c19190610561565b60405180910390f35b606060006100d78461025e565b905060006100e48461025e565b60408051600480825260a0820190925291925060009190816020015b60608152602001906001900390816101005790505090506040518060400160405280600a8152602001690e6eac2ecca5acecae8d60b31b8152508160008151811061014d5761014d61057b565b602002602001018190525060405180604001604052806005815260200164666f72676560d81b815250816001815181106101895761018961057b565b602002602001018190525082816002815181106101a8576101a861057b565b602002602001018190525081816003815181106101c7576101c761057b565b6020908102919091010152604051638916046760e01b8152600090737109709ecfa91a80626ff3989d68f67f5b1dd12d9063891604679061020c908590600401610591565b600060405180830381865afa158015610229573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261025191908101906105f3565b9450505050505b92915050565b60606000825160026102709190610680565b67ffffffffffffffff81111561028857610288610422565b6040519080825280601f01601f1916602001820160405280156102b2576020820181803683370190505b5060408051808201909152601081526f181899199a1a9b1b9c1cb0b131b232b360811b602082015290915060005b84518110156103f8578182518683815181106102fe576102fe61057b565b0160200151610310919060f81c6106ad565b815181106103205761032061057b565b01602001516001600160f81b0319168361033b836002610680565b8151811061034b5761034b61057b565b60200101906001600160f81b031916908160001a9053508182518683815181106103775761037761057b565b0160200151610389919060f81c6106c1565b815181106103995761039961057b565b01602001516001600160f81b031916836103b4836002610680565b6103bf9060016106d5565b815181106103cf576103cf61057b565b60200101906001600160f81b031916908160001a905350806103f0816106e8565b9150506102e0565b508160405160200161040a9190610701565b60405160208183030381529060405292505050919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561046157610461610422565b604052919050565b600067ffffffffffffffff82111561048357610483610422565b50601f01601f191660200190565b6000602082840312156104a357600080fd5b813567ffffffffffffffff8111156104ba57600080fd5b8201601f810184136104cb57600080fd5b80356104de6104d982610469565b610438565b8181528560208385010111156104f357600080fd5b81602084016020830137600091810160200191909152949350505050565b60005b8381101561052c578181015183820152602001610514565b50506000910152565b6000815180845261054d816020860160208601610511565b601f01601f19169290920160200192915050565b6020815260006105746020830184610535565b9392505050565b634e487b7160e01b600052603260045260246000fd5b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156105e657603f198886030184526105d4858351610535565b945092850192908501906001016105b8565b5092979650505050505050565b60006020828403121561060557600080fd5b815167ffffffffffffffff81111561061c57600080fd5b8201601f8101841361062d57600080fd5b805161063b6104d982610469565b81815285602083850101111561065057600080fd5b610661826020830160208601610511565b95945050505050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176102585761025861066a565b634e487b7160e01b600052601260045260246000fd5b6000826106bc576106bc610697565b500490565b6000826106d0576106d0610697565b500690565b808201808211156102585761025861066a565b6000600182016106fa576106fa61066a565b5060010190565b61060f60f31b81526000825161071e816002850160208701610511565b919091016002019291505056fea2646970667358221220918efca7b62d20c0fa19067dd7a091ef7cf76b94f70985c100a506284cf9d54664736f6c63430008130033";
vm.etch(addr, code);
}

Expand Down

0 comments on commit fd8574d

Please sign in to comment.