diff --git a/core/types/suave_structs.go b/core/types/suave_structs.go index 250af51a2c..8fb03a57a5 100755 --- a/core/types/suave_structs.go +++ b/core/types/suave_structs.go @@ -1,5 +1,5 @@ // Code generated by suave/gen. DO NOT EDIT. -// Hash: 23a6dd8b9b224b11b8baea19a80c55c7787c50c0eb2fc69727e66d615c913483 +// Hash: 28a0477e31df6e156281d6612b1d8534bbd47dd78b4582800839bb9d1b403d6c package types import "github.com/ethereum/go-ethereum/common" diff --git a/core/vm/contracts_suave_runtime_adapter.go b/core/vm/contracts_suave_runtime_adapter.go index 6a265d2fb2..ca0cc797d8 100644 --- a/core/vm/contracts_suave_runtime_adapter.go +++ b/core/vm/contracts_suave_runtime_adapter.go @@ -1,5 +1,5 @@ // Code generated by suave/gen. DO NOT EDIT. -// Hash: 23a6dd8b9b224b11b8baea19a80c55c7787c50c0eb2fc69727e66d615c913483 +// Hash: 28a0477e31df6e156281d6612b1d8534bbd47dd78b4582800839bb9d1b403d6c package vm import ( @@ -33,19 +33,19 @@ type SuaveRuntime interface { } var ( - buildEthBlockAddr = common.HexToAddress("0x0000000000000000000000000000000042100001") - confidentialInputsAddr = common.HexToAddress("0x0000000000000000000000000000000042010001") - confidentialRetrieveAddr = common.HexToAddress("0x0000000000000000000000000000000042020001") - confidentialStoreAddr = common.HexToAddress("0x0000000000000000000000000000000042020000") - ethcallAddr = common.HexToAddress("0x0000000000000000000000000000000042100003") - extractHintAddr = common.HexToAddress("0x0000000000000000000000000000000042100037") - fetchBidsAddr = common.HexToAddress("0x0000000000000000000000000000000042030001") - fillMevShareBundleAddr = common.HexToAddress("0x0000000000000000000000000000000043200001") - newBidAddr = common.HexToAddress("0x0000000000000000000000000000000042030000") - signEthTransactionAddr = common.HexToAddress("0x0000000000000000000000000000000040100001") - simulateBundleAddr = common.HexToAddress("0x0000000000000000000000000000000042100000") - submitBundleJsonRPCAddr = common.HexToAddress("0x0000000000000000000000000000000043000001") - submitEthBlockBidToRelayAddr = common.HexToAddress("0x0000000000000000000000000000000042100002") + buildEthBlockAddr = common.HexToAddress("0x0000000000000000000000000000000042100001") + confidentialInputsAddr = common.HexToAddress("0x0000000000000000000000000000000042010001") + confidentialRetrieveAddr = common.HexToAddress("0x0000000000000000000000000000000042020001") + confidentialStoreAddr = common.HexToAddress("0x0000000000000000000000000000000042020000") + ethcallAddr = common.HexToAddress("0x0000000000000000000000000000000042100003") + extractHintAddr = common.HexToAddress("0x0000000000000000000000000000000042100037") + fetchBidsAddr = common.HexToAddress("0x0000000000000000000000000000000042030001") + fillMevShareBundleAddr = common.HexToAddress("0x0000000000000000000000000000000043200001") + newBidAddr = common.HexToAddress("0x0000000000000000000000000000000042030000") + signEthTransactionAddr = common.HexToAddress("0x0000000000000000000000000000000040100001") + simulateBundleAddr = common.HexToAddress("0x0000000000000000000000000000000042100000") + submitBundleJsonRPCAddr = common.HexToAddress("0x0000000000000000000000000000000043000001") + submitEthBlockBidToRelayAddr = common.HexToAddress("0x0000000000000000000000000000000042100002") ) type SuaveRuntimeAdapter struct { diff --git a/suave/artifacts/Suave.sol/Suave.json b/suave/artifacts/Suave.sol/Suave.json index 668818c6f6..4b61ab1c66 100644 --- a/suave/artifacts/Suave.sol/Suave.json +++ b/suave/artifacts/Suave.sol/Suave.json @@ -16,6 +16,19 @@ "name": "PeekerReverted", "type": "error" }, + { + "inputs": [], + "name": "ANYALLOWED", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "BUILD_ETH_BLOCK", @@ -200,9 +213,9 @@ } ], "deployedBytecode": { - "object": "0x73000000000000000000000000000000000000000030146080604052600436106100f45760003560e01c8063ad05aae411610096578063c91e11df11610070578063c91e11df14610183578063d91525db1461018e578063f057975914610199578063f0608b1c146101a457600080fd5b8063ad05aae414610162578063b61b127d1461016d578063bc50c0051461017857600080fd5b80637320cb17116100d25780637320cb1714610136578063744795b914610141578063751afe2c1461014c57806394804c691461015757600080fd5b806301c19530146100f9578063040e51831461012057806369094cbc1461012b575b600080fd5b610104634320000181565b6040516001600160a01b03909116815260200160405180910390f35b610104634210000381565b610104634201000181565b610104634203000081565b610104634010000181565b610104634210003781565b610104634210000181565b610104634202000081565b610104634210000081565b610104634210000281565b610104634203000181565b610104634201000081565b610104634202000181565b61010463430000018156fea164736f6c6343000813000a" + "object": "0x73000000000000000000000000000000000000000030146080604052600436106100ff5760003560e01c8063ad05aae4116100a1578063d91525db11610070578063d91525db14610199578063de3dafbf146101a4578063f0579759146101bf578063f0608b1c146101ca57600080fd5b8063ad05aae41461016d578063b61b127d14610178578063bc50c00514610183578063c91e11df1461018e57600080fd5b80637320cb17116100dd5780637320cb1714610141578063744795b91461014c578063751afe2c1461015757806394804c691461016257600080fd5b806301c1953014610104578063040e51831461012b57806369094cbc14610136575b600080fd5b61010f634320000181565b6040516001600160a01b03909116815260200160405180910390f35b61010f634210000381565b61010f634201000181565b61010f634203000081565b61010f634010000181565b61010f634210003781565b61010f634210000181565b61010f634202000081565b61010f634210000081565b61010f634210000281565b61010f634203000181565b61010f634201000081565b61010f73c8df3686b4afb2bb53e60eae97ef043fe03fb82981565b61010f634202000181565b61010f63430000018156fea164736f6c6343000813000a" }, "bytecode": { - "object": "0x6101bc61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100f45760003560e01c8063ad05aae411610096578063c91e11df11610070578063c91e11df14610183578063d91525db1461018e578063f057975914610199578063f0608b1c146101a457600080fd5b8063ad05aae414610162578063b61b127d1461016d578063bc50c0051461017857600080fd5b80637320cb17116100d25780637320cb1714610136578063744795b914610141578063751afe2c1461014c57806394804c691461015757600080fd5b806301c19530146100f9578063040e51831461012057806369094cbc1461012b575b600080fd5b610104634320000181565b6040516001600160a01b03909116815260200160405180910390f35b610104634210000381565b610104634201000181565b610104634203000081565b610104634010000181565b610104634210003781565b610104634210000181565b610104634202000081565b610104634210000081565b610104634210000281565b610104634203000181565b610104634201000081565b610104634202000181565b61010463430000018156fea164736f6c6343000813000a" + "object": "0x6101e261003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100ff5760003560e01c8063ad05aae4116100a1578063d91525db11610070578063d91525db14610199578063de3dafbf146101a4578063f0579759146101bf578063f0608b1c146101ca57600080fd5b8063ad05aae41461016d578063b61b127d14610178578063bc50c00514610183578063c91e11df1461018e57600080fd5b80637320cb17116100dd5780637320cb1714610141578063744795b91461014c578063751afe2c1461015757806394804c691461016257600080fd5b806301c1953014610104578063040e51831461012b57806369094cbc14610136575b600080fd5b61010f634320000181565b6040516001600160a01b03909116815260200160405180910390f35b61010f634210000381565b61010f634201000181565b61010f634203000081565b61010f634010000181565b61010f634210003781565b61010f634210000181565b61010f634202000081565b61010f634210000081565b61010f634210000281565b61010f634203000181565b61010f634201000081565b61010f73c8df3686b4afb2bb53e60eae97ef043fe03fb82981565b61010f634202000181565b61010f63430000018156fea164736f6c6343000813000a" } } diff --git a/suave/artifacts/addresses.go b/suave/artifacts/addresses.go index 18ac750a68..130fa2ce29 100644 --- a/suave/artifacts/addresses.go +++ b/suave/artifacts/addresses.go @@ -1,5 +1,5 @@ // Code generated by suave/gen. DO NOT EDIT. -// Hash: 23a6dd8b9b224b11b8baea19a80c55c7787c50c0eb2fc69727e66d615c913483 +// Hash: 28a0477e31df6e156281d6612b1d8534bbd47dd78b4582800839bb9d1b403d6c package artifacts import ( @@ -8,35 +8,35 @@ import ( // List of suave precompile addresses var ( - buildEthBlockAddr = common.HexToAddress("0x0000000000000000000000000000000042100001") - confidentialInputsAddr = common.HexToAddress("0x0000000000000000000000000000000042010001") - confidentialRetrieveAddr = common.HexToAddress("0x0000000000000000000000000000000042020001") - confidentialStoreAddr = common.HexToAddress("0x0000000000000000000000000000000042020000") - ethcallAddr = common.HexToAddress("0x0000000000000000000000000000000042100003") - extractHintAddr = common.HexToAddress("0x0000000000000000000000000000000042100037") - fetchBidsAddr = common.HexToAddress("0x0000000000000000000000000000000042030001") - fillMevShareBundleAddr = common.HexToAddress("0x0000000000000000000000000000000043200001") - newBidAddr = common.HexToAddress("0x0000000000000000000000000000000042030000") - signEthTransactionAddr = common.HexToAddress("0x0000000000000000000000000000000040100001") - simulateBundleAddr = common.HexToAddress("0x0000000000000000000000000000000042100000") - submitBundleJsonRPCAddr = common.HexToAddress("0x0000000000000000000000000000000043000001") - submitEthBlockBidToRelayAddr = common.HexToAddress("0x0000000000000000000000000000000042100002") + buildEthBlockAddr = common.HexToAddress("0x0000000000000000000000000000000042100001") + confidentialInputsAddr = common.HexToAddress("0x0000000000000000000000000000000042010001") + confidentialRetrieveAddr = common.HexToAddress("0x0000000000000000000000000000000042020001") + confidentialStoreAddr = common.HexToAddress("0x0000000000000000000000000000000042020000") + ethcallAddr = common.HexToAddress("0x0000000000000000000000000000000042100003") + extractHintAddr = common.HexToAddress("0x0000000000000000000000000000000042100037") + fetchBidsAddr = common.HexToAddress("0x0000000000000000000000000000000042030001") + fillMevShareBundleAddr = common.HexToAddress("0x0000000000000000000000000000000043200001") + newBidAddr = common.HexToAddress("0x0000000000000000000000000000000042030000") + signEthTransactionAddr = common.HexToAddress("0x0000000000000000000000000000000040100001") + simulateBundleAddr = common.HexToAddress("0x0000000000000000000000000000000042100000") + submitBundleJsonRPCAddr = common.HexToAddress("0x0000000000000000000000000000000043000001") + submitEthBlockBidToRelayAddr = common.HexToAddress("0x0000000000000000000000000000000042100002") ) var SuaveMethods = map[string]common.Address{ - "buildEthBlock": buildEthBlockAddr, - "confidentialInputs": confidentialInputsAddr, - "confidentialRetrieve": confidentialRetrieveAddr, - "confidentialStore": confidentialStoreAddr, - "ethcall": ethcallAddr, - "extractHint": extractHintAddr, - "fetchBids": fetchBidsAddr, - "fillMevShareBundle": fillMevShareBundleAddr, - "newBid": newBidAddr, - "signEthTransaction": signEthTransactionAddr, - "simulateBundle": simulateBundleAddr, - "submitBundleJsonRPC": submitBundleJsonRPCAddr, - "submitEthBlockBidToRelay": submitEthBlockBidToRelayAddr, + "buildEthBlock": buildEthBlockAddr, + "confidentialInputs": confidentialInputsAddr, + "confidentialRetrieve": confidentialRetrieveAddr, + "confidentialStore": confidentialStoreAddr, + "ethcall": ethcallAddr, + "extractHint": extractHintAddr, + "fetchBids": fetchBidsAddr, + "fillMevShareBundle": fillMevShareBundleAddr, + "newBid": newBidAddr, + "signEthTransaction": signEthTransactionAddr, + "simulateBundle": simulateBundleAddr, + "submitBundleJsonRPC": submitBundleJsonRPCAddr, + "submitEthBlockBidToRelay": submitEthBlockBidToRelayAddr, } func PrecompileAddressToName(addr common.Address) string { diff --git a/suave/gen/main.go b/suave/gen/main.go index e675f27041..e298af3ded 100644 --- a/suave/gen/main.go +++ b/suave/gen/main.go @@ -355,6 +355,9 @@ struct {{.Name}} { {{end}} } {{end}} +address public constant ANYALLOWED = +0xC8df3686b4Afb2BB53e60EAe97EF043FE03Fb829; + address public constant IS_CONFIDENTIAL_ADDR = 0x0000000000000000000000000000000042010000; {{range .Functions}} diff --git a/suave/sol/libraries/Suave.sol b/suave/sol/libraries/Suave.sol index 012b6884e9..87d7fc9803 100644 --- a/suave/sol/libraries/Suave.sol +++ b/suave/sol/libraries/Suave.sol @@ -33,6 +33,8 @@ library Suave { uint64 amount; } + address public constant ANYALLOWED = 0xC8df3686b4Afb2BB53e60EAe97EF043FE03Fb829; + address public constant IS_CONFIDENTIAL_ADDR = 0x0000000000000000000000000000000042010000; address public constant BUILD_ETH_BLOCK = 0x0000000000000000000000000000000042100001; diff --git a/suave/sol/scripts/forge_example.sol b/suave/sol/scripts/forge_example.sol index 68cd956ebd..9f44f696c5 100644 --- a/suave/sol/scripts/forge_example.sol +++ b/suave/sol/scripts/forge_example.sol @@ -5,7 +5,7 @@ import "../libraries/SuaveForge.sol"; import "forge-std/Script.sol"; contract Example is Script { - address[] public addressList = [0xC8df3686b4Afb2BB53e60EAe97EF043FE03Fb829]; + address[] public addressList = [Suave.ANYALLOWED]; function run() public { Suave.Bid memory bid = SuaveForge.newBid(0, addressList, addressList, "default:v0:ethBundles");