diff --git a/.env.sample b/.env.sample index 04da0a4..25963b6 100644 --- a/.env.sample +++ b/.env.sample @@ -1,8 +1,10 @@ SUAVE_PK=1111111111111111111111111111111111111111111111111111111111111111 GOERLI_PK=2222222222222222222222222222222222222222222222222222222222222222 +RIGIL_PK=3333333333333333333333333333333333333333333333333333333333333333 SUAVE_RPC=http://localhost:8545 GOERLI_RPC=http://localhost:8548 +RIGIL_RPC=https://rpc.rigil.suave.flashbots.net EXECUTION_NODE=0x3333333333333333333333333333333333333333 GOERLI_BEACON=http://localhost:3500 diff --git a/.gitignore b/.gitignore index 7c3d8d4..0dc6853 100644 --- a/.gitignore +++ b/.gitignore @@ -10,5 +10,5 @@ yarn-error.log # Hardhat files cache artifacts -deployments +deployments/suave diff --git a/deployments/rigil/.chainId b/deployments/rigil/.chainId new file mode 100644 index 0000000..3f4bb72 --- /dev/null +++ b/deployments/rigil/.chainId @@ -0,0 +1 @@ +16813125 \ No newline at end of file diff --git a/deployments/rigil/BlockAdAuctionV2.json b/deployments/rigil/BlockAdAuctionV2.json new file mode 100644 index 0000000..35abc84 --- /dev/null +++ b/deployments/rigil/BlockAdAuctionV2.json @@ -0,0 +1,667 @@ +{ + "address": "0xa60F1B5cB70c0523A086BbCbe132C8679085ea0E", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "boostRelayUrl_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "PeekerReverted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "message", + "type": "string" + } + ], + "name": "SuaveError", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "Suave.BidId", + "name": "bidId", + "type": "bytes16" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "decryptionCondition", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "allowedPeekers", + "type": "address[]" + } + ], + "name": "BidEvent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "extra", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blockLimit", + "type": "uint256" + } + ], + "name": "RequestAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "egp", + "type": "uint64" + } + ], + "name": "RequestIncluded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "RequestRemoved", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint64", + "name": "slot", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "proposerPubkey", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "parent", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + }, + { + "internalType": "address", + "name": "feeRecipient", + "type": "address" + }, + { + "internalType": "uint64", + "name": "gasLimit", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "random", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint64", + "name": "index", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "validator", + "type": "uint64" + }, + { + "internalType": "address", + "name": "Address", + "type": "address" + }, + { + "internalType": "uint64", + "name": "amount", + "type": "uint64" + } + ], + "internalType": "struct Suave.Withdrawal[]", + "name": "withdrawals", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "extra", + "type": "bytes" + } + ], + "internalType": "struct Suave.BuildBlockArgs", + "name": "blockArgs", + "type": "tuple" + }, + { + "internalType": "uint64", + "name": "blockHeight", + "type": "uint64" + } + ], + "name": "buildBlock", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "builderCall", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "includedRequestB", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "pendingRemovalsB", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "nextHash", + "type": "bytes32" + } + ], + "internalType": "struct ConfidentialControl.UnlockArgs", + "name": "uArgs", + "type": "tuple" + } + ], + "name": "buildCallback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "builder", + "outputs": [ + { + "internalType": "contract EthBlockBidSenderContract", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "blockLimit", + "type": "uint64" + }, + { + "internalType": "string", + "name": "extra", + "type": "string" + } + ], + "name": "buyAd", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "string", + "name": "extra", + "type": "string" + }, + { + "internalType": "uint256", + "name": "blockLimit", + "type": "uint256" + }, + { + "internalType": "Suave.BidId", + "name": "paymentBidId", + "type": "bytes16" + } + ], + "internalType": "struct BlockAdAuctionV2.AdRequest", + "name": "request", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "nextHash", + "type": "bytes32" + } + ], + "internalType": "struct ConfidentialControl.UnlockArgs", + "name": "uArgs", + "type": "tuple" + } + ], + "name": "buyAdCallback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "nextHash", + "type": "bytes32" + }, + { + "internalType": "Suave.BidId", + "name": "sBidId", + "type": "bytes16" + } + ], + "name": "ccCallback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "confidentialConstructor", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "Suave.BidId", + "name": "id", + "type": "bytes16" + }, + { + "internalType": "Suave.BidId", + "name": "salt", + "type": "bytes16" + }, + { + "internalType": "uint64", + "name": "decryptionCondition", + "type": "uint64" + }, + { + "internalType": "address[]", + "name": "allowedPeekers", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "allowedStores", + "type": "address[]" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + } + ], + "internalType": "struct Suave.Bid", + "name": "bid", + "type": "tuple" + } + ], + "name": "emitBid", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fetchBidConfidentialBundleData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nextId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "requests", + "outputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "string", + "name": "extra", + "type": "string" + }, + { + "internalType": "uint256", + "name": "blockLimit", + "type": "uint256" + }, + { + "internalType": "Suave.BidId", + "name": "paymentBidId", + "type": "bytes16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "requestsLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x468f344ab54d0cc2e55f8d19c5bebf70a0cb47cdfd32814211fab10c2b2ea271", + "receipt": { + "to": null, + "from": "0x16f2Aa8dF055b6e672b93Ded41FecCCabAB565B0", + "contractAddress": "0xa60F1B5cB70c0523A086BbCbe132C8679085ea0E", + "transactionIndex": 0, + "gasUsed": "7151167", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xab057fa35fb9ac5f4faf3558f07b7f6f89992c789037a66ccf2f08bc5c8d12d1", + "transactionHash": "0x468f344ab54d0cc2e55f8d19c5bebf70a0cb47cdfd32814211fab10c2b2ea271", + "logs": [], + "blockNumber": 478691, + "cumulativeGasUsed": "7151167", + "status": 1, + "byzantium": true + }, + "args": [ + "https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@boost-relay-goerli.flashbots.net" + ], + "numDeployments": 1, + "solcInputHash": "23827a9d8caf34ac1d6e36f5c8991a07", + "metadata": "{\"compiler\":{\"version\":\"0.8.8+commit.dddeac2f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"boostRelayUrl_\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"PeekerReverted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"SuaveError\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"Suave.BidId\",\"name\":\"bidId\",\"type\":\"bytes16\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"decryptionCondition\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"allowedPeekers\",\"type\":\"address[]\"}],\"name\":\"BidEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"extra\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockLimit\",\"type\":\"uint256\"}],\"name\":\"RequestAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"egp\",\"type\":\"uint64\"}],\"name\":\"RequestIncluded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"RequestRemoved\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"slot\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"proposerPubkey\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"parent\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"feeRecipient\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"gasLimit\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"random\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"index\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"validator\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"Address\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"internalType\":\"struct Suave.Withdrawal[]\",\"name\":\"withdrawals\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"extra\",\"type\":\"bytes\"}],\"internalType\":\"struct Suave.BuildBlockArgs\",\"name\":\"blockArgs\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"}],\"name\":\"buildBlock\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"builderCall\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"includedRequestB\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"pendingRemovalsB\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"nextHash\",\"type\":\"bytes32\"}],\"internalType\":\"struct ConfidentialControl.UnlockArgs\",\"name\":\"uArgs\",\"type\":\"tuple\"}],\"name\":\"buildCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"builder\",\"outputs\":[{\"internalType\":\"contract EthBlockBidSenderContract\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockLimit\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"extra\",\"type\":\"string\"}],\"name\":\"buyAd\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"extra\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"blockLimit\",\"type\":\"uint256\"},{\"internalType\":\"Suave.BidId\",\"name\":\"paymentBidId\",\"type\":\"bytes16\"}],\"internalType\":\"struct BlockAdAuctionV2.AdRequest\",\"name\":\"request\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"nextHash\",\"type\":\"bytes32\"}],\"internalType\":\"struct ConfidentialControl.UnlockArgs\",\"name\":\"uArgs\",\"type\":\"tuple\"}],\"name\":\"buyAdCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"nextHash\",\"type\":\"bytes32\"},{\"internalType\":\"Suave.BidId\",\"name\":\"sBidId\",\"type\":\"bytes16\"}],\"name\":\"ccCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"confidentialConstructor\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"Suave.BidId\",\"name\":\"id\",\"type\":\"bytes16\"},{\"internalType\":\"Suave.BidId\",\"name\":\"salt\",\"type\":\"bytes16\"},{\"internalType\":\"uint64\",\"name\":\"decryptionCondition\",\"type\":\"uint64\"},{\"internalType\":\"address[]\",\"name\":\"allowedPeekers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"allowedStores\",\"type\":\"address[]\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"internalType\":\"struct Suave.Bid\",\"name\":\"bid\",\"type\":\"tuple\"}],\"name\":\"emitBid\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fetchBidConfidentialBundleData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"requests\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"extra\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"blockLimit\",\"type\":\"uint256\"},{\"internalType\":\"Suave.BidId\",\"name\":\"paymentBidId\",\"type\":\"bytes16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requestsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/blockad/BlockAdV2.sol\":\"BlockAdAuctionV2\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/blockad/BlockAdV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Author: Miha Lotric (halo3mic)\\n\\npragma solidity ^0.8.8;\\n\\nimport { EthBlockBidSenderContract, AnyBidContract, Suave } from \\\"../standard_peekers/bids.sol\\\";\\nimport { ConfidentialControl } from \\\"./lib/ConfidentialControl.sol\\\";\\nimport { DynamicUintArray } from \\\"./lib/Utils.sol\\\";\\n\\n\\ncontract BlockAdAuctionV2 is AnyBidContract, ConfidentialControl {\\n\\tusing DynamicUintArray for bytes;\\n\\n\\tstruct AdRequest {\\n\\t\\tuint id;\\n\\t\\tstring extra;\\n\\t\\tuint blockLimit;\\n\\t\\tSuave.BidId paymentBidId;\\n\\t}\\n\\tstruct Offer {\\n\\t\\tuint id;\\n\\t\\tstring extra;\\n\\t\\tuint64 egp;\\n\\t\\tbytes paymentBundle;\\n\\t}\\n\\n\\tevent RequestAdded(uint id, string extra, uint blockLimit);\\n\\tevent RequestRemoved(uint id);\\n\\tevent RequestIncluded(uint id, uint64 egp);\\n\\n\\tstring internal constant PB_NAMESPACE = \\\"blockad:v0:paymentBundle\\\";\\n\\tstring internal constant EB_NAMESPACE = \\\"default:v0:ethBundles\\\";\\n\\tstring internal constant EB_SIM_NAMESPACE = \\\"default:v0:ethBundleSimResults\\\";\\n\\tEthBlockBidSenderContract public builder;\\n\\tAdRequest[] public requests;\\n\\tuint public nextId;\\n\\n\\t/**********************************************************************\\n\\t * \\u26d3\\ufe0f ON-CHAIN METHODS *\\n\\t ***********************************************************************/\\n\\n\\tconstructor(string memory boostRelayUrl_) {\\n\\t\\tbuilder = new EthBlockBidSenderContract(boostRelayUrl_);\\n\\t}\\n\\n\\tfunction buyAdCallback(AdRequest calldata request, UnlockArgs calldata uArgs) external unlock(uArgs) {\\n\\t\\trequests.push(request);\\n\\t\\tnextId++;\\n\\t\\temit RequestAdded(request.id, request.extra, request.blockLimit);\\n\\t}\\n\\n\\tfunction buildCallback(\\n\\t\\tbytes memory builderCall,\\n\\t\\tbytes memory includedRequestB,\\n\\t\\tbytes memory pendingRemovalsB,\\n\\t\\tUnlockArgs calldata uArgs\\n\\t) external unlock(uArgs) {\\n\\t\\thandleIncludedRequest(includedRequestB);\\n\\t\\tif (pendingRemovalsB.length > 0) removeRequests(pendingRemovalsB.export());\\n\\t\\texecuteExternalCallback(address(builder), builderCall);\\n\\t}\\n\\n\\tfunction requestsLength() public view returns (uint) {\\n\\t\\treturn requests.length;\\n\\t}\\n\\n\\t/**********************************************************************\\n\\t * \\ud83d\\udd12 CONFIDENTIAL METHODS *\\n\\t ***********************************************************************/\\n\\n\\tfunction confidentialConstructor() public view override onlyConfidential returns (bytes memory) {\\n\\t\\treturn ConfidentialControl.confidentialConstructor();\\n\\t}\\n\\n\\tfunction buyAd(uint64 blockLimit, string memory extra) external onlyConfidential returns (bytes memory) {\\n\\t\\tbytes memory paymentBundle = this.fetchBidConfidentialBundleData();\\n\\t\\tcrequire(Suave.simulateBundle(paymentBundle) != 0, \\\"egp too low\\\");\\n\\t\\tSuave.BidId paymentBidId = storePaymentBundle(paymentBundle);\\n\\t\\tAdRequest memory request = AdRequest(nextId, extra, blockLimit, paymentBidId);\\n\\t\\treturn abi.encodeWithSelector(this.buyAdCallback.selector, request, getUnlockPair());\\n\\t}\\n\\n\\tfunction buildBlock(\\n\\t\\tSuave.BuildBlockArgs memory blockArgs,\\n\\t\\tuint64 blockHeight\\n\\t) public onlyConfidential returns (bytes memory) {\\n\\t\\tcrequire(requests.length > 0, \\\"No requests\\\");\\n\\t\\t(Offer memory bestOffer, bytes memory removals) = filterOffers(blockHeight);\\n\\t\\tcrequire(bestOffer.egp > 0, \\\"No valid offers\\\");\\n\\n\\t\\tstoreBundleInPool(blockHeight, bestOffer);\\n\\t\\tblockArgs.extra = bytes(bestOffer.extra);\\n\\t\\t// Expect flow is ordered by egp; if one wants to fail payment they need higher egp\\n\\t\\tbytes memory externalCallback = builder.buildFromPool(blockArgs, blockHeight);\\n\\n\\t\\treturn\\n\\t\\t\\tabi.encodeWithSelector(\\n\\t\\t\\t\\tthis.buildCallback.selector,\\n\\t\\t\\t\\texternalCallback,\\n\\t\\t\\t\\tabi.encode(bestOffer.id, bestOffer.egp),\\n\\t\\t\\t\\tremovals,\\n\\t\\t\\t\\tgetUnlockPair()\\n\\t\\t\\t);\\n\\t}\\n\\n\\t/**********************************************************************\\n\\t * \\ud83d\\udee0\\ufe0f INTERNAL METHODS *\\n\\t ***********************************************************************/\\n\\n\\tfunction removeRequests(uint[] memory pendingRemovals) internal {\\n\\t\\t// Assume that the pendingRemovals were added in ascending order\\n\\t\\t// Assume that pendingRemovals.length <= requests.length\\n\\t\\tfor (uint i = pendingRemovals.length; i > 0; --i) {\\n\\t\\t\\tuint indexToRemove = pendingRemovals[i - 1];\\n\\t\\t\\tuint requestId = requests[indexToRemove].id;\\n\\t\\t\\tif (indexToRemove < requests.length - 1) {\\n\\t\\t\\t\\trequests[indexToRemove] = requests[requests.length - 1];\\n\\t\\t\\t}\\n\\t\\t\\trequests.pop();\\n\\t\\t\\temit RequestRemoved(requestId);\\n\\t\\t}\\n\\t}\\n\\n\\tfunction handleIncludedRequest(bytes memory includedRequestB) internal {\\n\\t\\t(uint id, uint64 egp) = abi.decode(includedRequestB, (uint, uint64));\\n\\t\\temit RequestIncluded(id, egp);\\n\\t}\\n\\n\\tfunction executeExternalCallback(address target, bytes memory data) internal {\\n\\t\\t(bool success, ) = target.call(data);\\n\\t\\tcrequire(success, \\\"External call failed\\\");\\n\\t}\\n\\n\\tfunction storePaymentBundle(bytes memory paymentBundle) internal view returns (Suave.BidId) {\\n\\t\\taddress[] memory peekers = new address[](1);\\n\\t\\tpeekers[0] = address(this);\\n\\t\\tSuave.Bid memory paymentBid = Suave.newBid(0, peekers, peekers, PB_NAMESPACE);\\n\\t\\tSuave.confidentialStore(paymentBid.id, PB_NAMESPACE, paymentBundle);\\n\\t\\treturn paymentBid.id;\\n\\t}\\n\\n\\tfunction filterOffers(uint blockHeight) internal view returns (Offer memory bestOffer, bytes memory removals) {\\n\\t\\tfor (uint i; i < requests.length; ++i) {\\n\\t\\t\\tAdRequest memory request = requests[i];\\n\\t\\t\\tif (request.blockLimit < blockHeight) {\\n\\t\\t\\t\\tremovals = removals.append(i);\\n\\t\\t\\t\\tcontinue;\\n\\t\\t\\t}\\n\\t\\t\\tbytes memory paymentBundle = Suave.confidentialRetrieve(request.paymentBidId, PB_NAMESPACE);\\n\\t\\t\\t(bool success, uint64 egp) = simulateBundleSafe(paymentBundle);\\n\\t\\t\\tif (!success || egp == 0) {\\n\\t\\t\\t\\tremovals = removals.append(i);\\n\\t\\t\\t} else if (egp > bestOffer.egp) {\\n\\t\\t\\t\\tbestOffer = Offer(request.id, request.extra, egp, paymentBundle);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\tfunction storeBundleInPool(uint64 blockHeight, Offer memory bestOffer) internal view {\\n\\t\\taddress[] memory allowedPeekers = new address[](3);\\n\\t\\tallowedPeekers[0] = address(builder);\\n\\t\\tallowedPeekers[1] = Suave.BUILD_ETH_BLOCK;\\n\\t\\tallowedPeekers[2] = address(this);\\n\\t\\tSuave.Bid memory paymentBundleBid = Suave.newBid(blockHeight, allowedPeekers, allowedPeekers, EB_NAMESPACE);\\n\\t\\tSuave.confidentialStore(paymentBundleBid.id, EB_NAMESPACE, bestOffer.paymentBundle);\\n\\t\\tSuave.confidentialStore(paymentBundleBid.id, EB_SIM_NAMESPACE, abi.encode(bestOffer.egp));\\n\\t}\\n}\\n\",\"keccak256\":\"0x42c9cd08164b1180ce72b9dc4bce2583eeafb0ae6338cab77c46003ac30ded32\",\"license\":\"MIT\"},\"contracts/blockad/lib/ConfidentialControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Author: Miha Lotric (halo3mic)\\n\\npragma solidity ^0.8.8;\\n\\nimport { SuaveContract, Suave } from \\\"./SuaveContract.sol\\\";\\n\\n\\nabstract contract ConfidentialControl is SuaveContract {\\n\\tstruct UnlockArgs {\\n\\t\\tbytes32 key;\\n\\t\\tbytes32 nextHash;\\n\\t}\\n\\n\\tmodifier unlock(UnlockArgs calldata unlockPair) {\\n\\t\\tcrequire(isValidKey(unlockPair.key), \\\"Invalid key\\\");\\n\\t\\t_;\\n\\t\\tpresentHash = unlockPair.nextHash;\\n\\t\\tnonce++;\\n\\t}\\n\\n\\tstring internal constant S_NAMESPACE = \\\"blockad:v0:secret\\\";\\n\\tSuave.BidId internal secretBidId;\\n\\tbytes32 internal presentHash;\\n\\tuint internal nonce;\\n\\n\\t/**********************************************************************\\n\\t * \\u26d3\\ufe0f ON-CHAIN METHODS *\\n\\t ***********************************************************************/\\n\\n\\tfunction ccCallback(bytes32 nextHash, Suave.BidId sBidId) external {\\n\\t\\tcrequire(!isInitialized(), \\\"Already initialized\\\");\\n\\t\\tpresentHash = nextHash;\\n\\t\\tsecretBidId = sBidId;\\n\\t}\\n\\n\\tfunction isInitialized() public view returns (bool) {\\n\\t\\treturn presentHash != 0;\\n\\t}\\n\\n\\t/**********************************************************************\\n\\t * \\ud83d\\udd12 CONFIDENTIAL METHODS *\\n\\t ***********************************************************************/\\n\\n\\tfunction confidentialConstructor() public view virtual onlyConfidential returns (bytes memory) {\\n\\t\\tcrequire(!isInitialized(), \\\"Already initialized\\\");\\n\\t\\tbytes memory secret = Suave.confidentialInputs();\\n\\t\\tSuave.BidId sBidId = storeSecret(secret);\\n\\t\\tbytes32 nextHash = makeHash(abi.decode(secret, (bytes32)), nonce);\\n\\t\\treturn abi.encodeWithSelector(this.ccCallback.selector, nextHash, sBidId);\\n\\t}\\n\\n\\t/**********************************************************************\\n\\t * \\ud83d\\udee0\\ufe0f INTERNAL METHODS *\\n\\t ***********************************************************************/\\n\\n\\tfunction storeSecret(bytes memory secret) internal view returns (Suave.BidId) {\\n\\t\\taddress[] memory peekers = new address[](3);\\n\\t\\tpeekers[0] = address(this);\\n\\t\\tpeekers[1] = Suave.FETCH_BIDS;\\n\\t\\tpeekers[2] = Suave.CONFIDENTIAL_RETRIEVE;\\n\\t\\tSuave.Bid memory secretBid = Suave.newBid(0, peekers, peekers, S_NAMESPACE);\\n\\t\\tSuave.confidentialStore(secretBid.id, S_NAMESPACE, secret);\\n\\t\\treturn secretBid.id;\\n\\t}\\n\\n\\tfunction isValidKey(bytes32 key) internal view returns (bool) {\\n\\t\\treturn keccak256(abi.encode(key)) == presentHash;\\n\\t}\\n\\n\\tfunction getUnlockPair() internal view returns (UnlockArgs memory) {\\n\\t\\treturn UnlockArgs(getKey(nonce), getHash(nonce + 1));\\n\\t}\\n\\n\\tfunction getHash(uint _nonce) internal view returns (bytes32) {\\n\\t\\treturn keccak256(abi.encode(getKey(_nonce)));\\n\\t}\\n\\n\\tfunction getKey(uint _nonce) internal view returns (bytes32) {\\n\\t\\treturn makeKey(getSecret(), _nonce);\\n\\t}\\n\\n\\tfunction makeHash(bytes32 secret, uint _nonce) internal pure returns (bytes32) {\\n\\t\\treturn keccak256(abi.encode(makeKey(secret, _nonce)));\\n\\t}\\n\\n\\tfunction makeKey(bytes32 secret, uint _nonce) internal pure returns (bytes32) {\\n\\t\\treturn keccak256(abi.encode(secret, _nonce));\\n\\t}\\n\\n\\tfunction getSecret() internal view returns (bytes32) {\\n\\t\\tbytes memory secretB = Suave.confidentialRetrieve(secretBidId, S_NAMESPACE);\\n\\t\\treturn abi.decode(secretB, (bytes32));\\n\\t}\\n}\\n\",\"keccak256\":\"0x6fdfea1e6ff1ed99e9e5029d42aaea2b620463e67c5903b7d34743ccdc30e4b0\",\"license\":\"MIT\"},\"contracts/blockad/lib/SuaveContract.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Author: Miha Lotric (halo3mic)\\n\\npragma solidity ^0.8.8;\\n\\nimport { Suave } from \\\"../../standard_peekers/bids.sol\\\";\\n\\n\\nabstract contract SuaveContract {\\n\\terror SuaveError(string message);\\n\\n\\tmodifier onlyConfidential() {\\n\\t\\tcrequire(Suave.isConfidential(), \\\"Not confidential\\\");\\n\\t\\t_;\\n\\t}\\n\\n\\tfunction simulateBundleSafe(bytes memory bundle) internal view returns (bool valid, uint64 egp) {\\n\\t\\t(bool success, bytes memory d) = Suave.SIMULATE_BUNDLE.staticcall{ gas: 20_000 }(abi.encode(bundle));\\n\\t\\tif (success) {\\n\\t\\t\\treturn (true, abi.decode(d, (uint64)));\\n\\t\\t}\\n\\t}\\n\\n\\tfunction crequire(bool condition, string memory message) internal pure {\\n\\t\\tif (!condition) {\\n\\t\\t\\trevert SuaveError(message);\\n\\t\\t}\\n\\t}\\n}\\n\",\"keccak256\":\"0x0ec3f84a12a03aa8ff9f0ba9080506f2f29c7037f43b127860bc1a95a8aa79c5\",\"license\":\"MIT\"},\"contracts/blockad/lib/Utils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.8;\\n\\n\\nlibrary DynamicUintArray {\\n\\tfunction append(bytes memory a, uint e) internal pure returns (bytes memory) {\\n\\t\\treturn bytes.concat(a, TypeConversion.toBytes(e));\\n\\t}\\n\\n\\tfunction export(bytes memory a) internal pure returns (uint[] memory) {\\n\\t\\treturn TypeConversion.toUints(a);\\n\\t}\\n}\\n\\nlibrary TypeConversion {\\n\\tfunction toBytes(uint x) internal pure returns (bytes memory y) {\\n\\t\\ty = new bytes(32);\\n\\t\\tassembly {\\n\\t\\t\\tmstore(add(y, 32), x)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction toUint(bytes memory x, uint offset) internal pure returns (uint y) {\\n\\t\\tassembly {\\n\\t\\t\\ty := mload(add(x, offset))\\n\\t\\t}\\n\\t}\\n\\n\\tfunction toUints(bytes memory xs) internal pure returns (uint[] memory ys) {\\n\\t\\tys = new uint[](xs.length / 32);\\n\\t\\tfor (uint i = 0; i < xs.length / 32; i++) {\\n\\t\\t\\tys[i] = toUint(xs, i * 32 + 32);\\n\\t\\t}\\n\\t}\\n}\\n\",\"keccak256\":\"0xec09eed9c1d6d24228b0473b9614be28b428ed832808ac3a75ffbcb444ac54af\",\"license\":\"MIT\"},\"contracts/libraries/Suave.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.8;\\n\\nlibrary Suave {\\n error PeekerReverted(address, bytes);\\n\\n type BidId is bytes16;\\n\\n struct Bid {\\n BidId id;\\n BidId salt;\\n uint64 decryptionCondition;\\n address[] allowedPeekers;\\n address[] allowedStores;\\n string version;\\n }\\n\\n struct BuildBlockArgs {\\n uint64 slot;\\n bytes proposerPubkey;\\n bytes32 parent;\\n uint64 timestamp;\\n address feeRecipient;\\n uint64 gasLimit;\\n bytes32 random;\\n Withdrawal[] withdrawals;\\n bytes extra;\\n }\\n\\n struct Withdrawal {\\n uint64 index;\\n uint64 validator;\\n address Address;\\n uint64 amount;\\n }\\n\\n address public constant ANYALLOWED = 0xC8df3686b4Afb2BB53e60EAe97EF043FE03Fb829;\\n\\n address public constant IS_CONFIDENTIAL_ADDR = 0x0000000000000000000000000000000042010000;\\n\\n address public constant BUILD_ETH_BLOCK = 0x0000000000000000000000000000000042100001;\\n\\n address public constant CONFIDENTIAL_INPUTS = 0x0000000000000000000000000000000042010001;\\n\\n address public constant CONFIDENTIAL_RETRIEVE = 0x0000000000000000000000000000000042020001;\\n\\n address public constant CONFIDENTIAL_STORE = 0x0000000000000000000000000000000042020000;\\n\\n address public constant ETHCALL = 0x0000000000000000000000000000000042100003;\\n\\n address public constant EXTRACT_HINT = 0x0000000000000000000000000000000042100037;\\n\\n address public constant FETCH_BIDS = 0x0000000000000000000000000000000042030001;\\n\\n address public constant FILL_MEV_SHARE_BUNDLE = 0x0000000000000000000000000000000043200001;\\n\\n address public constant NEW_BID = 0x0000000000000000000000000000000042030000;\\n\\n address public constant SIGN_ETH_TRANSACTION = 0x0000000000000000000000000000000040100001;\\n\\n address public constant SIMULATE_BUNDLE = 0x0000000000000000000000000000000042100000;\\n\\n address public constant SUBMIT_BUNDLE_JSON_RPC = 0x0000000000000000000000000000000043000001;\\n\\n address public constant SUBMIT_ETH_BLOCK_BID_TO_RELAY = 0x0000000000000000000000000000000042100002;\\n\\n // Returns whether execution is off- or on-chain\\n function isConfidential() internal view returns (bool b) {\\n (bool success, bytes memory isConfidentialBytes) = IS_CONFIDENTIAL_ADDR.staticcall(\\\"\\\");\\n if (!success) {\\n revert PeekerReverted(IS_CONFIDENTIAL_ADDR, isConfidentialBytes);\\n }\\n assembly {\\n // Load the length of data (first 32 bytes)\\n let len := mload(isConfidentialBytes)\\n // Load the data after 32 bytes, so add 0x20\\n b := mload(add(isConfidentialBytes, 0x20))\\n }\\n }\\n\\n function buildEthBlock(BuildBlockArgs memory blockArgs, BidId bidId, string memory namespace)\\n internal\\n view\\n returns (bytes memory, bytes memory)\\n {\\n (bool success, bytes memory data) = BUILD_ETH_BLOCK.staticcall(abi.encode(blockArgs, bidId, namespace));\\n if (!success) {\\n revert PeekerReverted(BUILD_ETH_BLOCK, data);\\n }\\n\\n return abi.decode(data, (bytes, bytes));\\n }\\n\\n function confidentialInputs() internal view returns (bytes memory) {\\n (bool success, bytes memory data) = CONFIDENTIAL_INPUTS.staticcall(abi.encode());\\n if (!success) {\\n revert PeekerReverted(CONFIDENTIAL_INPUTS, data);\\n }\\n\\n return data;\\n }\\n\\n function confidentialRetrieve(BidId bidId, string memory key) internal view returns (bytes memory) {\\n (bool success, bytes memory data) = CONFIDENTIAL_RETRIEVE.staticcall(abi.encode(bidId, key));\\n if (!success) {\\n revert PeekerReverted(CONFIDENTIAL_RETRIEVE, data);\\n }\\n\\n return data;\\n }\\n\\n function confidentialStore(BidId bidId, string memory key, bytes memory data1) internal view {\\n (bool success, bytes memory data) = CONFIDENTIAL_STORE.staticcall(abi.encode(bidId, key, data1));\\n if (!success) {\\n revert PeekerReverted(CONFIDENTIAL_STORE, data);\\n }\\n }\\n\\n function ethcall(address contractAddr, bytes memory input1) internal view returns (bytes memory) {\\n (bool success, bytes memory data) = ETHCALL.staticcall(abi.encode(contractAddr, input1));\\n if (!success) {\\n revert PeekerReverted(ETHCALL, data);\\n }\\n\\n return abi.decode(data, (bytes));\\n }\\n\\n function extractHint(bytes memory bundleData) internal view returns (bytes memory) {\\n require(isConfidential());\\n (bool success, bytes memory data) = EXTRACT_HINT.staticcall(abi.encode(bundleData));\\n if (!success) {\\n revert PeekerReverted(EXTRACT_HINT, data);\\n }\\n\\n return data;\\n }\\n\\n function fetchBids(uint64 cond, string memory namespace) internal view returns (Bid[] memory) {\\n (bool success, bytes memory data) = FETCH_BIDS.staticcall(abi.encode(cond, namespace));\\n if (!success) {\\n revert PeekerReverted(FETCH_BIDS, data);\\n }\\n\\n return abi.decode(data, (Bid[]));\\n }\\n\\n function fillMevShareBundle(BidId bidId) internal view returns (bytes memory) {\\n require(isConfidential());\\n (bool success, bytes memory data) = FILL_MEV_SHARE_BUNDLE.staticcall(abi.encode(bidId));\\n if (!success) {\\n revert PeekerReverted(FILL_MEV_SHARE_BUNDLE, data);\\n }\\n\\n return data;\\n }\\n\\n function newBid(\\n uint64 decryptionCondition,\\n address[] memory allowedPeekers,\\n address[] memory allowedStores,\\n string memory bidType\\n ) internal view returns (Bid memory) {\\n (bool success, bytes memory data) =\\n NEW_BID.staticcall(abi.encode(decryptionCondition, allowedPeekers, allowedStores, bidType));\\n if (!success) {\\n revert PeekerReverted(NEW_BID, data);\\n }\\n\\n return abi.decode(data, (Bid));\\n }\\n\\n function signEthTransaction(bytes memory txn, string memory chainId, string memory signingKey)\\n internal\\n view\\n returns (bytes memory)\\n {\\n (bool success, bytes memory data) = SIGN_ETH_TRANSACTION.staticcall(abi.encode(txn, chainId, signingKey));\\n if (!success) {\\n revert PeekerReverted(SIGN_ETH_TRANSACTION, data);\\n }\\n\\n return abi.decode(data, (bytes));\\n }\\n\\n function simulateBundle(bytes memory bundleData) internal view returns (uint64) {\\n (bool success, bytes memory data) = SIMULATE_BUNDLE.staticcall(abi.encode(bundleData));\\n if (!success) {\\n revert PeekerReverted(SIMULATE_BUNDLE, data);\\n }\\n\\n return abi.decode(data, (uint64));\\n }\\n\\n function submitBundleJsonRPC(string memory url, string memory method, bytes memory params)\\n internal\\n view\\n returns (bytes memory)\\n {\\n require(isConfidential());\\n (bool success, bytes memory data) = SUBMIT_BUNDLE_JSON_RPC.staticcall(abi.encode(url, method, params));\\n if (!success) {\\n revert PeekerReverted(SUBMIT_BUNDLE_JSON_RPC, data);\\n }\\n\\n return data;\\n }\\n\\n function submitEthBlockBidToRelay(string memory relayUrl, bytes memory builderBid)\\n internal\\n view\\n returns (bytes memory)\\n {\\n require(isConfidential());\\n (bool success, bytes memory data) = SUBMIT_ETH_BLOCK_BID_TO_RELAY.staticcall(abi.encode(relayUrl, builderBid));\\n if (!success) {\\n revert PeekerReverted(SUBMIT_ETH_BLOCK_BID_TO_RELAY, data);\\n }\\n\\n return data;\\n }\\n}\\n\",\"keccak256\":\"0xfe780feb2dda2367a98f438a860a70a9b1b5805d97d95e5c830f4b0fe19eb210\",\"license\":\"UNLICENSED\"},\"contracts/standard_peekers/bids.sol\":{\"content\":\"pragma solidity ^0.8.8;\\n\\nimport \\\"../libraries/Suave.sol\\\";\\n\\ncontract AnyBidContract {\\n\\n\\tevent BidEvent(\\n\\t\\tSuave.BidId bidId,\\n\\t\\tuint64 decryptionCondition,\\n\\t\\taddress[] allowedPeekers\\n\\t);\\n\\n\\tfunction fetchBidConfidentialBundleData() public returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\t\\t\\n\\t\\tbytes memory confidentialInputs = Suave.confidentialInputs();\\n\\t\\treturn abi.decode(confidentialInputs, (bytes));\\n\\t}\\n\\n\\t// Bids to this contract should not be trusted!\\n\\tfunction emitBid(Suave.Bid calldata bid) public {\\n\\t\\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\\n\\t}\\n}\\n\\ncontract BundleBidContract is AnyBidContract {\\n\\n\\tfunction newBid(uint64 decryptionCondition, address[] memory bidAllowedPeekers, address[] memory bidAllowedStores) external payable returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\n\\t\\tbytes memory bundleData = this.fetchBidConfidentialBundleData();\\n\\n\\t\\tuint64 egp = Suave.simulateBundle(bundleData);\\n\\n\\t\\tSuave.Bid memory bid = Suave.newBid(decryptionCondition, bidAllowedPeekers, bidAllowedStores, \\\"default:v0:ethBundles\\\");\\n\\n\\t\\tSuave.confidentialStore(bid.id, \\\"default:v0:ethBundles\\\", bundleData);\\n\\t\\tSuave.confidentialStore(bid.id, \\\"default:v0:ethBundleSimResults\\\", abi.encode(egp));\\n\\n\\t\\treturn emitAndReturn(bid, bundleData);\\n\\t}\\n\\n\\tfunction emitAndReturn(Suave.Bid memory bid, bytes memory) internal virtual returns (bytes memory) {\\n\\t\\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\\n\\t\\treturn bytes.concat(this.emitBid.selector, abi.encode(bid));\\n\\t}\\n}\\n\\ncontract EthBundleSenderContract is BundleBidContract {\\n\\tstring[] public builderUrls;\\n\\n\\tconstructor(string[] memory builderUrls_) {\\n\\t\\tbuilderUrls = builderUrls_;\\n\\t}\\n\\n\\tfunction emitAndReturn(Suave.Bid memory bid, bytes memory bundleData) internal virtual override returns (bytes memory) {\\n\\t\\tfor (uint i = 0; i < builderUrls.length; i++) {\\n\\t\\t\\tSuave.submitBundleJsonRPC(builderUrls[i], \\\"eth_sendBundle\\\", bundleData);\\n\\t\\t}\\n\\n\\t\\treturn BundleBidContract.emitAndReturn(bid, bundleData);\\n\\t}\\n}\\n\\ncontract MevShareBidContract is AnyBidContract {\\n\\n\\tevent HintEvent(\\n\\t\\tSuave.BidId bidId,\\n\\t\\tbytes hint\\n\\t);\\n\\n\\tevent MatchEvent(\\n\\t\\tSuave.BidId matchBidId,\\n\\t\\tbytes matchHint\\n\\t);\\n\\n\\tfunction newBid(uint64 decryptionCondition, address[] memory bidAllowedPeekers, address[] memory bidAllowedStores) external payable returns (bytes memory) {\\n\\t\\t// 0. check confidential execution\\n\\t\\trequire(Suave.isConfidential());\\n\\n\\t\\t// 1. fetch bundle data\\n\\t\\tbytes memory bundleData = this.fetchBidConfidentialBundleData();\\n\\n\\t\\t// 2. sim bundle\\n\\t\\tuint64 egp = Suave.simulateBundle(bundleData);\\n\\t\\t\\n\\t\\t// 3. extract hint\\n\\t\\tbytes memory hint = Suave.extractHint(bundleData);\\n\\t\\t\\n\\t\\t// // 4. store bundle and sim results\\n\\t\\tSuave.Bid memory bid = Suave.newBid(decryptionCondition, bidAllowedPeekers, bidAllowedStores, \\\"mevshare:v0:unmatchedBundles\\\");\\n\\t\\tSuave.confidentialStore(bid.id, \\\"mevshare:v0:ethBundles\\\", bundleData);\\n\\t\\tSuave.confidentialStore(bid.id, \\\"mevshare:v0:ethBundleSimResults\\\", abi.encode(egp));\\n\\t\\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\\n\\t\\temit HintEvent(bid.id, hint);\\n\\n\\t\\t// // 5. return \\\"callback\\\" to emit hint onchain\\n\\t\\treturn bytes.concat(this.emitBidAndHint.selector, abi.encode(bid, hint));\\n\\t}\\n\\n\\tfunction emitBidAndHint(Suave.Bid calldata bid, bytes memory hint) public {\\n\\t\\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\\n\\t\\temit HintEvent(bid.id, hint);\\n\\t}\\n\\n\\tfunction newMatch(uint64 decryptionCondition, address[] memory bidAllowedPeekers, address[] memory bidAllowedStores, Suave.BidId shareBidId) external payable returns (bytes memory) {\\n\\t\\t// WARNING : this function will copy the original mev share bid\\n\\t\\t// into a new key with potentially different permsissions\\n\\t\\t\\n\\t\\trequire(Suave.isConfidential());\\n\\t\\t// 1. fetch confidential data\\n\\t\\tbytes memory matchBundleData = this.fetchBidConfidentialBundleData();\\n\\n\\t\\t// 2. sim match alone for validity\\n\\t\\tuint64 egp = Suave.simulateBundle(matchBundleData);\\n\\n\\t\\t// 3. extract hint\\n\\t\\tbytes memory matchHint = Suave.extractHint(matchBundleData);\\n\\t\\t\\n\\t\\tSuave.Bid memory bid = Suave.newBid(decryptionCondition, bidAllowedPeekers, bidAllowedStores, \\\"mevshare:v0:matchBids\\\");\\n\\t\\tSuave.confidentialStore(bid.id, \\\"mevshare:v0:ethBundles\\\", matchBundleData);\\n\\t\\tSuave.confidentialStore(bid.id, \\\"mevshare:v0:ethBundleSimResults\\\", abi.encode(0));\\n\\n\\t\\t//4. merge bids\\n\\t\\tSuave.BidId[] memory bids = new Suave.BidId[](2);\\n\\t\\tbids[0] = shareBidId;\\n\\t\\tbids[1] = bid.id;\\n\\t\\tSuave.confidentialStore(bid.id, \\\"mevshare:v0:mergedBids\\\", abi.encode(bids));\\n\\n\\t\\treturn emitMatchBidAndHint(bid, matchHint);\\n\\t}\\n\\n\\tfunction emitMatchBidAndHint(Suave.Bid memory bid, bytes memory matchHint) internal virtual returns (bytes memory) {\\n\\t\\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\\n\\t\\temit MatchEvent(bid.id, matchHint);\\n\\n\\t\\treturn bytes.concat(this.emitBid.selector, abi.encode(bid));\\n\\t}\\n}\\n\\ncontract MevShareBundleSenderContract is MevShareBidContract {\\n\\tstring[] public builderUrls;\\n\\n\\tconstructor(string[] memory builderUrls_) {\\n\\t\\tbuilderUrls = builderUrls_;\\n\\t}\\n\\n\\tfunction emitMatchBidAndHint(Suave.Bid memory bid, bytes memory matchHint) internal virtual override returns (bytes memory) {\\n\\t\\tbytes memory bundleData = Suave.fillMevShareBundle(bid.id);\\n\\t\\tfor (uint i = 0; i < builderUrls.length; i++) {\\n\\t\\t\\tSuave.submitBundleJsonRPC(builderUrls[i], \\\"mev_sendBundle\\\", bundleData);\\n\\t\\t}\\n\\n\\t\\treturn MevShareBidContract.emitMatchBidAndHint(bid, matchHint);\\n\\t}\\n}\\n\\n/* Not tested or implemented on the precompile side */\\nstruct EgpBidPair {\\n\\tuint64 egp; // in wei, beware overflow\\n\\tSuave.BidId bidId;\\n}\\n\\n// todo: instead of inherit interact with deployed builder contract\\ncontract EthBlockBidContract is AnyBidContract {\\n\\n\\tevent BuilderBoostBidEvent(\\n\\t\\tSuave.BidId bidId,\\n\\t\\tbytes builderBid\\n\\t);\\n\\t\\n\\tfunction idsEqual(Suave.BidId _l, Suave.BidId _r) public pure returns (bool) {\\n\\t\\tbytes memory l = abi.encodePacked(_l);\\n\\t\\tbytes memory r = abi.encodePacked(_r);\\n\\t\\tfor (uint i = 0; i < l.length; i++) {\\n\\t\\t\\tif (bytes(l)[i] != r[i]) {\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn true;\\n\\t}\\n\\n\\tfunction buildMevShare(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight) public virtual returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\t\\tSuave.Bid[] memory allShareMatchBids = Suave.fetchBids(blockHeight, \\\"mevshare:v0:matchBids\\\");\\n\\t\\tSuave.Bid[] memory allShareUserBids = Suave.fetchBids(blockHeight, \\\"mevshare:v0:unmatchedBundles\\\");\\n\\n\\t\\tif (allShareUserBids.length == 0) {\\n\\t\\t\\trevert Suave.PeekerReverted(address(this), \\\"no bids\\\");\\n\\t\\t}\\n\\n\\t\\tSuave.Bid[] memory allBids = new Suave.Bid[](allShareUserBids.length);\\n\\t\\tfor (uint i = 0; i < allShareUserBids.length; i++) {\\n\\t\\t\\t// TODO: sort matches by egp first!\\n\\t\\t\\tSuave.Bid memory bidToInsert = allShareUserBids[i]; // will be updated with the best match if any\\n\\t\\t\\tfor (uint j = 0; j < allShareMatchBids.length; j++) {\\n\\t\\t\\t\\t// TODO: should be done once at the start and sorted\\n\\t\\t\\t\\tSuave.BidId[] memory mergedBidIds = abi.decode(Suave.confidentialRetrieve(allShareMatchBids[j].id, \\\"mevshare:v0:mergedBids\\\"), (Suave.BidId[]));\\n\\t\\t\\t\\tif (idsEqual(mergedBidIds[0], allShareUserBids[i].id)) {\\n\\t\\t\\t\\t\\tbidToInsert = allShareMatchBids[j];\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\tallBids[i] = bidToInsert;\\n\\t\\t}\\n\\n\\t\\tEgpBidPair[] memory bidsByEGP = new EgpBidPair[](allBids.length);\\n\\t\\tfor (uint i = 0; i < allBids.length; i++) {\\n\\t\\t\\tbytes memory simResults = Suave.confidentialRetrieve(allBids[i].id, \\\"mevshare:v0:ethBundleSimResults\\\");\\n\\t\\t\\tuint64 egp = abi.decode(simResults, (uint64));\\n\\t\\t\\tbidsByEGP[i] = EgpBidPair(egp, allBids[i].id);\\n\\t\\t}\\n\\n\\t\\t// Bubble sort, cause why not\\n\\t\\tuint n = bidsByEGP.length;\\n\\t\\tfor (uint i = 0; i < n - 1; i++) {\\n\\t\\t\\tfor (uint j = i + 1; j < n; j++) {\\n\\t\\t\\t\\tif (bidsByEGP[i].egp < bidsByEGP[j].egp) {\\n\\t\\t\\t\\t\\tEgpBidPair memory temp = bidsByEGP[i];\\n\\t\\t\\t\\t\\tbidsByEGP[i] = bidsByEGP[j];\\n\\t\\t\\t\\t\\tbidsByEGP[j] = temp;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tSuave.BidId[] memory allBidIds = new Suave.BidId[](allBids.length);\\n\\t\\tfor (uint i = 0; i < bidsByEGP.length; i++) {\\n\\t\\t\\tallBidIds[i] = bidsByEGP[i].bidId;\\n\\t\\t}\\n\\n\\t\\treturn buildAndEmit(blockArgs, blockHeight, allBidIds, \\\"mevshare:v0\\\");\\n\\t}\\n\\n\\tfunction buildFromPool(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight) public returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\n\\t\\tSuave.Bid[] memory allBids = Suave.fetchBids(blockHeight, \\\"default:v0:ethBundles\\\");\\n\\t\\tif (allBids.length == 0) {\\n\\t\\t\\trevert Suave.PeekerReverted(address(this), \\\"no bids\\\");\\n\\t\\t}\\n\\n\\t\\tEgpBidPair[] memory bidsByEGP = new EgpBidPair[](allBids.length);\\n\\t\\tfor (uint i = 0; i < allBids.length; i++) {\\n\\t\\t\\tbytes memory simResults = Suave.confidentialRetrieve(allBids[i].id, \\\"default:v0:ethBundleSimResults\\\");\\n\\t\\t\\tuint64 egp = abi.decode(simResults, (uint64));\\n\\t\\t\\tbidsByEGP[i] = EgpBidPair(egp, allBids[i].id);\\n\\t\\t}\\n\\n\\t\\t// Bubble sort, cause why not\\n\\t\\tuint n = bidsByEGP.length;\\n\\t\\tfor (uint i = 0; i < n - 1; i++) {\\n\\t\\t\\tfor (uint j = i + 1; j < n; j++) {\\n\\t\\t\\t\\tif (bidsByEGP[i].egp < bidsByEGP[j].egp) {\\n\\t\\t\\t\\t\\tEgpBidPair memory temp = bidsByEGP[i];\\n\\t\\t\\t\\t\\tbidsByEGP[i] = bidsByEGP[j];\\n\\t\\t\\t\\t\\tbidsByEGP[j] = temp;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tSuave.BidId[] memory allBidIds = new Suave.BidId[](allBids.length);\\n\\t\\tfor (uint i = 0; i < bidsByEGP.length; i++) {\\n\\t\\t\\tallBidIds[i] = bidsByEGP[i].bidId;\\n\\t\\t}\\n\\n\\t\\treturn buildAndEmit(blockArgs, blockHeight, allBidIds, \\\"\\\");\\n\\t}\\n\\n\\tfunction buildAndEmit(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight, Suave.BidId[] memory bids, string memory namespace) public virtual returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\n\\t\\t(Suave.Bid memory blockBid, bytes memory builderBid) = this.doBuild(blockArgs, blockHeight, bids, namespace);\\n\\n\\t\\temit BuilderBoostBidEvent(blockBid.id, builderBid);\\n\\t\\temit BidEvent(blockBid.id, blockBid.decryptionCondition, blockBid.allowedPeekers);\\n\\t\\treturn bytes.concat(this.emitBuilderBidAndBid.selector, abi.encode(blockBid, builderBid));\\n\\t}\\n\\n\\tfunction doBuild(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight, Suave.BidId[] memory bids, string memory namespace) public view returns (Suave.Bid memory, bytes memory) {\\n\\t\\taddress[] memory allowedPeekers = new address[](2);\\n\\t\\tallowedPeekers[0] = address(this);\\n\\t\\tallowedPeekers[1] = Suave.BUILD_ETH_BLOCK;\\n\\n\\t\\tSuave.Bid memory blockBid = Suave.newBid(blockHeight, allowedPeekers, allowedPeekers, \\\"default:v0:mergedBids\\\");\\n\\t\\tSuave.confidentialStore(blockBid.id, \\\"default:v0:mergedBids\\\", abi.encode(bids));\\n\\t\\t \\n\\t\\t(bytes memory builderBid, bytes memory payload) = Suave.buildEthBlock(blockArgs, blockBid.id, namespace);\\n\\t\\tSuave.confidentialStore(blockBid.id, \\\"default:v0:builderPayload\\\", payload); // only through this.unlock\\n\\n\\t\\treturn (blockBid, builderBid);\\n\\t}\\n\\n\\tfunction emitBuilderBidAndBid(Suave.Bid memory bid, bytes memory builderBid) public returns (Suave.Bid memory, bytes memory) {\\n\\t\\temit BuilderBoostBidEvent(bid.id, builderBid);\\n\\t\\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\\n\\t\\treturn (bid, builderBid);\\n\\t}\\n\\n\\tfunction unlock(Suave.BidId bidId, bytes memory signedBlindedHeader) public view returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\n\\t\\t// TODO: verify the header is correct\\n\\t\\t// TODO: incorporate protocol name\\n\\t\\tbytes memory payload = Suave.confidentialRetrieve(bidId, \\\"default:v0:builderPayload\\\");\\n\\t\\treturn payload;\\n\\t}\\n}\\n\\ncontract EthBlockBidSenderContract is EthBlockBidContract {\\n\\tstring boostRelayUrl;\\n\\n\\tconstructor(string memory boostRelayUrl_) {\\n\\t\\tboostRelayUrl = boostRelayUrl_;\\n\\t}\\n\\n\\tfunction buildAndEmit(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight, Suave.BidId[] memory bids, string memory namespace) public virtual override returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\n\\t\\t(Suave.Bid memory blockBid, bytes memory builderBid) = this.doBuild(blockArgs, blockHeight, bids, namespace);\\n\\t\\tSuave.submitEthBlockBidToRelay(boostRelayUrl, builderBid);\\n\\n\\t\\temit BidEvent(blockBid.id, blockBid.decryptionCondition, blockBid.allowedPeekers);\\n\\t\\treturn bytes.concat(this.emitBid.selector, abi.encode(blockBid));\\n\\t}\\n}\\n\",\"keccak256\":\"0xdc53e0e48d02cd3565889503fb7413966aa8fdee19c4326c84bc15a0a723aa3c\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506040516200836438038062008364833981810160405281019062000037919062000262565b806040516200004690620000b7565b62000052919062000310565b604051809103906000f0801580156200006f573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505062000334565b613e1f806200454583390190565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200012e82620000e3565b810181811067ffffffffffffffff8211171562000150576200014f620000f4565b5b80604052505050565b600062000165620000c5565b905062000173828262000123565b919050565b600067ffffffffffffffff821115620001965762000195620000f4565b5b620001a182620000e3565b9050602081019050919050565b60005b83811015620001ce578082015181840152602081019050620001b1565b83811115620001de576000848401525b50505050565b6000620001fb620001f58462000178565b62000159565b9050828152602081018484840111156200021a5762000219620000de565b5b62000227848285620001ae565b509392505050565b600082601f830112620002475762000246620000d9565b5b815162000259848260208601620001e4565b91505092915050565b6000602082840312156200027b576200027a620000cf565b5b600082015167ffffffffffffffff8111156200029c576200029b620000d4565b5b620002aa848285016200022f565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000620002dc82620002b3565b620002e88185620002be565b9350620002fa818560208601620001ae565b6200030581620000e3565b840191505092915050565b600060208201905081810360008301526200032c8184620002cf565b905092915050565b61420180620003446000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c806392f07a581161008c578063d7e84fbf11610066578063d7e84fbf14610203578063ee2cc36414610221578063fd38f21d1461023d578063ffbbfcb01461026d576100cf565b806392f07a58146101ad578063bb7bae0a146101cb578063c0b9d287146101e7576100cf565b8063392e53cd146100d457806360727f8e146100f257806361b8ce8c1461012257806364e65a62146101405780637e48532c1461015c57806381d12c581461017a575b600080fd5b6100dc61028b565b6040516100e99190612283565b60405180910390f35b61010c6004803603810190610107919061274a565b61029b565b604051610119919061282e565b60405180910390f35b61012a61051b565b6040516101379190612869565b60405180910390f35b61015a600480360381019061015591906128a8565b610521565b005b6101646105e8565b604051610171919061282e565b60405180910390f35b610194600480360381019061018f919061298f565b61063d565b6040516101a49493929190612a5e565b60405180910390f35b6101b5610705565b6040516101c2919061282e565b60405180910390f35b6101e560048036038101906101e09190612ad6565b61073e565b005b61020160048036038101906101fc9190612b35565b6107aa565b005b61020b610821565b6040516102189190612bdd565b60405180910390f35b61023b60048036038101906102369190612c17565b610847565b005b61025760048036038101906102529190612d14565b610960565b604051610264919061282e565b60405180910390f35b610275610b61565b6040516102829190612869565b60405180910390f35b60008060001b6001541415905090565b60606102e36102a8610b6e565b6040518060400160405280601081526020017f4e6f7420636f6e666964656e7469616c00000000000000000000000000000000815250610c36565b61032a6000600480549050116040518060400160405280600b81526020017f4e6f207265717565737473000000000000000000000000000000000000000000815250610c36565b6000806103408467ffffffffffffffff16610c7c565b915091506103946000836040015167ffffffffffffffff16116040518060400160405280600f81526020017f4e6f2076616c6964206f66666572730000000000000000000000000000000000815250610c36565b61039e8483610ec4565b81602001518561010001819052506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663346ab17587876040518363ffffffff1660e01b815260040161040b929190612fcd565b600060405180830381600087803b15801561042557600080fd5b505af1158015610439573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610462919061306d565b90506364e65a6260e01b81846000015185604001516040516020016104889291906130b6565b604051602081830303815290604052846104a061111f565b6040516024016104b3949392919061310e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050935050505092915050565b60055481565b8061056d6105328260000135611161565b6040518060400160405280600b81526020017f496e76616c6964206b6579000000000000000000000000000000000000000000815250610c36565b61057684611195565b6000835111156105925761059161058c846111ee565b611200565b5b6105be600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16866113cb565b8060200135600181905550600260008154809291906105dc90613197565b91905055505050505050565b60606106306105f5610b6e565b6040518060400160405280601081526020017f4e6f7420636f6e666964656e7469616c00000000000000000000000000000000815250610c36565b61063861147c565b905090565b6004818154811061064d57600080fd5b90600052602060002090600402016000915090508060000154908060010180546106769061320f565b80601f01602080910402602001604051908101604052809291908181526020018280546106a29061320f565b80156106ef5780601f106106c4576101008083540402835291602001916106ef565b820191906000526020600020905b8154815290600101906020018083116106d257829003601f168201915b5050505050908060020154908060030154905084565b606061070f610b6e565b61071857600080fd5b60006107226115c7565b905080806020019051810190610738919061306d565b91505090565b61078561074961028b565b156040518060400160405280601381526020017f416c726561647920696e697469616c697a656400000000000000000000000000815250610c36565b81600181905550806000816fffffffffffffffffffffffffffffffff19169055505050565b7f83481d5b04dea534715acad673a8177a46fc93882760f36bdc16ccac439d504e81600001356fffffffffffffffffffffffffffffffff19168260400160208101906107f69190613241565b838060600190610806919061327d565b6040516108169493929190613394565b60405180910390a150565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b806108936108588260000135611161565b6040518060400160405280600b81526020017f496e76616c6964206b6579000000000000000000000000000000000000000000815250610c36565b600483908060018154018082558091505060019003906000526020600020906004020160009091909190915081816108cb9190613817565b5050600560008154809291906108e090613197565b91905055507fbf51327c63fb3c8741d4233ae0315e3e1a74641532f4e59c307f72314a346235836000013584806020019061091b9190613488565b86604001356040516109309493929190613852565b60405180910390a180602001356001819055506002600081548092919061095690613197565b9190505550505050565b60606109a861096d610b6e565b6040518060400160405280601081526020017f4e6f7420636f6e666964656e7469616c00000000000000000000000000000000815250610c36565b60003073ffffffffffffffffffffffffffffffffffffffff166392f07a586040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156109f257600080fd5b505af1158015610a06573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610a2f919061306d565b9050610a866000610a3f8361169e565b67ffffffffffffffff1614156040518060400160405280600b81526020017f65677020746f6f206c6f77000000000000000000000000000000000000000000815250610c36565b6000610a9182611795565b90506000604051806080016040528060055481526020018681526020018767ffffffffffffffff168152602001836fffffffffffffffffffffffffffffffff1916815250905063ee2cc36460e01b81610ae861111f565b604051602401610af992919061395d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050935050505092915050565b6000600480549050905090565b6000806000634201000073ffffffffffffffffffffffffffffffffffffffff16604051610b9a906139be565b600060405180830381855afa9150503d8060008114610bd5576040519150601f19603f3d011682016040523d82523d6000602084013e610bda565b606091505b509150915081610c27576342010000816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401610c1e9291906139e2565b60405180910390fd5b80516020820151935050505090565b81610c7857806040517f0c25cd98000000000000000000000000000000000000000000000000000000008152600401610c6f9190613a12565b60405180910390fd5b5050565b610c846120c6565b606060005b600480549050811015610ebe57600060048281548110610cac57610cab613a34565b5b906000526020600020906004020160405180608001604052908160008201548152602001600182018054610cdf9061320f565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0b9061320f565b8015610d585780601f10610d2d57610100808354040283529160200191610d58565b820191906000526020600020905b815481529060010190602001808311610d3b57829003601f168201915b505050505081526020016002820154815260200160038201546fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff19168152505090508481604001511015610dc457610dbc82846118cb90919063ffffffff16565b925050610ead565b6000610e0982606001516040518060400160405280601881526020017f626c6f636b61643a76303a7061796d656e7442756e646c6500000000000000008152506118ff565b9050600080610e17836119e6565b91509150811580610e32575060008167ffffffffffffffff16145b15610e5157610e4a85876118cb90919063ffffffff16565b9550610ea8565b866040015167ffffffffffffffff168167ffffffffffffffff161115610ea757604051806080016040528085600001518152602001856020015181526020018267ffffffffffffffff1681526020018481525096505b5b505050505b80610eb790613197565b9050610c89565b50915091565b6000600367ffffffffffffffff811115610ee157610ee06122c8565b5b604051908082528060200260200182016040528015610f0f5781602001602082028036833780820191505090505b509050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600081518110610f4957610f48613a34565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050634210000181600181518110610f9c57610f9b613a34565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250503081600281518110610feb57610fea613a34565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060006110688483846040518060400160405280601581526020017f64656661756c743a76303a65746842756e646c65730000000000000000000000815250611aac565b90506110b281600001516040518060400160405280601581526020017f64656661756c743a76303a65746842756e646c657300000000000000000000008152508560600151611bb2565b61111981600001516040518060400160405280601e81526020017f64656661756c743a76303a65746842756e646c6553696d526573756c7473000081525085604001516040516020016111059190613a63565b604051602081830303815290604052611bb2565b50505050565b6111276120f8565b604051806040016040528061113d600254611c95565b815260200161115960016002546111549190613a7e565b611caf565b815250905090565b6000600154826040516020016111779190613ae3565b60405160208183030381529060405280519060200120149050919050565b600080828060200190518101906111ac9190613b28565b915091507fb10654685ba901f594f5fa22c231463da1f86b86e6a2c015c71c052f5967d4aa82826040516111e19291906130b6565b60405180910390a1505050565b60606111f982611ce7565b9050919050565b6000815190505b60008111156113c7576000826001836112209190613b68565b8151811061123157611230613a34565b5b6020026020010151905060006004828154811061125157611250613a34565b5b906000526020600020906004020160000154905060016004805490506112779190613b68565b82101561132a57600460016004805490506112929190613b68565b815481106112a3576112a2613a34565b5b9060005260206000209060040201600483815481106112c5576112c4613a34565b5b90600052602060002090600402016000820154816000015560018201816001019080546112f19061320f565b6112fc929190612118565b5060028201548160020155600382015481600301906fffffffffffffffffffffffffffffffff191690559050505b600480548061133c5761133b613b9c565b5b600190038181906000526020600020906004020160008082016000905560018201600061136991906121a5565b60028201600090556003820160009055505090557f5fa4d8243d9549d33d615899224efcef51bfcacb970a31f68862ce74c858dbf0816040516113ac9190612869565b60405180910390a15050806113c090613bcb565b9050611207565b5050565b60008273ffffffffffffffffffffffffffffffffffffffff16826040516113f29190613c26565b6000604051808303816000865af19150503d806000811461142f576040519150601f19603f3d011682016040523d82523d6000602084013e611434565b606091505b50509050611477816040518060400160405280601481526020017f45787465726e616c2063616c6c206661696c6564000000000000000000000000815250610c36565b505050565b60606114c4611489610b6e565b6040518060400160405280601081526020017f4e6f7420636f6e666964656e7469616c00000000000000000000000000000000815250610c36565b61150b6114cf61028b565b156040518060400160405280601381526020017f416c726561647920696e697469616c697a656400000000000000000000000000815250610c36565b60006115156115c7565b9050600061152282611db2565b905060006115458380602001905181019061153d9190613c52565b600254611f8e565b905063bb7bae0a60e01b8183604051602401611562929190613c7f565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050935050505090565b6060600080634201000173ffffffffffffffffffffffffffffffffffffffff166040516020016040516020818303038152906040526040516116099190613c26565b600060405180830381855afa9150503d8060008114611644576040519150601f19603f3d011682016040523d82523d6000602084013e611649565b606091505b509150915081611696576342010001816040517f75fff46700000000000000000000000000000000000000000000000000000000815260040161168d9291906139e2565b60405180910390fd5b809250505090565b6000806000634210000073ffffffffffffffffffffffffffffffffffffffff16846040516020016116cf919061282e565b6040516020818303038152906040526040516116eb9190613c26565b600060405180830381855afa9150503d8060008114611726576040519150601f19603f3d011682016040523d82523d6000602084013e61172b565b606091505b509150915081611778576342100000816040517f75fff46700000000000000000000000000000000000000000000000000000000815260040161176f9291906139e2565b60405180910390fd5b8080602001905181019061178c9190613ca8565b92505050919050565b600080600167ffffffffffffffff8111156117b3576117b26122c8565b5b6040519080825280602002602001820160405280156117e15781602001602082028036833780820191505090505b50905030816000815181106117f9576117f8613a34565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506000611877600083846040518060400160405280601881526020017f626c6f636b61643a76303a7061796d656e7442756e646c650000000000000000815250611aac565b90506118bd81600001516040518060400160405280601881526020017f626c6f636b61643a76303a7061796d656e7442756e646c65000000000000000081525086611bb2565b806000015192505050919050565b6060826118d783611fc8565b6040516020016118e8929190613cd5565b604051602081830303815290604052905092915050565b6060600080634202000173ffffffffffffffffffffffffffffffffffffffff168585604051602001611932929190613cf9565b60405160208183030381529060405260405161194e9190613c26565b600060405180830381855afa9150503d8060008114611989576040519150601f19603f3d011682016040523d82523d6000602084013e61198e565b606091505b5091509150816119db576342020001816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016119d29291906139e2565b60405180910390fd5b809250505092915050565b600080600080634210000073ffffffffffffffffffffffffffffffffffffffff16614e2086604051602001611a1b919061282e565b604051602081830303815290604052604051611a379190613c26565b6000604051808303818686fa925050503d8060008114611a73576040519150601f19603f3d011682016040523d82523d6000602084013e611a78565b606091505b50915091508115611aa457600181806020019051810190611a999190613ca8565b935093505050611aa7565b50505b915091565b611ab46121e5565b600080634203000073ffffffffffffffffffffffffffffffffffffffff1687878787604051602001611ae99493929190613daf565b604051602081830303815290604052604051611b059190613c26565b600060405180830381855afa9150503d8060008114611b40576040519150601f19603f3d011682016040523d82523d6000602084013e611b45565b606091505b509150915081611b92576342030000816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401611b899291906139e2565b60405180910390fd5b80806020019051810190611ba6919061405a565b92505050949350505050565b600080634202000073ffffffffffffffffffffffffffffffffffffffff16858585604051602001611be5939291906140a3565b604051602081830303815290604052604051611c019190613c26565b600060405180830381855afa9150503d8060008114611c3c576040519150601f19603f3d011682016040523d82523d6000602084013e611c41565b606091505b509150915081611c8e576342020000816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401611c859291906139e2565b60405180910390fd5b5050505050565b6000611ca8611ca2612025565b83612085565b9050919050565b6000611cba82611c95565b604051602001611cca9190613ae3565b604051602081830303815290604052805190602001209050919050565b606060208251611cf79190614117565b67ffffffffffffffff811115611d1057611d0f6122c8565b5b604051908082528060200260200182016040528015611d3e5781602001602082028036833780820191505090505b50905060005b60208351611d529190614117565b811015611dac57611d7a8360208084611d6b9190614148565b611d759190613a7e565b6120b8565b828281518110611d8d57611d8c613a34565b5b6020026020010181815250508080611da490613197565b915050611d44565b50919050565b600080600367ffffffffffffffff811115611dd057611dcf6122c8565b5b604051908082528060200260200182016040528015611dfe5781602001602082028036833780820191505090505b5090503081600081518110611e1657611e15613a34565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050634203000181600181518110611e6957611e68613a34565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050634202000181600281518110611ebc57611ebb613a34565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506000611f3a600083846040518060400160405280601181526020017f626c6f636b61643a76303a736563726574000000000000000000000000000000815250611aac565b9050611f8081600001516040518060400160405280601181526020017f626c6f636b61643a76303a73656372657400000000000000000000000000000081525086611bb2565b806000015192505050919050565b6000611f9a8383612085565b604051602001611faa9190613ae3565b60405160208183030381529060405280519060200120905092915050565b6060602067ffffffffffffffff811115611fe557611fe46122c8565b5b6040519080825280601f01601f1916602001820160405280156120175781602001600182028036833780820191505090505b509050816020820152919050565b6000806120696000546040518060400160405280601181526020017f626c6f636b61643a76303a7365637265740000000000000000000000000000008152506118ff565b90508080602001905181019061207f9190613c52565b91505090565b6000828260405160200161209a9291906141a2565b60405160208183030381529060405280519060200120905092915050565b600081830151905092915050565b60405180608001604052806000815260200160608152602001600067ffffffffffffffff168152602001606081525090565b604051806040016040528060008019168152602001600080191681525090565b8280546121249061320f565b90600052602060002090601f0160209004810192826121465760008555612194565b82601f106121575780548555612194565b8280016001018555821561219457600052602060002091601f016020900482015b82811115612193578254825591600101919060010190612178565b5b5090506121a1919061224b565b5090565b5080546121b19061320f565b6000825580601f106121c357506121e2565b601f0160209004906000526020600020908101906121e1919061224b565b5b50565b6040518060c0016040528060006fffffffffffffffffffffffffffffffff1916815260200160006fffffffffffffffffffffffffffffffff19168152602001600067ffffffffffffffff1681526020016060815260200160608152602001606081525090565b5b8082111561226457600081600090555060010161224c565b5090565b60008115159050919050565b61227d81612268565b82525050565b60006020820190506122986000830184612274565b92915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612300826122b7565b810181811067ffffffffffffffff8211171561231f5761231e6122c8565b5b80604052505050565b600061233261229e565b905061233e82826122f7565b919050565b600080fd5b600067ffffffffffffffff82169050919050565b61236581612348565b811461237057600080fd5b50565b6000813590506123828161235c565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff8211156123ad576123ac6122c8565b5b6123b6826122b7565b9050602081019050919050565b82818337600083830152505050565b60006123e56123e084612392565b612328565b9050828152602081018484840111156124015761240061238d565b5b61240c8482856123c3565b509392505050565b600082601f83011261242957612428612388565b5b81356124398482602086016123d2565b91505092915050565b6000819050919050565b61245581612442565b811461246057600080fd5b50565b6000813590506124728161244c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006124a382612478565b9050919050565b6124b381612498565b81146124be57600080fd5b50565b6000813590506124d0816124aa565b92915050565b600067ffffffffffffffff8211156124f1576124f06122c8565b5b602082029050602081019050919050565b600080fd5b60006080828403121561251d5761251c6122b2565b5b6125276080612328565b9050600061253784828501612373565b600083015250602061254b84828501612373565b602083015250604061255f848285016124c1565b604083015250606061257384828501612373565b60608301525092915050565b600061259261258d846124d6565b612328565b905080838252602082019050608084028301858111156125b5576125b4612502565b5b835b818110156125de57806125ca8882612507565b8452602084019350506080810190506125b7565b5050509392505050565b600082601f8301126125fd576125fc612388565b5b813561260d84826020860161257f565b91505092915050565b6000610120828403121561262d5761262c6122b2565b5b612638610120612328565b9050600061264884828501612373565b600083015250602082013567ffffffffffffffff81111561266c5761266b612343565b5b61267884828501612414565b602083015250604061268c84828501612463565b60408301525060606126a084828501612373565b60608301525060806126b4848285016124c1565b60808301525060a06126c884828501612373565b60a08301525060c06126dc84828501612463565b60c08301525060e082013567ffffffffffffffff811115612700576126ff612343565b5b61270c848285016125e8565b60e08301525061010082013567ffffffffffffffff81111561273157612730612343565b5b61273d84828501612414565b6101008301525092915050565b60008060408385031215612761576127606122a8565b5b600083013567ffffffffffffffff81111561277f5761277e6122ad565b5b61278b85828601612616565b925050602061279c85828601612373565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b838110156127e05780820151818401526020810190506127c5565b838111156127ef576000848401525b50505050565b6000612800826127a6565b61280a81856127b1565b935061281a8185602086016127c2565b612823816122b7565b840191505092915050565b6000602082019050818103600083015261284881846127f5565b905092915050565b6000819050919050565b61286381612850565b82525050565b600060208201905061287e600083018461285a565b92915050565b600080fd5b60006040828403121561289f5761289e612884565b5b81905092915050565b60008060008060a085870312156128c2576128c16122a8565b5b600085013567ffffffffffffffff8111156128e0576128df6122ad565b5b6128ec87828801612414565b945050602085013567ffffffffffffffff81111561290d5761290c6122ad565b5b61291987828801612414565b935050604085013567ffffffffffffffff81111561293a576129396122ad565b5b61294687828801612414565b925050606061295787828801612889565b91505092959194509250565b61296c81612850565b811461297757600080fd5b50565b60008135905061298981612963565b92915050565b6000602082840312156129a5576129a46122a8565b5b60006129b38482850161297a565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60006129e3826129bc565b6129ed81856129c7565b93506129fd8185602086016127c2565b612a06816122b7565b840191505092915050565b60007fffffffffffffffffffffffffffffffff0000000000000000000000000000000082169050919050565b6000612a4882612a11565b9050919050565b612a5881612a3d565b82525050565b6000608082019050612a73600083018761285a565b8181036020830152612a8581866129d8565b9050612a94604083018561285a565b612aa16060830184612a4f565b95945050505050565b612ab381612a11565b8114612abe57600080fd5b50565b600081359050612ad081612aaa565b92915050565b60008060408385031215612aed57612aec6122a8565b5b6000612afb85828601612463565b9250506020612b0c85828601612ac1565b9150509250929050565b600060c08284031215612b2c57612b2b612884565b5b81905092915050565b600060208284031215612b4b57612b4a6122a8565b5b600082013567ffffffffffffffff811115612b6957612b686122ad565b5b612b7584828501612b16565b91505092915050565b6000819050919050565b6000612ba3612b9e612b9984612478565b612b7e565b612478565b9050919050565b6000612bb582612b88565b9050919050565b6000612bc782612baa565b9050919050565b612bd781612bbc565b82525050565b6000602082019050612bf26000830184612bce565b92915050565b600060808284031215612c0e57612c0d612884565b5b81905092915050565b60008060608385031215612c2e57612c2d6122a8565b5b600083013567ffffffffffffffff811115612c4c57612c4b6122ad565b5b612c5885828601612bf8565b9250506020612c6985828601612889565b9150509250929050565b600067ffffffffffffffff821115612c8e57612c8d6122c8565b5b612c97826122b7565b9050602081019050919050565b6000612cb7612cb284612c73565b612328565b905082815260208101848484011115612cd357612cd261238d565b5b612cde8482856123c3565b509392505050565b600082601f830112612cfb57612cfa612388565b5b8135612d0b848260208601612ca4565b91505092915050565b60008060408385031215612d2b57612d2a6122a8565b5b6000612d3985828601612373565b925050602083013567ffffffffffffffff811115612d5a57612d596122ad565b5b612d6685828601612ce6565b9150509250929050565b612d7981612348565b82525050565b600082825260208201905092915050565b6000612d9b826127a6565b612da58185612d7f565b9350612db58185602086016127c2565b612dbe816122b7565b840191505092915050565b612dd281612442565b82525050565b612de181612498565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b608082016000820151612e296000850182612d70565b506020820151612e3c6020850182612d70565b506040820151612e4f6040850182612dd8565b506060820151612e626060850182612d70565b50505050565b6000612e748383612e13565b60808301905092915050565b6000602082019050919050565b6000612e9882612de7565b612ea28185612df2565b9350612ead83612e03565b8060005b83811015612ede578151612ec58882612e68565b9750612ed083612e80565b925050600181019050612eb1565b5085935050505092915050565b600061012083016000830151612f046000860182612d70565b5060208301518482036020860152612f1c8282612d90565b9150506040830151612f316040860182612dc9565b506060830151612f446060860182612d70565b506080830151612f576080860182612dd8565b5060a0830151612f6a60a0860182612d70565b5060c0830151612f7d60c0860182612dc9565b5060e083015184820360e0860152612f958282612e8d565b915050610100830151848203610100860152612fb18282612d90565b9150508091505092915050565b612fc781612348565b82525050565b60006040820190508181036000830152612fe78185612eeb565b9050612ff66020830184612fbe565b9392505050565b600061301061300b84612392565b612328565b90508281526020810184848401111561302c5761302b61238d565b5b6130378482856127c2565b509392505050565b600082601f83011261305457613053612388565b5b8151613064848260208601612ffd565b91505092915050565b600060208284031215613083576130826122a8565b5b600082015167ffffffffffffffff8111156130a1576130a06122ad565b5b6130ad8482850161303f565b91505092915050565b60006040820190506130cb600083018561285a565b6130d86020830184612fbe565b9392505050565b6040820160008201516130f56000850182612dc9565b5060208201516131086020850182612dc9565b50505050565b600060a082019050818103600083015261312881876127f5565b9050818103602083015261313c81866127f5565b9050818103604083015261315081856127f5565b905061315f60608301846130df565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006131a282612850565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156131d5576131d4613168565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061322757607f821691505b6020821081141561323b5761323a6131e0565b5b50919050565b600060208284031215613257576132566122a8565b5b600061326584828501612373565b91505092915050565b600080fd5b600080fd5b600080fd5b6000808335600160200384360303811261329a5761329961326e565b5b80840192508235915067ffffffffffffffff8211156132bc576132bb613273565b5b6020830192506020820236038313156132d8576132d7613278565b5b509250929050565b600082825260208201905092915050565b6000819050919050565b60006133078383612dd8565b60208301905092915050565b600061332260208401846124c1565b905092915050565b6000602082019050919050565b600061334383856132e0565b935061334e826132f1565b8060005b85811015613387576133648284613313565b61336e88826132fb565b97506133798361332a565b925050600181019050613352565b5085925050509392505050565b60006060820190506133a96000830187612a4f565b6133b66020830186612fbe565b81810360408301526133c9818486613337565b905095945050505050565b600081356133e181612963565b80915050919050565b60008160001b9050919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff613423846133ea565b9350801983169250808416831791505092915050565b600061345461344f61344a84612850565b612b7e565b612850565b9050919050565b6000819050919050565b61346e82613439565b61348161347a8261345b565b83546133f7565b8255505050565b600080833560016020038436030381126134a5576134a461326e565b5b80840192508235915067ffffffffffffffff8211156134c7576134c6613273565b5b6020830192506001820236038313156134e3576134e2613278565b5b509250929050565b600082905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026135587fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261351b565b613562868361351b565b95508019841693508086168417925050509392505050565b61358383613439565b61359761358f8261345b565b848454613528565b825550505050565b600090565b6135ac61359f565b6135b781848461357a565b505050565b5b818110156135db576135d06000826135a4565b6001810190506135bd565b5050565b601f821115613620576135f1816134f6565b6135fa8461350b565b81016020851015613609578190505b61361d6136158561350b565b8301826135bc565b50505b505050565b600082821c905092915050565b600061364360001984600802613625565b1980831691505092915050565b600061365c8383613632565b9150826002028217905092915050565b61367683836134eb565b67ffffffffffffffff81111561368f5761368e6122c8565b5b613699825461320f565b6136a48282856135df565b6000601f8311600181146136d357600084156136c1578287013590505b6136cb8582613650565b865550613733565b601f1984166136e1866134f6565b60005b82811015613709578489013582556001820191506020850194506020810190506136e4565b868310156137265784890135613722601f891682613632565b8355505b6001600288020188555050505b50505050505050565b61374783838361366c565b505050565b6000813561375981612aaa565b80915050919050565b6000819050919050565b61377582612a3d565b61378861378182613762565b83546133f7565b8255505050565b6000810160008301806137a1816133d4565b90506137ad8184613465565b50505060018101602083016137c28185613488565b6137cd81838661373c565b505050506002810160408301806137e3816133d4565b90506137ef8184613465565b5050506003810160608301806138048161374c565b9050613810818461376c565b5050505050565b613821828261378f565b5050565b600061383183856129c7565b935061383e8385846123c3565b613847836122b7565b840190509392505050565b6000606082019050613867600083018761285a565b818103602083015261387a818587613825565b9050613889604083018461285a565b95945050505050565b61389b81612850565b82525050565b600082825260208201905092915050565b60006138bd826129bc565b6138c781856138a1565b93506138d78185602086016127c2565b6138e0816122b7565b840191505092915050565b6138f481612a3d565b82525050565b60006080830160008301516139126000860182613892565b506020830151848203602086015261392a82826138b2565b915050604083015161393f6040860182613892565b50606083015161395260608601826138eb565b508091505092915050565b6000606082019050818103600083015261397781856138fa565b905061398660208301846130df565b9392505050565b600081905092915050565b50565b60006139a860008361398d565b91506139b382613998565b600082019050919050565b60006139c98261399b565b9150819050919050565b6139dc81612498565b82525050565b60006040820190506139f760008301856139d3565b8181036020830152613a0981846127f5565b90509392505050565b60006020820190508181036000830152613a2c81846129d8565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082019050613a786000830184612fbe565b92915050565b6000613a8982612850565b9150613a9483612850565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613ac957613ac8613168565b5b828201905092915050565b613add81612442565b82525050565b6000602082019050613af86000830184613ad4565b92915050565b600081519050613b0d81612963565b92915050565b600081519050613b228161235c565b92915050565b60008060408385031215613b3f57613b3e6122a8565b5b6000613b4d85828601613afe565b9250506020613b5e85828601613b13565b9150509250929050565b6000613b7382612850565b9150613b7e83612850565b925082821015613b9157613b90613168565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000613bd682612850565b91506000821415613bea57613be9613168565b5b600182039050919050565b6000613c00826127a6565b613c0a818561398d565b9350613c1a8185602086016127c2565b80840191505092915050565b6000613c328284613bf5565b915081905092915050565b600081519050613c4c8161244c565b92915050565b600060208284031215613c6857613c676122a8565b5b6000613c7684828501613c3d565b91505092915050565b6000604082019050613c946000830185613ad4565b613ca16020830184612a4f565b9392505050565b600060208284031215613cbe57613cbd6122a8565b5b6000613ccc84828501613b13565b91505092915050565b6000613ce18285613bf5565b9150613ced8284613bf5565b91508190509392505050565b6000604082019050613d0e6000830185612a4f565b8181036020830152613d2081846129d8565b90509392505050565b600081519050919050565b6000819050602082019050919050565b6000602082019050919050565b6000613d5c82613d29565b613d6681856132e0565b9350613d7183613d34565b8060005b83811015613da2578151613d8988826132fb565b9750613d9483613d44565b925050600181019050613d75565b5085935050505092915050565b6000608082019050613dc46000830187612fbe565b8181036020830152613dd68186613d51565b90508181036040830152613dea8185613d51565b90508181036060830152613dfe81846129d8565b905095945050505050565b600081519050613e1881612aaa565b92915050565b600067ffffffffffffffff821115613e3957613e386122c8565b5b602082029050602081019050919050565b600081519050613e59816124aa565b92915050565b6000613e72613e6d84613e1e565b612328565b90508083825260208201905060208402830185811115613e9557613e94612502565b5b835b81811015613ebe5780613eaa8882613e4a565b845260208401935050602081019050613e97565b5050509392505050565b600082601f830112613edd57613edc612388565b5b8151613eed848260208601613e5f565b91505092915050565b6000613f09613f0484612c73565b612328565b905082815260208101848484011115613f2557613f2461238d565b5b613f308482856127c2565b509392505050565b600082601f830112613f4d57613f4c612388565b5b8151613f5d848260208601613ef6565b91505092915050565b600060c08284031215613f7c57613f7b6122b2565b5b613f8660c0612328565b90506000613f9684828501613e09565b6000830152506020613faa84828501613e09565b6020830152506040613fbe84828501613b13565b604083015250606082015167ffffffffffffffff811115613fe257613fe1612343565b5b613fee84828501613ec8565b606083015250608082015167ffffffffffffffff81111561401257614011612343565b5b61401e84828501613ec8565b60808301525060a082015167ffffffffffffffff81111561404257614041612343565b5b61404e84828501613f38565b60a08301525092915050565b6000602082840312156140705761406f6122a8565b5b600082015167ffffffffffffffff81111561408e5761408d6122ad565b5b61409a84828501613f66565b91505092915050565b60006060820190506140b86000830186612a4f565b81810360208301526140ca81856129d8565b905081810360408301526140de81846127f5565b9050949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061412282612850565b915061412d83612850565b92508261413d5761413c6140e8565b5b828204905092915050565b600061415382612850565b915061415e83612850565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561419757614196613168565b5b828202905092915050565b60006040820190506141b76000830185613ad4565b6141c4602083018461285a565b939250505056fea26469706673582212204fc2513183ff8aa031529ce64ce2ef262b0e5122e597f005992507db35f8ac1064736f6c6343000808003360806040523480156200001157600080fd5b5060405162003e1f38038062003e1f8339818101604052810190620000379190620002a4565b80600090805190602001906200004f92919062000057565b50506200035a565b828054620000659062000324565b90600052602060002090601f016020900481019282620000895760008555620000d5565b82601f10620000a457805160ff1916838001178555620000d5565b82800160010185558215620000d5579182015b82811115620000d4578251825591602001919060010190620000b7565b5b509050620000e49190620000e8565b5090565b5b8082111562000103576000816000905550600101620000e9565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620001708262000125565b810181811067ffffffffffffffff8211171562000192576200019162000136565b5b80604052505050565b6000620001a762000107565b9050620001b5828262000165565b919050565b600067ffffffffffffffff821115620001d857620001d762000136565b5b620001e38262000125565b9050602081019050919050565b60005b8381101562000210578082015181840152602081019050620001f3565b8381111562000220576000848401525b50505050565b60006200023d6200023784620001ba565b6200019b565b9050828152602081018484840111156200025c576200025b62000120565b5b62000269848285620001f0565b509392505050565b600082601f8301126200028957620002886200011b565b5b81516200029b84826020860162000226565b91505092915050565b600060208284031215620002bd57620002bc62000111565b5b600082015167ffffffffffffffff811115620002de57620002dd62000116565b5b620002ec8482850162000271565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200033d57607f821691505b60208210811415620003545762000353620002f5565b5b50919050565b613ab5806200036a6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806392f07a581161006657806392f07a5814610159578063b33e471514610177578063c0b9d287146101a8578063d503387a146101c4578063e829cd5d146101f457610093565b8063232ef1f414610098578063346ab175146100c9578063464b0c3a146100f95780637df1cde214610129575b600080fd5b6100b260048036038101906100ad91906121a1565b610224565b6040516100c09291906124be565b60405180910390f35b6100e360048036038101906100de91906124f5565b610433565b6040516100f09190612551565b60405180910390f35b610113600480360381019061010e91906121a1565b61085d565b6040516101209190612551565b60405180910390f35b610143600480360381019061013e9190612573565b610a3b565b6040516101509190612551565b60405180910390f35b610161610a9b565b60405161016e9190612551565b60405180910390f35b610191600480360381019061018c9190612786565b610ad4565b60405161019f9291906124be565b60405180910390f35b6101c260048036038101906101bd9190612822565b610b6f565b005b6101de60048036038101906101d991906124f5565b610be6565b6040516101eb9190612551565b60405180910390f35b61020e6004803603810190610209919061286b565b611233565b60405161021b91906128c6565b60405180910390f35b61022c611a9c565b60606000600267ffffffffffffffff81111561024b5761024a611b63565b5b6040519080825280602002602001820160405280156102795781602001602082028036833780820191505090505b5090503081600081518110610291576102906128e1565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506342100001816001815181106102e4576102e36128e1565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060006103618783846040518060400160405280601581526020017f64656661756c743a76303a6d657267656442696473000000000000000000000081525061133a565b90506103c681600001516040518060400160405280601581526020017f64656661756c743a76303a6d6572676564426964730000000000000000000000815250886040516020016103b291906129bf565b604051602081830303815290604052611440565b6000806103d88a846000015189611523565b9150915061042083600001516040518060400160405280601981526020017f64656661756c743a76303a6275696c6465725061796c6f61640000000000000081525083611440565b8282955095505050505094509492505050565b606061043d611624565b61044657600080fd5b6000610487836040518060400160405280601581526020017f64656661756c743a76303a65746842756e646c657300000000000000000000008152506116ec565b90506000815114156104d057306040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016104c79190612a3c565b60405180910390fd5b6000815167ffffffffffffffff8111156104ed576104ec611b63565b5b60405190808252806020026020018201604052801561052657816020015b610513611b02565b81526020019060019003908161050b5790505b50905060005b825181101561063157600061059484838151811061054d5761054c6128e1565b5b6020026020010151600001516040518060400160405280601e81526020017f64656661756c743a76303a65746842756e646c6553696d526573756c747300008152506117e6565b90506000818060200190518101906105ac9190612a7f565b905060405180604001604052808267ffffffffffffffff1681526020018685815181106105dc576105db6128e1565b5b6020026020010151600001516fffffffffffffffffffffffffffffffff1916815250848481518110610611576106106128e1565b5b60200260200101819052505050808061062990612ae5565b91505061052c565b5060008151905060005b6001826106489190612b2e565b81101561076157600060018261065e9190612b62565b90505b8281101561074d5783818151811061067c5761067b6128e1565b5b60200260200101516000015167ffffffffffffffff168483815181106106a5576106a46128e1565b5b60200260200101516000015167ffffffffffffffff16101561073a5760008483815181106106d6576106d56128e1565b5b602002602001015190508482815181106106f3576106f26128e1565b5b602002602001015185848151811061070e5761070d6128e1565b5b60200260200101819052508085838151811061072d5761072c6128e1565b5b6020026020010181905250505b808061074590612ae5565b915050610661565b50808061075990612ae5565b91505061063b565b506000835167ffffffffffffffff81111561077f5761077e611b63565b5b6040519080825280602002602001820160405280156107ad5781602001602082028036833780820191505090505b50905060005b8351811015610835578381815181106107cf576107ce6128e1565b5b6020026020010151602001518282815181106107ee576107ed6128e1565b5b60200260200101906fffffffffffffffffffffffffffffffff191690816fffffffffffffffffffffffffffffffff191681525050808061082d90612ae5565b9150506107b3565b506108518787836040518060200160405280600081525061085d565b94505050505092915050565b6060610867611624565b61087057600080fd5b6000803073ffffffffffffffffffffffffffffffffffffffff1663232ef1f4888888886040518563ffffffff1660e01b81526004016108b29493929190612e41565b60006040518083038186803b1580156108ca57600080fd5b505afa1580156108de573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906109079190613130565b9150915061099f6000805461091b906131d7565b80601f0160208091040260200160405190810160405280929190818152602001828054610947906131d7565b80156109945780601f1061096957610100808354040283529160200191610994565b820191906000526020600020905b81548152906001019060200180831161097757829003601f168201915b5050505050826118cd565b507f83481d5b04dea534715acad673a8177a46fc93882760f36bdc16ccac439d504e8260000151836040015184606001516040516109df93929190613287565b60405180910390a163c0b9d28760e01b82604051602001610a0091906132c5565b604051602081830303815290604052604051602001610a20929190613370565b60405160208183030381529060405292505050949350505050565b6060610a45611624565b610a4e57600080fd5b6000610a8f846040518060400160405280601981526020017f64656661756c743a76303a6275696c6465725061796c6f6164000000000000008152506117e6565b90508091505092915050565b6060610aa5611624565b610aae57600080fd5b6000610ab86119c5565b905080806020019051810190610ace9190613398565b91505090565b610adc611a9c565b60607f67fa9c16cd72410c4cc1d47205b31852a81ec5e92d1c8cebc3ecbe98ed67fe3f846000015184604051610b139291906133e1565b60405180910390a17f83481d5b04dea534715acad673a8177a46fc93882760f36bdc16ccac439d504e846000015185604001518660600151604051610b5a93929190613287565b60405180910390a18383915091509250929050565b7f83481d5b04dea534715acad673a8177a46fc93882760f36bdc16ccac439d504e81600001356fffffffffffffffffffffffffffffffff1916826040016020810190610bbb9190613411565b838060600190610bcb919061344d565b604051610bdb949392919061353b565b60405180910390a150565b6060610bf0611624565b610bf957600080fd5b6000610c3a836040518060400160405280601581526020017f6d657673686172653a76303a6d617463684269647300000000000000000000008152506116ec565b90506000610c7d846040518060400160405280601c81526020017f6d657673686172653a76303a756e6d61746368656442756e646c6573000000008152506116ec565b9050600081511415610cc657306040517f75fff467000000000000000000000000000000000000000000000000000000008152600401610cbd9190612a3c565b60405180910390fd5b6000815167ffffffffffffffff811115610ce357610ce2611b63565b5b604051908082528060200260200182016040528015610d1c57816020015b610d09611a9c565b815260200190600190039081610d015790505b50905060005b8251811015610e7d576000838281518110610d4057610d3f6128e1565b5b6020026020010151905060005b8551811015610e49576000610db5878381518110610d6e57610d6d6128e1565b5b6020026020010151600001516040518060400160405280601681526020017f6d657673686172653a76303a6d657267656442696473000000000000000000008152506117e6565b806020019051810190610dc89190613612565b9050610e0d81600081518110610de157610de06128e1565b5b6020026020010151878681518110610dfc57610dfb6128e1565b5b602002602001015160000151611233565b15610e3557868281518110610e2557610e246128e1565b5b6020026020010151925050610e49565b508080610e4190612ae5565b915050610d4d565b5080838381518110610e5e57610e5d6128e1565b5b6020026020010181905250508080610e7590612ae5565b915050610d22565b506000815167ffffffffffffffff811115610e9b57610e9a611b63565b5b604051908082528060200260200182016040528015610ed457816020015b610ec1611b02565b815260200190600190039081610eb95790505b50905060005b8251811015610fdf576000610f42848381518110610efb57610efa6128e1565b5b6020026020010151600001516040518060400160405280601f81526020017f6d657673686172653a76303a65746842756e646c6553696d526573756c7473008152506117e6565b9050600081806020019051810190610f5a9190612a7f565b905060405180604001604052808267ffffffffffffffff168152602001868581518110610f8a57610f896128e1565b5b6020026020010151600001516fffffffffffffffffffffffffffffffff1916815250848481518110610fbf57610fbe6128e1565b5b602002602001018190525050508080610fd790612ae5565b915050610eda565b5060008151905060005b600182610ff69190612b2e565b81101561110f57600060018261100c9190612b62565b90505b828110156110fb5783818151811061102a576110296128e1565b5b60200260200101516000015167ffffffffffffffff16848381518110611053576110526128e1565b5b60200260200101516000015167ffffffffffffffff1610156110e8576000848381518110611084576110836128e1565b5b602002602001015190508482815181106110a1576110a06128e1565b5b60200260200101518584815181106110bc576110bb6128e1565b5b6020026020010181905250808583815181106110db576110da6128e1565b5b6020026020010181905250505b80806110f390612ae5565b91505061100f565b50808061110790612ae5565b915050610fe9565b506000835167ffffffffffffffff81111561112d5761112c611b63565b5b60405190808252806020026020018201604052801561115b5781602001602082028036833780820191505090505b50905060005b83518110156111e35783818151811061117d5761117c6128e1565b5b60200260200101516020015182828151811061119c5761119b6128e1565b5b60200260200101906fffffffffffffffffffffffffffffffff191690816fffffffffffffffffffffffffffffffff19168152505080806111db90612ae5565b915050611161565b506112258989836040518060400160405280600b81526020017f6d657673686172653a763000000000000000000000000000000000000000000081525061085d565b965050505050505092915050565b60008083604051602001611247919061367c565b604051602081830303815290604052905060008360405160200161126b919061367c565b604051602081830303815290604052905060005b825181101561132c5781818151811061129b5761129a6128e1565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168382815181106112db576112da6128e1565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146113195760009350505050611334565b808061132490612ae5565b91505061127f565b506001925050505b92915050565b611342611a9c565b600080634203000073ffffffffffffffffffffffffffffffffffffffff16878787876040516020016113779493929190613697565b60405160208183030381529060405260405161139391906136f1565b600060405180830381855afa9150503d80600081146113ce576040519150601f19603f3d011682016040523d82523d6000602084013e6113d3565b606091505b509150915081611420576342030000816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401611417929190613708565b60405180910390fd5b808060200190518101906114349190613738565b92505050949350505050565b600080634202000073ffffffffffffffffffffffffffffffffffffffff1685858560405160200161147393929190613781565b60405160208183030381529060405260405161148f91906136f1565b600060405180830381855afa9150503d80600081146114ca576040519150601f19603f3d011682016040523d82523d6000602084013e6114cf565b606091505b50915091508161151c576342020000816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401611513929190613708565b60405180910390fd5b5050505050565b606080600080634210000173ffffffffffffffffffffffffffffffffffffffff16878787604051602001611559939291906137c6565b60405160208183030381529060405260405161157591906136f1565b600060405180830381855afa9150503d80600081146115b0576040519150601f19603f3d011682016040523d82523d6000602084013e6115b5565b606091505b509150915081611602576342100001816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016115f9929190613708565b60405180910390fd5b80806020019051810190611616919061380b565b935093505050935093915050565b6000806000634201000073ffffffffffffffffffffffffffffffffffffffff16604051611650906138a9565b600060405180830381855afa9150503d806000811461168b576040519150601f19603f3d011682016040523d82523d6000602084013e611690565b606091505b5091509150816116dd576342010000816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016116d4929190613708565b60405180910390fd5b80516020820151935050505090565b6060600080634203000173ffffffffffffffffffffffffffffffffffffffff16858560405160200161171f9291906138be565b60405160208183030381529060405260405161173b91906136f1565b600060405180830381855afa9150503d8060008114611776576040519150601f19603f3d011682016040523d82523d6000602084013e61177b565b606091505b5091509150816117c8576342030001816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016117bf929190613708565b60405180910390fd5b808060200190518101906117dc91906139cf565b9250505092915050565b6060600080634202000173ffffffffffffffffffffffffffffffffffffffff168585604051602001611819929190613a18565b60405160208183030381529060405260405161183591906136f1565b600060405180830381855afa9150503d8060008114611870576040519150601f19603f3d011682016040523d82523d6000602084013e611875565b606091505b5091509150816118c2576342020001816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016118b9929190613708565b60405180910390fd5b809250505092915050565b60606118d7611624565b6118e057600080fd5b600080634210000273ffffffffffffffffffffffffffffffffffffffff168585604051602001611911929190613a48565b60405160208183030381529060405260405161192d91906136f1565b600060405180830381855afa9150503d8060008114611968576040519150601f19603f3d011682016040523d82523d6000602084013e61196d565b606091505b5091509150816119ba576342100002816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016119b1929190613708565b60405180910390fd5b809250505092915050565b6060600080634201000173ffffffffffffffffffffffffffffffffffffffff16604051602001604051602081830303815290604052604051611a0791906136f1565b600060405180830381855afa9150503d8060008114611a42576040519150601f19603f3d011682016040523d82523d6000602084013e611a47565b606091505b509150915081611a94576342010001816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401611a8b929190613708565b60405180910390fd5b809250505090565b6040518060c0016040528060006fffffffffffffffffffffffffffffffff1916815260200160006fffffffffffffffffffffffffffffffff19168152602001600067ffffffffffffffff1681526020016060815260200160608152602001606081525090565b6040518060400160405280600067ffffffffffffffff16815260200160006fffffffffffffffffffffffffffffffff191681525090565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611b9b82611b52565b810181811067ffffffffffffffff82111715611bba57611bb9611b63565b5b80604052505050565b6000611bcd611b39565b9050611bd98282611b92565b919050565b600080fd5b600067ffffffffffffffff82169050919050565b611c0081611be3565b8114611c0b57600080fd5b50565b600081359050611c1d81611bf7565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115611c4857611c47611b63565b5b611c5182611b52565b9050602081019050919050565b82818337600083830152505050565b6000611c80611c7b84611c2d565b611bc3565b905082815260208101848484011115611c9c57611c9b611c28565b5b611ca7848285611c5e565b509392505050565b600082601f830112611cc457611cc3611c23565b5b8135611cd4848260208601611c6d565b91505092915050565b6000819050919050565b611cf081611cdd565b8114611cfb57600080fd5b50565b600081359050611d0d81611ce7565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611d3e82611d13565b9050919050565b611d4e81611d33565b8114611d5957600080fd5b50565b600081359050611d6b81611d45565b92915050565b600067ffffffffffffffff821115611d8c57611d8b611b63565b5b602082029050602081019050919050565b600080fd5b600060808284031215611db857611db7611b4d565b5b611dc26080611bc3565b90506000611dd284828501611c0e565b6000830152506020611de684828501611c0e565b6020830152506040611dfa84828501611d5c565b6040830152506060611e0e84828501611c0e565b60608301525092915050565b6000611e2d611e2884611d71565b611bc3565b90508083825260208201905060808402830185811115611e5057611e4f611d9d565b5b835b81811015611e795780611e658882611da2565b845260208401935050608081019050611e52565b5050509392505050565b600082601f830112611e9857611e97611c23565b5b8135611ea8848260208601611e1a565b91505092915050565b60006101208284031215611ec857611ec7611b4d565b5b611ed3610120611bc3565b90506000611ee384828501611c0e565b600083015250602082013567ffffffffffffffff811115611f0757611f06611bde565b5b611f1384828501611caf565b6020830152506040611f2784828501611cfe565b6040830152506060611f3b84828501611c0e565b6060830152506080611f4f84828501611d5c565b60808301525060a0611f6384828501611c0e565b60a08301525060c0611f7784828501611cfe565b60c08301525060e082013567ffffffffffffffff811115611f9b57611f9a611bde565b5b611fa784828501611e83565b60e08301525061010082013567ffffffffffffffff811115611fcc57611fcb611bde565b5b611fd884828501611caf565b6101008301525092915050565b600067ffffffffffffffff82111561200057611fff611b63565b5b602082029050602081019050919050565b60007fffffffffffffffffffffffffffffffff0000000000000000000000000000000082169050919050565b61204681612011565b811461205157600080fd5b50565b6000813590506120638161203d565b92915050565b600061207c61207784611fe5565b611bc3565b9050808382526020820190506020840283018581111561209f5761209e611d9d565b5b835b818110156120c857806120b48882612054565b8452602084019350506020810190506120a1565b5050509392505050565b600082601f8301126120e7576120e6611c23565b5b81356120f7848260208601612069565b91505092915050565b600067ffffffffffffffff82111561211b5761211a611b63565b5b61212482611b52565b9050602081019050919050565b600061214461213f84612100565b611bc3565b9050828152602081018484840111156121605761215f611c28565b5b61216b848285611c5e565b509392505050565b600082601f83011261218857612187611c23565b5b8135612198848260208601612131565b91505092915050565b600080600080608085870312156121bb576121ba611b43565b5b600085013567ffffffffffffffff8111156121d9576121d8611b48565b5b6121e587828801611eb1565b94505060206121f687828801611c0e565b935050604085013567ffffffffffffffff81111561221757612216611b48565b5b612223878288016120d2565b925050606085013567ffffffffffffffff81111561224457612243611b48565b5b61225087828801612173565b91505092959194509250565b600061226782612011565b9050919050565b6122778161225c565b82525050565b61228681611be3565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6122c181611d33565b82525050565b60006122d383836122b8565b60208301905092915050565b6000602082019050919050565b60006122f78261228c565b6123018185612297565b935061230c836122a8565b8060005b8381101561233d57815161232488826122c7565b975061232f836122df565b925050600181019050612310565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612384578082015181840152602081019050612369565b83811115612393576000848401525b50505050565b60006123a48261234a565b6123ae8185612355565b93506123be818560208601612366565b6123c781611b52565b840191505092915050565b600060c0830160008301516123ea600086018261226e565b5060208301516123fd602086018261226e565b506040830151612410604086018261227d565b506060830151848203606086015261242882826122ec565b9150506080830151848203608086015261244282826122ec565b91505060a083015184820360a086015261245c8282612399565b9150508091505092915050565b600081519050919050565b600082825260208201905092915050565b600061249082612469565b61249a8185612474565b93506124aa818560208601612366565b6124b381611b52565b840191505092915050565b600060408201905081810360008301526124d881856123d2565b905081810360208301526124ec8184612485565b90509392505050565b6000806040838503121561250c5761250b611b43565b5b600083013567ffffffffffffffff81111561252a57612529611b48565b5b61253685828601611eb1565b925050602061254785828601611c0e565b9150509250929050565b6000602082019050818103600083015261256b8184612485565b905092915050565b6000806040838503121561258a57612589611b43565b5b600061259885828601612054565b925050602083013567ffffffffffffffff8111156125b9576125b8611b48565b5b6125c585828601611caf565b9150509250929050565b600067ffffffffffffffff8211156125ea576125e9611b63565b5b602082029050602081019050919050565b600061260e612609846125cf565b611bc3565b9050808382526020820190506020840283018581111561263157612630611d9d565b5b835b8181101561265a57806126468882611d5c565b845260208401935050602081019050612633565b5050509392505050565b600082601f83011261267957612678611c23565b5b81356126898482602086016125fb565b91505092915050565b600060c082840312156126a8576126a7611b4d565b5b6126b260c0611bc3565b905060006126c284828501612054565b60008301525060206126d684828501612054565b60208301525060406126ea84828501611c0e565b604083015250606082013567ffffffffffffffff81111561270e5761270d611bde565b5b61271a84828501612664565b606083015250608082013567ffffffffffffffff81111561273e5761273d611bde565b5b61274a84828501612664565b60808301525060a082013567ffffffffffffffff81111561276e5761276d611bde565b5b61277a84828501612173565b60a08301525092915050565b6000806040838503121561279d5761279c611b43565b5b600083013567ffffffffffffffff8111156127bb576127ba611b48565b5b6127c785828601612692565b925050602083013567ffffffffffffffff8111156127e8576127e7611b48565b5b6127f485828601611caf565b9150509250929050565b600080fd5b600060c08284031215612819576128186127fe565b5b81905092915050565b60006020828403121561283857612837611b43565b5b600082013567ffffffffffffffff81111561285657612855611b48565b5b61286284828501612803565b91505092915050565b6000806040838503121561288257612881611b43565b5b600061289085828601612054565b92505060206128a185828601612054565b9150509250929050565b60008115159050919050565b6128c0816128ab565b82525050565b60006020820190506128db60008301846128b7565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000612948838361226e565b60208301905092915050565b6000602082019050919050565b600061296c82612910565b612976818561291b565b93506129818361292c565b8060005b838110156129b2578151612999888261293c565b97506129a483612954565b925050600181019050612985565b5085935050505092915050565b600060208201905081810360008301526129d98184612961565b905092915050565b6129ea81611d33565b82525050565b7f6e6f206269647300000000000000000000000000000000000000000000000000600082015250565b6000612a26600783612474565b9150612a31826129f0565b602082019050919050565b6000604082019050612a5160008301846129e1565b8181036020830152612a6281612a19565b905092915050565b600081519050612a7981611bf7565b92915050565b600060208284031215612a9557612a94611b43565b5b6000612aa384828501612a6a565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000819050919050565b6000612af082612adb565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612b2357612b22612aac565b5b600182019050919050565b6000612b3982612adb565b9150612b4483612adb565b925082821015612b5757612b56612aac565b5b828203905092915050565b6000612b6d82612adb565b9150612b7883612adb565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612bad57612bac612aac565b5b828201905092915050565b600082825260208201905092915050565b6000612bd482612469565b612bde8185612bb8565b9350612bee818560208601612366565b612bf781611b52565b840191505092915050565b612c0b81611cdd565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b608082016000820151612c53600085018261227d565b506020820151612c66602085018261227d565b506040820151612c7960408501826122b8565b506060820151612c8c606085018261227d565b50505050565b6000612c9e8383612c3d565b60808301905092915050565b6000602082019050919050565b6000612cc282612c11565b612ccc8185612c1c565b9350612cd783612c2d565b8060005b83811015612d08578151612cef8882612c92565b9750612cfa83612caa565b925050600181019050612cdb565b5085935050505092915050565b600061012083016000830151612d2e600086018261227d565b5060208301518482036020860152612d468282612bc9565b9150506040830151612d5b6040860182612c02565b506060830151612d6e606086018261227d565b506080830151612d8160808601826122b8565b5060a0830151612d9460a086018261227d565b5060c0830151612da760c0860182612c02565b5060e083015184820360e0860152612dbf8282612cb7565b915050610100830151848203610100860152612ddb8282612bc9565b9150508091505092915050565b612df181611be3565b82525050565b600082825260208201905092915050565b6000612e138261234a565b612e1d8185612df7565b9350612e2d818560208601612366565b612e3681611b52565b840191505092915050565b60006080820190508181036000830152612e5b8187612d15565b9050612e6a6020830186612de8565b8181036040830152612e7c8185612961565b90508181036060830152612e908184612e08565b905095945050505050565b600081519050612eaa8161203d565b92915050565b600081519050612ebf81611d45565b92915050565b6000612ed8612ed3846125cf565b611bc3565b90508083825260208201905060208402830185811115612efb57612efa611d9d565b5b835b81811015612f245780612f108882612eb0565b845260208401935050602081019050612efd565b5050509392505050565b600082601f830112612f4357612f42611c23565b5b8151612f53848260208601612ec5565b91505092915050565b6000612f6f612f6a84612100565b611bc3565b905082815260208101848484011115612f8b57612f8a611c28565b5b612f96848285612366565b509392505050565b600082601f830112612fb357612fb2611c23565b5b8151612fc3848260208601612f5c565b91505092915050565b600060c08284031215612fe257612fe1611b4d565b5b612fec60c0611bc3565b90506000612ffc84828501612e9b565b600083015250602061301084828501612e9b565b602083015250604061302484828501612a6a565b604083015250606082015167ffffffffffffffff81111561304857613047611bde565b5b61305484828501612f2e565b606083015250608082015167ffffffffffffffff81111561307857613077611bde565b5b61308484828501612f2e565b60808301525060a082015167ffffffffffffffff8111156130a8576130a7611bde565b5b6130b484828501612f9e565b60a08301525092915050565b60006130d36130ce84611c2d565b611bc3565b9050828152602081018484840111156130ef576130ee611c28565b5b6130fa848285612366565b509392505050565b600082601f83011261311757613116611c23565b5b81516131278482602086016130c0565b91505092915050565b6000806040838503121561314757613146611b43565b5b600083015167ffffffffffffffff81111561316557613164611b48565b5b61317185828601612fcc565b925050602083015167ffffffffffffffff81111561319257613191611b48565b5b61319e85828601613102565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806131ef57607f821691505b60208210811415613203576132026131a8565b5b50919050565b6132128161225c565b82525050565b600082825260208201905092915050565b60006132348261228c565b61323e8185613218565b9350613249836122a8565b8060005b8381101561327a57815161326188826122c7565b975061326c836122df565b92505060018101905061324d565b5085935050505092915050565b600060608201905061329c6000830186613209565b6132a96020830185612de8565b81810360408301526132bb8184613229565b9050949350505050565b600060208201905081810360008301526132df81846123d2565b905092915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b61332e613329826132e7565b613313565b82525050565b600081905092915050565b600061334a82612469565b6133548185613334565b9350613364818560208601612366565b80840191505092915050565b600061337c828561331d565b60048201915061338c828461333f565b91508190509392505050565b6000602082840312156133ae576133ad611b43565b5b600082015167ffffffffffffffff8111156133cc576133cb611b48565b5b6133d884828501613102565b91505092915050565b60006040820190506133f66000830185613209565b81810360208301526134088184612485565b90509392505050565b60006020828403121561342757613426611b43565b5b600061343584828501611c0e565b91505092915050565b600080fd5b600080fd5b600080fd5b6000808335600160200384360303811261346a5761346961343e565b5b80840192508235915067ffffffffffffffff82111561348c5761348b613443565b5b6020830192506020820236038313156134a8576134a7613448565b5b509250929050565b6000819050919050565b60006134c96020840184611d5c565b905092915050565b6000602082019050919050565b60006134ea8385613218565b93506134f5826134b0565b8060005b8581101561352e5761350b82846134ba565b61351588826122c7565b9750613520836134d1565b9250506001810190506134f9565b5085925050509392505050565b60006060820190506135506000830187613209565b61355d6020830186612de8565b81810360408301526135708184866134de565b905095945050505050565b600061358e61358984611fe5565b611bc3565b905080838252602082019050602084028301858111156135b1576135b0611d9d565b5b835b818110156135da57806135c68882612e9b565b8452602084019350506020810190506135b3565b5050509392505050565b600082601f8301126135f9576135f8611c23565b5b815161360984826020860161357b565b91505092915050565b60006020828403121561362857613627611b43565b5b600082015167ffffffffffffffff81111561364657613645611b48565b5b613652848285016135e4565b91505092915050565b6000819050919050565b6136766136718261225c565b61365b565b82525050565b60006136888284613665565b60108201915081905092915050565b60006080820190506136ac6000830187612de8565b81810360208301526136be8186613229565b905081810360408301526136d28185613229565b905081810360608301526136e68184612e08565b905095945050505050565b60006136fd828461333f565b915081905092915050565b600060408201905061371d60008301856129e1565b818103602083015261372f8184612485565b90509392505050565b60006020828403121561374e5761374d611b43565b5b600082015167ffffffffffffffff81111561376c5761376b611b48565b5b61377884828501612fcc565b91505092915050565b60006060820190506137966000830186613209565b81810360208301526137a88185612e08565b905081810360408301526137bc8184612485565b9050949350505050565b600060608201905081810360008301526137e08186612d15565b90506137ef6020830185613209565b81810360408301526138018184612e08565b9050949350505050565b6000806040838503121561382257613821611b43565b5b600083015167ffffffffffffffff8111156138405761383f611b48565b5b61384c85828601613102565b925050602083015167ffffffffffffffff81111561386d5761386c611b48565b5b61387985828601613102565b9150509250929050565b50565b6000613893600083613334565b915061389e82613883565b600082019050919050565b60006138b482613886565b9150819050919050565b60006040820190506138d36000830185612de8565b81810360208301526138e58184612e08565b90509392505050565b600067ffffffffffffffff82111561390957613908611b63565b5b602082029050602081019050919050565b600061392d613928846138ee565b611bc3565b905080838252602082019050602084028301858111156139505761394f611d9d565b5b835b8181101561399757805167ffffffffffffffff81111561397557613974611c23565b5b8086016139828982612fcc565b85526020850194505050602081019050613952565b5050509392505050565b600082601f8301126139b6576139b5611c23565b5b81516139c684826020860161391a565b91505092915050565b6000602082840312156139e5576139e4611b43565b5b600082015167ffffffffffffffff811115613a0357613a02611b48565b5b613a0f848285016139a1565b91505092915050565b6000604082019050613a2d6000830185613209565b8181036020830152613a3f8184612e08565b90509392505050565b60006040820190508181036000830152613a628185612e08565b90508181036020830152613a768184612485565b9050939250505056fea264697066735822122075497e2184534eaa5e84d894c9f5ed17093c939e32bfb00630f7ddf23186340b64736f6c63430008080033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c806392f07a581161008c578063d7e84fbf11610066578063d7e84fbf14610203578063ee2cc36414610221578063fd38f21d1461023d578063ffbbfcb01461026d576100cf565b806392f07a58146101ad578063bb7bae0a146101cb578063c0b9d287146101e7576100cf565b8063392e53cd146100d457806360727f8e146100f257806361b8ce8c1461012257806364e65a62146101405780637e48532c1461015c57806381d12c581461017a575b600080fd5b6100dc61028b565b6040516100e99190612283565b60405180910390f35b61010c6004803603810190610107919061274a565b61029b565b604051610119919061282e565b60405180910390f35b61012a61051b565b6040516101379190612869565b60405180910390f35b61015a600480360381019061015591906128a8565b610521565b005b6101646105e8565b604051610171919061282e565b60405180910390f35b610194600480360381019061018f919061298f565b61063d565b6040516101a49493929190612a5e565b60405180910390f35b6101b5610705565b6040516101c2919061282e565b60405180910390f35b6101e560048036038101906101e09190612ad6565b61073e565b005b61020160048036038101906101fc9190612b35565b6107aa565b005b61020b610821565b6040516102189190612bdd565b60405180910390f35b61023b60048036038101906102369190612c17565b610847565b005b61025760048036038101906102529190612d14565b610960565b604051610264919061282e565b60405180910390f35b610275610b61565b6040516102829190612869565b60405180910390f35b60008060001b6001541415905090565b60606102e36102a8610b6e565b6040518060400160405280601081526020017f4e6f7420636f6e666964656e7469616c00000000000000000000000000000000815250610c36565b61032a6000600480549050116040518060400160405280600b81526020017f4e6f207265717565737473000000000000000000000000000000000000000000815250610c36565b6000806103408467ffffffffffffffff16610c7c565b915091506103946000836040015167ffffffffffffffff16116040518060400160405280600f81526020017f4e6f2076616c6964206f66666572730000000000000000000000000000000000815250610c36565b61039e8483610ec4565b81602001518561010001819052506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663346ab17587876040518363ffffffff1660e01b815260040161040b929190612fcd565b600060405180830381600087803b15801561042557600080fd5b505af1158015610439573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610462919061306d565b90506364e65a6260e01b81846000015185604001516040516020016104889291906130b6565b604051602081830303815290604052846104a061111f565b6040516024016104b3949392919061310e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050935050505092915050565b60055481565b8061056d6105328260000135611161565b6040518060400160405280600b81526020017f496e76616c6964206b6579000000000000000000000000000000000000000000815250610c36565b61057684611195565b6000835111156105925761059161058c846111ee565b611200565b5b6105be600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16866113cb565b8060200135600181905550600260008154809291906105dc90613197565b91905055505050505050565b60606106306105f5610b6e565b6040518060400160405280601081526020017f4e6f7420636f6e666964656e7469616c00000000000000000000000000000000815250610c36565b61063861147c565b905090565b6004818154811061064d57600080fd5b90600052602060002090600402016000915090508060000154908060010180546106769061320f565b80601f01602080910402602001604051908101604052809291908181526020018280546106a29061320f565b80156106ef5780601f106106c4576101008083540402835291602001916106ef565b820191906000526020600020905b8154815290600101906020018083116106d257829003601f168201915b5050505050908060020154908060030154905084565b606061070f610b6e565b61071857600080fd5b60006107226115c7565b905080806020019051810190610738919061306d565b91505090565b61078561074961028b565b156040518060400160405280601381526020017f416c726561647920696e697469616c697a656400000000000000000000000000815250610c36565b81600181905550806000816fffffffffffffffffffffffffffffffff19169055505050565b7f83481d5b04dea534715acad673a8177a46fc93882760f36bdc16ccac439d504e81600001356fffffffffffffffffffffffffffffffff19168260400160208101906107f69190613241565b838060600190610806919061327d565b6040516108169493929190613394565b60405180910390a150565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b806108936108588260000135611161565b6040518060400160405280600b81526020017f496e76616c6964206b6579000000000000000000000000000000000000000000815250610c36565b600483908060018154018082558091505060019003906000526020600020906004020160009091909190915081816108cb9190613817565b5050600560008154809291906108e090613197565b91905055507fbf51327c63fb3c8741d4233ae0315e3e1a74641532f4e59c307f72314a346235836000013584806020019061091b9190613488565b86604001356040516109309493929190613852565b60405180910390a180602001356001819055506002600081548092919061095690613197565b9190505550505050565b60606109a861096d610b6e565b6040518060400160405280601081526020017f4e6f7420636f6e666964656e7469616c00000000000000000000000000000000815250610c36565b60003073ffffffffffffffffffffffffffffffffffffffff166392f07a586040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156109f257600080fd5b505af1158015610a06573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610a2f919061306d565b9050610a866000610a3f8361169e565b67ffffffffffffffff1614156040518060400160405280600b81526020017f65677020746f6f206c6f77000000000000000000000000000000000000000000815250610c36565b6000610a9182611795565b90506000604051806080016040528060055481526020018681526020018767ffffffffffffffff168152602001836fffffffffffffffffffffffffffffffff1916815250905063ee2cc36460e01b81610ae861111f565b604051602401610af992919061395d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050935050505092915050565b6000600480549050905090565b6000806000634201000073ffffffffffffffffffffffffffffffffffffffff16604051610b9a906139be565b600060405180830381855afa9150503d8060008114610bd5576040519150601f19603f3d011682016040523d82523d6000602084013e610bda565b606091505b509150915081610c27576342010000816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401610c1e9291906139e2565b60405180910390fd5b80516020820151935050505090565b81610c7857806040517f0c25cd98000000000000000000000000000000000000000000000000000000008152600401610c6f9190613a12565b60405180910390fd5b5050565b610c846120c6565b606060005b600480549050811015610ebe57600060048281548110610cac57610cab613a34565b5b906000526020600020906004020160405180608001604052908160008201548152602001600182018054610cdf9061320f565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0b9061320f565b8015610d585780601f10610d2d57610100808354040283529160200191610d58565b820191906000526020600020905b815481529060010190602001808311610d3b57829003601f168201915b505050505081526020016002820154815260200160038201546fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff19168152505090508481604001511015610dc457610dbc82846118cb90919063ffffffff16565b925050610ead565b6000610e0982606001516040518060400160405280601881526020017f626c6f636b61643a76303a7061796d656e7442756e646c6500000000000000008152506118ff565b9050600080610e17836119e6565b91509150811580610e32575060008167ffffffffffffffff16145b15610e5157610e4a85876118cb90919063ffffffff16565b9550610ea8565b866040015167ffffffffffffffff168167ffffffffffffffff161115610ea757604051806080016040528085600001518152602001856020015181526020018267ffffffffffffffff1681526020018481525096505b5b505050505b80610eb790613197565b9050610c89565b50915091565b6000600367ffffffffffffffff811115610ee157610ee06122c8565b5b604051908082528060200260200182016040528015610f0f5781602001602082028036833780820191505090505b509050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600081518110610f4957610f48613a34565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050634210000181600181518110610f9c57610f9b613a34565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250503081600281518110610feb57610fea613a34565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060006110688483846040518060400160405280601581526020017f64656661756c743a76303a65746842756e646c65730000000000000000000000815250611aac565b90506110b281600001516040518060400160405280601581526020017f64656661756c743a76303a65746842756e646c657300000000000000000000008152508560600151611bb2565b61111981600001516040518060400160405280601e81526020017f64656661756c743a76303a65746842756e646c6553696d526573756c7473000081525085604001516040516020016111059190613a63565b604051602081830303815290604052611bb2565b50505050565b6111276120f8565b604051806040016040528061113d600254611c95565b815260200161115960016002546111549190613a7e565b611caf565b815250905090565b6000600154826040516020016111779190613ae3565b60405160208183030381529060405280519060200120149050919050565b600080828060200190518101906111ac9190613b28565b915091507fb10654685ba901f594f5fa22c231463da1f86b86e6a2c015c71c052f5967d4aa82826040516111e19291906130b6565b60405180910390a1505050565b60606111f982611ce7565b9050919050565b6000815190505b60008111156113c7576000826001836112209190613b68565b8151811061123157611230613a34565b5b6020026020010151905060006004828154811061125157611250613a34565b5b906000526020600020906004020160000154905060016004805490506112779190613b68565b82101561132a57600460016004805490506112929190613b68565b815481106112a3576112a2613a34565b5b9060005260206000209060040201600483815481106112c5576112c4613a34565b5b90600052602060002090600402016000820154816000015560018201816001019080546112f19061320f565b6112fc929190612118565b5060028201548160020155600382015481600301906fffffffffffffffffffffffffffffffff191690559050505b600480548061133c5761133b613b9c565b5b600190038181906000526020600020906004020160008082016000905560018201600061136991906121a5565b60028201600090556003820160009055505090557f5fa4d8243d9549d33d615899224efcef51bfcacb970a31f68862ce74c858dbf0816040516113ac9190612869565b60405180910390a15050806113c090613bcb565b9050611207565b5050565b60008273ffffffffffffffffffffffffffffffffffffffff16826040516113f29190613c26565b6000604051808303816000865af19150503d806000811461142f576040519150601f19603f3d011682016040523d82523d6000602084013e611434565b606091505b50509050611477816040518060400160405280601481526020017f45787465726e616c2063616c6c206661696c6564000000000000000000000000815250610c36565b505050565b60606114c4611489610b6e565b6040518060400160405280601081526020017f4e6f7420636f6e666964656e7469616c00000000000000000000000000000000815250610c36565b61150b6114cf61028b565b156040518060400160405280601381526020017f416c726561647920696e697469616c697a656400000000000000000000000000815250610c36565b60006115156115c7565b9050600061152282611db2565b905060006115458380602001905181019061153d9190613c52565b600254611f8e565b905063bb7bae0a60e01b8183604051602401611562929190613c7f565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050935050505090565b6060600080634201000173ffffffffffffffffffffffffffffffffffffffff166040516020016040516020818303038152906040526040516116099190613c26565b600060405180830381855afa9150503d8060008114611644576040519150601f19603f3d011682016040523d82523d6000602084013e611649565b606091505b509150915081611696576342010001816040517f75fff46700000000000000000000000000000000000000000000000000000000815260040161168d9291906139e2565b60405180910390fd5b809250505090565b6000806000634210000073ffffffffffffffffffffffffffffffffffffffff16846040516020016116cf919061282e565b6040516020818303038152906040526040516116eb9190613c26565b600060405180830381855afa9150503d8060008114611726576040519150601f19603f3d011682016040523d82523d6000602084013e61172b565b606091505b509150915081611778576342100000816040517f75fff46700000000000000000000000000000000000000000000000000000000815260040161176f9291906139e2565b60405180910390fd5b8080602001905181019061178c9190613ca8565b92505050919050565b600080600167ffffffffffffffff8111156117b3576117b26122c8565b5b6040519080825280602002602001820160405280156117e15781602001602082028036833780820191505090505b50905030816000815181106117f9576117f8613a34565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506000611877600083846040518060400160405280601881526020017f626c6f636b61643a76303a7061796d656e7442756e646c650000000000000000815250611aac565b90506118bd81600001516040518060400160405280601881526020017f626c6f636b61643a76303a7061796d656e7442756e646c65000000000000000081525086611bb2565b806000015192505050919050565b6060826118d783611fc8565b6040516020016118e8929190613cd5565b604051602081830303815290604052905092915050565b6060600080634202000173ffffffffffffffffffffffffffffffffffffffff168585604051602001611932929190613cf9565b60405160208183030381529060405260405161194e9190613c26565b600060405180830381855afa9150503d8060008114611989576040519150601f19603f3d011682016040523d82523d6000602084013e61198e565b606091505b5091509150816119db576342020001816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016119d29291906139e2565b60405180910390fd5b809250505092915050565b600080600080634210000073ffffffffffffffffffffffffffffffffffffffff16614e2086604051602001611a1b919061282e565b604051602081830303815290604052604051611a379190613c26565b6000604051808303818686fa925050503d8060008114611a73576040519150601f19603f3d011682016040523d82523d6000602084013e611a78565b606091505b50915091508115611aa457600181806020019051810190611a999190613ca8565b935093505050611aa7565b50505b915091565b611ab46121e5565b600080634203000073ffffffffffffffffffffffffffffffffffffffff1687878787604051602001611ae99493929190613daf565b604051602081830303815290604052604051611b059190613c26565b600060405180830381855afa9150503d8060008114611b40576040519150601f19603f3d011682016040523d82523d6000602084013e611b45565b606091505b509150915081611b92576342030000816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401611b899291906139e2565b60405180910390fd5b80806020019051810190611ba6919061405a565b92505050949350505050565b600080634202000073ffffffffffffffffffffffffffffffffffffffff16858585604051602001611be5939291906140a3565b604051602081830303815290604052604051611c019190613c26565b600060405180830381855afa9150503d8060008114611c3c576040519150601f19603f3d011682016040523d82523d6000602084013e611c41565b606091505b509150915081611c8e576342020000816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401611c859291906139e2565b60405180910390fd5b5050505050565b6000611ca8611ca2612025565b83612085565b9050919050565b6000611cba82611c95565b604051602001611cca9190613ae3565b604051602081830303815290604052805190602001209050919050565b606060208251611cf79190614117565b67ffffffffffffffff811115611d1057611d0f6122c8565b5b604051908082528060200260200182016040528015611d3e5781602001602082028036833780820191505090505b50905060005b60208351611d529190614117565b811015611dac57611d7a8360208084611d6b9190614148565b611d759190613a7e565b6120b8565b828281518110611d8d57611d8c613a34565b5b6020026020010181815250508080611da490613197565b915050611d44565b50919050565b600080600367ffffffffffffffff811115611dd057611dcf6122c8565b5b604051908082528060200260200182016040528015611dfe5781602001602082028036833780820191505090505b5090503081600081518110611e1657611e15613a34565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050634203000181600181518110611e6957611e68613a34565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050634202000181600281518110611ebc57611ebb613a34565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506000611f3a600083846040518060400160405280601181526020017f626c6f636b61643a76303a736563726574000000000000000000000000000000815250611aac565b9050611f8081600001516040518060400160405280601181526020017f626c6f636b61643a76303a73656372657400000000000000000000000000000081525086611bb2565b806000015192505050919050565b6000611f9a8383612085565b604051602001611faa9190613ae3565b60405160208183030381529060405280519060200120905092915050565b6060602067ffffffffffffffff811115611fe557611fe46122c8565b5b6040519080825280601f01601f1916602001820160405280156120175781602001600182028036833780820191505090505b509050816020820152919050565b6000806120696000546040518060400160405280601181526020017f626c6f636b61643a76303a7365637265740000000000000000000000000000008152506118ff565b90508080602001905181019061207f9190613c52565b91505090565b6000828260405160200161209a9291906141a2565b60405160208183030381529060405280519060200120905092915050565b600081830151905092915050565b60405180608001604052806000815260200160608152602001600067ffffffffffffffff168152602001606081525090565b604051806040016040528060008019168152602001600080191681525090565b8280546121249061320f565b90600052602060002090601f0160209004810192826121465760008555612194565b82601f106121575780548555612194565b8280016001018555821561219457600052602060002091601f016020900482015b82811115612193578254825591600101919060010190612178565b5b5090506121a1919061224b565b5090565b5080546121b19061320f565b6000825580601f106121c357506121e2565b601f0160209004906000526020600020908101906121e1919061224b565b5b50565b6040518060c0016040528060006fffffffffffffffffffffffffffffffff1916815260200160006fffffffffffffffffffffffffffffffff19168152602001600067ffffffffffffffff1681526020016060815260200160608152602001606081525090565b5b8082111561226457600081600090555060010161224c565b5090565b60008115159050919050565b61227d81612268565b82525050565b60006020820190506122986000830184612274565b92915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612300826122b7565b810181811067ffffffffffffffff8211171561231f5761231e6122c8565b5b80604052505050565b600061233261229e565b905061233e82826122f7565b919050565b600080fd5b600067ffffffffffffffff82169050919050565b61236581612348565b811461237057600080fd5b50565b6000813590506123828161235c565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff8211156123ad576123ac6122c8565b5b6123b6826122b7565b9050602081019050919050565b82818337600083830152505050565b60006123e56123e084612392565b612328565b9050828152602081018484840111156124015761240061238d565b5b61240c8482856123c3565b509392505050565b600082601f83011261242957612428612388565b5b81356124398482602086016123d2565b91505092915050565b6000819050919050565b61245581612442565b811461246057600080fd5b50565b6000813590506124728161244c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006124a382612478565b9050919050565b6124b381612498565b81146124be57600080fd5b50565b6000813590506124d0816124aa565b92915050565b600067ffffffffffffffff8211156124f1576124f06122c8565b5b602082029050602081019050919050565b600080fd5b60006080828403121561251d5761251c6122b2565b5b6125276080612328565b9050600061253784828501612373565b600083015250602061254b84828501612373565b602083015250604061255f848285016124c1565b604083015250606061257384828501612373565b60608301525092915050565b600061259261258d846124d6565b612328565b905080838252602082019050608084028301858111156125b5576125b4612502565b5b835b818110156125de57806125ca8882612507565b8452602084019350506080810190506125b7565b5050509392505050565b600082601f8301126125fd576125fc612388565b5b813561260d84826020860161257f565b91505092915050565b6000610120828403121561262d5761262c6122b2565b5b612638610120612328565b9050600061264884828501612373565b600083015250602082013567ffffffffffffffff81111561266c5761266b612343565b5b61267884828501612414565b602083015250604061268c84828501612463565b60408301525060606126a084828501612373565b60608301525060806126b4848285016124c1565b60808301525060a06126c884828501612373565b60a08301525060c06126dc84828501612463565b60c08301525060e082013567ffffffffffffffff811115612700576126ff612343565b5b61270c848285016125e8565b60e08301525061010082013567ffffffffffffffff81111561273157612730612343565b5b61273d84828501612414565b6101008301525092915050565b60008060408385031215612761576127606122a8565b5b600083013567ffffffffffffffff81111561277f5761277e6122ad565b5b61278b85828601612616565b925050602061279c85828601612373565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b838110156127e05780820151818401526020810190506127c5565b838111156127ef576000848401525b50505050565b6000612800826127a6565b61280a81856127b1565b935061281a8185602086016127c2565b612823816122b7565b840191505092915050565b6000602082019050818103600083015261284881846127f5565b905092915050565b6000819050919050565b61286381612850565b82525050565b600060208201905061287e600083018461285a565b92915050565b600080fd5b60006040828403121561289f5761289e612884565b5b81905092915050565b60008060008060a085870312156128c2576128c16122a8565b5b600085013567ffffffffffffffff8111156128e0576128df6122ad565b5b6128ec87828801612414565b945050602085013567ffffffffffffffff81111561290d5761290c6122ad565b5b61291987828801612414565b935050604085013567ffffffffffffffff81111561293a576129396122ad565b5b61294687828801612414565b925050606061295787828801612889565b91505092959194509250565b61296c81612850565b811461297757600080fd5b50565b60008135905061298981612963565b92915050565b6000602082840312156129a5576129a46122a8565b5b60006129b38482850161297a565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60006129e3826129bc565b6129ed81856129c7565b93506129fd8185602086016127c2565b612a06816122b7565b840191505092915050565b60007fffffffffffffffffffffffffffffffff0000000000000000000000000000000082169050919050565b6000612a4882612a11565b9050919050565b612a5881612a3d565b82525050565b6000608082019050612a73600083018761285a565b8181036020830152612a8581866129d8565b9050612a94604083018561285a565b612aa16060830184612a4f565b95945050505050565b612ab381612a11565b8114612abe57600080fd5b50565b600081359050612ad081612aaa565b92915050565b60008060408385031215612aed57612aec6122a8565b5b6000612afb85828601612463565b9250506020612b0c85828601612ac1565b9150509250929050565b600060c08284031215612b2c57612b2b612884565b5b81905092915050565b600060208284031215612b4b57612b4a6122a8565b5b600082013567ffffffffffffffff811115612b6957612b686122ad565b5b612b7584828501612b16565b91505092915050565b6000819050919050565b6000612ba3612b9e612b9984612478565b612b7e565b612478565b9050919050565b6000612bb582612b88565b9050919050565b6000612bc782612baa565b9050919050565b612bd781612bbc565b82525050565b6000602082019050612bf26000830184612bce565b92915050565b600060808284031215612c0e57612c0d612884565b5b81905092915050565b60008060608385031215612c2e57612c2d6122a8565b5b600083013567ffffffffffffffff811115612c4c57612c4b6122ad565b5b612c5885828601612bf8565b9250506020612c6985828601612889565b9150509250929050565b600067ffffffffffffffff821115612c8e57612c8d6122c8565b5b612c97826122b7565b9050602081019050919050565b6000612cb7612cb284612c73565b612328565b905082815260208101848484011115612cd357612cd261238d565b5b612cde8482856123c3565b509392505050565b600082601f830112612cfb57612cfa612388565b5b8135612d0b848260208601612ca4565b91505092915050565b60008060408385031215612d2b57612d2a6122a8565b5b6000612d3985828601612373565b925050602083013567ffffffffffffffff811115612d5a57612d596122ad565b5b612d6685828601612ce6565b9150509250929050565b612d7981612348565b82525050565b600082825260208201905092915050565b6000612d9b826127a6565b612da58185612d7f565b9350612db58185602086016127c2565b612dbe816122b7565b840191505092915050565b612dd281612442565b82525050565b612de181612498565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b608082016000820151612e296000850182612d70565b506020820151612e3c6020850182612d70565b506040820151612e4f6040850182612dd8565b506060820151612e626060850182612d70565b50505050565b6000612e748383612e13565b60808301905092915050565b6000602082019050919050565b6000612e9882612de7565b612ea28185612df2565b9350612ead83612e03565b8060005b83811015612ede578151612ec58882612e68565b9750612ed083612e80565b925050600181019050612eb1565b5085935050505092915050565b600061012083016000830151612f046000860182612d70565b5060208301518482036020860152612f1c8282612d90565b9150506040830151612f316040860182612dc9565b506060830151612f446060860182612d70565b506080830151612f576080860182612dd8565b5060a0830151612f6a60a0860182612d70565b5060c0830151612f7d60c0860182612dc9565b5060e083015184820360e0860152612f958282612e8d565b915050610100830151848203610100860152612fb18282612d90565b9150508091505092915050565b612fc781612348565b82525050565b60006040820190508181036000830152612fe78185612eeb565b9050612ff66020830184612fbe565b9392505050565b600061301061300b84612392565b612328565b90508281526020810184848401111561302c5761302b61238d565b5b6130378482856127c2565b509392505050565b600082601f83011261305457613053612388565b5b8151613064848260208601612ffd565b91505092915050565b600060208284031215613083576130826122a8565b5b600082015167ffffffffffffffff8111156130a1576130a06122ad565b5b6130ad8482850161303f565b91505092915050565b60006040820190506130cb600083018561285a565b6130d86020830184612fbe565b9392505050565b6040820160008201516130f56000850182612dc9565b5060208201516131086020850182612dc9565b50505050565b600060a082019050818103600083015261312881876127f5565b9050818103602083015261313c81866127f5565b9050818103604083015261315081856127f5565b905061315f60608301846130df565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006131a282612850565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156131d5576131d4613168565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061322757607f821691505b6020821081141561323b5761323a6131e0565b5b50919050565b600060208284031215613257576132566122a8565b5b600061326584828501612373565b91505092915050565b600080fd5b600080fd5b600080fd5b6000808335600160200384360303811261329a5761329961326e565b5b80840192508235915067ffffffffffffffff8211156132bc576132bb613273565b5b6020830192506020820236038313156132d8576132d7613278565b5b509250929050565b600082825260208201905092915050565b6000819050919050565b60006133078383612dd8565b60208301905092915050565b600061332260208401846124c1565b905092915050565b6000602082019050919050565b600061334383856132e0565b935061334e826132f1565b8060005b85811015613387576133648284613313565b61336e88826132fb565b97506133798361332a565b925050600181019050613352565b5085925050509392505050565b60006060820190506133a96000830187612a4f565b6133b66020830186612fbe565b81810360408301526133c9818486613337565b905095945050505050565b600081356133e181612963565b80915050919050565b60008160001b9050919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff613423846133ea565b9350801983169250808416831791505092915050565b600061345461344f61344a84612850565b612b7e565b612850565b9050919050565b6000819050919050565b61346e82613439565b61348161347a8261345b565b83546133f7565b8255505050565b600080833560016020038436030381126134a5576134a461326e565b5b80840192508235915067ffffffffffffffff8211156134c7576134c6613273565b5b6020830192506001820236038313156134e3576134e2613278565b5b509250929050565b600082905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026135587fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261351b565b613562868361351b565b95508019841693508086168417925050509392505050565b61358383613439565b61359761358f8261345b565b848454613528565b825550505050565b600090565b6135ac61359f565b6135b781848461357a565b505050565b5b818110156135db576135d06000826135a4565b6001810190506135bd565b5050565b601f821115613620576135f1816134f6565b6135fa8461350b565b81016020851015613609578190505b61361d6136158561350b565b8301826135bc565b50505b505050565b600082821c905092915050565b600061364360001984600802613625565b1980831691505092915050565b600061365c8383613632565b9150826002028217905092915050565b61367683836134eb565b67ffffffffffffffff81111561368f5761368e6122c8565b5b613699825461320f565b6136a48282856135df565b6000601f8311600181146136d357600084156136c1578287013590505b6136cb8582613650565b865550613733565b601f1984166136e1866134f6565b60005b82811015613709578489013582556001820191506020850194506020810190506136e4565b868310156137265784890135613722601f891682613632565b8355505b6001600288020188555050505b50505050505050565b61374783838361366c565b505050565b6000813561375981612aaa565b80915050919050565b6000819050919050565b61377582612a3d565b61378861378182613762565b83546133f7565b8255505050565b6000810160008301806137a1816133d4565b90506137ad8184613465565b50505060018101602083016137c28185613488565b6137cd81838661373c565b505050506002810160408301806137e3816133d4565b90506137ef8184613465565b5050506003810160608301806138048161374c565b9050613810818461376c565b5050505050565b613821828261378f565b5050565b600061383183856129c7565b935061383e8385846123c3565b613847836122b7565b840190509392505050565b6000606082019050613867600083018761285a565b818103602083015261387a818587613825565b9050613889604083018461285a565b95945050505050565b61389b81612850565b82525050565b600082825260208201905092915050565b60006138bd826129bc565b6138c781856138a1565b93506138d78185602086016127c2565b6138e0816122b7565b840191505092915050565b6138f481612a3d565b82525050565b60006080830160008301516139126000860182613892565b506020830151848203602086015261392a82826138b2565b915050604083015161393f6040860182613892565b50606083015161395260608601826138eb565b508091505092915050565b6000606082019050818103600083015261397781856138fa565b905061398660208301846130df565b9392505050565b600081905092915050565b50565b60006139a860008361398d565b91506139b382613998565b600082019050919050565b60006139c98261399b565b9150819050919050565b6139dc81612498565b82525050565b60006040820190506139f760008301856139d3565b8181036020830152613a0981846127f5565b90509392505050565b60006020820190508181036000830152613a2c81846129d8565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082019050613a786000830184612fbe565b92915050565b6000613a8982612850565b9150613a9483612850565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613ac957613ac8613168565b5b828201905092915050565b613add81612442565b82525050565b6000602082019050613af86000830184613ad4565b92915050565b600081519050613b0d81612963565b92915050565b600081519050613b228161235c565b92915050565b60008060408385031215613b3f57613b3e6122a8565b5b6000613b4d85828601613afe565b9250506020613b5e85828601613b13565b9150509250929050565b6000613b7382612850565b9150613b7e83612850565b925082821015613b9157613b90613168565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000613bd682612850565b91506000821415613bea57613be9613168565b5b600182039050919050565b6000613c00826127a6565b613c0a818561398d565b9350613c1a8185602086016127c2565b80840191505092915050565b6000613c328284613bf5565b915081905092915050565b600081519050613c4c8161244c565b92915050565b600060208284031215613c6857613c676122a8565b5b6000613c7684828501613c3d565b91505092915050565b6000604082019050613c946000830185613ad4565b613ca16020830184612a4f565b9392505050565b600060208284031215613cbe57613cbd6122a8565b5b6000613ccc84828501613b13565b91505092915050565b6000613ce18285613bf5565b9150613ced8284613bf5565b91508190509392505050565b6000604082019050613d0e6000830185612a4f565b8181036020830152613d2081846129d8565b90509392505050565b600081519050919050565b6000819050602082019050919050565b6000602082019050919050565b6000613d5c82613d29565b613d6681856132e0565b9350613d7183613d34565b8060005b83811015613da2578151613d8988826132fb565b9750613d9483613d44565b925050600181019050613d75565b5085935050505092915050565b6000608082019050613dc46000830187612fbe565b8181036020830152613dd68186613d51565b90508181036040830152613dea8185613d51565b90508181036060830152613dfe81846129d8565b905095945050505050565b600081519050613e1881612aaa565b92915050565b600067ffffffffffffffff821115613e3957613e386122c8565b5b602082029050602081019050919050565b600081519050613e59816124aa565b92915050565b6000613e72613e6d84613e1e565b612328565b90508083825260208201905060208402830185811115613e9557613e94612502565b5b835b81811015613ebe5780613eaa8882613e4a565b845260208401935050602081019050613e97565b5050509392505050565b600082601f830112613edd57613edc612388565b5b8151613eed848260208601613e5f565b91505092915050565b6000613f09613f0484612c73565b612328565b905082815260208101848484011115613f2557613f2461238d565b5b613f308482856127c2565b509392505050565b600082601f830112613f4d57613f4c612388565b5b8151613f5d848260208601613ef6565b91505092915050565b600060c08284031215613f7c57613f7b6122b2565b5b613f8660c0612328565b90506000613f9684828501613e09565b6000830152506020613faa84828501613e09565b6020830152506040613fbe84828501613b13565b604083015250606082015167ffffffffffffffff811115613fe257613fe1612343565b5b613fee84828501613ec8565b606083015250608082015167ffffffffffffffff81111561401257614011612343565b5b61401e84828501613ec8565b60808301525060a082015167ffffffffffffffff81111561404257614041612343565b5b61404e84828501613f38565b60a08301525092915050565b6000602082840312156140705761406f6122a8565b5b600082015167ffffffffffffffff81111561408e5761408d6122ad565b5b61409a84828501613f66565b91505092915050565b60006060820190506140b86000830186612a4f565b81810360208301526140ca81856129d8565b905081810360408301526140de81846127f5565b9050949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061412282612850565b915061412d83612850565b92508261413d5761413c6140e8565b5b828204905092915050565b600061415382612850565b915061415e83612850565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561419757614196613168565b5b828202905092915050565b60006040820190506141b76000830185613ad4565b6141c4602083018461285a565b939250505056fea26469706673582212204fc2513183ff8aa031529ce64ce2ef262b0e5122e597f005992507db35f8ac1064736f6c63430008080033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1096, + "contract": "contracts/blockad/BlockAdV2.sol:BlockAdAuctionV2", + "label": "secretBidId", + "offset": 0, + "slot": "0", + "type": "t_userDefinedValueType(BidId)1578" + }, + { + "astId": 1098, + "contract": "contracts/blockad/BlockAdV2.sol:BlockAdAuctionV2", + "label": "presentHash", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 1100, + "contract": "contracts/blockad/BlockAdV2.sol:BlockAdAuctionV2", + "label": "nonce", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 470, + "contract": "contracts/blockad/BlockAdV2.sol:BlockAdAuctionV2", + "label": "builder", + "offset": 0, + "slot": "3", + "type": "t_contract(EthBlockBidSenderContract)3838" + }, + { + "astId": 474, + "contract": "contracts/blockad/BlockAdV2.sol:BlockAdAuctionV2", + "label": "requests", + "offset": 0, + "slot": "4", + "type": "t_array(t_struct(AdRequest)431_storage)dyn_storage" + }, + { + "astId": 476, + "contract": "contracts/blockad/BlockAdV2.sol:BlockAdAuctionV2", + "label": "nextId", + "offset": 0, + "slot": "5", + "type": "t_uint256" + } + ], + "types": { + "t_array(t_struct(AdRequest)431_storage)dyn_storage": { + "base": "t_struct(AdRequest)431_storage", + "encoding": "dynamic_array", + "label": "struct BlockAdAuctionV2.AdRequest[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(EthBlockBidSenderContract)3838": { + "encoding": "inplace", + "label": "contract EthBlockBidSenderContract", + "numberOfBytes": "20" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AdRequest)431_storage": { + "encoding": "inplace", + "label": "struct BlockAdAuctionV2.AdRequest", + "members": [ + { + "astId": 423, + "contract": "contracts/blockad/BlockAdV2.sol:BlockAdAuctionV2", + "label": "id", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 425, + "contract": "contracts/blockad/BlockAdV2.sol:BlockAdAuctionV2", + "label": "extra", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 427, + "contract": "contracts/blockad/BlockAdV2.sol:BlockAdAuctionV2", + "label": "blockLimit", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 430, + "contract": "contracts/blockad/BlockAdV2.sol:BlockAdAuctionV2", + "label": "paymentBidId", + "offset": 0, + "slot": "3", + "type": "t_userDefinedValueType(BidId)1578" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_userDefinedValueType(BidId)1578": { + "encoding": "inplace", + "label": "Suave.BidId", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/rigil/Builder.json b/deployments/rigil/Builder.json new file mode 100644 index 0000000..61dd3bc --- /dev/null +++ b/deployments/rigil/Builder.json @@ -0,0 +1,757 @@ +{ + "address": "0xfAe9E5469A6Bbb8B7e03742d3b92a0584b63595E", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "boostRelayUrl_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "PeekerReverted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "Suave.BidId", + "name": "bidId", + "type": "bytes16" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "decryptionCondition", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "allowedPeekers", + "type": "address[]" + } + ], + "name": "BidEvent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "Suave.BidId", + "name": "bidId", + "type": "bytes16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "builderBid", + "type": "bytes" + } + ], + "name": "BuilderBoostBidEvent", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint64", + "name": "slot", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "proposerPubkey", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "parent", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + }, + { + "internalType": "address", + "name": "feeRecipient", + "type": "address" + }, + { + "internalType": "uint64", + "name": "gasLimit", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "random", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint64", + "name": "index", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "validator", + "type": "uint64" + }, + { + "internalType": "address", + "name": "Address", + "type": "address" + }, + { + "internalType": "uint64", + "name": "amount", + "type": "uint64" + } + ], + "internalType": "struct Suave.Withdrawal[]", + "name": "withdrawals", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "extra", + "type": "bytes" + } + ], + "internalType": "struct Suave.BuildBlockArgs", + "name": "blockArgs", + "type": "tuple" + }, + { + "internalType": "uint64", + "name": "blockHeight", + "type": "uint64" + }, + { + "internalType": "Suave.BidId[]", + "name": "bids", + "type": "bytes16[]" + }, + { + "internalType": "string", + "name": "namespace", + "type": "string" + } + ], + "name": "buildAndEmit", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint64", + "name": "slot", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "proposerPubkey", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "parent", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + }, + { + "internalType": "address", + "name": "feeRecipient", + "type": "address" + }, + { + "internalType": "uint64", + "name": "gasLimit", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "random", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint64", + "name": "index", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "validator", + "type": "uint64" + }, + { + "internalType": "address", + "name": "Address", + "type": "address" + }, + { + "internalType": "uint64", + "name": "amount", + "type": "uint64" + } + ], + "internalType": "struct Suave.Withdrawal[]", + "name": "withdrawals", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "extra", + "type": "bytes" + } + ], + "internalType": "struct Suave.BuildBlockArgs", + "name": "blockArgs", + "type": "tuple" + }, + { + "internalType": "uint64", + "name": "blockHeight", + "type": "uint64" + } + ], + "name": "buildFromPool", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint64", + "name": "slot", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "proposerPubkey", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "parent", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + }, + { + "internalType": "address", + "name": "feeRecipient", + "type": "address" + }, + { + "internalType": "uint64", + "name": "gasLimit", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "random", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint64", + "name": "index", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "validator", + "type": "uint64" + }, + { + "internalType": "address", + "name": "Address", + "type": "address" + }, + { + "internalType": "uint64", + "name": "amount", + "type": "uint64" + } + ], + "internalType": "struct Suave.Withdrawal[]", + "name": "withdrawals", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "extra", + "type": "bytes" + } + ], + "internalType": "struct Suave.BuildBlockArgs", + "name": "blockArgs", + "type": "tuple" + }, + { + "internalType": "uint64", + "name": "blockHeight", + "type": "uint64" + } + ], + "name": "buildMevShare", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint64", + "name": "slot", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "proposerPubkey", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "parent", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + }, + { + "internalType": "address", + "name": "feeRecipient", + "type": "address" + }, + { + "internalType": "uint64", + "name": "gasLimit", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "random", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint64", + "name": "index", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "validator", + "type": "uint64" + }, + { + "internalType": "address", + "name": "Address", + "type": "address" + }, + { + "internalType": "uint64", + "name": "amount", + "type": "uint64" + } + ], + "internalType": "struct Suave.Withdrawal[]", + "name": "withdrawals", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "extra", + "type": "bytes" + } + ], + "internalType": "struct Suave.BuildBlockArgs", + "name": "blockArgs", + "type": "tuple" + }, + { + "internalType": "uint64", + "name": "blockHeight", + "type": "uint64" + }, + { + "internalType": "Suave.BidId[]", + "name": "bids", + "type": "bytes16[]" + }, + { + "internalType": "string", + "name": "namespace", + "type": "string" + } + ], + "name": "doBuild", + "outputs": [ + { + "components": [ + { + "internalType": "Suave.BidId", + "name": "id", + "type": "bytes16" + }, + { + "internalType": "Suave.BidId", + "name": "salt", + "type": "bytes16" + }, + { + "internalType": "uint64", + "name": "decryptionCondition", + "type": "uint64" + }, + { + "internalType": "address[]", + "name": "allowedPeekers", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "allowedStores", + "type": "address[]" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + } + ], + "internalType": "struct Suave.Bid", + "name": "", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "Suave.BidId", + "name": "id", + "type": "bytes16" + }, + { + "internalType": "Suave.BidId", + "name": "salt", + "type": "bytes16" + }, + { + "internalType": "uint64", + "name": "decryptionCondition", + "type": "uint64" + }, + { + "internalType": "address[]", + "name": "allowedPeekers", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "allowedStores", + "type": "address[]" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + } + ], + "internalType": "struct Suave.Bid", + "name": "bid", + "type": "tuple" + } + ], + "name": "emitBid", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "Suave.BidId", + "name": "id", + "type": "bytes16" + }, + { + "internalType": "Suave.BidId", + "name": "salt", + "type": "bytes16" + }, + { + "internalType": "uint64", + "name": "decryptionCondition", + "type": "uint64" + }, + { + "internalType": "address[]", + "name": "allowedPeekers", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "allowedStores", + "type": "address[]" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + } + ], + "internalType": "struct Suave.Bid", + "name": "bid", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "builderBid", + "type": "bytes" + } + ], + "name": "emitBuilderBidAndBid", + "outputs": [ + { + "components": [ + { + "internalType": "Suave.BidId", + "name": "id", + "type": "bytes16" + }, + { + "internalType": "Suave.BidId", + "name": "salt", + "type": "bytes16" + }, + { + "internalType": "uint64", + "name": "decryptionCondition", + "type": "uint64" + }, + { + "internalType": "address[]", + "name": "allowedPeekers", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "allowedStores", + "type": "address[]" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + } + ], + "internalType": "struct Suave.Bid", + "name": "", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fetchBidConfidentialBundleData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "Suave.BidId", + "name": "_l", + "type": "bytes16" + }, + { + "internalType": "Suave.BidId", + "name": "_r", + "type": "bytes16" + } + ], + "name": "idsEqual", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "Suave.BidId", + "name": "bidId", + "type": "bytes16" + }, + { + "internalType": "bytes", + "name": "signedBlindedHeader", + "type": "bytes" + } + ], + "name": "unlock", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x10e3f8b28dab66438832412ff41e8f8ffbe80c64e12338463f902b9ac6fcf9b9", + "receipt": { + "to": null, + "from": "0x16f2Aa8dF055b6e672b93Ded41FecCCabAB565B0", + "contractAddress": "0xfAe9E5469A6Bbb8B7e03742d3b92a0584b63595E", + "transactionIndex": 0, + "gasUsed": "3440657", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x7e1afb0c27ae9a57f512ec9468d9fe8784173417fe1ed2a613df200921f76df9", + "transactionHash": "0x10e3f8b28dab66438832412ff41e8f8ffbe80c64e12338463f902b9ac6fcf9b9", + "logs": [], + "blockNumber": 478692, + "cumulativeGasUsed": "3440657", + "status": 1, + "byzantium": true + }, + "args": [ + "https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@boost-relay-goerli.flashbots.net" + ], + "numDeployments": 1, + "solcInputHash": "23827a9d8caf34ac1d6e36f5c8991a07", + "metadata": "{\"compiler\":{\"version\":\"0.8.8+commit.dddeac2f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"boostRelayUrl_\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"PeekerReverted\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"Suave.BidId\",\"name\":\"bidId\",\"type\":\"bytes16\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"decryptionCondition\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"allowedPeekers\",\"type\":\"address[]\"}],\"name\":\"BidEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"Suave.BidId\",\"name\":\"bidId\",\"type\":\"bytes16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"builderBid\",\"type\":\"bytes\"}],\"name\":\"BuilderBoostBidEvent\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"slot\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"proposerPubkey\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"parent\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"feeRecipient\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"gasLimit\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"random\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"index\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"validator\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"Address\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"internalType\":\"struct Suave.Withdrawal[]\",\"name\":\"withdrawals\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"extra\",\"type\":\"bytes\"}],\"internalType\":\"struct Suave.BuildBlockArgs\",\"name\":\"blockArgs\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"},{\"internalType\":\"Suave.BidId[]\",\"name\":\"bids\",\"type\":\"bytes16[]\"},{\"internalType\":\"string\",\"name\":\"namespace\",\"type\":\"string\"}],\"name\":\"buildAndEmit\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"slot\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"proposerPubkey\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"parent\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"feeRecipient\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"gasLimit\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"random\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"index\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"validator\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"Address\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"internalType\":\"struct Suave.Withdrawal[]\",\"name\":\"withdrawals\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"extra\",\"type\":\"bytes\"}],\"internalType\":\"struct Suave.BuildBlockArgs\",\"name\":\"blockArgs\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"}],\"name\":\"buildFromPool\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"slot\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"proposerPubkey\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"parent\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"feeRecipient\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"gasLimit\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"random\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"index\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"validator\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"Address\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"internalType\":\"struct Suave.Withdrawal[]\",\"name\":\"withdrawals\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"extra\",\"type\":\"bytes\"}],\"internalType\":\"struct Suave.BuildBlockArgs\",\"name\":\"blockArgs\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"}],\"name\":\"buildMevShare\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"slot\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"proposerPubkey\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"parent\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"feeRecipient\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"gasLimit\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"random\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"index\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"validator\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"Address\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"internalType\":\"struct Suave.Withdrawal[]\",\"name\":\"withdrawals\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"extra\",\"type\":\"bytes\"}],\"internalType\":\"struct Suave.BuildBlockArgs\",\"name\":\"blockArgs\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"},{\"internalType\":\"Suave.BidId[]\",\"name\":\"bids\",\"type\":\"bytes16[]\"},{\"internalType\":\"string\",\"name\":\"namespace\",\"type\":\"string\"}],\"name\":\"doBuild\",\"outputs\":[{\"components\":[{\"internalType\":\"Suave.BidId\",\"name\":\"id\",\"type\":\"bytes16\"},{\"internalType\":\"Suave.BidId\",\"name\":\"salt\",\"type\":\"bytes16\"},{\"internalType\":\"uint64\",\"name\":\"decryptionCondition\",\"type\":\"uint64\"},{\"internalType\":\"address[]\",\"name\":\"allowedPeekers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"allowedStores\",\"type\":\"address[]\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"internalType\":\"struct Suave.Bid\",\"name\":\"\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"Suave.BidId\",\"name\":\"id\",\"type\":\"bytes16\"},{\"internalType\":\"Suave.BidId\",\"name\":\"salt\",\"type\":\"bytes16\"},{\"internalType\":\"uint64\",\"name\":\"decryptionCondition\",\"type\":\"uint64\"},{\"internalType\":\"address[]\",\"name\":\"allowedPeekers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"allowedStores\",\"type\":\"address[]\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"internalType\":\"struct Suave.Bid\",\"name\":\"bid\",\"type\":\"tuple\"}],\"name\":\"emitBid\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"Suave.BidId\",\"name\":\"id\",\"type\":\"bytes16\"},{\"internalType\":\"Suave.BidId\",\"name\":\"salt\",\"type\":\"bytes16\"},{\"internalType\":\"uint64\",\"name\":\"decryptionCondition\",\"type\":\"uint64\"},{\"internalType\":\"address[]\",\"name\":\"allowedPeekers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"allowedStores\",\"type\":\"address[]\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"internalType\":\"struct Suave.Bid\",\"name\":\"bid\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"builderBid\",\"type\":\"bytes\"}],\"name\":\"emitBuilderBidAndBid\",\"outputs\":[{\"components\":[{\"internalType\":\"Suave.BidId\",\"name\":\"id\",\"type\":\"bytes16\"},{\"internalType\":\"Suave.BidId\",\"name\":\"salt\",\"type\":\"bytes16\"},{\"internalType\":\"uint64\",\"name\":\"decryptionCondition\",\"type\":\"uint64\"},{\"internalType\":\"address[]\",\"name\":\"allowedPeekers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"allowedStores\",\"type\":\"address[]\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"internalType\":\"struct Suave.Bid\",\"name\":\"\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fetchBidConfidentialBundleData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Suave.BidId\",\"name\":\"_l\",\"type\":\"bytes16\"},{\"internalType\":\"Suave.BidId\",\"name\":\"_r\",\"type\":\"bytes16\"}],\"name\":\"idsEqual\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"Suave.BidId\",\"name\":\"bidId\",\"type\":\"bytes16\"},{\"internalType\":\"bytes\",\"name\":\"signedBlindedHeader\",\"type\":\"bytes\"}],\"name\":\"unlock\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/standard_peekers/bids.sol\":\"EthBlockBidSenderContract\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/libraries/Suave.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.8;\\n\\nlibrary Suave {\\n error PeekerReverted(address, bytes);\\n\\n type BidId is bytes16;\\n\\n struct Bid {\\n BidId id;\\n BidId salt;\\n uint64 decryptionCondition;\\n address[] allowedPeekers;\\n address[] allowedStores;\\n string version;\\n }\\n\\n struct BuildBlockArgs {\\n uint64 slot;\\n bytes proposerPubkey;\\n bytes32 parent;\\n uint64 timestamp;\\n address feeRecipient;\\n uint64 gasLimit;\\n bytes32 random;\\n Withdrawal[] withdrawals;\\n bytes extra;\\n }\\n\\n struct Withdrawal {\\n uint64 index;\\n uint64 validator;\\n address Address;\\n uint64 amount;\\n }\\n\\n address public constant ANYALLOWED = 0xC8df3686b4Afb2BB53e60EAe97EF043FE03Fb829;\\n\\n address public constant IS_CONFIDENTIAL_ADDR = 0x0000000000000000000000000000000042010000;\\n\\n address public constant BUILD_ETH_BLOCK = 0x0000000000000000000000000000000042100001;\\n\\n address public constant CONFIDENTIAL_INPUTS = 0x0000000000000000000000000000000042010001;\\n\\n address public constant CONFIDENTIAL_RETRIEVE = 0x0000000000000000000000000000000042020001;\\n\\n address public constant CONFIDENTIAL_STORE = 0x0000000000000000000000000000000042020000;\\n\\n address public constant ETHCALL = 0x0000000000000000000000000000000042100003;\\n\\n address public constant EXTRACT_HINT = 0x0000000000000000000000000000000042100037;\\n\\n address public constant FETCH_BIDS = 0x0000000000000000000000000000000042030001;\\n\\n address public constant FILL_MEV_SHARE_BUNDLE = 0x0000000000000000000000000000000043200001;\\n\\n address public constant NEW_BID = 0x0000000000000000000000000000000042030000;\\n\\n address public constant SIGN_ETH_TRANSACTION = 0x0000000000000000000000000000000040100001;\\n\\n address public constant SIMULATE_BUNDLE = 0x0000000000000000000000000000000042100000;\\n\\n address public constant SUBMIT_BUNDLE_JSON_RPC = 0x0000000000000000000000000000000043000001;\\n\\n address public constant SUBMIT_ETH_BLOCK_BID_TO_RELAY = 0x0000000000000000000000000000000042100002;\\n\\n // Returns whether execution is off- or on-chain\\n function isConfidential() internal view returns (bool b) {\\n (bool success, bytes memory isConfidentialBytes) = IS_CONFIDENTIAL_ADDR.staticcall(\\\"\\\");\\n if (!success) {\\n revert PeekerReverted(IS_CONFIDENTIAL_ADDR, isConfidentialBytes);\\n }\\n assembly {\\n // Load the length of data (first 32 bytes)\\n let len := mload(isConfidentialBytes)\\n // Load the data after 32 bytes, so add 0x20\\n b := mload(add(isConfidentialBytes, 0x20))\\n }\\n }\\n\\n function buildEthBlock(BuildBlockArgs memory blockArgs, BidId bidId, string memory namespace)\\n internal\\n view\\n returns (bytes memory, bytes memory)\\n {\\n (bool success, bytes memory data) = BUILD_ETH_BLOCK.staticcall(abi.encode(blockArgs, bidId, namespace));\\n if (!success) {\\n revert PeekerReverted(BUILD_ETH_BLOCK, data);\\n }\\n\\n return abi.decode(data, (bytes, bytes));\\n }\\n\\n function confidentialInputs() internal view returns (bytes memory) {\\n (bool success, bytes memory data) = CONFIDENTIAL_INPUTS.staticcall(abi.encode());\\n if (!success) {\\n revert PeekerReverted(CONFIDENTIAL_INPUTS, data);\\n }\\n\\n return data;\\n }\\n\\n function confidentialRetrieve(BidId bidId, string memory key) internal view returns (bytes memory) {\\n (bool success, bytes memory data) = CONFIDENTIAL_RETRIEVE.staticcall(abi.encode(bidId, key));\\n if (!success) {\\n revert PeekerReverted(CONFIDENTIAL_RETRIEVE, data);\\n }\\n\\n return data;\\n }\\n\\n function confidentialStore(BidId bidId, string memory key, bytes memory data1) internal view {\\n (bool success, bytes memory data) = CONFIDENTIAL_STORE.staticcall(abi.encode(bidId, key, data1));\\n if (!success) {\\n revert PeekerReverted(CONFIDENTIAL_STORE, data);\\n }\\n }\\n\\n function ethcall(address contractAddr, bytes memory input1) internal view returns (bytes memory) {\\n (bool success, bytes memory data) = ETHCALL.staticcall(abi.encode(contractAddr, input1));\\n if (!success) {\\n revert PeekerReverted(ETHCALL, data);\\n }\\n\\n return abi.decode(data, (bytes));\\n }\\n\\n function extractHint(bytes memory bundleData) internal view returns (bytes memory) {\\n require(isConfidential());\\n (bool success, bytes memory data) = EXTRACT_HINT.staticcall(abi.encode(bundleData));\\n if (!success) {\\n revert PeekerReverted(EXTRACT_HINT, data);\\n }\\n\\n return data;\\n }\\n\\n function fetchBids(uint64 cond, string memory namespace) internal view returns (Bid[] memory) {\\n (bool success, bytes memory data) = FETCH_BIDS.staticcall(abi.encode(cond, namespace));\\n if (!success) {\\n revert PeekerReverted(FETCH_BIDS, data);\\n }\\n\\n return abi.decode(data, (Bid[]));\\n }\\n\\n function fillMevShareBundle(BidId bidId) internal view returns (bytes memory) {\\n require(isConfidential());\\n (bool success, bytes memory data) = FILL_MEV_SHARE_BUNDLE.staticcall(abi.encode(bidId));\\n if (!success) {\\n revert PeekerReverted(FILL_MEV_SHARE_BUNDLE, data);\\n }\\n\\n return data;\\n }\\n\\n function newBid(\\n uint64 decryptionCondition,\\n address[] memory allowedPeekers,\\n address[] memory allowedStores,\\n string memory bidType\\n ) internal view returns (Bid memory) {\\n (bool success, bytes memory data) =\\n NEW_BID.staticcall(abi.encode(decryptionCondition, allowedPeekers, allowedStores, bidType));\\n if (!success) {\\n revert PeekerReverted(NEW_BID, data);\\n }\\n\\n return abi.decode(data, (Bid));\\n }\\n\\n function signEthTransaction(bytes memory txn, string memory chainId, string memory signingKey)\\n internal\\n view\\n returns (bytes memory)\\n {\\n (bool success, bytes memory data) = SIGN_ETH_TRANSACTION.staticcall(abi.encode(txn, chainId, signingKey));\\n if (!success) {\\n revert PeekerReverted(SIGN_ETH_TRANSACTION, data);\\n }\\n\\n return abi.decode(data, (bytes));\\n }\\n\\n function simulateBundle(bytes memory bundleData) internal view returns (uint64) {\\n (bool success, bytes memory data) = SIMULATE_BUNDLE.staticcall(abi.encode(bundleData));\\n if (!success) {\\n revert PeekerReverted(SIMULATE_BUNDLE, data);\\n }\\n\\n return abi.decode(data, (uint64));\\n }\\n\\n function submitBundleJsonRPC(string memory url, string memory method, bytes memory params)\\n internal\\n view\\n returns (bytes memory)\\n {\\n require(isConfidential());\\n (bool success, bytes memory data) = SUBMIT_BUNDLE_JSON_RPC.staticcall(abi.encode(url, method, params));\\n if (!success) {\\n revert PeekerReverted(SUBMIT_BUNDLE_JSON_RPC, data);\\n }\\n\\n return data;\\n }\\n\\n function submitEthBlockBidToRelay(string memory relayUrl, bytes memory builderBid)\\n internal\\n view\\n returns (bytes memory)\\n {\\n require(isConfidential());\\n (bool success, bytes memory data) = SUBMIT_ETH_BLOCK_BID_TO_RELAY.staticcall(abi.encode(relayUrl, builderBid));\\n if (!success) {\\n revert PeekerReverted(SUBMIT_ETH_BLOCK_BID_TO_RELAY, data);\\n }\\n\\n return data;\\n }\\n}\\n\",\"keccak256\":\"0xfe780feb2dda2367a98f438a860a70a9b1b5805d97d95e5c830f4b0fe19eb210\",\"license\":\"UNLICENSED\"},\"contracts/standard_peekers/bids.sol\":{\"content\":\"pragma solidity ^0.8.8;\\n\\nimport \\\"../libraries/Suave.sol\\\";\\n\\ncontract AnyBidContract {\\n\\n\\tevent BidEvent(\\n\\t\\tSuave.BidId bidId,\\n\\t\\tuint64 decryptionCondition,\\n\\t\\taddress[] allowedPeekers\\n\\t);\\n\\n\\tfunction fetchBidConfidentialBundleData() public returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\t\\t\\n\\t\\tbytes memory confidentialInputs = Suave.confidentialInputs();\\n\\t\\treturn abi.decode(confidentialInputs, (bytes));\\n\\t}\\n\\n\\t// Bids to this contract should not be trusted!\\n\\tfunction emitBid(Suave.Bid calldata bid) public {\\n\\t\\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\\n\\t}\\n}\\n\\ncontract BundleBidContract is AnyBidContract {\\n\\n\\tfunction newBid(uint64 decryptionCondition, address[] memory bidAllowedPeekers, address[] memory bidAllowedStores) external payable returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\n\\t\\tbytes memory bundleData = this.fetchBidConfidentialBundleData();\\n\\n\\t\\tuint64 egp = Suave.simulateBundle(bundleData);\\n\\n\\t\\tSuave.Bid memory bid = Suave.newBid(decryptionCondition, bidAllowedPeekers, bidAllowedStores, \\\"default:v0:ethBundles\\\");\\n\\n\\t\\tSuave.confidentialStore(bid.id, \\\"default:v0:ethBundles\\\", bundleData);\\n\\t\\tSuave.confidentialStore(bid.id, \\\"default:v0:ethBundleSimResults\\\", abi.encode(egp));\\n\\n\\t\\treturn emitAndReturn(bid, bundleData);\\n\\t}\\n\\n\\tfunction emitAndReturn(Suave.Bid memory bid, bytes memory) internal virtual returns (bytes memory) {\\n\\t\\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\\n\\t\\treturn bytes.concat(this.emitBid.selector, abi.encode(bid));\\n\\t}\\n}\\n\\ncontract EthBundleSenderContract is BundleBidContract {\\n\\tstring[] public builderUrls;\\n\\n\\tconstructor(string[] memory builderUrls_) {\\n\\t\\tbuilderUrls = builderUrls_;\\n\\t}\\n\\n\\tfunction emitAndReturn(Suave.Bid memory bid, bytes memory bundleData) internal virtual override returns (bytes memory) {\\n\\t\\tfor (uint i = 0; i < builderUrls.length; i++) {\\n\\t\\t\\tSuave.submitBundleJsonRPC(builderUrls[i], \\\"eth_sendBundle\\\", bundleData);\\n\\t\\t}\\n\\n\\t\\treturn BundleBidContract.emitAndReturn(bid, bundleData);\\n\\t}\\n}\\n\\ncontract MevShareBidContract is AnyBidContract {\\n\\n\\tevent HintEvent(\\n\\t\\tSuave.BidId bidId,\\n\\t\\tbytes hint\\n\\t);\\n\\n\\tevent MatchEvent(\\n\\t\\tSuave.BidId matchBidId,\\n\\t\\tbytes matchHint\\n\\t);\\n\\n\\tfunction newBid(uint64 decryptionCondition, address[] memory bidAllowedPeekers, address[] memory bidAllowedStores) external payable returns (bytes memory) {\\n\\t\\t// 0. check confidential execution\\n\\t\\trequire(Suave.isConfidential());\\n\\n\\t\\t// 1. fetch bundle data\\n\\t\\tbytes memory bundleData = this.fetchBidConfidentialBundleData();\\n\\n\\t\\t// 2. sim bundle\\n\\t\\tuint64 egp = Suave.simulateBundle(bundleData);\\n\\t\\t\\n\\t\\t// 3. extract hint\\n\\t\\tbytes memory hint = Suave.extractHint(bundleData);\\n\\t\\t\\n\\t\\t// // 4. store bundle and sim results\\n\\t\\tSuave.Bid memory bid = Suave.newBid(decryptionCondition, bidAllowedPeekers, bidAllowedStores, \\\"mevshare:v0:unmatchedBundles\\\");\\n\\t\\tSuave.confidentialStore(bid.id, \\\"mevshare:v0:ethBundles\\\", bundleData);\\n\\t\\tSuave.confidentialStore(bid.id, \\\"mevshare:v0:ethBundleSimResults\\\", abi.encode(egp));\\n\\t\\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\\n\\t\\temit HintEvent(bid.id, hint);\\n\\n\\t\\t// // 5. return \\\"callback\\\" to emit hint onchain\\n\\t\\treturn bytes.concat(this.emitBidAndHint.selector, abi.encode(bid, hint));\\n\\t}\\n\\n\\tfunction emitBidAndHint(Suave.Bid calldata bid, bytes memory hint) public {\\n\\t\\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\\n\\t\\temit HintEvent(bid.id, hint);\\n\\t}\\n\\n\\tfunction newMatch(uint64 decryptionCondition, address[] memory bidAllowedPeekers, address[] memory bidAllowedStores, Suave.BidId shareBidId) external payable returns (bytes memory) {\\n\\t\\t// WARNING : this function will copy the original mev share bid\\n\\t\\t// into a new key with potentially different permsissions\\n\\t\\t\\n\\t\\trequire(Suave.isConfidential());\\n\\t\\t// 1. fetch confidential data\\n\\t\\tbytes memory matchBundleData = this.fetchBidConfidentialBundleData();\\n\\n\\t\\t// 2. sim match alone for validity\\n\\t\\tuint64 egp = Suave.simulateBundle(matchBundleData);\\n\\n\\t\\t// 3. extract hint\\n\\t\\tbytes memory matchHint = Suave.extractHint(matchBundleData);\\n\\t\\t\\n\\t\\tSuave.Bid memory bid = Suave.newBid(decryptionCondition, bidAllowedPeekers, bidAllowedStores, \\\"mevshare:v0:matchBids\\\");\\n\\t\\tSuave.confidentialStore(bid.id, \\\"mevshare:v0:ethBundles\\\", matchBundleData);\\n\\t\\tSuave.confidentialStore(bid.id, \\\"mevshare:v0:ethBundleSimResults\\\", abi.encode(0));\\n\\n\\t\\t//4. merge bids\\n\\t\\tSuave.BidId[] memory bids = new Suave.BidId[](2);\\n\\t\\tbids[0] = shareBidId;\\n\\t\\tbids[1] = bid.id;\\n\\t\\tSuave.confidentialStore(bid.id, \\\"mevshare:v0:mergedBids\\\", abi.encode(bids));\\n\\n\\t\\treturn emitMatchBidAndHint(bid, matchHint);\\n\\t}\\n\\n\\tfunction emitMatchBidAndHint(Suave.Bid memory bid, bytes memory matchHint) internal virtual returns (bytes memory) {\\n\\t\\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\\n\\t\\temit MatchEvent(bid.id, matchHint);\\n\\n\\t\\treturn bytes.concat(this.emitBid.selector, abi.encode(bid));\\n\\t}\\n}\\n\\ncontract MevShareBundleSenderContract is MevShareBidContract {\\n\\tstring[] public builderUrls;\\n\\n\\tconstructor(string[] memory builderUrls_) {\\n\\t\\tbuilderUrls = builderUrls_;\\n\\t}\\n\\n\\tfunction emitMatchBidAndHint(Suave.Bid memory bid, bytes memory matchHint) internal virtual override returns (bytes memory) {\\n\\t\\tbytes memory bundleData = Suave.fillMevShareBundle(bid.id);\\n\\t\\tfor (uint i = 0; i < builderUrls.length; i++) {\\n\\t\\t\\tSuave.submitBundleJsonRPC(builderUrls[i], \\\"mev_sendBundle\\\", bundleData);\\n\\t\\t}\\n\\n\\t\\treturn MevShareBidContract.emitMatchBidAndHint(bid, matchHint);\\n\\t}\\n}\\n\\n/* Not tested or implemented on the precompile side */\\nstruct EgpBidPair {\\n\\tuint64 egp; // in wei, beware overflow\\n\\tSuave.BidId bidId;\\n}\\n\\n// todo: instead of inherit interact with deployed builder contract\\ncontract EthBlockBidContract is AnyBidContract {\\n\\n\\tevent BuilderBoostBidEvent(\\n\\t\\tSuave.BidId bidId,\\n\\t\\tbytes builderBid\\n\\t);\\n\\t\\n\\tfunction idsEqual(Suave.BidId _l, Suave.BidId _r) public pure returns (bool) {\\n\\t\\tbytes memory l = abi.encodePacked(_l);\\n\\t\\tbytes memory r = abi.encodePacked(_r);\\n\\t\\tfor (uint i = 0; i < l.length; i++) {\\n\\t\\t\\tif (bytes(l)[i] != r[i]) {\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn true;\\n\\t}\\n\\n\\tfunction buildMevShare(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight) public virtual returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\t\\tSuave.Bid[] memory allShareMatchBids = Suave.fetchBids(blockHeight, \\\"mevshare:v0:matchBids\\\");\\n\\t\\tSuave.Bid[] memory allShareUserBids = Suave.fetchBids(blockHeight, \\\"mevshare:v0:unmatchedBundles\\\");\\n\\n\\t\\tif (allShareUserBids.length == 0) {\\n\\t\\t\\trevert Suave.PeekerReverted(address(this), \\\"no bids\\\");\\n\\t\\t}\\n\\n\\t\\tSuave.Bid[] memory allBids = new Suave.Bid[](allShareUserBids.length);\\n\\t\\tfor (uint i = 0; i < allShareUserBids.length; i++) {\\n\\t\\t\\t// TODO: sort matches by egp first!\\n\\t\\t\\tSuave.Bid memory bidToInsert = allShareUserBids[i]; // will be updated with the best match if any\\n\\t\\t\\tfor (uint j = 0; j < allShareMatchBids.length; j++) {\\n\\t\\t\\t\\t// TODO: should be done once at the start and sorted\\n\\t\\t\\t\\tSuave.BidId[] memory mergedBidIds = abi.decode(Suave.confidentialRetrieve(allShareMatchBids[j].id, \\\"mevshare:v0:mergedBids\\\"), (Suave.BidId[]));\\n\\t\\t\\t\\tif (idsEqual(mergedBidIds[0], allShareUserBids[i].id)) {\\n\\t\\t\\t\\t\\tbidToInsert = allShareMatchBids[j];\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\tallBids[i] = bidToInsert;\\n\\t\\t}\\n\\n\\t\\tEgpBidPair[] memory bidsByEGP = new EgpBidPair[](allBids.length);\\n\\t\\tfor (uint i = 0; i < allBids.length; i++) {\\n\\t\\t\\tbytes memory simResults = Suave.confidentialRetrieve(allBids[i].id, \\\"mevshare:v0:ethBundleSimResults\\\");\\n\\t\\t\\tuint64 egp = abi.decode(simResults, (uint64));\\n\\t\\t\\tbidsByEGP[i] = EgpBidPair(egp, allBids[i].id);\\n\\t\\t}\\n\\n\\t\\t// Bubble sort, cause why not\\n\\t\\tuint n = bidsByEGP.length;\\n\\t\\tfor (uint i = 0; i < n - 1; i++) {\\n\\t\\t\\tfor (uint j = i + 1; j < n; j++) {\\n\\t\\t\\t\\tif (bidsByEGP[i].egp < bidsByEGP[j].egp) {\\n\\t\\t\\t\\t\\tEgpBidPair memory temp = bidsByEGP[i];\\n\\t\\t\\t\\t\\tbidsByEGP[i] = bidsByEGP[j];\\n\\t\\t\\t\\t\\tbidsByEGP[j] = temp;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tSuave.BidId[] memory allBidIds = new Suave.BidId[](allBids.length);\\n\\t\\tfor (uint i = 0; i < bidsByEGP.length; i++) {\\n\\t\\t\\tallBidIds[i] = bidsByEGP[i].bidId;\\n\\t\\t}\\n\\n\\t\\treturn buildAndEmit(blockArgs, blockHeight, allBidIds, \\\"mevshare:v0\\\");\\n\\t}\\n\\n\\tfunction buildFromPool(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight) public returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\n\\t\\tSuave.Bid[] memory allBids = Suave.fetchBids(blockHeight, \\\"default:v0:ethBundles\\\");\\n\\t\\tif (allBids.length == 0) {\\n\\t\\t\\trevert Suave.PeekerReverted(address(this), \\\"no bids\\\");\\n\\t\\t}\\n\\n\\t\\tEgpBidPair[] memory bidsByEGP = new EgpBidPair[](allBids.length);\\n\\t\\tfor (uint i = 0; i < allBids.length; i++) {\\n\\t\\t\\tbytes memory simResults = Suave.confidentialRetrieve(allBids[i].id, \\\"default:v0:ethBundleSimResults\\\");\\n\\t\\t\\tuint64 egp = abi.decode(simResults, (uint64));\\n\\t\\t\\tbidsByEGP[i] = EgpBidPair(egp, allBids[i].id);\\n\\t\\t}\\n\\n\\t\\t// Bubble sort, cause why not\\n\\t\\tuint n = bidsByEGP.length;\\n\\t\\tfor (uint i = 0; i < n - 1; i++) {\\n\\t\\t\\tfor (uint j = i + 1; j < n; j++) {\\n\\t\\t\\t\\tif (bidsByEGP[i].egp < bidsByEGP[j].egp) {\\n\\t\\t\\t\\t\\tEgpBidPair memory temp = bidsByEGP[i];\\n\\t\\t\\t\\t\\tbidsByEGP[i] = bidsByEGP[j];\\n\\t\\t\\t\\t\\tbidsByEGP[j] = temp;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tSuave.BidId[] memory allBidIds = new Suave.BidId[](allBids.length);\\n\\t\\tfor (uint i = 0; i < bidsByEGP.length; i++) {\\n\\t\\t\\tallBidIds[i] = bidsByEGP[i].bidId;\\n\\t\\t}\\n\\n\\t\\treturn buildAndEmit(blockArgs, blockHeight, allBidIds, \\\"\\\");\\n\\t}\\n\\n\\tfunction buildAndEmit(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight, Suave.BidId[] memory bids, string memory namespace) public virtual returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\n\\t\\t(Suave.Bid memory blockBid, bytes memory builderBid) = this.doBuild(blockArgs, blockHeight, bids, namespace);\\n\\n\\t\\temit BuilderBoostBidEvent(blockBid.id, builderBid);\\n\\t\\temit BidEvent(blockBid.id, blockBid.decryptionCondition, blockBid.allowedPeekers);\\n\\t\\treturn bytes.concat(this.emitBuilderBidAndBid.selector, abi.encode(blockBid, builderBid));\\n\\t}\\n\\n\\tfunction doBuild(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight, Suave.BidId[] memory bids, string memory namespace) public view returns (Suave.Bid memory, bytes memory) {\\n\\t\\taddress[] memory allowedPeekers = new address[](2);\\n\\t\\tallowedPeekers[0] = address(this);\\n\\t\\tallowedPeekers[1] = Suave.BUILD_ETH_BLOCK;\\n\\n\\t\\tSuave.Bid memory blockBid = Suave.newBid(blockHeight, allowedPeekers, allowedPeekers, \\\"default:v0:mergedBids\\\");\\n\\t\\tSuave.confidentialStore(blockBid.id, \\\"default:v0:mergedBids\\\", abi.encode(bids));\\n\\t\\t \\n\\t\\t(bytes memory builderBid, bytes memory payload) = Suave.buildEthBlock(blockArgs, blockBid.id, namespace);\\n\\t\\tSuave.confidentialStore(blockBid.id, \\\"default:v0:builderPayload\\\", payload); // only through this.unlock\\n\\n\\t\\treturn (blockBid, builderBid);\\n\\t}\\n\\n\\tfunction emitBuilderBidAndBid(Suave.Bid memory bid, bytes memory builderBid) public returns (Suave.Bid memory, bytes memory) {\\n\\t\\temit BuilderBoostBidEvent(bid.id, builderBid);\\n\\t\\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\\n\\t\\treturn (bid, builderBid);\\n\\t}\\n\\n\\tfunction unlock(Suave.BidId bidId, bytes memory signedBlindedHeader) public view returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\n\\t\\t// TODO: verify the header is correct\\n\\t\\t// TODO: incorporate protocol name\\n\\t\\tbytes memory payload = Suave.confidentialRetrieve(bidId, \\\"default:v0:builderPayload\\\");\\n\\t\\treturn payload;\\n\\t}\\n}\\n\\ncontract EthBlockBidSenderContract is EthBlockBidContract {\\n\\tstring boostRelayUrl;\\n\\n\\tconstructor(string memory boostRelayUrl_) {\\n\\t\\tboostRelayUrl = boostRelayUrl_;\\n\\t}\\n\\n\\tfunction buildAndEmit(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight, Suave.BidId[] memory bids, string memory namespace) public virtual override returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\n\\t\\t(Suave.Bid memory blockBid, bytes memory builderBid) = this.doBuild(blockArgs, blockHeight, bids, namespace);\\n\\t\\tSuave.submitEthBlockBidToRelay(boostRelayUrl, builderBid);\\n\\n\\t\\temit BidEvent(blockBid.id, blockBid.decryptionCondition, blockBid.allowedPeekers);\\n\\t\\treturn bytes.concat(this.emitBid.selector, abi.encode(blockBid));\\n\\t}\\n}\\n\",\"keccak256\":\"0xdc53e0e48d02cd3565889503fb7413966aa8fdee19c4326c84bc15a0a723aa3c\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162003e1f38038062003e1f8339818101604052810190620000379190620002a4565b80600090805190602001906200004f92919062000057565b50506200035a565b828054620000659062000324565b90600052602060002090601f016020900481019282620000895760008555620000d5565b82601f10620000a457805160ff1916838001178555620000d5565b82800160010185558215620000d5579182015b82811115620000d4578251825591602001919060010190620000b7565b5b509050620000e49190620000e8565b5090565b5b8082111562000103576000816000905550600101620000e9565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620001708262000125565b810181811067ffffffffffffffff8211171562000192576200019162000136565b5b80604052505050565b6000620001a762000107565b9050620001b5828262000165565b919050565b600067ffffffffffffffff821115620001d857620001d762000136565b5b620001e38262000125565b9050602081019050919050565b60005b8381101562000210578082015181840152602081019050620001f3565b8381111562000220576000848401525b50505050565b60006200023d6200023784620001ba565b6200019b565b9050828152602081018484840111156200025c576200025b62000120565b5b62000269848285620001f0565b509392505050565b600082601f8301126200028957620002886200011b565b5b81516200029b84826020860162000226565b91505092915050565b600060208284031215620002bd57620002bc62000111565b5b600082015167ffffffffffffffff811115620002de57620002dd62000116565b5b620002ec8482850162000271565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200033d57607f821691505b60208210811415620003545762000353620002f5565b5b50919050565b613ab5806200036a6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806392f07a581161006657806392f07a5814610159578063b33e471514610177578063c0b9d287146101a8578063d503387a146101c4578063e829cd5d146101f457610093565b8063232ef1f414610098578063346ab175146100c9578063464b0c3a146100f95780637df1cde214610129575b600080fd5b6100b260048036038101906100ad91906121a1565b610224565b6040516100c09291906124be565b60405180910390f35b6100e360048036038101906100de91906124f5565b610433565b6040516100f09190612551565b60405180910390f35b610113600480360381019061010e91906121a1565b61085d565b6040516101209190612551565b60405180910390f35b610143600480360381019061013e9190612573565b610a3b565b6040516101509190612551565b60405180910390f35b610161610a9b565b60405161016e9190612551565b60405180910390f35b610191600480360381019061018c9190612786565b610ad4565b60405161019f9291906124be565b60405180910390f35b6101c260048036038101906101bd9190612822565b610b6f565b005b6101de60048036038101906101d991906124f5565b610be6565b6040516101eb9190612551565b60405180910390f35b61020e6004803603810190610209919061286b565b611233565b60405161021b91906128c6565b60405180910390f35b61022c611a9c565b60606000600267ffffffffffffffff81111561024b5761024a611b63565b5b6040519080825280602002602001820160405280156102795781602001602082028036833780820191505090505b5090503081600081518110610291576102906128e1565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506342100001816001815181106102e4576102e36128e1565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060006103618783846040518060400160405280601581526020017f64656661756c743a76303a6d657267656442696473000000000000000000000081525061133a565b90506103c681600001516040518060400160405280601581526020017f64656661756c743a76303a6d6572676564426964730000000000000000000000815250886040516020016103b291906129bf565b604051602081830303815290604052611440565b6000806103d88a846000015189611523565b9150915061042083600001516040518060400160405280601981526020017f64656661756c743a76303a6275696c6465725061796c6f61640000000000000081525083611440565b8282955095505050505094509492505050565b606061043d611624565b61044657600080fd5b6000610487836040518060400160405280601581526020017f64656661756c743a76303a65746842756e646c657300000000000000000000008152506116ec565b90506000815114156104d057306040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016104c79190612a3c565b60405180910390fd5b6000815167ffffffffffffffff8111156104ed576104ec611b63565b5b60405190808252806020026020018201604052801561052657816020015b610513611b02565b81526020019060019003908161050b5790505b50905060005b825181101561063157600061059484838151811061054d5761054c6128e1565b5b6020026020010151600001516040518060400160405280601e81526020017f64656661756c743a76303a65746842756e646c6553696d526573756c747300008152506117e6565b90506000818060200190518101906105ac9190612a7f565b905060405180604001604052808267ffffffffffffffff1681526020018685815181106105dc576105db6128e1565b5b6020026020010151600001516fffffffffffffffffffffffffffffffff1916815250848481518110610611576106106128e1565b5b60200260200101819052505050808061062990612ae5565b91505061052c565b5060008151905060005b6001826106489190612b2e565b81101561076157600060018261065e9190612b62565b90505b8281101561074d5783818151811061067c5761067b6128e1565b5b60200260200101516000015167ffffffffffffffff168483815181106106a5576106a46128e1565b5b60200260200101516000015167ffffffffffffffff16101561073a5760008483815181106106d6576106d56128e1565b5b602002602001015190508482815181106106f3576106f26128e1565b5b602002602001015185848151811061070e5761070d6128e1565b5b60200260200101819052508085838151811061072d5761072c6128e1565b5b6020026020010181905250505b808061074590612ae5565b915050610661565b50808061075990612ae5565b91505061063b565b506000835167ffffffffffffffff81111561077f5761077e611b63565b5b6040519080825280602002602001820160405280156107ad5781602001602082028036833780820191505090505b50905060005b8351811015610835578381815181106107cf576107ce6128e1565b5b6020026020010151602001518282815181106107ee576107ed6128e1565b5b60200260200101906fffffffffffffffffffffffffffffffff191690816fffffffffffffffffffffffffffffffff191681525050808061082d90612ae5565b9150506107b3565b506108518787836040518060200160405280600081525061085d565b94505050505092915050565b6060610867611624565b61087057600080fd5b6000803073ffffffffffffffffffffffffffffffffffffffff1663232ef1f4888888886040518563ffffffff1660e01b81526004016108b29493929190612e41565b60006040518083038186803b1580156108ca57600080fd5b505afa1580156108de573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906109079190613130565b9150915061099f6000805461091b906131d7565b80601f0160208091040260200160405190810160405280929190818152602001828054610947906131d7565b80156109945780601f1061096957610100808354040283529160200191610994565b820191906000526020600020905b81548152906001019060200180831161097757829003601f168201915b5050505050826118cd565b507f83481d5b04dea534715acad673a8177a46fc93882760f36bdc16ccac439d504e8260000151836040015184606001516040516109df93929190613287565b60405180910390a163c0b9d28760e01b82604051602001610a0091906132c5565b604051602081830303815290604052604051602001610a20929190613370565b60405160208183030381529060405292505050949350505050565b6060610a45611624565b610a4e57600080fd5b6000610a8f846040518060400160405280601981526020017f64656661756c743a76303a6275696c6465725061796c6f6164000000000000008152506117e6565b90508091505092915050565b6060610aa5611624565b610aae57600080fd5b6000610ab86119c5565b905080806020019051810190610ace9190613398565b91505090565b610adc611a9c565b60607f67fa9c16cd72410c4cc1d47205b31852a81ec5e92d1c8cebc3ecbe98ed67fe3f846000015184604051610b139291906133e1565b60405180910390a17f83481d5b04dea534715acad673a8177a46fc93882760f36bdc16ccac439d504e846000015185604001518660600151604051610b5a93929190613287565b60405180910390a18383915091509250929050565b7f83481d5b04dea534715acad673a8177a46fc93882760f36bdc16ccac439d504e81600001356fffffffffffffffffffffffffffffffff1916826040016020810190610bbb9190613411565b838060600190610bcb919061344d565b604051610bdb949392919061353b565b60405180910390a150565b6060610bf0611624565b610bf957600080fd5b6000610c3a836040518060400160405280601581526020017f6d657673686172653a76303a6d617463684269647300000000000000000000008152506116ec565b90506000610c7d846040518060400160405280601c81526020017f6d657673686172653a76303a756e6d61746368656442756e646c6573000000008152506116ec565b9050600081511415610cc657306040517f75fff467000000000000000000000000000000000000000000000000000000008152600401610cbd9190612a3c565b60405180910390fd5b6000815167ffffffffffffffff811115610ce357610ce2611b63565b5b604051908082528060200260200182016040528015610d1c57816020015b610d09611a9c565b815260200190600190039081610d015790505b50905060005b8251811015610e7d576000838281518110610d4057610d3f6128e1565b5b6020026020010151905060005b8551811015610e49576000610db5878381518110610d6e57610d6d6128e1565b5b6020026020010151600001516040518060400160405280601681526020017f6d657673686172653a76303a6d657267656442696473000000000000000000008152506117e6565b806020019051810190610dc89190613612565b9050610e0d81600081518110610de157610de06128e1565b5b6020026020010151878681518110610dfc57610dfb6128e1565b5b602002602001015160000151611233565b15610e3557868281518110610e2557610e246128e1565b5b6020026020010151925050610e49565b508080610e4190612ae5565b915050610d4d565b5080838381518110610e5e57610e5d6128e1565b5b6020026020010181905250508080610e7590612ae5565b915050610d22565b506000815167ffffffffffffffff811115610e9b57610e9a611b63565b5b604051908082528060200260200182016040528015610ed457816020015b610ec1611b02565b815260200190600190039081610eb95790505b50905060005b8251811015610fdf576000610f42848381518110610efb57610efa6128e1565b5b6020026020010151600001516040518060400160405280601f81526020017f6d657673686172653a76303a65746842756e646c6553696d526573756c7473008152506117e6565b9050600081806020019051810190610f5a9190612a7f565b905060405180604001604052808267ffffffffffffffff168152602001868581518110610f8a57610f896128e1565b5b6020026020010151600001516fffffffffffffffffffffffffffffffff1916815250848481518110610fbf57610fbe6128e1565b5b602002602001018190525050508080610fd790612ae5565b915050610eda565b5060008151905060005b600182610ff69190612b2e565b81101561110f57600060018261100c9190612b62565b90505b828110156110fb5783818151811061102a576110296128e1565b5b60200260200101516000015167ffffffffffffffff16848381518110611053576110526128e1565b5b60200260200101516000015167ffffffffffffffff1610156110e8576000848381518110611084576110836128e1565b5b602002602001015190508482815181106110a1576110a06128e1565b5b60200260200101518584815181106110bc576110bb6128e1565b5b6020026020010181905250808583815181106110db576110da6128e1565b5b6020026020010181905250505b80806110f390612ae5565b91505061100f565b50808061110790612ae5565b915050610fe9565b506000835167ffffffffffffffff81111561112d5761112c611b63565b5b60405190808252806020026020018201604052801561115b5781602001602082028036833780820191505090505b50905060005b83518110156111e35783818151811061117d5761117c6128e1565b5b60200260200101516020015182828151811061119c5761119b6128e1565b5b60200260200101906fffffffffffffffffffffffffffffffff191690816fffffffffffffffffffffffffffffffff19168152505080806111db90612ae5565b915050611161565b506112258989836040518060400160405280600b81526020017f6d657673686172653a763000000000000000000000000000000000000000000081525061085d565b965050505050505092915050565b60008083604051602001611247919061367c565b604051602081830303815290604052905060008360405160200161126b919061367c565b604051602081830303815290604052905060005b825181101561132c5781818151811061129b5761129a6128e1565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168382815181106112db576112da6128e1565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146113195760009350505050611334565b808061132490612ae5565b91505061127f565b506001925050505b92915050565b611342611a9c565b600080634203000073ffffffffffffffffffffffffffffffffffffffff16878787876040516020016113779493929190613697565b60405160208183030381529060405260405161139391906136f1565b600060405180830381855afa9150503d80600081146113ce576040519150601f19603f3d011682016040523d82523d6000602084013e6113d3565b606091505b509150915081611420576342030000816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401611417929190613708565b60405180910390fd5b808060200190518101906114349190613738565b92505050949350505050565b600080634202000073ffffffffffffffffffffffffffffffffffffffff1685858560405160200161147393929190613781565b60405160208183030381529060405260405161148f91906136f1565b600060405180830381855afa9150503d80600081146114ca576040519150601f19603f3d011682016040523d82523d6000602084013e6114cf565b606091505b50915091508161151c576342020000816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401611513929190613708565b60405180910390fd5b5050505050565b606080600080634210000173ffffffffffffffffffffffffffffffffffffffff16878787604051602001611559939291906137c6565b60405160208183030381529060405260405161157591906136f1565b600060405180830381855afa9150503d80600081146115b0576040519150601f19603f3d011682016040523d82523d6000602084013e6115b5565b606091505b509150915081611602576342100001816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016115f9929190613708565b60405180910390fd5b80806020019051810190611616919061380b565b935093505050935093915050565b6000806000634201000073ffffffffffffffffffffffffffffffffffffffff16604051611650906138a9565b600060405180830381855afa9150503d806000811461168b576040519150601f19603f3d011682016040523d82523d6000602084013e611690565b606091505b5091509150816116dd576342010000816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016116d4929190613708565b60405180910390fd5b80516020820151935050505090565b6060600080634203000173ffffffffffffffffffffffffffffffffffffffff16858560405160200161171f9291906138be565b60405160208183030381529060405260405161173b91906136f1565b600060405180830381855afa9150503d8060008114611776576040519150601f19603f3d011682016040523d82523d6000602084013e61177b565b606091505b5091509150816117c8576342030001816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016117bf929190613708565b60405180910390fd5b808060200190518101906117dc91906139cf565b9250505092915050565b6060600080634202000173ffffffffffffffffffffffffffffffffffffffff168585604051602001611819929190613a18565b60405160208183030381529060405260405161183591906136f1565b600060405180830381855afa9150503d8060008114611870576040519150601f19603f3d011682016040523d82523d6000602084013e611875565b606091505b5091509150816118c2576342020001816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016118b9929190613708565b60405180910390fd5b809250505092915050565b60606118d7611624565b6118e057600080fd5b600080634210000273ffffffffffffffffffffffffffffffffffffffff168585604051602001611911929190613a48565b60405160208183030381529060405260405161192d91906136f1565b600060405180830381855afa9150503d8060008114611968576040519150601f19603f3d011682016040523d82523d6000602084013e61196d565b606091505b5091509150816119ba576342100002816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016119b1929190613708565b60405180910390fd5b809250505092915050565b6060600080634201000173ffffffffffffffffffffffffffffffffffffffff16604051602001604051602081830303815290604052604051611a0791906136f1565b600060405180830381855afa9150503d8060008114611a42576040519150601f19603f3d011682016040523d82523d6000602084013e611a47565b606091505b509150915081611a94576342010001816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401611a8b929190613708565b60405180910390fd5b809250505090565b6040518060c0016040528060006fffffffffffffffffffffffffffffffff1916815260200160006fffffffffffffffffffffffffffffffff19168152602001600067ffffffffffffffff1681526020016060815260200160608152602001606081525090565b6040518060400160405280600067ffffffffffffffff16815260200160006fffffffffffffffffffffffffffffffff191681525090565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611b9b82611b52565b810181811067ffffffffffffffff82111715611bba57611bb9611b63565b5b80604052505050565b6000611bcd611b39565b9050611bd98282611b92565b919050565b600080fd5b600067ffffffffffffffff82169050919050565b611c0081611be3565b8114611c0b57600080fd5b50565b600081359050611c1d81611bf7565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115611c4857611c47611b63565b5b611c5182611b52565b9050602081019050919050565b82818337600083830152505050565b6000611c80611c7b84611c2d565b611bc3565b905082815260208101848484011115611c9c57611c9b611c28565b5b611ca7848285611c5e565b509392505050565b600082601f830112611cc457611cc3611c23565b5b8135611cd4848260208601611c6d565b91505092915050565b6000819050919050565b611cf081611cdd565b8114611cfb57600080fd5b50565b600081359050611d0d81611ce7565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611d3e82611d13565b9050919050565b611d4e81611d33565b8114611d5957600080fd5b50565b600081359050611d6b81611d45565b92915050565b600067ffffffffffffffff821115611d8c57611d8b611b63565b5b602082029050602081019050919050565b600080fd5b600060808284031215611db857611db7611b4d565b5b611dc26080611bc3565b90506000611dd284828501611c0e565b6000830152506020611de684828501611c0e565b6020830152506040611dfa84828501611d5c565b6040830152506060611e0e84828501611c0e565b60608301525092915050565b6000611e2d611e2884611d71565b611bc3565b90508083825260208201905060808402830185811115611e5057611e4f611d9d565b5b835b81811015611e795780611e658882611da2565b845260208401935050608081019050611e52565b5050509392505050565b600082601f830112611e9857611e97611c23565b5b8135611ea8848260208601611e1a565b91505092915050565b60006101208284031215611ec857611ec7611b4d565b5b611ed3610120611bc3565b90506000611ee384828501611c0e565b600083015250602082013567ffffffffffffffff811115611f0757611f06611bde565b5b611f1384828501611caf565b6020830152506040611f2784828501611cfe565b6040830152506060611f3b84828501611c0e565b6060830152506080611f4f84828501611d5c565b60808301525060a0611f6384828501611c0e565b60a08301525060c0611f7784828501611cfe565b60c08301525060e082013567ffffffffffffffff811115611f9b57611f9a611bde565b5b611fa784828501611e83565b60e08301525061010082013567ffffffffffffffff811115611fcc57611fcb611bde565b5b611fd884828501611caf565b6101008301525092915050565b600067ffffffffffffffff82111561200057611fff611b63565b5b602082029050602081019050919050565b60007fffffffffffffffffffffffffffffffff0000000000000000000000000000000082169050919050565b61204681612011565b811461205157600080fd5b50565b6000813590506120638161203d565b92915050565b600061207c61207784611fe5565b611bc3565b9050808382526020820190506020840283018581111561209f5761209e611d9d565b5b835b818110156120c857806120b48882612054565b8452602084019350506020810190506120a1565b5050509392505050565b600082601f8301126120e7576120e6611c23565b5b81356120f7848260208601612069565b91505092915050565b600067ffffffffffffffff82111561211b5761211a611b63565b5b61212482611b52565b9050602081019050919050565b600061214461213f84612100565b611bc3565b9050828152602081018484840111156121605761215f611c28565b5b61216b848285611c5e565b509392505050565b600082601f83011261218857612187611c23565b5b8135612198848260208601612131565b91505092915050565b600080600080608085870312156121bb576121ba611b43565b5b600085013567ffffffffffffffff8111156121d9576121d8611b48565b5b6121e587828801611eb1565b94505060206121f687828801611c0e565b935050604085013567ffffffffffffffff81111561221757612216611b48565b5b612223878288016120d2565b925050606085013567ffffffffffffffff81111561224457612243611b48565b5b61225087828801612173565b91505092959194509250565b600061226782612011565b9050919050565b6122778161225c565b82525050565b61228681611be3565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6122c181611d33565b82525050565b60006122d383836122b8565b60208301905092915050565b6000602082019050919050565b60006122f78261228c565b6123018185612297565b935061230c836122a8565b8060005b8381101561233d57815161232488826122c7565b975061232f836122df565b925050600181019050612310565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612384578082015181840152602081019050612369565b83811115612393576000848401525b50505050565b60006123a48261234a565b6123ae8185612355565b93506123be818560208601612366565b6123c781611b52565b840191505092915050565b600060c0830160008301516123ea600086018261226e565b5060208301516123fd602086018261226e565b506040830151612410604086018261227d565b506060830151848203606086015261242882826122ec565b9150506080830151848203608086015261244282826122ec565b91505060a083015184820360a086015261245c8282612399565b9150508091505092915050565b600081519050919050565b600082825260208201905092915050565b600061249082612469565b61249a8185612474565b93506124aa818560208601612366565b6124b381611b52565b840191505092915050565b600060408201905081810360008301526124d881856123d2565b905081810360208301526124ec8184612485565b90509392505050565b6000806040838503121561250c5761250b611b43565b5b600083013567ffffffffffffffff81111561252a57612529611b48565b5b61253685828601611eb1565b925050602061254785828601611c0e565b9150509250929050565b6000602082019050818103600083015261256b8184612485565b905092915050565b6000806040838503121561258a57612589611b43565b5b600061259885828601612054565b925050602083013567ffffffffffffffff8111156125b9576125b8611b48565b5b6125c585828601611caf565b9150509250929050565b600067ffffffffffffffff8211156125ea576125e9611b63565b5b602082029050602081019050919050565b600061260e612609846125cf565b611bc3565b9050808382526020820190506020840283018581111561263157612630611d9d565b5b835b8181101561265a57806126468882611d5c565b845260208401935050602081019050612633565b5050509392505050565b600082601f83011261267957612678611c23565b5b81356126898482602086016125fb565b91505092915050565b600060c082840312156126a8576126a7611b4d565b5b6126b260c0611bc3565b905060006126c284828501612054565b60008301525060206126d684828501612054565b60208301525060406126ea84828501611c0e565b604083015250606082013567ffffffffffffffff81111561270e5761270d611bde565b5b61271a84828501612664565b606083015250608082013567ffffffffffffffff81111561273e5761273d611bde565b5b61274a84828501612664565b60808301525060a082013567ffffffffffffffff81111561276e5761276d611bde565b5b61277a84828501612173565b60a08301525092915050565b6000806040838503121561279d5761279c611b43565b5b600083013567ffffffffffffffff8111156127bb576127ba611b48565b5b6127c785828601612692565b925050602083013567ffffffffffffffff8111156127e8576127e7611b48565b5b6127f485828601611caf565b9150509250929050565b600080fd5b600060c08284031215612819576128186127fe565b5b81905092915050565b60006020828403121561283857612837611b43565b5b600082013567ffffffffffffffff81111561285657612855611b48565b5b61286284828501612803565b91505092915050565b6000806040838503121561288257612881611b43565b5b600061289085828601612054565b92505060206128a185828601612054565b9150509250929050565b60008115159050919050565b6128c0816128ab565b82525050565b60006020820190506128db60008301846128b7565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000612948838361226e565b60208301905092915050565b6000602082019050919050565b600061296c82612910565b612976818561291b565b93506129818361292c565b8060005b838110156129b2578151612999888261293c565b97506129a483612954565b925050600181019050612985565b5085935050505092915050565b600060208201905081810360008301526129d98184612961565b905092915050565b6129ea81611d33565b82525050565b7f6e6f206269647300000000000000000000000000000000000000000000000000600082015250565b6000612a26600783612474565b9150612a31826129f0565b602082019050919050565b6000604082019050612a5160008301846129e1565b8181036020830152612a6281612a19565b905092915050565b600081519050612a7981611bf7565b92915050565b600060208284031215612a9557612a94611b43565b5b6000612aa384828501612a6a565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000819050919050565b6000612af082612adb565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612b2357612b22612aac565b5b600182019050919050565b6000612b3982612adb565b9150612b4483612adb565b925082821015612b5757612b56612aac565b5b828203905092915050565b6000612b6d82612adb565b9150612b7883612adb565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612bad57612bac612aac565b5b828201905092915050565b600082825260208201905092915050565b6000612bd482612469565b612bde8185612bb8565b9350612bee818560208601612366565b612bf781611b52565b840191505092915050565b612c0b81611cdd565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b608082016000820151612c53600085018261227d565b506020820151612c66602085018261227d565b506040820151612c7960408501826122b8565b506060820151612c8c606085018261227d565b50505050565b6000612c9e8383612c3d565b60808301905092915050565b6000602082019050919050565b6000612cc282612c11565b612ccc8185612c1c565b9350612cd783612c2d565b8060005b83811015612d08578151612cef8882612c92565b9750612cfa83612caa565b925050600181019050612cdb565b5085935050505092915050565b600061012083016000830151612d2e600086018261227d565b5060208301518482036020860152612d468282612bc9565b9150506040830151612d5b6040860182612c02565b506060830151612d6e606086018261227d565b506080830151612d8160808601826122b8565b5060a0830151612d9460a086018261227d565b5060c0830151612da760c0860182612c02565b5060e083015184820360e0860152612dbf8282612cb7565b915050610100830151848203610100860152612ddb8282612bc9565b9150508091505092915050565b612df181611be3565b82525050565b600082825260208201905092915050565b6000612e138261234a565b612e1d8185612df7565b9350612e2d818560208601612366565b612e3681611b52565b840191505092915050565b60006080820190508181036000830152612e5b8187612d15565b9050612e6a6020830186612de8565b8181036040830152612e7c8185612961565b90508181036060830152612e908184612e08565b905095945050505050565b600081519050612eaa8161203d565b92915050565b600081519050612ebf81611d45565b92915050565b6000612ed8612ed3846125cf565b611bc3565b90508083825260208201905060208402830185811115612efb57612efa611d9d565b5b835b81811015612f245780612f108882612eb0565b845260208401935050602081019050612efd565b5050509392505050565b600082601f830112612f4357612f42611c23565b5b8151612f53848260208601612ec5565b91505092915050565b6000612f6f612f6a84612100565b611bc3565b905082815260208101848484011115612f8b57612f8a611c28565b5b612f96848285612366565b509392505050565b600082601f830112612fb357612fb2611c23565b5b8151612fc3848260208601612f5c565b91505092915050565b600060c08284031215612fe257612fe1611b4d565b5b612fec60c0611bc3565b90506000612ffc84828501612e9b565b600083015250602061301084828501612e9b565b602083015250604061302484828501612a6a565b604083015250606082015167ffffffffffffffff81111561304857613047611bde565b5b61305484828501612f2e565b606083015250608082015167ffffffffffffffff81111561307857613077611bde565b5b61308484828501612f2e565b60808301525060a082015167ffffffffffffffff8111156130a8576130a7611bde565b5b6130b484828501612f9e565b60a08301525092915050565b60006130d36130ce84611c2d565b611bc3565b9050828152602081018484840111156130ef576130ee611c28565b5b6130fa848285612366565b509392505050565b600082601f83011261311757613116611c23565b5b81516131278482602086016130c0565b91505092915050565b6000806040838503121561314757613146611b43565b5b600083015167ffffffffffffffff81111561316557613164611b48565b5b61317185828601612fcc565b925050602083015167ffffffffffffffff81111561319257613191611b48565b5b61319e85828601613102565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806131ef57607f821691505b60208210811415613203576132026131a8565b5b50919050565b6132128161225c565b82525050565b600082825260208201905092915050565b60006132348261228c565b61323e8185613218565b9350613249836122a8565b8060005b8381101561327a57815161326188826122c7565b975061326c836122df565b92505060018101905061324d565b5085935050505092915050565b600060608201905061329c6000830186613209565b6132a96020830185612de8565b81810360408301526132bb8184613229565b9050949350505050565b600060208201905081810360008301526132df81846123d2565b905092915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b61332e613329826132e7565b613313565b82525050565b600081905092915050565b600061334a82612469565b6133548185613334565b9350613364818560208601612366565b80840191505092915050565b600061337c828561331d565b60048201915061338c828461333f565b91508190509392505050565b6000602082840312156133ae576133ad611b43565b5b600082015167ffffffffffffffff8111156133cc576133cb611b48565b5b6133d884828501613102565b91505092915050565b60006040820190506133f66000830185613209565b81810360208301526134088184612485565b90509392505050565b60006020828403121561342757613426611b43565b5b600061343584828501611c0e565b91505092915050565b600080fd5b600080fd5b600080fd5b6000808335600160200384360303811261346a5761346961343e565b5b80840192508235915067ffffffffffffffff82111561348c5761348b613443565b5b6020830192506020820236038313156134a8576134a7613448565b5b509250929050565b6000819050919050565b60006134c96020840184611d5c565b905092915050565b6000602082019050919050565b60006134ea8385613218565b93506134f5826134b0565b8060005b8581101561352e5761350b82846134ba565b61351588826122c7565b9750613520836134d1565b9250506001810190506134f9565b5085925050509392505050565b60006060820190506135506000830187613209565b61355d6020830186612de8565b81810360408301526135708184866134de565b905095945050505050565b600061358e61358984611fe5565b611bc3565b905080838252602082019050602084028301858111156135b1576135b0611d9d565b5b835b818110156135da57806135c68882612e9b565b8452602084019350506020810190506135b3565b5050509392505050565b600082601f8301126135f9576135f8611c23565b5b815161360984826020860161357b565b91505092915050565b60006020828403121561362857613627611b43565b5b600082015167ffffffffffffffff81111561364657613645611b48565b5b613652848285016135e4565b91505092915050565b6000819050919050565b6136766136718261225c565b61365b565b82525050565b60006136888284613665565b60108201915081905092915050565b60006080820190506136ac6000830187612de8565b81810360208301526136be8186613229565b905081810360408301526136d28185613229565b905081810360608301526136e68184612e08565b905095945050505050565b60006136fd828461333f565b915081905092915050565b600060408201905061371d60008301856129e1565b818103602083015261372f8184612485565b90509392505050565b60006020828403121561374e5761374d611b43565b5b600082015167ffffffffffffffff81111561376c5761376b611b48565b5b61377884828501612fcc565b91505092915050565b60006060820190506137966000830186613209565b81810360208301526137a88185612e08565b905081810360408301526137bc8184612485565b9050949350505050565b600060608201905081810360008301526137e08186612d15565b90506137ef6020830185613209565b81810360408301526138018184612e08565b9050949350505050565b6000806040838503121561382257613821611b43565b5b600083015167ffffffffffffffff8111156138405761383f611b48565b5b61384c85828601613102565b925050602083015167ffffffffffffffff81111561386d5761386c611b48565b5b61387985828601613102565b9150509250929050565b50565b6000613893600083613334565b915061389e82613883565b600082019050919050565b60006138b482613886565b9150819050919050565b60006040820190506138d36000830185612de8565b81810360208301526138e58184612e08565b90509392505050565b600067ffffffffffffffff82111561390957613908611b63565b5b602082029050602081019050919050565b600061392d613928846138ee565b611bc3565b905080838252602082019050602084028301858111156139505761394f611d9d565b5b835b8181101561399757805167ffffffffffffffff81111561397557613974611c23565b5b8086016139828982612fcc565b85526020850194505050602081019050613952565b5050509392505050565b600082601f8301126139b6576139b5611c23565b5b81516139c684826020860161391a565b91505092915050565b6000602082840312156139e5576139e4611b43565b5b600082015167ffffffffffffffff811115613a0357613a02611b48565b5b613a0f848285016139a1565b91505092915050565b6000604082019050613a2d6000830185613209565b8181036020830152613a3f8184612e08565b90509392505050565b60006040820190508181036000830152613a628185612e08565b90508181036020830152613a768184612485565b9050939250505056fea264697066735822122075497e2184534eaa5e84d894c9f5ed17093c939e32bfb00630f7ddf23186340b64736f6c63430008080033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c806392f07a581161006657806392f07a5814610159578063b33e471514610177578063c0b9d287146101a8578063d503387a146101c4578063e829cd5d146101f457610093565b8063232ef1f414610098578063346ab175146100c9578063464b0c3a146100f95780637df1cde214610129575b600080fd5b6100b260048036038101906100ad91906121a1565b610224565b6040516100c09291906124be565b60405180910390f35b6100e360048036038101906100de91906124f5565b610433565b6040516100f09190612551565b60405180910390f35b610113600480360381019061010e91906121a1565b61085d565b6040516101209190612551565b60405180910390f35b610143600480360381019061013e9190612573565b610a3b565b6040516101509190612551565b60405180910390f35b610161610a9b565b60405161016e9190612551565b60405180910390f35b610191600480360381019061018c9190612786565b610ad4565b60405161019f9291906124be565b60405180910390f35b6101c260048036038101906101bd9190612822565b610b6f565b005b6101de60048036038101906101d991906124f5565b610be6565b6040516101eb9190612551565b60405180910390f35b61020e6004803603810190610209919061286b565b611233565b60405161021b91906128c6565b60405180910390f35b61022c611a9c565b60606000600267ffffffffffffffff81111561024b5761024a611b63565b5b6040519080825280602002602001820160405280156102795781602001602082028036833780820191505090505b5090503081600081518110610291576102906128e1565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506342100001816001815181106102e4576102e36128e1565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060006103618783846040518060400160405280601581526020017f64656661756c743a76303a6d657267656442696473000000000000000000000081525061133a565b90506103c681600001516040518060400160405280601581526020017f64656661756c743a76303a6d6572676564426964730000000000000000000000815250886040516020016103b291906129bf565b604051602081830303815290604052611440565b6000806103d88a846000015189611523565b9150915061042083600001516040518060400160405280601981526020017f64656661756c743a76303a6275696c6465725061796c6f61640000000000000081525083611440565b8282955095505050505094509492505050565b606061043d611624565b61044657600080fd5b6000610487836040518060400160405280601581526020017f64656661756c743a76303a65746842756e646c657300000000000000000000008152506116ec565b90506000815114156104d057306040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016104c79190612a3c565b60405180910390fd5b6000815167ffffffffffffffff8111156104ed576104ec611b63565b5b60405190808252806020026020018201604052801561052657816020015b610513611b02565b81526020019060019003908161050b5790505b50905060005b825181101561063157600061059484838151811061054d5761054c6128e1565b5b6020026020010151600001516040518060400160405280601e81526020017f64656661756c743a76303a65746842756e646c6553696d526573756c747300008152506117e6565b90506000818060200190518101906105ac9190612a7f565b905060405180604001604052808267ffffffffffffffff1681526020018685815181106105dc576105db6128e1565b5b6020026020010151600001516fffffffffffffffffffffffffffffffff1916815250848481518110610611576106106128e1565b5b60200260200101819052505050808061062990612ae5565b91505061052c565b5060008151905060005b6001826106489190612b2e565b81101561076157600060018261065e9190612b62565b90505b8281101561074d5783818151811061067c5761067b6128e1565b5b60200260200101516000015167ffffffffffffffff168483815181106106a5576106a46128e1565b5b60200260200101516000015167ffffffffffffffff16101561073a5760008483815181106106d6576106d56128e1565b5b602002602001015190508482815181106106f3576106f26128e1565b5b602002602001015185848151811061070e5761070d6128e1565b5b60200260200101819052508085838151811061072d5761072c6128e1565b5b6020026020010181905250505b808061074590612ae5565b915050610661565b50808061075990612ae5565b91505061063b565b506000835167ffffffffffffffff81111561077f5761077e611b63565b5b6040519080825280602002602001820160405280156107ad5781602001602082028036833780820191505090505b50905060005b8351811015610835578381815181106107cf576107ce6128e1565b5b6020026020010151602001518282815181106107ee576107ed6128e1565b5b60200260200101906fffffffffffffffffffffffffffffffff191690816fffffffffffffffffffffffffffffffff191681525050808061082d90612ae5565b9150506107b3565b506108518787836040518060200160405280600081525061085d565b94505050505092915050565b6060610867611624565b61087057600080fd5b6000803073ffffffffffffffffffffffffffffffffffffffff1663232ef1f4888888886040518563ffffffff1660e01b81526004016108b29493929190612e41565b60006040518083038186803b1580156108ca57600080fd5b505afa1580156108de573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906109079190613130565b9150915061099f6000805461091b906131d7565b80601f0160208091040260200160405190810160405280929190818152602001828054610947906131d7565b80156109945780601f1061096957610100808354040283529160200191610994565b820191906000526020600020905b81548152906001019060200180831161097757829003601f168201915b5050505050826118cd565b507f83481d5b04dea534715acad673a8177a46fc93882760f36bdc16ccac439d504e8260000151836040015184606001516040516109df93929190613287565b60405180910390a163c0b9d28760e01b82604051602001610a0091906132c5565b604051602081830303815290604052604051602001610a20929190613370565b60405160208183030381529060405292505050949350505050565b6060610a45611624565b610a4e57600080fd5b6000610a8f846040518060400160405280601981526020017f64656661756c743a76303a6275696c6465725061796c6f6164000000000000008152506117e6565b90508091505092915050565b6060610aa5611624565b610aae57600080fd5b6000610ab86119c5565b905080806020019051810190610ace9190613398565b91505090565b610adc611a9c565b60607f67fa9c16cd72410c4cc1d47205b31852a81ec5e92d1c8cebc3ecbe98ed67fe3f846000015184604051610b139291906133e1565b60405180910390a17f83481d5b04dea534715acad673a8177a46fc93882760f36bdc16ccac439d504e846000015185604001518660600151604051610b5a93929190613287565b60405180910390a18383915091509250929050565b7f83481d5b04dea534715acad673a8177a46fc93882760f36bdc16ccac439d504e81600001356fffffffffffffffffffffffffffffffff1916826040016020810190610bbb9190613411565b838060600190610bcb919061344d565b604051610bdb949392919061353b565b60405180910390a150565b6060610bf0611624565b610bf957600080fd5b6000610c3a836040518060400160405280601581526020017f6d657673686172653a76303a6d617463684269647300000000000000000000008152506116ec565b90506000610c7d846040518060400160405280601c81526020017f6d657673686172653a76303a756e6d61746368656442756e646c6573000000008152506116ec565b9050600081511415610cc657306040517f75fff467000000000000000000000000000000000000000000000000000000008152600401610cbd9190612a3c565b60405180910390fd5b6000815167ffffffffffffffff811115610ce357610ce2611b63565b5b604051908082528060200260200182016040528015610d1c57816020015b610d09611a9c565b815260200190600190039081610d015790505b50905060005b8251811015610e7d576000838281518110610d4057610d3f6128e1565b5b6020026020010151905060005b8551811015610e49576000610db5878381518110610d6e57610d6d6128e1565b5b6020026020010151600001516040518060400160405280601681526020017f6d657673686172653a76303a6d657267656442696473000000000000000000008152506117e6565b806020019051810190610dc89190613612565b9050610e0d81600081518110610de157610de06128e1565b5b6020026020010151878681518110610dfc57610dfb6128e1565b5b602002602001015160000151611233565b15610e3557868281518110610e2557610e246128e1565b5b6020026020010151925050610e49565b508080610e4190612ae5565b915050610d4d565b5080838381518110610e5e57610e5d6128e1565b5b6020026020010181905250508080610e7590612ae5565b915050610d22565b506000815167ffffffffffffffff811115610e9b57610e9a611b63565b5b604051908082528060200260200182016040528015610ed457816020015b610ec1611b02565b815260200190600190039081610eb95790505b50905060005b8251811015610fdf576000610f42848381518110610efb57610efa6128e1565b5b6020026020010151600001516040518060400160405280601f81526020017f6d657673686172653a76303a65746842756e646c6553696d526573756c7473008152506117e6565b9050600081806020019051810190610f5a9190612a7f565b905060405180604001604052808267ffffffffffffffff168152602001868581518110610f8a57610f896128e1565b5b6020026020010151600001516fffffffffffffffffffffffffffffffff1916815250848481518110610fbf57610fbe6128e1565b5b602002602001018190525050508080610fd790612ae5565b915050610eda565b5060008151905060005b600182610ff69190612b2e565b81101561110f57600060018261100c9190612b62565b90505b828110156110fb5783818151811061102a576110296128e1565b5b60200260200101516000015167ffffffffffffffff16848381518110611053576110526128e1565b5b60200260200101516000015167ffffffffffffffff1610156110e8576000848381518110611084576110836128e1565b5b602002602001015190508482815181106110a1576110a06128e1565b5b60200260200101518584815181106110bc576110bb6128e1565b5b6020026020010181905250808583815181106110db576110da6128e1565b5b6020026020010181905250505b80806110f390612ae5565b91505061100f565b50808061110790612ae5565b915050610fe9565b506000835167ffffffffffffffff81111561112d5761112c611b63565b5b60405190808252806020026020018201604052801561115b5781602001602082028036833780820191505090505b50905060005b83518110156111e35783818151811061117d5761117c6128e1565b5b60200260200101516020015182828151811061119c5761119b6128e1565b5b60200260200101906fffffffffffffffffffffffffffffffff191690816fffffffffffffffffffffffffffffffff19168152505080806111db90612ae5565b915050611161565b506112258989836040518060400160405280600b81526020017f6d657673686172653a763000000000000000000000000000000000000000000081525061085d565b965050505050505092915050565b60008083604051602001611247919061367c565b604051602081830303815290604052905060008360405160200161126b919061367c565b604051602081830303815290604052905060005b825181101561132c5781818151811061129b5761129a6128e1565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168382815181106112db576112da6128e1565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146113195760009350505050611334565b808061132490612ae5565b91505061127f565b506001925050505b92915050565b611342611a9c565b600080634203000073ffffffffffffffffffffffffffffffffffffffff16878787876040516020016113779493929190613697565b60405160208183030381529060405260405161139391906136f1565b600060405180830381855afa9150503d80600081146113ce576040519150601f19603f3d011682016040523d82523d6000602084013e6113d3565b606091505b509150915081611420576342030000816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401611417929190613708565b60405180910390fd5b808060200190518101906114349190613738565b92505050949350505050565b600080634202000073ffffffffffffffffffffffffffffffffffffffff1685858560405160200161147393929190613781565b60405160208183030381529060405260405161148f91906136f1565b600060405180830381855afa9150503d80600081146114ca576040519150601f19603f3d011682016040523d82523d6000602084013e6114cf565b606091505b50915091508161151c576342020000816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401611513929190613708565b60405180910390fd5b5050505050565b606080600080634210000173ffffffffffffffffffffffffffffffffffffffff16878787604051602001611559939291906137c6565b60405160208183030381529060405260405161157591906136f1565b600060405180830381855afa9150503d80600081146115b0576040519150601f19603f3d011682016040523d82523d6000602084013e6115b5565b606091505b509150915081611602576342100001816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016115f9929190613708565b60405180910390fd5b80806020019051810190611616919061380b565b935093505050935093915050565b6000806000634201000073ffffffffffffffffffffffffffffffffffffffff16604051611650906138a9565b600060405180830381855afa9150503d806000811461168b576040519150601f19603f3d011682016040523d82523d6000602084013e611690565b606091505b5091509150816116dd576342010000816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016116d4929190613708565b60405180910390fd5b80516020820151935050505090565b6060600080634203000173ffffffffffffffffffffffffffffffffffffffff16858560405160200161171f9291906138be565b60405160208183030381529060405260405161173b91906136f1565b600060405180830381855afa9150503d8060008114611776576040519150601f19603f3d011682016040523d82523d6000602084013e61177b565b606091505b5091509150816117c8576342030001816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016117bf929190613708565b60405180910390fd5b808060200190518101906117dc91906139cf565b9250505092915050565b6060600080634202000173ffffffffffffffffffffffffffffffffffffffff168585604051602001611819929190613a18565b60405160208183030381529060405260405161183591906136f1565b600060405180830381855afa9150503d8060008114611870576040519150601f19603f3d011682016040523d82523d6000602084013e611875565b606091505b5091509150816118c2576342020001816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016118b9929190613708565b60405180910390fd5b809250505092915050565b60606118d7611624565b6118e057600080fd5b600080634210000273ffffffffffffffffffffffffffffffffffffffff168585604051602001611911929190613a48565b60405160208183030381529060405260405161192d91906136f1565b600060405180830381855afa9150503d8060008114611968576040519150601f19603f3d011682016040523d82523d6000602084013e61196d565b606091505b5091509150816119ba576342100002816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016119b1929190613708565b60405180910390fd5b809250505092915050565b6060600080634201000173ffffffffffffffffffffffffffffffffffffffff16604051602001604051602081830303815290604052604051611a0791906136f1565b600060405180830381855afa9150503d8060008114611a42576040519150601f19603f3d011682016040523d82523d6000602084013e611a47565b606091505b509150915081611a94576342010001816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401611a8b929190613708565b60405180910390fd5b809250505090565b6040518060c0016040528060006fffffffffffffffffffffffffffffffff1916815260200160006fffffffffffffffffffffffffffffffff19168152602001600067ffffffffffffffff1681526020016060815260200160608152602001606081525090565b6040518060400160405280600067ffffffffffffffff16815260200160006fffffffffffffffffffffffffffffffff191681525090565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611b9b82611b52565b810181811067ffffffffffffffff82111715611bba57611bb9611b63565b5b80604052505050565b6000611bcd611b39565b9050611bd98282611b92565b919050565b600080fd5b600067ffffffffffffffff82169050919050565b611c0081611be3565b8114611c0b57600080fd5b50565b600081359050611c1d81611bf7565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115611c4857611c47611b63565b5b611c5182611b52565b9050602081019050919050565b82818337600083830152505050565b6000611c80611c7b84611c2d565b611bc3565b905082815260208101848484011115611c9c57611c9b611c28565b5b611ca7848285611c5e565b509392505050565b600082601f830112611cc457611cc3611c23565b5b8135611cd4848260208601611c6d565b91505092915050565b6000819050919050565b611cf081611cdd565b8114611cfb57600080fd5b50565b600081359050611d0d81611ce7565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611d3e82611d13565b9050919050565b611d4e81611d33565b8114611d5957600080fd5b50565b600081359050611d6b81611d45565b92915050565b600067ffffffffffffffff821115611d8c57611d8b611b63565b5b602082029050602081019050919050565b600080fd5b600060808284031215611db857611db7611b4d565b5b611dc26080611bc3565b90506000611dd284828501611c0e565b6000830152506020611de684828501611c0e565b6020830152506040611dfa84828501611d5c565b6040830152506060611e0e84828501611c0e565b60608301525092915050565b6000611e2d611e2884611d71565b611bc3565b90508083825260208201905060808402830185811115611e5057611e4f611d9d565b5b835b81811015611e795780611e658882611da2565b845260208401935050608081019050611e52565b5050509392505050565b600082601f830112611e9857611e97611c23565b5b8135611ea8848260208601611e1a565b91505092915050565b60006101208284031215611ec857611ec7611b4d565b5b611ed3610120611bc3565b90506000611ee384828501611c0e565b600083015250602082013567ffffffffffffffff811115611f0757611f06611bde565b5b611f1384828501611caf565b6020830152506040611f2784828501611cfe565b6040830152506060611f3b84828501611c0e565b6060830152506080611f4f84828501611d5c565b60808301525060a0611f6384828501611c0e565b60a08301525060c0611f7784828501611cfe565b60c08301525060e082013567ffffffffffffffff811115611f9b57611f9a611bde565b5b611fa784828501611e83565b60e08301525061010082013567ffffffffffffffff811115611fcc57611fcb611bde565b5b611fd884828501611caf565b6101008301525092915050565b600067ffffffffffffffff82111561200057611fff611b63565b5b602082029050602081019050919050565b60007fffffffffffffffffffffffffffffffff0000000000000000000000000000000082169050919050565b61204681612011565b811461205157600080fd5b50565b6000813590506120638161203d565b92915050565b600061207c61207784611fe5565b611bc3565b9050808382526020820190506020840283018581111561209f5761209e611d9d565b5b835b818110156120c857806120b48882612054565b8452602084019350506020810190506120a1565b5050509392505050565b600082601f8301126120e7576120e6611c23565b5b81356120f7848260208601612069565b91505092915050565b600067ffffffffffffffff82111561211b5761211a611b63565b5b61212482611b52565b9050602081019050919050565b600061214461213f84612100565b611bc3565b9050828152602081018484840111156121605761215f611c28565b5b61216b848285611c5e565b509392505050565b600082601f83011261218857612187611c23565b5b8135612198848260208601612131565b91505092915050565b600080600080608085870312156121bb576121ba611b43565b5b600085013567ffffffffffffffff8111156121d9576121d8611b48565b5b6121e587828801611eb1565b94505060206121f687828801611c0e565b935050604085013567ffffffffffffffff81111561221757612216611b48565b5b612223878288016120d2565b925050606085013567ffffffffffffffff81111561224457612243611b48565b5b61225087828801612173565b91505092959194509250565b600061226782612011565b9050919050565b6122778161225c565b82525050565b61228681611be3565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6122c181611d33565b82525050565b60006122d383836122b8565b60208301905092915050565b6000602082019050919050565b60006122f78261228c565b6123018185612297565b935061230c836122a8565b8060005b8381101561233d57815161232488826122c7565b975061232f836122df565b925050600181019050612310565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612384578082015181840152602081019050612369565b83811115612393576000848401525b50505050565b60006123a48261234a565b6123ae8185612355565b93506123be818560208601612366565b6123c781611b52565b840191505092915050565b600060c0830160008301516123ea600086018261226e565b5060208301516123fd602086018261226e565b506040830151612410604086018261227d565b506060830151848203606086015261242882826122ec565b9150506080830151848203608086015261244282826122ec565b91505060a083015184820360a086015261245c8282612399565b9150508091505092915050565b600081519050919050565b600082825260208201905092915050565b600061249082612469565b61249a8185612474565b93506124aa818560208601612366565b6124b381611b52565b840191505092915050565b600060408201905081810360008301526124d881856123d2565b905081810360208301526124ec8184612485565b90509392505050565b6000806040838503121561250c5761250b611b43565b5b600083013567ffffffffffffffff81111561252a57612529611b48565b5b61253685828601611eb1565b925050602061254785828601611c0e565b9150509250929050565b6000602082019050818103600083015261256b8184612485565b905092915050565b6000806040838503121561258a57612589611b43565b5b600061259885828601612054565b925050602083013567ffffffffffffffff8111156125b9576125b8611b48565b5b6125c585828601611caf565b9150509250929050565b600067ffffffffffffffff8211156125ea576125e9611b63565b5b602082029050602081019050919050565b600061260e612609846125cf565b611bc3565b9050808382526020820190506020840283018581111561263157612630611d9d565b5b835b8181101561265a57806126468882611d5c565b845260208401935050602081019050612633565b5050509392505050565b600082601f83011261267957612678611c23565b5b81356126898482602086016125fb565b91505092915050565b600060c082840312156126a8576126a7611b4d565b5b6126b260c0611bc3565b905060006126c284828501612054565b60008301525060206126d684828501612054565b60208301525060406126ea84828501611c0e565b604083015250606082013567ffffffffffffffff81111561270e5761270d611bde565b5b61271a84828501612664565b606083015250608082013567ffffffffffffffff81111561273e5761273d611bde565b5b61274a84828501612664565b60808301525060a082013567ffffffffffffffff81111561276e5761276d611bde565b5b61277a84828501612173565b60a08301525092915050565b6000806040838503121561279d5761279c611b43565b5b600083013567ffffffffffffffff8111156127bb576127ba611b48565b5b6127c785828601612692565b925050602083013567ffffffffffffffff8111156127e8576127e7611b48565b5b6127f485828601611caf565b9150509250929050565b600080fd5b600060c08284031215612819576128186127fe565b5b81905092915050565b60006020828403121561283857612837611b43565b5b600082013567ffffffffffffffff81111561285657612855611b48565b5b61286284828501612803565b91505092915050565b6000806040838503121561288257612881611b43565b5b600061289085828601612054565b92505060206128a185828601612054565b9150509250929050565b60008115159050919050565b6128c0816128ab565b82525050565b60006020820190506128db60008301846128b7565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000612948838361226e565b60208301905092915050565b6000602082019050919050565b600061296c82612910565b612976818561291b565b93506129818361292c565b8060005b838110156129b2578151612999888261293c565b97506129a483612954565b925050600181019050612985565b5085935050505092915050565b600060208201905081810360008301526129d98184612961565b905092915050565b6129ea81611d33565b82525050565b7f6e6f206269647300000000000000000000000000000000000000000000000000600082015250565b6000612a26600783612474565b9150612a31826129f0565b602082019050919050565b6000604082019050612a5160008301846129e1565b8181036020830152612a6281612a19565b905092915050565b600081519050612a7981611bf7565b92915050565b600060208284031215612a9557612a94611b43565b5b6000612aa384828501612a6a565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000819050919050565b6000612af082612adb565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612b2357612b22612aac565b5b600182019050919050565b6000612b3982612adb565b9150612b4483612adb565b925082821015612b5757612b56612aac565b5b828203905092915050565b6000612b6d82612adb565b9150612b7883612adb565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612bad57612bac612aac565b5b828201905092915050565b600082825260208201905092915050565b6000612bd482612469565b612bde8185612bb8565b9350612bee818560208601612366565b612bf781611b52565b840191505092915050565b612c0b81611cdd565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b608082016000820151612c53600085018261227d565b506020820151612c66602085018261227d565b506040820151612c7960408501826122b8565b506060820151612c8c606085018261227d565b50505050565b6000612c9e8383612c3d565b60808301905092915050565b6000602082019050919050565b6000612cc282612c11565b612ccc8185612c1c565b9350612cd783612c2d565b8060005b83811015612d08578151612cef8882612c92565b9750612cfa83612caa565b925050600181019050612cdb565b5085935050505092915050565b600061012083016000830151612d2e600086018261227d565b5060208301518482036020860152612d468282612bc9565b9150506040830151612d5b6040860182612c02565b506060830151612d6e606086018261227d565b506080830151612d8160808601826122b8565b5060a0830151612d9460a086018261227d565b5060c0830151612da760c0860182612c02565b5060e083015184820360e0860152612dbf8282612cb7565b915050610100830151848203610100860152612ddb8282612bc9565b9150508091505092915050565b612df181611be3565b82525050565b600082825260208201905092915050565b6000612e138261234a565b612e1d8185612df7565b9350612e2d818560208601612366565b612e3681611b52565b840191505092915050565b60006080820190508181036000830152612e5b8187612d15565b9050612e6a6020830186612de8565b8181036040830152612e7c8185612961565b90508181036060830152612e908184612e08565b905095945050505050565b600081519050612eaa8161203d565b92915050565b600081519050612ebf81611d45565b92915050565b6000612ed8612ed3846125cf565b611bc3565b90508083825260208201905060208402830185811115612efb57612efa611d9d565b5b835b81811015612f245780612f108882612eb0565b845260208401935050602081019050612efd565b5050509392505050565b600082601f830112612f4357612f42611c23565b5b8151612f53848260208601612ec5565b91505092915050565b6000612f6f612f6a84612100565b611bc3565b905082815260208101848484011115612f8b57612f8a611c28565b5b612f96848285612366565b509392505050565b600082601f830112612fb357612fb2611c23565b5b8151612fc3848260208601612f5c565b91505092915050565b600060c08284031215612fe257612fe1611b4d565b5b612fec60c0611bc3565b90506000612ffc84828501612e9b565b600083015250602061301084828501612e9b565b602083015250604061302484828501612a6a565b604083015250606082015167ffffffffffffffff81111561304857613047611bde565b5b61305484828501612f2e565b606083015250608082015167ffffffffffffffff81111561307857613077611bde565b5b61308484828501612f2e565b60808301525060a082015167ffffffffffffffff8111156130a8576130a7611bde565b5b6130b484828501612f9e565b60a08301525092915050565b60006130d36130ce84611c2d565b611bc3565b9050828152602081018484840111156130ef576130ee611c28565b5b6130fa848285612366565b509392505050565b600082601f83011261311757613116611c23565b5b81516131278482602086016130c0565b91505092915050565b6000806040838503121561314757613146611b43565b5b600083015167ffffffffffffffff81111561316557613164611b48565b5b61317185828601612fcc565b925050602083015167ffffffffffffffff81111561319257613191611b48565b5b61319e85828601613102565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806131ef57607f821691505b60208210811415613203576132026131a8565b5b50919050565b6132128161225c565b82525050565b600082825260208201905092915050565b60006132348261228c565b61323e8185613218565b9350613249836122a8565b8060005b8381101561327a57815161326188826122c7565b975061326c836122df565b92505060018101905061324d565b5085935050505092915050565b600060608201905061329c6000830186613209565b6132a96020830185612de8565b81810360408301526132bb8184613229565b9050949350505050565b600060208201905081810360008301526132df81846123d2565b905092915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b61332e613329826132e7565b613313565b82525050565b600081905092915050565b600061334a82612469565b6133548185613334565b9350613364818560208601612366565b80840191505092915050565b600061337c828561331d565b60048201915061338c828461333f565b91508190509392505050565b6000602082840312156133ae576133ad611b43565b5b600082015167ffffffffffffffff8111156133cc576133cb611b48565b5b6133d884828501613102565b91505092915050565b60006040820190506133f66000830185613209565b81810360208301526134088184612485565b90509392505050565b60006020828403121561342757613426611b43565b5b600061343584828501611c0e565b91505092915050565b600080fd5b600080fd5b600080fd5b6000808335600160200384360303811261346a5761346961343e565b5b80840192508235915067ffffffffffffffff82111561348c5761348b613443565b5b6020830192506020820236038313156134a8576134a7613448565b5b509250929050565b6000819050919050565b60006134c96020840184611d5c565b905092915050565b6000602082019050919050565b60006134ea8385613218565b93506134f5826134b0565b8060005b8581101561352e5761350b82846134ba565b61351588826122c7565b9750613520836134d1565b9250506001810190506134f9565b5085925050509392505050565b60006060820190506135506000830187613209565b61355d6020830186612de8565b81810360408301526135708184866134de565b905095945050505050565b600061358e61358984611fe5565b611bc3565b905080838252602082019050602084028301858111156135b1576135b0611d9d565b5b835b818110156135da57806135c68882612e9b565b8452602084019350506020810190506135b3565b5050509392505050565b600082601f8301126135f9576135f8611c23565b5b815161360984826020860161357b565b91505092915050565b60006020828403121561362857613627611b43565b5b600082015167ffffffffffffffff81111561364657613645611b48565b5b613652848285016135e4565b91505092915050565b6000819050919050565b6136766136718261225c565b61365b565b82525050565b60006136888284613665565b60108201915081905092915050565b60006080820190506136ac6000830187612de8565b81810360208301526136be8186613229565b905081810360408301526136d28185613229565b905081810360608301526136e68184612e08565b905095945050505050565b60006136fd828461333f565b915081905092915050565b600060408201905061371d60008301856129e1565b818103602083015261372f8184612485565b90509392505050565b60006020828403121561374e5761374d611b43565b5b600082015167ffffffffffffffff81111561376c5761376b611b48565b5b61377884828501612fcc565b91505092915050565b60006060820190506137966000830186613209565b81810360208301526137a88185612e08565b905081810360408301526137bc8184612485565b9050949350505050565b600060608201905081810360008301526137e08186612d15565b90506137ef6020830185613209565b81810360408301526138018184612e08565b9050949350505050565b6000806040838503121561382257613821611b43565b5b600083015167ffffffffffffffff8111156138405761383f611b48565b5b61384c85828601613102565b925050602083015167ffffffffffffffff81111561386d5761386c611b48565b5b61387985828601613102565b9150509250929050565b50565b6000613893600083613334565b915061389e82613883565b600082019050919050565b60006138b482613886565b9150819050919050565b60006040820190506138d36000830185612de8565b81810360208301526138e58184612e08565b90509392505050565b600067ffffffffffffffff82111561390957613908611b63565b5b602082029050602081019050919050565b600061392d613928846138ee565b611bc3565b905080838252602082019050602084028301858111156139505761394f611d9d565b5b835b8181101561399757805167ffffffffffffffff81111561397557613974611c23565b5b8086016139828982612fcc565b85526020850194505050602081019050613952565b5050509392505050565b600082601f8301126139b6576139b5611c23565b5b81516139c684826020860161391a565b91505092915050565b6000602082840312156139e5576139e4611b43565b5b600082015167ffffffffffffffff811115613a0357613a02611b48565b5b613a0f848285016139a1565b91505092915050565b6000604082019050613a2d6000830185613209565b8181036020830152613a3f8184612e08565b90509392505050565b60006040820190508181036000830152613a628185612e08565b90508181036020830152613a768184612485565b9050939250505056fea264697066735822122075497e2184534eaa5e84d894c9f5ed17093c939e32bfb00630f7ddf23186340b64736f6c63430008080033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 3760, + "contract": "contracts/standard_peekers/bids.sol:EthBlockBidSenderContract", + "label": "boostRelayUrl", + "offset": 0, + "slot": "0", + "type": "t_string_storage" + } + ], + "types": { + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/rigil/MevShare.json b/deployments/rigil/MevShare.json new file mode 100644 index 0000000..97d9b2e --- /dev/null +++ b/deployments/rigil/MevShare.json @@ -0,0 +1,291 @@ +{ + "address": "0x6C6c681669B329fCF2DC6862e8F06D5025aA58e3", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "PeekerReverted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "Suave.BidId", + "name": "bidId", + "type": "bytes16" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "decryptionCondition", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "allowedPeekers", + "type": "address[]" + } + ], + "name": "BidEvent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "Suave.BidId", + "name": "bidId", + "type": "bytes16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "hint", + "type": "bytes" + } + ], + "name": "HintEvent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "Suave.BidId", + "name": "matchBidId", + "type": "bytes16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "matchHint", + "type": "bytes" + } + ], + "name": "MatchEvent", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "Suave.BidId", + "name": "id", + "type": "bytes16" + }, + { + "internalType": "Suave.BidId", + "name": "salt", + "type": "bytes16" + }, + { + "internalType": "uint64", + "name": "decryptionCondition", + "type": "uint64" + }, + { + "internalType": "address[]", + "name": "allowedPeekers", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "allowedStores", + "type": "address[]" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + } + ], + "internalType": "struct Suave.Bid", + "name": "bid", + "type": "tuple" + } + ], + "name": "emitBid", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "Suave.BidId", + "name": "id", + "type": "bytes16" + }, + { + "internalType": "Suave.BidId", + "name": "salt", + "type": "bytes16" + }, + { + "internalType": "uint64", + "name": "decryptionCondition", + "type": "uint64" + }, + { + "internalType": "address[]", + "name": "allowedPeekers", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "allowedStores", + "type": "address[]" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + } + ], + "internalType": "struct Suave.Bid", + "name": "bid", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "hint", + "type": "bytes" + } + ], + "name": "emitBidAndHint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fetchBidConfidentialBundleData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "decryptionCondition", + "type": "uint64" + }, + { + "internalType": "address[]", + "name": "bidAllowedPeekers", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "bidAllowedStores", + "type": "address[]" + } + ], + "name": "newBid", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "decryptionCondition", + "type": "uint64" + }, + { + "internalType": "address[]", + "name": "bidAllowedPeekers", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "bidAllowedStores", + "type": "address[]" + }, + { + "internalType": "Suave.BidId", + "name": "shareBidId", + "type": "bytes16" + } + ], + "name": "newMatch", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x3aaca1b6ea6d24eeffa09a3a8e2878c00582bb1ab2919e50f95e8c5ce8598357", + "receipt": { + "to": null, + "from": "0x16f2Aa8dF055b6e672b93Ded41FecCCabAB565B0", + "contractAddress": "0x6C6c681669B329fCF2DC6862e8F06D5025aA58e3", + "transactionIndex": 0, + "gasUsed": "1861408", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xbd250ab8c5d2f1cec98d2078e448f9aa2c8b2efd73a4f3eff8038c88173a4917", + "transactionHash": "0x3aaca1b6ea6d24eeffa09a3a8e2878c00582bb1ab2919e50f95e8c5ce8598357", + "logs": [], + "blockNumber": 478693, + "cumulativeGasUsed": "1861408", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "23827a9d8caf34ac1d6e36f5c8991a07", + "metadata": "{\"compiler\":{\"version\":\"0.8.8+commit.dddeac2f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"PeekerReverted\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"Suave.BidId\",\"name\":\"bidId\",\"type\":\"bytes16\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"decryptionCondition\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"allowedPeekers\",\"type\":\"address[]\"}],\"name\":\"BidEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"Suave.BidId\",\"name\":\"bidId\",\"type\":\"bytes16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"hint\",\"type\":\"bytes\"}],\"name\":\"HintEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"Suave.BidId\",\"name\":\"matchBidId\",\"type\":\"bytes16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"matchHint\",\"type\":\"bytes\"}],\"name\":\"MatchEvent\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"Suave.BidId\",\"name\":\"id\",\"type\":\"bytes16\"},{\"internalType\":\"Suave.BidId\",\"name\":\"salt\",\"type\":\"bytes16\"},{\"internalType\":\"uint64\",\"name\":\"decryptionCondition\",\"type\":\"uint64\"},{\"internalType\":\"address[]\",\"name\":\"allowedPeekers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"allowedStores\",\"type\":\"address[]\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"internalType\":\"struct Suave.Bid\",\"name\":\"bid\",\"type\":\"tuple\"}],\"name\":\"emitBid\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"Suave.BidId\",\"name\":\"id\",\"type\":\"bytes16\"},{\"internalType\":\"Suave.BidId\",\"name\":\"salt\",\"type\":\"bytes16\"},{\"internalType\":\"uint64\",\"name\":\"decryptionCondition\",\"type\":\"uint64\"},{\"internalType\":\"address[]\",\"name\":\"allowedPeekers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"allowedStores\",\"type\":\"address[]\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"internalType\":\"struct Suave.Bid\",\"name\":\"bid\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"hint\",\"type\":\"bytes\"}],\"name\":\"emitBidAndHint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fetchBidConfidentialBundleData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"decryptionCondition\",\"type\":\"uint64\"},{\"internalType\":\"address[]\",\"name\":\"bidAllowedPeekers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bidAllowedStores\",\"type\":\"address[]\"}],\"name\":\"newBid\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"decryptionCondition\",\"type\":\"uint64\"},{\"internalType\":\"address[]\",\"name\":\"bidAllowedPeekers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"bidAllowedStores\",\"type\":\"address[]\"},{\"internalType\":\"Suave.BidId\",\"name\":\"shareBidId\",\"type\":\"bytes16\"}],\"name\":\"newMatch\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/standard_peekers/bids.sol\":\"MevShareBidContract\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/libraries/Suave.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.8;\\n\\nlibrary Suave {\\n error PeekerReverted(address, bytes);\\n\\n type BidId is bytes16;\\n\\n struct Bid {\\n BidId id;\\n BidId salt;\\n uint64 decryptionCondition;\\n address[] allowedPeekers;\\n address[] allowedStores;\\n string version;\\n }\\n\\n struct BuildBlockArgs {\\n uint64 slot;\\n bytes proposerPubkey;\\n bytes32 parent;\\n uint64 timestamp;\\n address feeRecipient;\\n uint64 gasLimit;\\n bytes32 random;\\n Withdrawal[] withdrawals;\\n bytes extra;\\n }\\n\\n struct Withdrawal {\\n uint64 index;\\n uint64 validator;\\n address Address;\\n uint64 amount;\\n }\\n\\n address public constant ANYALLOWED = 0xC8df3686b4Afb2BB53e60EAe97EF043FE03Fb829;\\n\\n address public constant IS_CONFIDENTIAL_ADDR = 0x0000000000000000000000000000000042010000;\\n\\n address public constant BUILD_ETH_BLOCK = 0x0000000000000000000000000000000042100001;\\n\\n address public constant CONFIDENTIAL_INPUTS = 0x0000000000000000000000000000000042010001;\\n\\n address public constant CONFIDENTIAL_RETRIEVE = 0x0000000000000000000000000000000042020001;\\n\\n address public constant CONFIDENTIAL_STORE = 0x0000000000000000000000000000000042020000;\\n\\n address public constant ETHCALL = 0x0000000000000000000000000000000042100003;\\n\\n address public constant EXTRACT_HINT = 0x0000000000000000000000000000000042100037;\\n\\n address public constant FETCH_BIDS = 0x0000000000000000000000000000000042030001;\\n\\n address public constant FILL_MEV_SHARE_BUNDLE = 0x0000000000000000000000000000000043200001;\\n\\n address public constant NEW_BID = 0x0000000000000000000000000000000042030000;\\n\\n address public constant SIGN_ETH_TRANSACTION = 0x0000000000000000000000000000000040100001;\\n\\n address public constant SIMULATE_BUNDLE = 0x0000000000000000000000000000000042100000;\\n\\n address public constant SUBMIT_BUNDLE_JSON_RPC = 0x0000000000000000000000000000000043000001;\\n\\n address public constant SUBMIT_ETH_BLOCK_BID_TO_RELAY = 0x0000000000000000000000000000000042100002;\\n\\n // Returns whether execution is off- or on-chain\\n function isConfidential() internal view returns (bool b) {\\n (bool success, bytes memory isConfidentialBytes) = IS_CONFIDENTIAL_ADDR.staticcall(\\\"\\\");\\n if (!success) {\\n revert PeekerReverted(IS_CONFIDENTIAL_ADDR, isConfidentialBytes);\\n }\\n assembly {\\n // Load the length of data (first 32 bytes)\\n let len := mload(isConfidentialBytes)\\n // Load the data after 32 bytes, so add 0x20\\n b := mload(add(isConfidentialBytes, 0x20))\\n }\\n }\\n\\n function buildEthBlock(BuildBlockArgs memory blockArgs, BidId bidId, string memory namespace)\\n internal\\n view\\n returns (bytes memory, bytes memory)\\n {\\n (bool success, bytes memory data) = BUILD_ETH_BLOCK.staticcall(abi.encode(blockArgs, bidId, namespace));\\n if (!success) {\\n revert PeekerReverted(BUILD_ETH_BLOCK, data);\\n }\\n\\n return abi.decode(data, (bytes, bytes));\\n }\\n\\n function confidentialInputs() internal view returns (bytes memory) {\\n (bool success, bytes memory data) = CONFIDENTIAL_INPUTS.staticcall(abi.encode());\\n if (!success) {\\n revert PeekerReverted(CONFIDENTIAL_INPUTS, data);\\n }\\n\\n return data;\\n }\\n\\n function confidentialRetrieve(BidId bidId, string memory key) internal view returns (bytes memory) {\\n (bool success, bytes memory data) = CONFIDENTIAL_RETRIEVE.staticcall(abi.encode(bidId, key));\\n if (!success) {\\n revert PeekerReverted(CONFIDENTIAL_RETRIEVE, data);\\n }\\n\\n return data;\\n }\\n\\n function confidentialStore(BidId bidId, string memory key, bytes memory data1) internal view {\\n (bool success, bytes memory data) = CONFIDENTIAL_STORE.staticcall(abi.encode(bidId, key, data1));\\n if (!success) {\\n revert PeekerReverted(CONFIDENTIAL_STORE, data);\\n }\\n }\\n\\n function ethcall(address contractAddr, bytes memory input1) internal view returns (bytes memory) {\\n (bool success, bytes memory data) = ETHCALL.staticcall(abi.encode(contractAddr, input1));\\n if (!success) {\\n revert PeekerReverted(ETHCALL, data);\\n }\\n\\n return abi.decode(data, (bytes));\\n }\\n\\n function extractHint(bytes memory bundleData) internal view returns (bytes memory) {\\n require(isConfidential());\\n (bool success, bytes memory data) = EXTRACT_HINT.staticcall(abi.encode(bundleData));\\n if (!success) {\\n revert PeekerReverted(EXTRACT_HINT, data);\\n }\\n\\n return data;\\n }\\n\\n function fetchBids(uint64 cond, string memory namespace) internal view returns (Bid[] memory) {\\n (bool success, bytes memory data) = FETCH_BIDS.staticcall(abi.encode(cond, namespace));\\n if (!success) {\\n revert PeekerReverted(FETCH_BIDS, data);\\n }\\n\\n return abi.decode(data, (Bid[]));\\n }\\n\\n function fillMevShareBundle(BidId bidId) internal view returns (bytes memory) {\\n require(isConfidential());\\n (bool success, bytes memory data) = FILL_MEV_SHARE_BUNDLE.staticcall(abi.encode(bidId));\\n if (!success) {\\n revert PeekerReverted(FILL_MEV_SHARE_BUNDLE, data);\\n }\\n\\n return data;\\n }\\n\\n function newBid(\\n uint64 decryptionCondition,\\n address[] memory allowedPeekers,\\n address[] memory allowedStores,\\n string memory bidType\\n ) internal view returns (Bid memory) {\\n (bool success, bytes memory data) =\\n NEW_BID.staticcall(abi.encode(decryptionCondition, allowedPeekers, allowedStores, bidType));\\n if (!success) {\\n revert PeekerReverted(NEW_BID, data);\\n }\\n\\n return abi.decode(data, (Bid));\\n }\\n\\n function signEthTransaction(bytes memory txn, string memory chainId, string memory signingKey)\\n internal\\n view\\n returns (bytes memory)\\n {\\n (bool success, bytes memory data) = SIGN_ETH_TRANSACTION.staticcall(abi.encode(txn, chainId, signingKey));\\n if (!success) {\\n revert PeekerReverted(SIGN_ETH_TRANSACTION, data);\\n }\\n\\n return abi.decode(data, (bytes));\\n }\\n\\n function simulateBundle(bytes memory bundleData) internal view returns (uint64) {\\n (bool success, bytes memory data) = SIMULATE_BUNDLE.staticcall(abi.encode(bundleData));\\n if (!success) {\\n revert PeekerReverted(SIMULATE_BUNDLE, data);\\n }\\n\\n return abi.decode(data, (uint64));\\n }\\n\\n function submitBundleJsonRPC(string memory url, string memory method, bytes memory params)\\n internal\\n view\\n returns (bytes memory)\\n {\\n require(isConfidential());\\n (bool success, bytes memory data) = SUBMIT_BUNDLE_JSON_RPC.staticcall(abi.encode(url, method, params));\\n if (!success) {\\n revert PeekerReverted(SUBMIT_BUNDLE_JSON_RPC, data);\\n }\\n\\n return data;\\n }\\n\\n function submitEthBlockBidToRelay(string memory relayUrl, bytes memory builderBid)\\n internal\\n view\\n returns (bytes memory)\\n {\\n require(isConfidential());\\n (bool success, bytes memory data) = SUBMIT_ETH_BLOCK_BID_TO_RELAY.staticcall(abi.encode(relayUrl, builderBid));\\n if (!success) {\\n revert PeekerReverted(SUBMIT_ETH_BLOCK_BID_TO_RELAY, data);\\n }\\n\\n return data;\\n }\\n}\\n\",\"keccak256\":\"0xfe780feb2dda2367a98f438a860a70a9b1b5805d97d95e5c830f4b0fe19eb210\",\"license\":\"UNLICENSED\"},\"contracts/standard_peekers/bids.sol\":{\"content\":\"pragma solidity ^0.8.8;\\n\\nimport \\\"../libraries/Suave.sol\\\";\\n\\ncontract AnyBidContract {\\n\\n\\tevent BidEvent(\\n\\t\\tSuave.BidId bidId,\\n\\t\\tuint64 decryptionCondition,\\n\\t\\taddress[] allowedPeekers\\n\\t);\\n\\n\\tfunction fetchBidConfidentialBundleData() public returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\t\\t\\n\\t\\tbytes memory confidentialInputs = Suave.confidentialInputs();\\n\\t\\treturn abi.decode(confidentialInputs, (bytes));\\n\\t}\\n\\n\\t// Bids to this contract should not be trusted!\\n\\tfunction emitBid(Suave.Bid calldata bid) public {\\n\\t\\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\\n\\t}\\n}\\n\\ncontract BundleBidContract is AnyBidContract {\\n\\n\\tfunction newBid(uint64 decryptionCondition, address[] memory bidAllowedPeekers, address[] memory bidAllowedStores) external payable returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\n\\t\\tbytes memory bundleData = this.fetchBidConfidentialBundleData();\\n\\n\\t\\tuint64 egp = Suave.simulateBundle(bundleData);\\n\\n\\t\\tSuave.Bid memory bid = Suave.newBid(decryptionCondition, bidAllowedPeekers, bidAllowedStores, \\\"default:v0:ethBundles\\\");\\n\\n\\t\\tSuave.confidentialStore(bid.id, \\\"default:v0:ethBundles\\\", bundleData);\\n\\t\\tSuave.confidentialStore(bid.id, \\\"default:v0:ethBundleSimResults\\\", abi.encode(egp));\\n\\n\\t\\treturn emitAndReturn(bid, bundleData);\\n\\t}\\n\\n\\tfunction emitAndReturn(Suave.Bid memory bid, bytes memory) internal virtual returns (bytes memory) {\\n\\t\\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\\n\\t\\treturn bytes.concat(this.emitBid.selector, abi.encode(bid));\\n\\t}\\n}\\n\\ncontract EthBundleSenderContract is BundleBidContract {\\n\\tstring[] public builderUrls;\\n\\n\\tconstructor(string[] memory builderUrls_) {\\n\\t\\tbuilderUrls = builderUrls_;\\n\\t}\\n\\n\\tfunction emitAndReturn(Suave.Bid memory bid, bytes memory bundleData) internal virtual override returns (bytes memory) {\\n\\t\\tfor (uint i = 0; i < builderUrls.length; i++) {\\n\\t\\t\\tSuave.submitBundleJsonRPC(builderUrls[i], \\\"eth_sendBundle\\\", bundleData);\\n\\t\\t}\\n\\n\\t\\treturn BundleBidContract.emitAndReturn(bid, bundleData);\\n\\t}\\n}\\n\\ncontract MevShareBidContract is AnyBidContract {\\n\\n\\tevent HintEvent(\\n\\t\\tSuave.BidId bidId,\\n\\t\\tbytes hint\\n\\t);\\n\\n\\tevent MatchEvent(\\n\\t\\tSuave.BidId matchBidId,\\n\\t\\tbytes matchHint\\n\\t);\\n\\n\\tfunction newBid(uint64 decryptionCondition, address[] memory bidAllowedPeekers, address[] memory bidAllowedStores) external payable returns (bytes memory) {\\n\\t\\t// 0. check confidential execution\\n\\t\\trequire(Suave.isConfidential());\\n\\n\\t\\t// 1. fetch bundle data\\n\\t\\tbytes memory bundleData = this.fetchBidConfidentialBundleData();\\n\\n\\t\\t// 2. sim bundle\\n\\t\\tuint64 egp = Suave.simulateBundle(bundleData);\\n\\t\\t\\n\\t\\t// 3. extract hint\\n\\t\\tbytes memory hint = Suave.extractHint(bundleData);\\n\\t\\t\\n\\t\\t// // 4. store bundle and sim results\\n\\t\\tSuave.Bid memory bid = Suave.newBid(decryptionCondition, bidAllowedPeekers, bidAllowedStores, \\\"mevshare:v0:unmatchedBundles\\\");\\n\\t\\tSuave.confidentialStore(bid.id, \\\"mevshare:v0:ethBundles\\\", bundleData);\\n\\t\\tSuave.confidentialStore(bid.id, \\\"mevshare:v0:ethBundleSimResults\\\", abi.encode(egp));\\n\\t\\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\\n\\t\\temit HintEvent(bid.id, hint);\\n\\n\\t\\t// // 5. return \\\"callback\\\" to emit hint onchain\\n\\t\\treturn bytes.concat(this.emitBidAndHint.selector, abi.encode(bid, hint));\\n\\t}\\n\\n\\tfunction emitBidAndHint(Suave.Bid calldata bid, bytes memory hint) public {\\n\\t\\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\\n\\t\\temit HintEvent(bid.id, hint);\\n\\t}\\n\\n\\tfunction newMatch(uint64 decryptionCondition, address[] memory bidAllowedPeekers, address[] memory bidAllowedStores, Suave.BidId shareBidId) external payable returns (bytes memory) {\\n\\t\\t// WARNING : this function will copy the original mev share bid\\n\\t\\t// into a new key with potentially different permsissions\\n\\t\\t\\n\\t\\trequire(Suave.isConfidential());\\n\\t\\t// 1. fetch confidential data\\n\\t\\tbytes memory matchBundleData = this.fetchBidConfidentialBundleData();\\n\\n\\t\\t// 2. sim match alone for validity\\n\\t\\tuint64 egp = Suave.simulateBundle(matchBundleData);\\n\\n\\t\\t// 3. extract hint\\n\\t\\tbytes memory matchHint = Suave.extractHint(matchBundleData);\\n\\t\\t\\n\\t\\tSuave.Bid memory bid = Suave.newBid(decryptionCondition, bidAllowedPeekers, bidAllowedStores, \\\"mevshare:v0:matchBids\\\");\\n\\t\\tSuave.confidentialStore(bid.id, \\\"mevshare:v0:ethBundles\\\", matchBundleData);\\n\\t\\tSuave.confidentialStore(bid.id, \\\"mevshare:v0:ethBundleSimResults\\\", abi.encode(0));\\n\\n\\t\\t//4. merge bids\\n\\t\\tSuave.BidId[] memory bids = new Suave.BidId[](2);\\n\\t\\tbids[0] = shareBidId;\\n\\t\\tbids[1] = bid.id;\\n\\t\\tSuave.confidentialStore(bid.id, \\\"mevshare:v0:mergedBids\\\", abi.encode(bids));\\n\\n\\t\\treturn emitMatchBidAndHint(bid, matchHint);\\n\\t}\\n\\n\\tfunction emitMatchBidAndHint(Suave.Bid memory bid, bytes memory matchHint) internal virtual returns (bytes memory) {\\n\\t\\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\\n\\t\\temit MatchEvent(bid.id, matchHint);\\n\\n\\t\\treturn bytes.concat(this.emitBid.selector, abi.encode(bid));\\n\\t}\\n}\\n\\ncontract MevShareBundleSenderContract is MevShareBidContract {\\n\\tstring[] public builderUrls;\\n\\n\\tconstructor(string[] memory builderUrls_) {\\n\\t\\tbuilderUrls = builderUrls_;\\n\\t}\\n\\n\\tfunction emitMatchBidAndHint(Suave.Bid memory bid, bytes memory matchHint) internal virtual override returns (bytes memory) {\\n\\t\\tbytes memory bundleData = Suave.fillMevShareBundle(bid.id);\\n\\t\\tfor (uint i = 0; i < builderUrls.length; i++) {\\n\\t\\t\\tSuave.submitBundleJsonRPC(builderUrls[i], \\\"mev_sendBundle\\\", bundleData);\\n\\t\\t}\\n\\n\\t\\treturn MevShareBidContract.emitMatchBidAndHint(bid, matchHint);\\n\\t}\\n}\\n\\n/* Not tested or implemented on the precompile side */\\nstruct EgpBidPair {\\n\\tuint64 egp; // in wei, beware overflow\\n\\tSuave.BidId bidId;\\n}\\n\\n// todo: instead of inherit interact with deployed builder contract\\ncontract EthBlockBidContract is AnyBidContract {\\n\\n\\tevent BuilderBoostBidEvent(\\n\\t\\tSuave.BidId bidId,\\n\\t\\tbytes builderBid\\n\\t);\\n\\t\\n\\tfunction idsEqual(Suave.BidId _l, Suave.BidId _r) public pure returns (bool) {\\n\\t\\tbytes memory l = abi.encodePacked(_l);\\n\\t\\tbytes memory r = abi.encodePacked(_r);\\n\\t\\tfor (uint i = 0; i < l.length; i++) {\\n\\t\\t\\tif (bytes(l)[i] != r[i]) {\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn true;\\n\\t}\\n\\n\\tfunction buildMevShare(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight) public virtual returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\t\\tSuave.Bid[] memory allShareMatchBids = Suave.fetchBids(blockHeight, \\\"mevshare:v0:matchBids\\\");\\n\\t\\tSuave.Bid[] memory allShareUserBids = Suave.fetchBids(blockHeight, \\\"mevshare:v0:unmatchedBundles\\\");\\n\\n\\t\\tif (allShareUserBids.length == 0) {\\n\\t\\t\\trevert Suave.PeekerReverted(address(this), \\\"no bids\\\");\\n\\t\\t}\\n\\n\\t\\tSuave.Bid[] memory allBids = new Suave.Bid[](allShareUserBids.length);\\n\\t\\tfor (uint i = 0; i < allShareUserBids.length; i++) {\\n\\t\\t\\t// TODO: sort matches by egp first!\\n\\t\\t\\tSuave.Bid memory bidToInsert = allShareUserBids[i]; // will be updated with the best match if any\\n\\t\\t\\tfor (uint j = 0; j < allShareMatchBids.length; j++) {\\n\\t\\t\\t\\t// TODO: should be done once at the start and sorted\\n\\t\\t\\t\\tSuave.BidId[] memory mergedBidIds = abi.decode(Suave.confidentialRetrieve(allShareMatchBids[j].id, \\\"mevshare:v0:mergedBids\\\"), (Suave.BidId[]));\\n\\t\\t\\t\\tif (idsEqual(mergedBidIds[0], allShareUserBids[i].id)) {\\n\\t\\t\\t\\t\\tbidToInsert = allShareMatchBids[j];\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\tallBids[i] = bidToInsert;\\n\\t\\t}\\n\\n\\t\\tEgpBidPair[] memory bidsByEGP = new EgpBidPair[](allBids.length);\\n\\t\\tfor (uint i = 0; i < allBids.length; i++) {\\n\\t\\t\\tbytes memory simResults = Suave.confidentialRetrieve(allBids[i].id, \\\"mevshare:v0:ethBundleSimResults\\\");\\n\\t\\t\\tuint64 egp = abi.decode(simResults, (uint64));\\n\\t\\t\\tbidsByEGP[i] = EgpBidPair(egp, allBids[i].id);\\n\\t\\t}\\n\\n\\t\\t// Bubble sort, cause why not\\n\\t\\tuint n = bidsByEGP.length;\\n\\t\\tfor (uint i = 0; i < n - 1; i++) {\\n\\t\\t\\tfor (uint j = i + 1; j < n; j++) {\\n\\t\\t\\t\\tif (bidsByEGP[i].egp < bidsByEGP[j].egp) {\\n\\t\\t\\t\\t\\tEgpBidPair memory temp = bidsByEGP[i];\\n\\t\\t\\t\\t\\tbidsByEGP[i] = bidsByEGP[j];\\n\\t\\t\\t\\t\\tbidsByEGP[j] = temp;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tSuave.BidId[] memory allBidIds = new Suave.BidId[](allBids.length);\\n\\t\\tfor (uint i = 0; i < bidsByEGP.length; i++) {\\n\\t\\t\\tallBidIds[i] = bidsByEGP[i].bidId;\\n\\t\\t}\\n\\n\\t\\treturn buildAndEmit(blockArgs, blockHeight, allBidIds, \\\"mevshare:v0\\\");\\n\\t}\\n\\n\\tfunction buildFromPool(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight) public returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\n\\t\\tSuave.Bid[] memory allBids = Suave.fetchBids(blockHeight, \\\"default:v0:ethBundles\\\");\\n\\t\\tif (allBids.length == 0) {\\n\\t\\t\\trevert Suave.PeekerReverted(address(this), \\\"no bids\\\");\\n\\t\\t}\\n\\n\\t\\tEgpBidPair[] memory bidsByEGP = new EgpBidPair[](allBids.length);\\n\\t\\tfor (uint i = 0; i < allBids.length; i++) {\\n\\t\\t\\tbytes memory simResults = Suave.confidentialRetrieve(allBids[i].id, \\\"default:v0:ethBundleSimResults\\\");\\n\\t\\t\\tuint64 egp = abi.decode(simResults, (uint64));\\n\\t\\t\\tbidsByEGP[i] = EgpBidPair(egp, allBids[i].id);\\n\\t\\t}\\n\\n\\t\\t// Bubble sort, cause why not\\n\\t\\tuint n = bidsByEGP.length;\\n\\t\\tfor (uint i = 0; i < n - 1; i++) {\\n\\t\\t\\tfor (uint j = i + 1; j < n; j++) {\\n\\t\\t\\t\\tif (bidsByEGP[i].egp < bidsByEGP[j].egp) {\\n\\t\\t\\t\\t\\tEgpBidPair memory temp = bidsByEGP[i];\\n\\t\\t\\t\\t\\tbidsByEGP[i] = bidsByEGP[j];\\n\\t\\t\\t\\t\\tbidsByEGP[j] = temp;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tSuave.BidId[] memory allBidIds = new Suave.BidId[](allBids.length);\\n\\t\\tfor (uint i = 0; i < bidsByEGP.length; i++) {\\n\\t\\t\\tallBidIds[i] = bidsByEGP[i].bidId;\\n\\t\\t}\\n\\n\\t\\treturn buildAndEmit(blockArgs, blockHeight, allBidIds, \\\"\\\");\\n\\t}\\n\\n\\tfunction buildAndEmit(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight, Suave.BidId[] memory bids, string memory namespace) public virtual returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\n\\t\\t(Suave.Bid memory blockBid, bytes memory builderBid) = this.doBuild(blockArgs, blockHeight, bids, namespace);\\n\\n\\t\\temit BuilderBoostBidEvent(blockBid.id, builderBid);\\n\\t\\temit BidEvent(blockBid.id, blockBid.decryptionCondition, blockBid.allowedPeekers);\\n\\t\\treturn bytes.concat(this.emitBuilderBidAndBid.selector, abi.encode(blockBid, builderBid));\\n\\t}\\n\\n\\tfunction doBuild(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight, Suave.BidId[] memory bids, string memory namespace) public view returns (Suave.Bid memory, bytes memory) {\\n\\t\\taddress[] memory allowedPeekers = new address[](2);\\n\\t\\tallowedPeekers[0] = address(this);\\n\\t\\tallowedPeekers[1] = Suave.BUILD_ETH_BLOCK;\\n\\n\\t\\tSuave.Bid memory blockBid = Suave.newBid(blockHeight, allowedPeekers, allowedPeekers, \\\"default:v0:mergedBids\\\");\\n\\t\\tSuave.confidentialStore(blockBid.id, \\\"default:v0:mergedBids\\\", abi.encode(bids));\\n\\t\\t \\n\\t\\t(bytes memory builderBid, bytes memory payload) = Suave.buildEthBlock(blockArgs, blockBid.id, namespace);\\n\\t\\tSuave.confidentialStore(blockBid.id, \\\"default:v0:builderPayload\\\", payload); // only through this.unlock\\n\\n\\t\\treturn (blockBid, builderBid);\\n\\t}\\n\\n\\tfunction emitBuilderBidAndBid(Suave.Bid memory bid, bytes memory builderBid) public returns (Suave.Bid memory, bytes memory) {\\n\\t\\temit BuilderBoostBidEvent(bid.id, builderBid);\\n\\t\\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\\n\\t\\treturn (bid, builderBid);\\n\\t}\\n\\n\\tfunction unlock(Suave.BidId bidId, bytes memory signedBlindedHeader) public view returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\n\\t\\t// TODO: verify the header is correct\\n\\t\\t// TODO: incorporate protocol name\\n\\t\\tbytes memory payload = Suave.confidentialRetrieve(bidId, \\\"default:v0:builderPayload\\\");\\n\\t\\treturn payload;\\n\\t}\\n}\\n\\ncontract EthBlockBidSenderContract is EthBlockBidContract {\\n\\tstring boostRelayUrl;\\n\\n\\tconstructor(string memory boostRelayUrl_) {\\n\\t\\tboostRelayUrl = boostRelayUrl_;\\n\\t}\\n\\n\\tfunction buildAndEmit(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight, Suave.BidId[] memory bids, string memory namespace) public virtual override returns (bytes memory) {\\n\\t\\trequire(Suave.isConfidential());\\n\\n\\t\\t(Suave.Bid memory blockBid, bytes memory builderBid) = this.doBuild(blockArgs, blockHeight, bids, namespace);\\n\\t\\tSuave.submitEthBlockBidToRelay(boostRelayUrl, builderBid);\\n\\n\\t\\temit BidEvent(blockBid.id, blockBid.decryptionCondition, blockBid.allowedPeekers);\\n\\t\\treturn bytes.concat(this.emitBid.selector, abi.encode(blockBid));\\n\\t}\\n}\\n\",\"keccak256\":\"0xdc53e0e48d02cd3565889503fb7413966aa8fdee19c4326c84bc15a0a723aa3c\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506120ca806100206000396000f3fe60806040526004361061004a5760003560e01c8063236eb5a71461004f57806389026c111461007f57806392f07a58146100a8578063c0b9d287146100d3578063d8f55db9146100fc575b600080fd5b610069600480360381019061006491906110df565b61012c565b60405161007691906111f2565b60405180910390f35b34801561008b57600080fd5b506100a660048036038101906100a191906112ed565b6103a9565b005b3480156100b457600080fd5b506100bd610471565b6040516100ca91906111f2565b60405180910390f35b3480156100df57600080fd5b506100fa60048036038101906100f59190611365565b6104aa565b005b61011660048036038101906101119190611406565b610521565b60405161012391906111f2565b60405180910390f35b6060610136610824565b61013f57600080fd5b60003073ffffffffffffffffffffffffffffffffffffffff166392f07a586040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561018957600080fd5b505af115801561019d573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906101c69190611515565b905060006101d3826108ec565b905060006101e0836109e3565b905060006102258888886040518060400160405280601c81526020017f6d657673686172653a76303a756e6d61746368656442756e646c657300000000815250610ad8565b905061026b81600001516040518060400160405280601681526020017f6d657673686172653a76303a65746842756e646c65730000000000000000000081525086610bde565b6102ce81600001516040518060400160405280601f81526020017f6d657673686172653a76303a65746842756e646c6553696d526573756c747300815250856040516020016102ba919061156d565b604051602081830303815290604052610bde565b7f83481d5b04dea534715acad673a8177a46fc93882760f36bdc16ccac439d504e81600001518260400151836060015160405161030d93929190611667565b60405180910390a17fdab8306bad2ca820d05b9eff8da2e3016d372c15f00bb032f758718b9cda395081600001518360405161034a9291906116a5565b60405180910390a16389026c1160e01b818360405160200161036d92919061184e565b60405160208183030381529060405260405160200161038d92919061190e565b6040516020818303038152906040529450505050509392505050565b7f83481d5b04dea534715acad673a8177a46fc93882760f36bdc16ccac439d504e82600001356fffffffffffffffffffffffffffffffff19168360400160208101906103f59190611936565b8480606001906104059190611972565b6040516104159493929190611a60565b60405180910390a17fdab8306bad2ca820d05b9eff8da2e3016d372c15f00bb032f758718b9cda395082600001356fffffffffffffffffffffffffffffffff1916826040516104659291906116a5565b60405180910390a15050565b606061047b610824565b61048457600080fd5b600061048e610cc1565b9050808060200190518101906104a49190611515565b91505090565b7f83481d5b04dea534715acad673a8177a46fc93882760f36bdc16ccac439d504e81600001356fffffffffffffffffffffffffffffffff19168260400160208101906104f69190611936565b8380606001906105069190611972565b6040516105169493929190611a60565b60405180910390a150565b606061052b610824565b61053457600080fd5b60003073ffffffffffffffffffffffffffffffffffffffff166392f07a586040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561057e57600080fd5b505af1158015610592573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906105bb9190611515565b905060006105c8826108ec565b905060006105d5836109e3565b9050600061061a8989896040518060400160405280601581526020017f6d657673686172653a76303a6d61746368426964730000000000000000000000815250610ad8565b905061066081600001516040518060400160405280601681526020017f6d657673686172653a76303a65746842756e646c65730000000000000000000081525086610bde565b6106c481600001516040518060400160405280601f81526020017f6d657673686172653a76303a65746842756e646c6553696d526573756c74730081525060006040516020016106b09190611af2565b604051602081830303815290604052610bde565b6000600267ffffffffffffffff8111156106e1576106e0610f3e565b5b60405190808252806020026020018201604052801561070f5781602001602082028036833780820191505090505b509050868160008151811061072757610726611b0d565b5b60200260200101906fffffffffffffffffffffffffffffffff191690816fffffffffffffffffffffffffffffffff19168152505081600001518160018151811061077457610773611b0d565b5b60200260200101906fffffffffffffffffffffffffffffffff191690816fffffffffffffffffffffffffffffffff19168152505061080b82600001516040518060400160405280601681526020017f6d657673686172653a76303a6d65726765644269647300000000000000000000815250836040516020016107f79190611beb565b604051602081830303815290604052610bde565b6108158284610d98565b95505050505050949350505050565b6000806000634201000073ffffffffffffffffffffffffffffffffffffffff1660405161085090611c33565b600060405180830381855afa9150503d806000811461088b576040519150601f19603f3d011682016040523d82523d6000602084013e610890565b606091505b5091509150816108dd576342010000816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016108d4929190611c57565b60405180910390fd5b80516020820151935050505090565b6000806000634210000073ffffffffffffffffffffffffffffffffffffffff168460405160200161091d91906111f2565b6040516020818303038152906040526040516109399190611c87565b600060405180830381855afa9150503d8060008114610974576040519150601f19603f3d011682016040523d82523d6000602084013e610979565b606091505b5091509150816109c6576342100000816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016109bd929190611c57565b60405180910390fd5b808060200190518101906109da9190611cb3565b92505050919050565b60606109ed610824565b6109f657600080fd5b600080634210003773ffffffffffffffffffffffffffffffffffffffff1684604051602001610a2591906111f2565b604051602081830303815290604052604051610a419190611c87565b600060405180830381855afa9150503d8060008114610a7c576040519150601f19603f3d011682016040523d82523d6000602084013e610a81565b606091505b509150915081610ace576342100037816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401610ac5929190611c57565b60405180910390fd5b8092505050919050565b610ae0610e6e565b600080634203000073ffffffffffffffffffffffffffffffffffffffff1687878787604051602001610b159493929190611d2a565b604051602081830303815290604052604051610b319190611c87565b600060405180830381855afa9150503d8060008114610b6c576040519150601f19603f3d011682016040523d82523d6000602084013e610b71565b606091505b509150915081610bbe576342030000816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401610bb5929190611c57565b60405180910390fd5b80806020019051810190610bd29190611fe4565b92505050949350505050565b600080634202000073ffffffffffffffffffffffffffffffffffffffff16858585604051602001610c119392919061202d565b604051602081830303815290604052604051610c2d9190611c87565b600060405180830381855afa9150503d8060008114610c68576040519150601f19603f3d011682016040523d82523d6000602084013e610c6d565b606091505b509150915081610cba576342020000816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401610cb1929190611c57565b60405180910390fd5b5050505050565b6060600080634201000173ffffffffffffffffffffffffffffffffffffffff16604051602001604051602081830303815290604052604051610d039190611c87565b600060405180830381855afa9150503d8060008114610d3e576040519150601f19603f3d011682016040523d82523d6000602084013e610d43565b606091505b509150915081610d90576342010001816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401610d87929190611c57565b60405180910390fd5b809250505090565b60607f83481d5b04dea534715acad673a8177a46fc93882760f36bdc16ccac439d504e836000015184604001518560600151604051610dd993929190611667565b60405180910390a17fafa6f6affefc1010901fc56588695137d9939d2d8b34b30abee96af800a1adc2836000015183604051610e169291906116a5565b60405180910390a163c0b9d28760e01b83604051602001610e379190612072565b604051602081830303815290604052604051602001610e5792919061190e565b604051602081830303815290604052905092915050565b6040518060c0016040528060006fffffffffffffffffffffffffffffffff1916815260200160006fffffffffffffffffffffffffffffffff19168152602001600067ffffffffffffffff1681526020016060815260200160608152602001606081525090565b6000604051905090565b600080fd5b600080fd5b600067ffffffffffffffff82169050919050565b610f0581610ee8565b8114610f1057600080fd5b50565b600081359050610f2281610efc565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610f7682610f2d565b810181811067ffffffffffffffff82111715610f9557610f94610f3e565b5b80604052505050565b6000610fa8610ed4565b9050610fb48282610f6d565b919050565b600067ffffffffffffffff821115610fd457610fd3610f3e565b5b602082029050602081019050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061101582610fea565b9050919050565b6110258161100a565b811461103057600080fd5b50565b6000813590506110428161101c565b92915050565b600061105b61105684610fb9565b610f9e565b9050808382526020820190506020840283018581111561107e5761107d610fe5565b5b835b818110156110a757806110938882611033565b845260208401935050602081019050611080565b5050509392505050565b600082601f8301126110c6576110c5610f28565b5b81356110d6848260208601611048565b91505092915050565b6000806000606084860312156110f8576110f7610ede565b5b600061110686828701610f13565b935050602084013567ffffffffffffffff81111561112757611126610ee3565b5b611133868287016110b1565b925050604084013567ffffffffffffffff81111561115457611153610ee3565b5b611160868287016110b1565b9150509250925092565b600081519050919050565b600082825260208201905092915050565b60005b838110156111a4578082015181840152602081019050611189565b838111156111b3576000848401525b50505050565b60006111c48261116a565b6111ce8185611175565b93506111de818560208601611186565b6111e781610f2d565b840191505092915050565b6000602082019050818103600083015261120c81846111b9565b905092915050565b600080fd5b600060c0828403121561122f5761122e611214565b5b81905092915050565b600080fd5b600067ffffffffffffffff82111561125857611257610f3e565b5b61126182610f2d565b9050602081019050919050565b82818337600083830152505050565b600061129061128b8461123d565b610f9e565b9050828152602081018484840111156112ac576112ab611238565b5b6112b784828561126e565b509392505050565b600082601f8301126112d4576112d3610f28565b5b81356112e484826020860161127d565b91505092915050565b6000806040838503121561130457611303610ede565b5b600083013567ffffffffffffffff81111561132257611321610ee3565b5b61132e85828601611219565b925050602083013567ffffffffffffffff81111561134f5761134e610ee3565b5b61135b858286016112bf565b9150509250929050565b60006020828403121561137b5761137a610ede565b5b600082013567ffffffffffffffff81111561139957611398610ee3565b5b6113a584828501611219565b91505092915050565b60007fffffffffffffffffffffffffffffffff0000000000000000000000000000000082169050919050565b6113e3816113ae565b81146113ee57600080fd5b50565b600081359050611400816113da565b92915050565b600080600080608085870312156114205761141f610ede565b5b600061142e87828801610f13565b945050602085013567ffffffffffffffff81111561144f5761144e610ee3565b5b61145b878288016110b1565b935050604085013567ffffffffffffffff81111561147c5761147b610ee3565b5b611488878288016110b1565b9250506060611499878288016113f1565b91505092959194509250565b60006114b86114b38461123d565b610f9e565b9050828152602081018484840111156114d4576114d3611238565b5b6114df848285611186565b509392505050565b600082601f8301126114fc576114fb610f28565b5b815161150c8482602086016114a5565b91505092915050565b60006020828403121561152b5761152a610ede565b5b600082015167ffffffffffffffff81111561154957611548610ee3565b5b611555848285016114e7565b91505092915050565b61156781610ee8565b82525050565b6000602082019050611582600083018461155e565b92915050565b6000611593826113ae565b9050919050565b6115a381611588565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6115de8161100a565b82525050565b60006115f083836115d5565b60208301905092915050565b6000602082019050919050565b6000611614826115a9565b61161e81856115b4565b9350611629836115c5565b8060005b8381101561165a57815161164188826115e4565b975061164c836115fc565b92505060018101905061162d565b5085935050505092915050565b600060608201905061167c600083018661159a565b611689602083018561155e565b818103604083015261169b8184611609565b9050949350505050565b60006040820190506116ba600083018561159a565b81810360208301526116cc81846111b9565b90509392505050565b6116de81611588565b82525050565b6116ed81610ee8565b82525050565b600082825260208201905092915050565b600061170f826115a9565b61171981856116f3565b9350611724836115c5565b8060005b8381101561175557815161173c88826115e4565b9750611747836115fc565b925050600181019050611728565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b600061178982611762565b611793818561176d565b93506117a3818560208601611186565b6117ac81610f2d565b840191505092915050565b600060c0830160008301516117cf60008601826116d5565b5060208301516117e260208601826116d5565b5060408301516117f560408601826116e4565b506060830151848203606086015261180d8282611704565b915050608083015184820360808601526118278282611704565b91505060a083015184820360a0860152611841828261177e565b9150508091505092915050565b6000604082019050818103600083015261186881856117b7565b9050818103602083015261187c81846111b9565b90509392505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b6118cc6118c782611885565b6118b1565b82525050565b600081905092915050565b60006118e88261116a565b6118f281856118d2565b9350611902818560208601611186565b80840191505092915050565b600061191a82856118bb565b60048201915061192a82846118dd565b91508190509392505050565b60006020828403121561194c5761194b610ede565b5b600061195a84828501610f13565b91505092915050565b600080fd5b600080fd5b600080fd5b6000808335600160200384360303811261198f5761198e611963565b5b80840192508235915067ffffffffffffffff8211156119b1576119b0611968565b5b6020830192506020820236038313156119cd576119cc61196d565b5b509250929050565b6000819050919050565b60006119ee6020840184611033565b905092915050565b6000602082019050919050565b6000611a0f83856115b4565b9350611a1a826119d5565b8060005b85811015611a5357611a3082846119df565b611a3a88826115e4565b9750611a45836119f6565b925050600181019050611a1e565b5085925050509392505050565b6000606082019050611a75600083018761159a565b611a82602083018661155e565b8181036040830152611a95818486611a03565b905095945050505050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000611adc611ad7611ad284611aa0565b611ab7565b611aaa565b9050919050565b611aec81611ac1565b82525050565b6000602082019050611b076000830184611ae3565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000611b7483836116d5565b60208301905092915050565b6000602082019050919050565b6000611b9882611b3c565b611ba28185611b47565b9350611bad83611b58565b8060005b83811015611bde578151611bc58882611b68565b9750611bd083611b80565b925050600181019050611bb1565b5085935050505092915050565b60006020820190508181036000830152611c058184611b8d565b905092915050565b50565b6000611c1d6000836118d2565b9150611c2882611c0d565b600082019050919050565b6000611c3e82611c10565b9150819050919050565b611c518161100a565b82525050565b6000604082019050611c6c6000830185611c48565b8181036020830152611c7e81846111b9565b90509392505050565b6000611c9382846118dd565b915081905092915050565b600081519050611cad81610efc565b92915050565b600060208284031215611cc957611cc8610ede565b5b6000611cd784828501611c9e565b91505092915050565b600082825260208201905092915050565b6000611cfc82611762565b611d068185611ce0565b9350611d16818560208601611186565b611d1f81610f2d565b840191505092915050565b6000608082019050611d3f600083018761155e565b8181036020830152611d518186611609565b90508181036040830152611d658185611609565b90508181036060830152611d798184611cf1565b905095945050505050565b600080fd5b600080fd5b600081519050611d9d816113da565b92915050565b600081519050611db28161101c565b92915050565b6000611dcb611dc684610fb9565b610f9e565b90508083825260208201905060208402830185811115611dee57611ded610fe5565b5b835b81811015611e175780611e038882611da3565b845260208401935050602081019050611df0565b5050509392505050565b600082601f830112611e3657611e35610f28565b5b8151611e46848260208601611db8565b91505092915050565b600067ffffffffffffffff821115611e6a57611e69610f3e565b5b611e7382610f2d565b9050602081019050919050565b6000611e93611e8e84611e4f565b610f9e565b905082815260208101848484011115611eaf57611eae611238565b5b611eba848285611186565b509392505050565b600082601f830112611ed757611ed6610f28565b5b8151611ee7848260208601611e80565b91505092915050565b600060c08284031215611f0657611f05611d84565b5b611f1060c0610f9e565b90506000611f2084828501611d8e565b6000830152506020611f3484828501611d8e565b6020830152506040611f4884828501611c9e565b604083015250606082015167ffffffffffffffff811115611f6c57611f6b611d89565b5b611f7884828501611e21565b606083015250608082015167ffffffffffffffff811115611f9c57611f9b611d89565b5b611fa884828501611e21565b60808301525060a082015167ffffffffffffffff811115611fcc57611fcb611d89565b5b611fd884828501611ec2565b60a08301525092915050565b600060208284031215611ffa57611ff9610ede565b5b600082015167ffffffffffffffff81111561201857612017610ee3565b5b61202484828501611ef0565b91505092915050565b6000606082019050612042600083018661159a565b81810360208301526120548185611cf1565b9050818103604083015261206881846111b9565b9050949350505050565b6000602082019050818103600083015261208c81846117b7565b90509291505056fea2646970667358221220d21e19f7df8aab7da17bc28af8f13fc0d6b67c37c5fd040570eaa801bed550a064736f6c63430008080033", + "deployedBytecode": "0x60806040526004361061004a5760003560e01c8063236eb5a71461004f57806389026c111461007f57806392f07a58146100a8578063c0b9d287146100d3578063d8f55db9146100fc575b600080fd5b610069600480360381019061006491906110df565b61012c565b60405161007691906111f2565b60405180910390f35b34801561008b57600080fd5b506100a660048036038101906100a191906112ed565b6103a9565b005b3480156100b457600080fd5b506100bd610471565b6040516100ca91906111f2565b60405180910390f35b3480156100df57600080fd5b506100fa60048036038101906100f59190611365565b6104aa565b005b61011660048036038101906101119190611406565b610521565b60405161012391906111f2565b60405180910390f35b6060610136610824565b61013f57600080fd5b60003073ffffffffffffffffffffffffffffffffffffffff166392f07a586040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561018957600080fd5b505af115801561019d573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906101c69190611515565b905060006101d3826108ec565b905060006101e0836109e3565b905060006102258888886040518060400160405280601c81526020017f6d657673686172653a76303a756e6d61746368656442756e646c657300000000815250610ad8565b905061026b81600001516040518060400160405280601681526020017f6d657673686172653a76303a65746842756e646c65730000000000000000000081525086610bde565b6102ce81600001516040518060400160405280601f81526020017f6d657673686172653a76303a65746842756e646c6553696d526573756c747300815250856040516020016102ba919061156d565b604051602081830303815290604052610bde565b7f83481d5b04dea534715acad673a8177a46fc93882760f36bdc16ccac439d504e81600001518260400151836060015160405161030d93929190611667565b60405180910390a17fdab8306bad2ca820d05b9eff8da2e3016d372c15f00bb032f758718b9cda395081600001518360405161034a9291906116a5565b60405180910390a16389026c1160e01b818360405160200161036d92919061184e565b60405160208183030381529060405260405160200161038d92919061190e565b6040516020818303038152906040529450505050509392505050565b7f83481d5b04dea534715acad673a8177a46fc93882760f36bdc16ccac439d504e82600001356fffffffffffffffffffffffffffffffff19168360400160208101906103f59190611936565b8480606001906104059190611972565b6040516104159493929190611a60565b60405180910390a17fdab8306bad2ca820d05b9eff8da2e3016d372c15f00bb032f758718b9cda395082600001356fffffffffffffffffffffffffffffffff1916826040516104659291906116a5565b60405180910390a15050565b606061047b610824565b61048457600080fd5b600061048e610cc1565b9050808060200190518101906104a49190611515565b91505090565b7f83481d5b04dea534715acad673a8177a46fc93882760f36bdc16ccac439d504e81600001356fffffffffffffffffffffffffffffffff19168260400160208101906104f69190611936565b8380606001906105069190611972565b6040516105169493929190611a60565b60405180910390a150565b606061052b610824565b61053457600080fd5b60003073ffffffffffffffffffffffffffffffffffffffff166392f07a586040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561057e57600080fd5b505af1158015610592573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906105bb9190611515565b905060006105c8826108ec565b905060006105d5836109e3565b9050600061061a8989896040518060400160405280601581526020017f6d657673686172653a76303a6d61746368426964730000000000000000000000815250610ad8565b905061066081600001516040518060400160405280601681526020017f6d657673686172653a76303a65746842756e646c65730000000000000000000081525086610bde565b6106c481600001516040518060400160405280601f81526020017f6d657673686172653a76303a65746842756e646c6553696d526573756c74730081525060006040516020016106b09190611af2565b604051602081830303815290604052610bde565b6000600267ffffffffffffffff8111156106e1576106e0610f3e565b5b60405190808252806020026020018201604052801561070f5781602001602082028036833780820191505090505b509050868160008151811061072757610726611b0d565b5b60200260200101906fffffffffffffffffffffffffffffffff191690816fffffffffffffffffffffffffffffffff19168152505081600001518160018151811061077457610773611b0d565b5b60200260200101906fffffffffffffffffffffffffffffffff191690816fffffffffffffffffffffffffffffffff19168152505061080b82600001516040518060400160405280601681526020017f6d657673686172653a76303a6d65726765644269647300000000000000000000815250836040516020016107f79190611beb565b604051602081830303815290604052610bde565b6108158284610d98565b95505050505050949350505050565b6000806000634201000073ffffffffffffffffffffffffffffffffffffffff1660405161085090611c33565b600060405180830381855afa9150503d806000811461088b576040519150601f19603f3d011682016040523d82523d6000602084013e610890565b606091505b5091509150816108dd576342010000816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016108d4929190611c57565b60405180910390fd5b80516020820151935050505090565b6000806000634210000073ffffffffffffffffffffffffffffffffffffffff168460405160200161091d91906111f2565b6040516020818303038152906040526040516109399190611c87565b600060405180830381855afa9150503d8060008114610974576040519150601f19603f3d011682016040523d82523d6000602084013e610979565b606091505b5091509150816109c6576342100000816040517f75fff4670000000000000000000000000000000000000000000000000000000081526004016109bd929190611c57565b60405180910390fd5b808060200190518101906109da9190611cb3565b92505050919050565b60606109ed610824565b6109f657600080fd5b600080634210003773ffffffffffffffffffffffffffffffffffffffff1684604051602001610a2591906111f2565b604051602081830303815290604052604051610a419190611c87565b600060405180830381855afa9150503d8060008114610a7c576040519150601f19603f3d011682016040523d82523d6000602084013e610a81565b606091505b509150915081610ace576342100037816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401610ac5929190611c57565b60405180910390fd5b8092505050919050565b610ae0610e6e565b600080634203000073ffffffffffffffffffffffffffffffffffffffff1687878787604051602001610b159493929190611d2a565b604051602081830303815290604052604051610b319190611c87565b600060405180830381855afa9150503d8060008114610b6c576040519150601f19603f3d011682016040523d82523d6000602084013e610b71565b606091505b509150915081610bbe576342030000816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401610bb5929190611c57565b60405180910390fd5b80806020019051810190610bd29190611fe4565b92505050949350505050565b600080634202000073ffffffffffffffffffffffffffffffffffffffff16858585604051602001610c119392919061202d565b604051602081830303815290604052604051610c2d9190611c87565b600060405180830381855afa9150503d8060008114610c68576040519150601f19603f3d011682016040523d82523d6000602084013e610c6d565b606091505b509150915081610cba576342020000816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401610cb1929190611c57565b60405180910390fd5b5050505050565b6060600080634201000173ffffffffffffffffffffffffffffffffffffffff16604051602001604051602081830303815290604052604051610d039190611c87565b600060405180830381855afa9150503d8060008114610d3e576040519150601f19603f3d011682016040523d82523d6000602084013e610d43565b606091505b509150915081610d90576342010001816040517f75fff467000000000000000000000000000000000000000000000000000000008152600401610d87929190611c57565b60405180910390fd5b809250505090565b60607f83481d5b04dea534715acad673a8177a46fc93882760f36bdc16ccac439d504e836000015184604001518560600151604051610dd993929190611667565b60405180910390a17fafa6f6affefc1010901fc56588695137d9939d2d8b34b30abee96af800a1adc2836000015183604051610e169291906116a5565b60405180910390a163c0b9d28760e01b83604051602001610e379190612072565b604051602081830303815290604052604051602001610e5792919061190e565b604051602081830303815290604052905092915050565b6040518060c0016040528060006fffffffffffffffffffffffffffffffff1916815260200160006fffffffffffffffffffffffffffffffff19168152602001600067ffffffffffffffff1681526020016060815260200160608152602001606081525090565b6000604051905090565b600080fd5b600080fd5b600067ffffffffffffffff82169050919050565b610f0581610ee8565b8114610f1057600080fd5b50565b600081359050610f2281610efc565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610f7682610f2d565b810181811067ffffffffffffffff82111715610f9557610f94610f3e565b5b80604052505050565b6000610fa8610ed4565b9050610fb48282610f6d565b919050565b600067ffffffffffffffff821115610fd457610fd3610f3e565b5b602082029050602081019050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061101582610fea565b9050919050565b6110258161100a565b811461103057600080fd5b50565b6000813590506110428161101c565b92915050565b600061105b61105684610fb9565b610f9e565b9050808382526020820190506020840283018581111561107e5761107d610fe5565b5b835b818110156110a757806110938882611033565b845260208401935050602081019050611080565b5050509392505050565b600082601f8301126110c6576110c5610f28565b5b81356110d6848260208601611048565b91505092915050565b6000806000606084860312156110f8576110f7610ede565b5b600061110686828701610f13565b935050602084013567ffffffffffffffff81111561112757611126610ee3565b5b611133868287016110b1565b925050604084013567ffffffffffffffff81111561115457611153610ee3565b5b611160868287016110b1565b9150509250925092565b600081519050919050565b600082825260208201905092915050565b60005b838110156111a4578082015181840152602081019050611189565b838111156111b3576000848401525b50505050565b60006111c48261116a565b6111ce8185611175565b93506111de818560208601611186565b6111e781610f2d565b840191505092915050565b6000602082019050818103600083015261120c81846111b9565b905092915050565b600080fd5b600060c0828403121561122f5761122e611214565b5b81905092915050565b600080fd5b600067ffffffffffffffff82111561125857611257610f3e565b5b61126182610f2d565b9050602081019050919050565b82818337600083830152505050565b600061129061128b8461123d565b610f9e565b9050828152602081018484840111156112ac576112ab611238565b5b6112b784828561126e565b509392505050565b600082601f8301126112d4576112d3610f28565b5b81356112e484826020860161127d565b91505092915050565b6000806040838503121561130457611303610ede565b5b600083013567ffffffffffffffff81111561132257611321610ee3565b5b61132e85828601611219565b925050602083013567ffffffffffffffff81111561134f5761134e610ee3565b5b61135b858286016112bf565b9150509250929050565b60006020828403121561137b5761137a610ede565b5b600082013567ffffffffffffffff81111561139957611398610ee3565b5b6113a584828501611219565b91505092915050565b60007fffffffffffffffffffffffffffffffff0000000000000000000000000000000082169050919050565b6113e3816113ae565b81146113ee57600080fd5b50565b600081359050611400816113da565b92915050565b600080600080608085870312156114205761141f610ede565b5b600061142e87828801610f13565b945050602085013567ffffffffffffffff81111561144f5761144e610ee3565b5b61145b878288016110b1565b935050604085013567ffffffffffffffff81111561147c5761147b610ee3565b5b611488878288016110b1565b9250506060611499878288016113f1565b91505092959194509250565b60006114b86114b38461123d565b610f9e565b9050828152602081018484840111156114d4576114d3611238565b5b6114df848285611186565b509392505050565b600082601f8301126114fc576114fb610f28565b5b815161150c8482602086016114a5565b91505092915050565b60006020828403121561152b5761152a610ede565b5b600082015167ffffffffffffffff81111561154957611548610ee3565b5b611555848285016114e7565b91505092915050565b61156781610ee8565b82525050565b6000602082019050611582600083018461155e565b92915050565b6000611593826113ae565b9050919050565b6115a381611588565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6115de8161100a565b82525050565b60006115f083836115d5565b60208301905092915050565b6000602082019050919050565b6000611614826115a9565b61161e81856115b4565b9350611629836115c5565b8060005b8381101561165a57815161164188826115e4565b975061164c836115fc565b92505060018101905061162d565b5085935050505092915050565b600060608201905061167c600083018661159a565b611689602083018561155e565b818103604083015261169b8184611609565b9050949350505050565b60006040820190506116ba600083018561159a565b81810360208301526116cc81846111b9565b90509392505050565b6116de81611588565b82525050565b6116ed81610ee8565b82525050565b600082825260208201905092915050565b600061170f826115a9565b61171981856116f3565b9350611724836115c5565b8060005b8381101561175557815161173c88826115e4565b9750611747836115fc565b925050600181019050611728565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b600061178982611762565b611793818561176d565b93506117a3818560208601611186565b6117ac81610f2d565b840191505092915050565b600060c0830160008301516117cf60008601826116d5565b5060208301516117e260208601826116d5565b5060408301516117f560408601826116e4565b506060830151848203606086015261180d8282611704565b915050608083015184820360808601526118278282611704565b91505060a083015184820360a0860152611841828261177e565b9150508091505092915050565b6000604082019050818103600083015261186881856117b7565b9050818103602083015261187c81846111b9565b90509392505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b6118cc6118c782611885565b6118b1565b82525050565b600081905092915050565b60006118e88261116a565b6118f281856118d2565b9350611902818560208601611186565b80840191505092915050565b600061191a82856118bb565b60048201915061192a82846118dd565b91508190509392505050565b60006020828403121561194c5761194b610ede565b5b600061195a84828501610f13565b91505092915050565b600080fd5b600080fd5b600080fd5b6000808335600160200384360303811261198f5761198e611963565b5b80840192508235915067ffffffffffffffff8211156119b1576119b0611968565b5b6020830192506020820236038313156119cd576119cc61196d565b5b509250929050565b6000819050919050565b60006119ee6020840184611033565b905092915050565b6000602082019050919050565b6000611a0f83856115b4565b9350611a1a826119d5565b8060005b85811015611a5357611a3082846119df565b611a3a88826115e4565b9750611a45836119f6565b925050600181019050611a1e565b5085925050509392505050565b6000606082019050611a75600083018761159a565b611a82602083018661155e565b8181036040830152611a95818486611a03565b905095945050505050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000611adc611ad7611ad284611aa0565b611ab7565b611aaa565b9050919050565b611aec81611ac1565b82525050565b6000602082019050611b076000830184611ae3565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000611b7483836116d5565b60208301905092915050565b6000602082019050919050565b6000611b9882611b3c565b611ba28185611b47565b9350611bad83611b58565b8060005b83811015611bde578151611bc58882611b68565b9750611bd083611b80565b925050600181019050611bb1565b5085935050505092915050565b60006020820190508181036000830152611c058184611b8d565b905092915050565b50565b6000611c1d6000836118d2565b9150611c2882611c0d565b600082019050919050565b6000611c3e82611c10565b9150819050919050565b611c518161100a565b82525050565b6000604082019050611c6c6000830185611c48565b8181036020830152611c7e81846111b9565b90509392505050565b6000611c9382846118dd565b915081905092915050565b600081519050611cad81610efc565b92915050565b600060208284031215611cc957611cc8610ede565b5b6000611cd784828501611c9e565b91505092915050565b600082825260208201905092915050565b6000611cfc82611762565b611d068185611ce0565b9350611d16818560208601611186565b611d1f81610f2d565b840191505092915050565b6000608082019050611d3f600083018761155e565b8181036020830152611d518186611609565b90508181036040830152611d658185611609565b90508181036060830152611d798184611cf1565b905095945050505050565b600080fd5b600080fd5b600081519050611d9d816113da565b92915050565b600081519050611db28161101c565b92915050565b6000611dcb611dc684610fb9565b610f9e565b90508083825260208201905060208402830185811115611dee57611ded610fe5565b5b835b81811015611e175780611e038882611da3565b845260208401935050602081019050611df0565b5050509392505050565b600082601f830112611e3657611e35610f28565b5b8151611e46848260208601611db8565b91505092915050565b600067ffffffffffffffff821115611e6a57611e69610f3e565b5b611e7382610f2d565b9050602081019050919050565b6000611e93611e8e84611e4f565b610f9e565b905082815260208101848484011115611eaf57611eae611238565b5b611eba848285611186565b509392505050565b600082601f830112611ed757611ed6610f28565b5b8151611ee7848260208601611e80565b91505092915050565b600060c08284031215611f0657611f05611d84565b5b611f1060c0610f9e565b90506000611f2084828501611d8e565b6000830152506020611f3484828501611d8e565b6020830152506040611f4884828501611c9e565b604083015250606082015167ffffffffffffffff811115611f6c57611f6b611d89565b5b611f7884828501611e21565b606083015250608082015167ffffffffffffffff811115611f9c57611f9b611d89565b5b611fa884828501611e21565b60808301525060a082015167ffffffffffffffff811115611fcc57611fcb611d89565b5b611fd884828501611ec2565b60a08301525092915050565b600060208284031215611ffa57611ff9610ede565b5b600082015167ffffffffffffffff81111561201857612017610ee3565b5b61202484828501611ef0565b91505092915050565b6000606082019050612042600083018661159a565b81810360208301526120548185611cf1565b9050818103604083015261206881846111b9565b9050949350505050565b6000602082019050818103600083015261208c81846117b7565b90509291505056fea2646970667358221220d21e19f7df8aab7da17bc28af8f13fc0d6b67c37c5fd040570eaa801bed550a064736f6c63430008080033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/rigil/solcInputs/23827a9d8caf34ac1d6e36f5c8991a07.json b/deployments/rigil/solcInputs/23827a9d8caf34ac1d6e36f5c8991a07.json new file mode 100644 index 0000000..7924397 --- /dev/null +++ b/deployments/rigil/solcInputs/23827a9d8caf34ac1d6e36f5c8991a07.json @@ -0,0 +1,56 @@ +{ + "language": "Solidity", + "sources": { + "contracts/blockad/BlockAdV1.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport { AnyBidContract, EthBlockBidSenderContract, Suave } from \"../standard_peekers/bids.sol\";\n\n\ncontract BlockAdAuctionV1 is AnyBidContract {\n\n\tstruct AdBid {\n\t\tstring extra; \n\t\tSuave.BidId paymentBidId;\n\t\tuint blockHeight;\n\t}\n\n\tstruct EffectiveAdBid {\n\t\tstring extra;\n\t\tuint64 egp;\n\t\tbytes paymentBundle;\n\t}\n\n\tevent AdBidEvent(\n\t\tstring extra,\n\t\tuint blockNum\n\t);\n\n\tmapping(uint => AdBid[]) public blockToBid;\n\tEthBlockBidSenderContract public builder;\n\n\tconstructor(string memory boostRelayUrl_) {\n\t\t// Make sure the builder contract cannot abuse the confidential payment bundle\n\t\tbuilder = new EthBlockBidSenderContract(boostRelayUrl_);\n\t}\n\n\t// ON-CHAIN METHODS\n\n\tfunction buyAdCallback(AdBid[] memory bids) external {\n\t\tfor (uint i = 0; i < bids.length; ++i) {\n\t\t\tuint blockNum = bids[i].blockHeight;\n\t\t\tblockToBid[blockNum].push(bids[i]);\n\t\t\t// todo: add some form of an id to the bid\n\t\t\temit AdBidEvent(bids[i].extra, blockNum);\n\t\t}\n\t}\n\n\t// CONFIDENTIAL METHODS\n\n\tfunction buyAd(\n\t\tuint64 blockStart, \n\t\tuint64 range, \n\t\tstring memory extra\n\t) external returns (bytes memory) {\n\t\trequire(Suave.isConfidential(), \"Not confidential\");\n\t\t// Check payment is valid for the latest state\n\t\tbytes memory paymentBundle = this.fetchBidConfidentialBundleData();\n\t\trequire(Suave.simulateBundle(paymentBundle) != 0, \"Initial sim check failed\");\n\t\t\n\t\taddress[] memory allowedPeekers = new address[](1);\n\t\tallowedPeekers[0] = address(this);\n\n\t\tAdBid[] memory bids = new AdBid[](range);\n\t\tfor (uint64 b = blockStart; b < blockStart+range; b++) {\n\t\t\t// Store payment bundle\n\t\t\tSuave.Bid memory paymentBid = Suave.newBid(0, allowedPeekers, allowedPeekers, \"blockad:v0:paymentBundle\");\n\t\t\tSuave.confidentialStore(paymentBid.id, \"blockad:v0:paymentBundle\", paymentBundle);\n\t\t\t// Prepare bid data to be commited on-chain\n\t\t\tbids[b-blockStart] = AdBid(extra, paymentBid.id, b);\n\t\t}\n\t\treturn abi.encodeWithSelector(this.buyAdCallback.selector, bids);\n\t}\n\n\tfunction buildBlock(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight) public returns (bytes memory) {\n\t\trequire(Suave.isConfidential());\n\n\t\tAdBid[] storage blockBids = blockToBid[blockHeight];\n\t\trequire(blockBids.length > 0, \"No bids\");\n\n\t\tEffectiveAdBid memory bestOffer;\n\t\tfor (uint i = 0; i < blockBids.length; ++i) {\n\t\t\tbytes memory paymentBundle = Suave.confidentialRetrieve(\n\t\t\t\tblockBids[i].paymentBidId, \n\t\t\t\t\"blockad:v0:paymentBundle\"\n\t\t\t);\n\t\t\tuint64 egp = Suave.simulateBundle(paymentBundle);\n\t\t\tif (egp > bestOffer.egp)\n\t\t\t\tbestOffer = EffectiveAdBid(blockBids[i].extra, egp, paymentBundle);\n\t\t\t// todo: if egp == 0, delete all of their bids for the next blocks (when someone wins an ad, discard their subsequent(pending) bids)\n\t\t}\n\t\tdelete blockToBid[blockHeight];\n\n\t\t// Prep for block building - include extra & payment bundle\n\t\tif (bestOffer.egp > 0)\n\t\t\tblockArgs.extra = bytes(bestOffer.extra);\n\t\t// Expect the payment on top; if someone wants to fail the payment with other txs they have to have higher egp than the payment tx\n\t\taddress[] memory allowedPeekers = new address[](3);\n\t\tallowedPeekers[0] = address(builder);\n\t\tallowedPeekers[1] = Suave.BUILD_ETH_BLOCK;\n\t\tallowedPeekers[2] = address(this);\n\t\tSuave.Bid memory paymentBundleBid = Suave.newBid(blockHeight, allowedPeekers, allowedPeekers, \"default:v0:ethBundles\");\n\t\tSuave.confidentialStore(paymentBundleBid.id, \"default:v0:ethBundles\", bestOffer.paymentBundle);\n\t\tSuave.confidentialStore(paymentBundleBid.id, \"default:v0:ethBundleSimResults\", abi.encode(bestOffer.egp));\n\t\t\n\t\treturn builder.buildFromPool(blockArgs, blockHeight);\n\t}\n\n}\n" + }, + "contracts/blockad/BlockAdV2.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Author: Miha Lotric (halo3mic)\n\npragma solidity ^0.8.8;\n\nimport { EthBlockBidSenderContract, AnyBidContract, Suave } from \"../standard_peekers/bids.sol\";\nimport { ConfidentialControl } from \"./lib/ConfidentialControl.sol\";\nimport { DynamicUintArray } from \"./lib/Utils.sol\";\n\n\ncontract BlockAdAuctionV2 is AnyBidContract, ConfidentialControl {\n\tusing DynamicUintArray for bytes;\n\n\tstruct AdRequest {\n\t\tuint id;\n\t\tstring extra;\n\t\tuint blockLimit;\n\t\tSuave.BidId paymentBidId;\n\t}\n\tstruct Offer {\n\t\tuint id;\n\t\tstring extra;\n\t\tuint64 egp;\n\t\tbytes paymentBundle;\n\t}\n\n\tevent RequestAdded(uint id, string extra, uint blockLimit);\n\tevent RequestRemoved(uint id);\n\tevent RequestIncluded(uint id, uint64 egp);\n\n\tstring internal constant PB_NAMESPACE = \"blockad:v0:paymentBundle\";\n\tstring internal constant EB_NAMESPACE = \"default:v0:ethBundles\";\n\tstring internal constant EB_SIM_NAMESPACE = \"default:v0:ethBundleSimResults\";\n\tEthBlockBidSenderContract public builder;\n\tAdRequest[] public requests;\n\tuint public nextId;\n\n\t/**********************************************************************\n\t * ⛓️ ON-CHAIN METHODS *\n\t ***********************************************************************/\n\n\tconstructor(string memory boostRelayUrl_) {\n\t\tbuilder = new EthBlockBidSenderContract(boostRelayUrl_);\n\t}\n\n\tfunction buyAdCallback(AdRequest calldata request, UnlockArgs calldata uArgs) external unlock(uArgs) {\n\t\trequests.push(request);\n\t\tnextId++;\n\t\temit RequestAdded(request.id, request.extra, request.blockLimit);\n\t}\n\n\tfunction buildCallback(\n\t\tbytes memory builderCall,\n\t\tbytes memory includedRequestB,\n\t\tbytes memory pendingRemovalsB,\n\t\tUnlockArgs calldata uArgs\n\t) external unlock(uArgs) {\n\t\thandleIncludedRequest(includedRequestB);\n\t\tif (pendingRemovalsB.length > 0) removeRequests(pendingRemovalsB.export());\n\t\texecuteExternalCallback(address(builder), builderCall);\n\t}\n\n\tfunction requestsLength() public view returns (uint) {\n\t\treturn requests.length;\n\t}\n\n\t/**********************************************************************\n\t * 🔒 CONFIDENTIAL METHODS *\n\t ***********************************************************************/\n\n\tfunction confidentialConstructor() public view override onlyConfidential returns (bytes memory) {\n\t\treturn ConfidentialControl.confidentialConstructor();\n\t}\n\n\tfunction buyAd(uint64 blockLimit, string memory extra) external onlyConfidential returns (bytes memory) {\n\t\tbytes memory paymentBundle = this.fetchBidConfidentialBundleData();\n\t\tcrequire(Suave.simulateBundle(paymentBundle) != 0, \"egp too low\");\n\t\tSuave.BidId paymentBidId = storePaymentBundle(paymentBundle);\n\t\tAdRequest memory request = AdRequest(nextId, extra, blockLimit, paymentBidId);\n\t\treturn abi.encodeWithSelector(this.buyAdCallback.selector, request, getUnlockPair());\n\t}\n\n\tfunction buildBlock(\n\t\tSuave.BuildBlockArgs memory blockArgs,\n\t\tuint64 blockHeight\n\t) public onlyConfidential returns (bytes memory) {\n\t\tcrequire(requests.length > 0, \"No requests\");\n\t\t(Offer memory bestOffer, bytes memory removals) = filterOffers(blockHeight);\n\t\tcrequire(bestOffer.egp > 0, \"No valid offers\");\n\n\t\tstoreBundleInPool(blockHeight, bestOffer);\n\t\tblockArgs.extra = bytes(bestOffer.extra);\n\t\t// Expect flow is ordered by egp; if one wants to fail payment they need higher egp\n\t\tbytes memory externalCallback = builder.buildFromPool(blockArgs, blockHeight);\n\n\t\treturn\n\t\t\tabi.encodeWithSelector(\n\t\t\t\tthis.buildCallback.selector,\n\t\t\t\texternalCallback,\n\t\t\t\tabi.encode(bestOffer.id, bestOffer.egp),\n\t\t\t\tremovals,\n\t\t\t\tgetUnlockPair()\n\t\t\t);\n\t}\n\n\t/**********************************************************************\n\t * 🛠️ INTERNAL METHODS *\n\t ***********************************************************************/\n\n\tfunction removeRequests(uint[] memory pendingRemovals) internal {\n\t\t// Assume that the pendingRemovals were added in ascending order\n\t\t// Assume that pendingRemovals.length <= requests.length\n\t\tfor (uint i = pendingRemovals.length; i > 0; --i) {\n\t\t\tuint indexToRemove = pendingRemovals[i - 1];\n\t\t\tuint requestId = requests[indexToRemove].id;\n\t\t\tif (indexToRemove < requests.length - 1) {\n\t\t\t\trequests[indexToRemove] = requests[requests.length - 1];\n\t\t\t}\n\t\t\trequests.pop();\n\t\t\temit RequestRemoved(requestId);\n\t\t}\n\t}\n\n\tfunction handleIncludedRequest(bytes memory includedRequestB) internal {\n\t\t(uint id, uint64 egp) = abi.decode(includedRequestB, (uint, uint64));\n\t\temit RequestIncluded(id, egp);\n\t}\n\n\tfunction executeExternalCallback(address target, bytes memory data) internal {\n\t\t(bool success, ) = target.call(data);\n\t\tcrequire(success, \"External call failed\");\n\t}\n\n\tfunction storePaymentBundle(bytes memory paymentBundle) internal view returns (Suave.BidId) {\n\t\taddress[] memory peekers = new address[](1);\n\t\tpeekers[0] = address(this);\n\t\tSuave.Bid memory paymentBid = Suave.newBid(0, peekers, peekers, PB_NAMESPACE);\n\t\tSuave.confidentialStore(paymentBid.id, PB_NAMESPACE, paymentBundle);\n\t\treturn paymentBid.id;\n\t}\n\n\tfunction filterOffers(uint blockHeight) internal view returns (Offer memory bestOffer, bytes memory removals) {\n\t\tfor (uint i; i < requests.length; ++i) {\n\t\t\tAdRequest memory request = requests[i];\n\t\t\tif (request.blockLimit < blockHeight) {\n\t\t\t\tremovals = removals.append(i);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbytes memory paymentBundle = Suave.confidentialRetrieve(request.paymentBidId, PB_NAMESPACE);\n\t\t\t(bool success, uint64 egp) = simulateBundleSafe(paymentBundle);\n\t\t\tif (!success || egp == 0) {\n\t\t\t\tremovals = removals.append(i);\n\t\t\t} else if (egp > bestOffer.egp) {\n\t\t\t\tbestOffer = Offer(request.id, request.extra, egp, paymentBundle);\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction storeBundleInPool(uint64 blockHeight, Offer memory bestOffer) internal view {\n\t\taddress[] memory allowedPeekers = new address[](3);\n\t\tallowedPeekers[0] = address(builder);\n\t\tallowedPeekers[1] = Suave.BUILD_ETH_BLOCK;\n\t\tallowedPeekers[2] = address(this);\n\t\tSuave.Bid memory paymentBundleBid = Suave.newBid(blockHeight, allowedPeekers, allowedPeekers, EB_NAMESPACE);\n\t\tSuave.confidentialStore(paymentBundleBid.id, EB_NAMESPACE, bestOffer.paymentBundle);\n\t\tSuave.confidentialStore(paymentBundleBid.id, EB_SIM_NAMESPACE, abi.encode(bestOffer.egp));\n\t}\n}\n" + }, + "contracts/blockad/lib/ConfidentialControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Author: Miha Lotric (halo3mic)\n\npragma solidity ^0.8.8;\n\nimport { SuaveContract, Suave } from \"./SuaveContract.sol\";\n\n\nabstract contract ConfidentialControl is SuaveContract {\n\tstruct UnlockArgs {\n\t\tbytes32 key;\n\t\tbytes32 nextHash;\n\t}\n\n\tmodifier unlock(UnlockArgs calldata unlockPair) {\n\t\tcrequire(isValidKey(unlockPair.key), \"Invalid key\");\n\t\t_;\n\t\tpresentHash = unlockPair.nextHash;\n\t\tnonce++;\n\t}\n\n\tstring internal constant S_NAMESPACE = \"blockad:v0:secret\";\n\tSuave.BidId internal secretBidId;\n\tbytes32 internal presentHash;\n\tuint internal nonce;\n\n\t/**********************************************************************\n\t * ⛓️ ON-CHAIN METHODS *\n\t ***********************************************************************/\n\n\tfunction ccCallback(bytes32 nextHash, Suave.BidId sBidId) external {\n\t\tcrequire(!isInitialized(), \"Already initialized\");\n\t\tpresentHash = nextHash;\n\t\tsecretBidId = sBidId;\n\t}\n\n\tfunction isInitialized() public view returns (bool) {\n\t\treturn presentHash != 0;\n\t}\n\n\t/**********************************************************************\n\t * 🔒 CONFIDENTIAL METHODS *\n\t ***********************************************************************/\n\n\tfunction confidentialConstructor() public view virtual onlyConfidential returns (bytes memory) {\n\t\tcrequire(!isInitialized(), \"Already initialized\");\n\t\tbytes memory secret = Suave.confidentialInputs();\n\t\tSuave.BidId sBidId = storeSecret(secret);\n\t\tbytes32 nextHash = makeHash(abi.decode(secret, (bytes32)), nonce);\n\t\treturn abi.encodeWithSelector(this.ccCallback.selector, nextHash, sBidId);\n\t}\n\n\t/**********************************************************************\n\t * 🛠️ INTERNAL METHODS *\n\t ***********************************************************************/\n\n\tfunction storeSecret(bytes memory secret) internal view returns (Suave.BidId) {\n\t\taddress[] memory peekers = new address[](3);\n\t\tpeekers[0] = address(this);\n\t\tpeekers[1] = Suave.FETCH_BIDS;\n\t\tpeekers[2] = Suave.CONFIDENTIAL_RETRIEVE;\n\t\tSuave.Bid memory secretBid = Suave.newBid(0, peekers, peekers, S_NAMESPACE);\n\t\tSuave.confidentialStore(secretBid.id, S_NAMESPACE, secret);\n\t\treturn secretBid.id;\n\t}\n\n\tfunction isValidKey(bytes32 key) internal view returns (bool) {\n\t\treturn keccak256(abi.encode(key)) == presentHash;\n\t}\n\n\tfunction getUnlockPair() internal view returns (UnlockArgs memory) {\n\t\treturn UnlockArgs(getKey(nonce), getHash(nonce + 1));\n\t}\n\n\tfunction getHash(uint _nonce) internal view returns (bytes32) {\n\t\treturn keccak256(abi.encode(getKey(_nonce)));\n\t}\n\n\tfunction getKey(uint _nonce) internal view returns (bytes32) {\n\t\treturn makeKey(getSecret(), _nonce);\n\t}\n\n\tfunction makeHash(bytes32 secret, uint _nonce) internal pure returns (bytes32) {\n\t\treturn keccak256(abi.encode(makeKey(secret, _nonce)));\n\t}\n\n\tfunction makeKey(bytes32 secret, uint _nonce) internal pure returns (bytes32) {\n\t\treturn keccak256(abi.encode(secret, _nonce));\n\t}\n\n\tfunction getSecret() internal view returns (bytes32) {\n\t\tbytes memory secretB = Suave.confidentialRetrieve(secretBidId, S_NAMESPACE);\n\t\treturn abi.decode(secretB, (bytes32));\n\t}\n}\n" + }, + "contracts/blockad/lib/SuaveContract.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Author: Miha Lotric (halo3mic)\n\npragma solidity ^0.8.8;\n\nimport { Suave } from \"../../standard_peekers/bids.sol\";\n\n\nabstract contract SuaveContract {\n\terror SuaveError(string message);\n\n\tmodifier onlyConfidential() {\n\t\tcrequire(Suave.isConfidential(), \"Not confidential\");\n\t\t_;\n\t}\n\n\tfunction simulateBundleSafe(bytes memory bundle) internal view returns (bool valid, uint64 egp) {\n\t\t(bool success, bytes memory d) = Suave.SIMULATE_BUNDLE.staticcall{ gas: 20_000 }(abi.encode(bundle));\n\t\tif (success) {\n\t\t\treturn (true, abi.decode(d, (uint64)));\n\t\t}\n\t}\n\n\tfunction crequire(bool condition, string memory message) internal pure {\n\t\tif (!condition) {\n\t\t\trevert SuaveError(message);\n\t\t}\n\t}\n}\n" + }, + "contracts/blockad/lib/Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.8;\n\n\nlibrary DynamicUintArray {\n\tfunction append(bytes memory a, uint e) internal pure returns (bytes memory) {\n\t\treturn bytes.concat(a, TypeConversion.toBytes(e));\n\t}\n\n\tfunction export(bytes memory a) internal pure returns (uint[] memory) {\n\t\treturn TypeConversion.toUints(a);\n\t}\n}\n\nlibrary TypeConversion {\n\tfunction toBytes(uint x) internal pure returns (bytes memory y) {\n\t\ty = new bytes(32);\n\t\tassembly {\n\t\t\tmstore(add(y, 32), x)\n\t\t}\n\t}\n\n\tfunction toUint(bytes memory x, uint offset) internal pure returns (uint y) {\n\t\tassembly {\n\t\t\ty := mload(add(x, offset))\n\t\t}\n\t}\n\n\tfunction toUints(bytes memory xs) internal pure returns (uint[] memory ys) {\n\t\tys = new uint[](xs.length / 32);\n\t\tfor (uint i = 0; i < xs.length / 32; i++) {\n\t\t\tys[i] = toUint(xs, i * 32 + 32);\n\t\t}\n\t}\n}\n" + }, + "contracts/libraries/Suave.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.8;\n\nlibrary Suave {\n error PeekerReverted(address, bytes);\n\n type BidId is bytes16;\n\n struct Bid {\n BidId id;\n BidId salt;\n uint64 decryptionCondition;\n address[] allowedPeekers;\n address[] allowedStores;\n string version;\n }\n\n struct BuildBlockArgs {\n uint64 slot;\n bytes proposerPubkey;\n bytes32 parent;\n uint64 timestamp;\n address feeRecipient;\n uint64 gasLimit;\n bytes32 random;\n Withdrawal[] withdrawals;\n bytes extra;\n }\n\n struct Withdrawal {\n uint64 index;\n uint64 validator;\n address Address;\n uint64 amount;\n }\n\n address public constant ANYALLOWED = 0xC8df3686b4Afb2BB53e60EAe97EF043FE03Fb829;\n\n address public constant IS_CONFIDENTIAL_ADDR = 0x0000000000000000000000000000000042010000;\n\n address public constant BUILD_ETH_BLOCK = 0x0000000000000000000000000000000042100001;\n\n address public constant CONFIDENTIAL_INPUTS = 0x0000000000000000000000000000000042010001;\n\n address public constant CONFIDENTIAL_RETRIEVE = 0x0000000000000000000000000000000042020001;\n\n address public constant CONFIDENTIAL_STORE = 0x0000000000000000000000000000000042020000;\n\n address public constant ETHCALL = 0x0000000000000000000000000000000042100003;\n\n address public constant EXTRACT_HINT = 0x0000000000000000000000000000000042100037;\n\n address public constant FETCH_BIDS = 0x0000000000000000000000000000000042030001;\n\n address public constant FILL_MEV_SHARE_BUNDLE = 0x0000000000000000000000000000000043200001;\n\n address public constant NEW_BID = 0x0000000000000000000000000000000042030000;\n\n address public constant SIGN_ETH_TRANSACTION = 0x0000000000000000000000000000000040100001;\n\n address public constant SIMULATE_BUNDLE = 0x0000000000000000000000000000000042100000;\n\n address public constant SUBMIT_BUNDLE_JSON_RPC = 0x0000000000000000000000000000000043000001;\n\n address public constant SUBMIT_ETH_BLOCK_BID_TO_RELAY = 0x0000000000000000000000000000000042100002;\n\n // Returns whether execution is off- or on-chain\n function isConfidential() internal view returns (bool b) {\n (bool success, bytes memory isConfidentialBytes) = IS_CONFIDENTIAL_ADDR.staticcall(\"\");\n if (!success) {\n revert PeekerReverted(IS_CONFIDENTIAL_ADDR, isConfidentialBytes);\n }\n assembly {\n // Load the length of data (first 32 bytes)\n let len := mload(isConfidentialBytes)\n // Load the data after 32 bytes, so add 0x20\n b := mload(add(isConfidentialBytes, 0x20))\n }\n }\n\n function buildEthBlock(BuildBlockArgs memory blockArgs, BidId bidId, string memory namespace)\n internal\n view\n returns (bytes memory, bytes memory)\n {\n (bool success, bytes memory data) = BUILD_ETH_BLOCK.staticcall(abi.encode(blockArgs, bidId, namespace));\n if (!success) {\n revert PeekerReverted(BUILD_ETH_BLOCK, data);\n }\n\n return abi.decode(data, (bytes, bytes));\n }\n\n function confidentialInputs() internal view returns (bytes memory) {\n (bool success, bytes memory data) = CONFIDENTIAL_INPUTS.staticcall(abi.encode());\n if (!success) {\n revert PeekerReverted(CONFIDENTIAL_INPUTS, data);\n }\n\n return data;\n }\n\n function confidentialRetrieve(BidId bidId, string memory key) internal view returns (bytes memory) {\n (bool success, bytes memory data) = CONFIDENTIAL_RETRIEVE.staticcall(abi.encode(bidId, key));\n if (!success) {\n revert PeekerReverted(CONFIDENTIAL_RETRIEVE, data);\n }\n\n return data;\n }\n\n function confidentialStore(BidId bidId, string memory key, bytes memory data1) internal view {\n (bool success, bytes memory data) = CONFIDENTIAL_STORE.staticcall(abi.encode(bidId, key, data1));\n if (!success) {\n revert PeekerReverted(CONFIDENTIAL_STORE, data);\n }\n }\n\n function ethcall(address contractAddr, bytes memory input1) internal view returns (bytes memory) {\n (bool success, bytes memory data) = ETHCALL.staticcall(abi.encode(contractAddr, input1));\n if (!success) {\n revert PeekerReverted(ETHCALL, data);\n }\n\n return abi.decode(data, (bytes));\n }\n\n function extractHint(bytes memory bundleData) internal view returns (bytes memory) {\n require(isConfidential());\n (bool success, bytes memory data) = EXTRACT_HINT.staticcall(abi.encode(bundleData));\n if (!success) {\n revert PeekerReverted(EXTRACT_HINT, data);\n }\n\n return data;\n }\n\n function fetchBids(uint64 cond, string memory namespace) internal view returns (Bid[] memory) {\n (bool success, bytes memory data) = FETCH_BIDS.staticcall(abi.encode(cond, namespace));\n if (!success) {\n revert PeekerReverted(FETCH_BIDS, data);\n }\n\n return abi.decode(data, (Bid[]));\n }\n\n function fillMevShareBundle(BidId bidId) internal view returns (bytes memory) {\n require(isConfidential());\n (bool success, bytes memory data) = FILL_MEV_SHARE_BUNDLE.staticcall(abi.encode(bidId));\n if (!success) {\n revert PeekerReverted(FILL_MEV_SHARE_BUNDLE, data);\n }\n\n return data;\n }\n\n function newBid(\n uint64 decryptionCondition,\n address[] memory allowedPeekers,\n address[] memory allowedStores,\n string memory bidType\n ) internal view returns (Bid memory) {\n (bool success, bytes memory data) =\n NEW_BID.staticcall(abi.encode(decryptionCondition, allowedPeekers, allowedStores, bidType));\n if (!success) {\n revert PeekerReverted(NEW_BID, data);\n }\n\n return abi.decode(data, (Bid));\n }\n\n function signEthTransaction(bytes memory txn, string memory chainId, string memory signingKey)\n internal\n view\n returns (bytes memory)\n {\n (bool success, bytes memory data) = SIGN_ETH_TRANSACTION.staticcall(abi.encode(txn, chainId, signingKey));\n if (!success) {\n revert PeekerReverted(SIGN_ETH_TRANSACTION, data);\n }\n\n return abi.decode(data, (bytes));\n }\n\n function simulateBundle(bytes memory bundleData) internal view returns (uint64) {\n (bool success, bytes memory data) = SIMULATE_BUNDLE.staticcall(abi.encode(bundleData));\n if (!success) {\n revert PeekerReverted(SIMULATE_BUNDLE, data);\n }\n\n return abi.decode(data, (uint64));\n }\n\n function submitBundleJsonRPC(string memory url, string memory method, bytes memory params)\n internal\n view\n returns (bytes memory)\n {\n require(isConfidential());\n (bool success, bytes memory data) = SUBMIT_BUNDLE_JSON_RPC.staticcall(abi.encode(url, method, params));\n if (!success) {\n revert PeekerReverted(SUBMIT_BUNDLE_JSON_RPC, data);\n }\n\n return data;\n }\n\n function submitEthBlockBidToRelay(string memory relayUrl, bytes memory builderBid)\n internal\n view\n returns (bytes memory)\n {\n require(isConfidential());\n (bool success, bytes memory data) = SUBMIT_ETH_BLOCK_BID_TO_RELAY.staticcall(abi.encode(relayUrl, builderBid));\n if (!success) {\n revert PeekerReverted(SUBMIT_ETH_BLOCK_BID_TO_RELAY, data);\n }\n\n return data;\n }\n}\n" + }, + "contracts/libraries/SuaveAbi.sol": { + "content": "pragma solidity ^0.8.8;\n\nimport {Suave} from \"./Suave.sol\";\n\ncontract SuaveAbi {\n error PeekerReverted(address, bytes);\n\n function newBid(uint64 decryptionCondition, address[] memory allowedPeekers, address[] memory allowedStores, string memory BidType) external view returns (Suave.Bid memory) {}\n\tfunction fetchBids(uint64 cond, string memory namespace) external view returns (Suave.Bid[] memory) {}\n function confidentialStore(Suave.BidId bidId, string memory key, bytes memory data) external view {}\n function confidentialRetrieve(Suave.BidId bidId, string memory key) external view returns (bytes memory) {}\n function signEthTransaction(bytes memory txn, string memory chainId, string memory signingKey) external view returns (bytes memory) {}\n function simulateBundle(bytes memory bundleData) external view returns (uint64) {}\n function extractHint(bytes memory bundleData) external view returns (bytes memory) {}\n\tfunction buildEthBlock(Suave.BuildBlockArgs memory blockArgs, Suave.BidId bid, string memory namespace) external view returns (bytes memory, bytes memory) {}\n function submitEthBlockBidToRelay(string memory relayUrl, bytes memory builderBid) external view returns (bytes memory) {}\n function fillMevShareBundle(Suave.BidId bidId) external view returns (bytes memory) {}\n function submitBundleJsonRPC(string memory url, string memory method, bytes memory params) external view returns (bytes memory) {}\n}\n" + }, + "contracts/standard_peekers/bids.sol": { + "content": "pragma solidity ^0.8.8;\n\nimport \"../libraries/Suave.sol\";\n\ncontract AnyBidContract {\n\n\tevent BidEvent(\n\t\tSuave.BidId bidId,\n\t\tuint64 decryptionCondition,\n\t\taddress[] allowedPeekers\n\t);\n\n\tfunction fetchBidConfidentialBundleData() public returns (bytes memory) {\n\t\trequire(Suave.isConfidential());\n\t\t\n\t\tbytes memory confidentialInputs = Suave.confidentialInputs();\n\t\treturn abi.decode(confidentialInputs, (bytes));\n\t}\n\n\t// Bids to this contract should not be trusted!\n\tfunction emitBid(Suave.Bid calldata bid) public {\n\t\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\n\t}\n}\n\ncontract BundleBidContract is AnyBidContract {\n\n\tfunction newBid(uint64 decryptionCondition, address[] memory bidAllowedPeekers, address[] memory bidAllowedStores) external payable returns (bytes memory) {\n\t\trequire(Suave.isConfidential());\n\n\t\tbytes memory bundleData = this.fetchBidConfidentialBundleData();\n\n\t\tuint64 egp = Suave.simulateBundle(bundleData);\n\n\t\tSuave.Bid memory bid = Suave.newBid(decryptionCondition, bidAllowedPeekers, bidAllowedStores, \"default:v0:ethBundles\");\n\n\t\tSuave.confidentialStore(bid.id, \"default:v0:ethBundles\", bundleData);\n\t\tSuave.confidentialStore(bid.id, \"default:v0:ethBundleSimResults\", abi.encode(egp));\n\n\t\treturn emitAndReturn(bid, bundleData);\n\t}\n\n\tfunction emitAndReturn(Suave.Bid memory bid, bytes memory) internal virtual returns (bytes memory) {\n\t\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\n\t\treturn bytes.concat(this.emitBid.selector, abi.encode(bid));\n\t}\n}\n\ncontract EthBundleSenderContract is BundleBidContract {\n\tstring[] public builderUrls;\n\n\tconstructor(string[] memory builderUrls_) {\n\t\tbuilderUrls = builderUrls_;\n\t}\n\n\tfunction emitAndReturn(Suave.Bid memory bid, bytes memory bundleData) internal virtual override returns (bytes memory) {\n\t\tfor (uint i = 0; i < builderUrls.length; i++) {\n\t\t\tSuave.submitBundleJsonRPC(builderUrls[i], \"eth_sendBundle\", bundleData);\n\t\t}\n\n\t\treturn BundleBidContract.emitAndReturn(bid, bundleData);\n\t}\n}\n\ncontract MevShareBidContract is AnyBidContract {\n\n\tevent HintEvent(\n\t\tSuave.BidId bidId,\n\t\tbytes hint\n\t);\n\n\tevent MatchEvent(\n\t\tSuave.BidId matchBidId,\n\t\tbytes matchHint\n\t);\n\n\tfunction newBid(uint64 decryptionCondition, address[] memory bidAllowedPeekers, address[] memory bidAllowedStores) external payable returns (bytes memory) {\n\t\t// 0. check confidential execution\n\t\trequire(Suave.isConfidential());\n\n\t\t// 1. fetch bundle data\n\t\tbytes memory bundleData = this.fetchBidConfidentialBundleData();\n\n\t\t// 2. sim bundle\n\t\tuint64 egp = Suave.simulateBundle(bundleData);\n\t\t\n\t\t// 3. extract hint\n\t\tbytes memory hint = Suave.extractHint(bundleData);\n\t\t\n\t\t// // 4. store bundle and sim results\n\t\tSuave.Bid memory bid = Suave.newBid(decryptionCondition, bidAllowedPeekers, bidAllowedStores, \"mevshare:v0:unmatchedBundles\");\n\t\tSuave.confidentialStore(bid.id, \"mevshare:v0:ethBundles\", bundleData);\n\t\tSuave.confidentialStore(bid.id, \"mevshare:v0:ethBundleSimResults\", abi.encode(egp));\n\t\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\n\t\temit HintEvent(bid.id, hint);\n\n\t\t// // 5. return \"callback\" to emit hint onchain\n\t\treturn bytes.concat(this.emitBidAndHint.selector, abi.encode(bid, hint));\n\t}\n\n\tfunction emitBidAndHint(Suave.Bid calldata bid, bytes memory hint) public {\n\t\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\n\t\temit HintEvent(bid.id, hint);\n\t}\n\n\tfunction newMatch(uint64 decryptionCondition, address[] memory bidAllowedPeekers, address[] memory bidAllowedStores, Suave.BidId shareBidId) external payable returns (bytes memory) {\n\t\t// WARNING : this function will copy the original mev share bid\n\t\t// into a new key with potentially different permsissions\n\t\t\n\t\trequire(Suave.isConfidential());\n\t\t// 1. fetch confidential data\n\t\tbytes memory matchBundleData = this.fetchBidConfidentialBundleData();\n\n\t\t// 2. sim match alone for validity\n\t\tuint64 egp = Suave.simulateBundle(matchBundleData);\n\n\t\t// 3. extract hint\n\t\tbytes memory matchHint = Suave.extractHint(matchBundleData);\n\t\t\n\t\tSuave.Bid memory bid = Suave.newBid(decryptionCondition, bidAllowedPeekers, bidAllowedStores, \"mevshare:v0:matchBids\");\n\t\tSuave.confidentialStore(bid.id, \"mevshare:v0:ethBundles\", matchBundleData);\n\t\tSuave.confidentialStore(bid.id, \"mevshare:v0:ethBundleSimResults\", abi.encode(0));\n\n\t\t//4. merge bids\n\t\tSuave.BidId[] memory bids = new Suave.BidId[](2);\n\t\tbids[0] = shareBidId;\n\t\tbids[1] = bid.id;\n\t\tSuave.confidentialStore(bid.id, \"mevshare:v0:mergedBids\", abi.encode(bids));\n\n\t\treturn emitMatchBidAndHint(bid, matchHint);\n\t}\n\n\tfunction emitMatchBidAndHint(Suave.Bid memory bid, bytes memory matchHint) internal virtual returns (bytes memory) {\n\t\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\n\t\temit MatchEvent(bid.id, matchHint);\n\n\t\treturn bytes.concat(this.emitBid.selector, abi.encode(bid));\n\t}\n}\n\ncontract MevShareBundleSenderContract is MevShareBidContract {\n\tstring[] public builderUrls;\n\n\tconstructor(string[] memory builderUrls_) {\n\t\tbuilderUrls = builderUrls_;\n\t}\n\n\tfunction emitMatchBidAndHint(Suave.Bid memory bid, bytes memory matchHint) internal virtual override returns (bytes memory) {\n\t\tbytes memory bundleData = Suave.fillMevShareBundle(bid.id);\n\t\tfor (uint i = 0; i < builderUrls.length; i++) {\n\t\t\tSuave.submitBundleJsonRPC(builderUrls[i], \"mev_sendBundle\", bundleData);\n\t\t}\n\n\t\treturn MevShareBidContract.emitMatchBidAndHint(bid, matchHint);\n\t}\n}\n\n/* Not tested or implemented on the precompile side */\nstruct EgpBidPair {\n\tuint64 egp; // in wei, beware overflow\n\tSuave.BidId bidId;\n}\n\n// todo: instead of inherit interact with deployed builder contract\ncontract EthBlockBidContract is AnyBidContract {\n\n\tevent BuilderBoostBidEvent(\n\t\tSuave.BidId bidId,\n\t\tbytes builderBid\n\t);\n\t\n\tfunction idsEqual(Suave.BidId _l, Suave.BidId _r) public pure returns (bool) {\n\t\tbytes memory l = abi.encodePacked(_l);\n\t\tbytes memory r = abi.encodePacked(_r);\n\t\tfor (uint i = 0; i < l.length; i++) {\n\t\t\tif (bytes(l)[i] != r[i]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction buildMevShare(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight) public virtual returns (bytes memory) {\n\t\trequire(Suave.isConfidential());\n\t\tSuave.Bid[] memory allShareMatchBids = Suave.fetchBids(blockHeight, \"mevshare:v0:matchBids\");\n\t\tSuave.Bid[] memory allShareUserBids = Suave.fetchBids(blockHeight, \"mevshare:v0:unmatchedBundles\");\n\n\t\tif (allShareUserBids.length == 0) {\n\t\t\trevert Suave.PeekerReverted(address(this), \"no bids\");\n\t\t}\n\n\t\tSuave.Bid[] memory allBids = new Suave.Bid[](allShareUserBids.length);\n\t\tfor (uint i = 0; i < allShareUserBids.length; i++) {\n\t\t\t// TODO: sort matches by egp first!\n\t\t\tSuave.Bid memory bidToInsert = allShareUserBids[i]; // will be updated with the best match if any\n\t\t\tfor (uint j = 0; j < allShareMatchBids.length; j++) {\n\t\t\t\t// TODO: should be done once at the start and sorted\n\t\t\t\tSuave.BidId[] memory mergedBidIds = abi.decode(Suave.confidentialRetrieve(allShareMatchBids[j].id, \"mevshare:v0:mergedBids\"), (Suave.BidId[]));\n\t\t\t\tif (idsEqual(mergedBidIds[0], allShareUserBids[i].id)) {\n\t\t\t\t\tbidToInsert = allShareMatchBids[j];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tallBids[i] = bidToInsert;\n\t\t}\n\n\t\tEgpBidPair[] memory bidsByEGP = new EgpBidPair[](allBids.length);\n\t\tfor (uint i = 0; i < allBids.length; i++) {\n\t\t\tbytes memory simResults = Suave.confidentialRetrieve(allBids[i].id, \"mevshare:v0:ethBundleSimResults\");\n\t\t\tuint64 egp = abi.decode(simResults, (uint64));\n\t\t\tbidsByEGP[i] = EgpBidPair(egp, allBids[i].id);\n\t\t}\n\n\t\t// Bubble sort, cause why not\n\t\tuint n = bidsByEGP.length;\n\t\tfor (uint i = 0; i < n - 1; i++) {\n\t\t\tfor (uint j = i + 1; j < n; j++) {\n\t\t\t\tif (bidsByEGP[i].egp < bidsByEGP[j].egp) {\n\t\t\t\t\tEgpBidPair memory temp = bidsByEGP[i];\n\t\t\t\t\tbidsByEGP[i] = bidsByEGP[j];\n\t\t\t\t\tbidsByEGP[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSuave.BidId[] memory allBidIds = new Suave.BidId[](allBids.length);\n\t\tfor (uint i = 0; i < bidsByEGP.length; i++) {\n\t\t\tallBidIds[i] = bidsByEGP[i].bidId;\n\t\t}\n\n\t\treturn buildAndEmit(blockArgs, blockHeight, allBidIds, \"mevshare:v0\");\n\t}\n\n\tfunction buildFromPool(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight) public returns (bytes memory) {\n\t\trequire(Suave.isConfidential());\n\n\t\tSuave.Bid[] memory allBids = Suave.fetchBids(blockHeight, \"default:v0:ethBundles\");\n\t\tif (allBids.length == 0) {\n\t\t\trevert Suave.PeekerReverted(address(this), \"no bids\");\n\t\t}\n\n\t\tEgpBidPair[] memory bidsByEGP = new EgpBidPair[](allBids.length);\n\t\tfor (uint i = 0; i < allBids.length; i++) {\n\t\t\tbytes memory simResults = Suave.confidentialRetrieve(allBids[i].id, \"default:v0:ethBundleSimResults\");\n\t\t\tuint64 egp = abi.decode(simResults, (uint64));\n\t\t\tbidsByEGP[i] = EgpBidPair(egp, allBids[i].id);\n\t\t}\n\n\t\t// Bubble sort, cause why not\n\t\tuint n = bidsByEGP.length;\n\t\tfor (uint i = 0; i < n - 1; i++) {\n\t\t\tfor (uint j = i + 1; j < n; j++) {\n\t\t\t\tif (bidsByEGP[i].egp < bidsByEGP[j].egp) {\n\t\t\t\t\tEgpBidPair memory temp = bidsByEGP[i];\n\t\t\t\t\tbidsByEGP[i] = bidsByEGP[j];\n\t\t\t\t\tbidsByEGP[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSuave.BidId[] memory allBidIds = new Suave.BidId[](allBids.length);\n\t\tfor (uint i = 0; i < bidsByEGP.length; i++) {\n\t\t\tallBidIds[i] = bidsByEGP[i].bidId;\n\t\t}\n\n\t\treturn buildAndEmit(blockArgs, blockHeight, allBidIds, \"\");\n\t}\n\n\tfunction buildAndEmit(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight, Suave.BidId[] memory bids, string memory namespace) public virtual returns (bytes memory) {\n\t\trequire(Suave.isConfidential());\n\n\t\t(Suave.Bid memory blockBid, bytes memory builderBid) = this.doBuild(blockArgs, blockHeight, bids, namespace);\n\n\t\temit BuilderBoostBidEvent(blockBid.id, builderBid);\n\t\temit BidEvent(blockBid.id, blockBid.decryptionCondition, blockBid.allowedPeekers);\n\t\treturn bytes.concat(this.emitBuilderBidAndBid.selector, abi.encode(blockBid, builderBid));\n\t}\n\n\tfunction doBuild(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight, Suave.BidId[] memory bids, string memory namespace) public view returns (Suave.Bid memory, bytes memory) {\n\t\taddress[] memory allowedPeekers = new address[](2);\n\t\tallowedPeekers[0] = address(this);\n\t\tallowedPeekers[1] = Suave.BUILD_ETH_BLOCK;\n\n\t\tSuave.Bid memory blockBid = Suave.newBid(blockHeight, allowedPeekers, allowedPeekers, \"default:v0:mergedBids\");\n\t\tSuave.confidentialStore(blockBid.id, \"default:v0:mergedBids\", abi.encode(bids));\n\t\t \n\t\t(bytes memory builderBid, bytes memory payload) = Suave.buildEthBlock(blockArgs, blockBid.id, namespace);\n\t\tSuave.confidentialStore(blockBid.id, \"default:v0:builderPayload\", payload); // only through this.unlock\n\n\t\treturn (blockBid, builderBid);\n\t}\n\n\tfunction emitBuilderBidAndBid(Suave.Bid memory bid, bytes memory builderBid) public returns (Suave.Bid memory, bytes memory) {\n\t\temit BuilderBoostBidEvent(bid.id, builderBid);\n\t\temit BidEvent(bid.id, bid.decryptionCondition, bid.allowedPeekers);\n\t\treturn (bid, builderBid);\n\t}\n\n\tfunction unlock(Suave.BidId bidId, bytes memory signedBlindedHeader) public view returns (bytes memory) {\n\t\trequire(Suave.isConfidential());\n\n\t\t// TODO: verify the header is correct\n\t\t// TODO: incorporate protocol name\n\t\tbytes memory payload = Suave.confidentialRetrieve(bidId, \"default:v0:builderPayload\");\n\t\treturn payload;\n\t}\n}\n\ncontract EthBlockBidSenderContract is EthBlockBidContract {\n\tstring boostRelayUrl;\n\n\tconstructor(string memory boostRelayUrl_) {\n\t\tboostRelayUrl = boostRelayUrl_;\n\t}\n\n\tfunction buildAndEmit(Suave.BuildBlockArgs memory blockArgs, uint64 blockHeight, Suave.BidId[] memory bids, string memory namespace) public virtual override returns (bytes memory) {\n\t\trequire(Suave.isConfidential());\n\n\t\t(Suave.Bid memory blockBid, bytes memory builderBid) = this.doBuild(blockArgs, blockHeight, bids, namespace);\n\t\tSuave.submitEthBlockBidToRelay(boostRelayUrl, builderBid);\n\n\t\temit BidEvent(blockBid.id, blockBid.decryptionCondition, blockBid.allowedPeekers);\n\t\treturn bytes.concat(this.emitBid.selector, abi.encode(blockBid));\n\t}\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/hardhat.config.ts b/hardhat.config.ts index efa8d33..7b00c5d 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -15,8 +15,10 @@ import './tasks/adblock' dconfig() const SUAVE_PK = getEnvValSafe('SUAVE_PK') const GOERLI_PK = getEnvValSafe('GOERLI_PK') +const RIGIL_PK = getEnvValSafe('RIGIL_PK') const SUAVE_RPC = getEnvValSafe('SUAVE_RPC') const GOERLI_RPC = getEnvValSafe('GOERLI_RPC') +const RIGIL_RPC = getEnvValSafe('RIGIL_RPC') export default { @@ -38,6 +40,11 @@ export default { chainId: 5, url: GOERLI_RPC, accounts: [ GOERLI_PK ] + }, + rigil: { + chainId: 16813125, + url: RIGIL_RPC, + accounts: [ RIGIL_PK ] } } } diff --git a/tasks/adblock.ts b/tasks/adblock.ts index 63fc1c4..29ac310 100644 --- a/tasks/adblock.ts +++ b/tasks/adblock.ts @@ -3,7 +3,7 @@ import { ethers, Wallet, BigNumber } from 'ethers' import { task, types } from 'hardhat/config' import { ConfidentialComputeRequest } from '../src/confidential-types' -import { SUAVE_CHAIN_ID } from '../src/const' +import { SUAVE_CHAIN_ID, RIGIL_CHAIN_ID } from './utils/const' import * as utils from './utils' import { getEnvConfig as getBuildEnvConfig, @@ -22,7 +22,7 @@ task('block-ad', 'Submit bids, build blocks and send them to relay') .addOptionalParam('mevshare', 'Address of a MevShare contract. By default fetch most recently deployed one.') .addFlag('build', 'Whether to build blocks after sending the ad-request') .setAction(async function (taskArgs: any, hre: HRE) { - utils.checkChain(hre, SUAVE_CHAIN_ID) + utils.checkChain(hre, [SUAVE_CHAIN_ID, RIGIL_CHAIN_ID]) const config = await getConfig(hre, taskArgs) console.log(`Suave signer: ${config.suaveSigner.address}`) @@ -49,7 +49,8 @@ async function submitAndBuild(c: ITaskConfig) { const buildConfig: IBuildConfig = { ...getBuildEnvConfig(), - executionNodeAdd: c.executionNodeAdd, + executionNodeAdd: c.executionNodeAdd, + suaveSigner: c.suaveSigner, builderAdd: c.adauctionAdd, nSlots: c.blockrange, } @@ -169,17 +170,18 @@ interface ITaskConfig { } async function getConfig(hre: HRE, taskArgs: any): Promise { + const useTestnet = utils.getNetworkChainId(hre) === RIGIL_CHAIN_ID const cliConfig = await parseTaskArgs(hre, taskArgs) - const envConfig = getEnvConfig() + const envConfig = getEnvConfig(useTestnet) return { ...cliConfig, ...envConfig, } } -export function getEnvConfig() { +export function getEnvConfig(useTestnet: boolean = false) { const executionNodeAdd = utils.getEnvValSafe('EXECUTION_NODE') - const suaveSigner = utils.makeSuaveSigner() + const suaveSigner = utils.makeSuaveSigner(useTestnet) const goerliSigner = utils.makeGoerliSigner() return { executionNodeAdd, diff --git a/tasks/build-blocks.ts b/tasks/build-blocks.ts index 310c766..1d06dcc 100644 --- a/tasks/build-blocks.ts +++ b/tasks/build-blocks.ts @@ -2,18 +2,18 @@ import { HardhatRuntimeEnvironment as HRE } from 'hardhat/types' import { task, types } from 'hardhat/config' import { ethers, Wallet } from 'ethers' -import { SUAVE_CHAIN_ID } from '../src/const' import { ConfidentialComputeRequest, ConfidentialComputeRecord } from '../src/confidential-types' +import { SUAVE_CHAIN_ID, RIGIL_CHAIN_ID } from './utils/const' import * as utils from './utils' import { BeaconPAListener, BeaconEventData, ValidatorMsg, getValidatorForSlot -} from './beacon' +} from './utils/beacon' type PreCall = (nextBlockNum: number) => Promise @@ -28,7 +28,7 @@ task('build-blocks', 'Build blocks and send them to relay') .addOptionalParam('nslots', 'Number of slots to build blocks for. Default is two.', 1, types.int) .addOptionalParam('builder', 'Address of a Builder contract. By default fetch most recently deployed one.') .setAction(async function (taskArgs: any, hre: HRE) { - utils.checkChain(hre, SUAVE_CHAIN_ID) + utils.checkChain(hre, [SUAVE_CHAIN_ID, RIGIL_CHAIN_ID]) const config = await getConfig(hre, taskArgs) console.log(`Sending blocks for the next ${config.nSlots} slots`) @@ -188,21 +188,21 @@ export interface ITaskConfig { } async function getConfig(hre: HRE, taskArgs: any): Promise { + const useTestnet = utils.getNetworkChainId(hre) === RIGIL_CHAIN_ID const cliConfig = await parseTaskArgs(hre, taskArgs) - const envConfig = getEnvConfig() - const suaveSigner = utils.makeSuaveSigner() + const envConfig = getEnvConfig(useTestnet) return { - suaveSigner, ...envConfig, ...cliConfig, } } -export function getEnvConfig() { +export function getEnvConfig(useTestnet: boolean = false) { const executionNodeAdd = utils.getEnvValSafe('EXECUTION_NODE') const relayUrl = utils.getEnvValSafe('GOERLI_RELAY') const beaconUrl = utils.getEnvValSafe('GOERLI_BEACON') - const suaveSigner = utils.makeSuaveSigner() + const suaveSigner = utils.makeSuaveSigner(useTestnet) + return { executionNodeAdd, suaveSigner, diff --git a/tasks/mevshare.ts b/tasks/mevshare.ts index 48475b7..4693530 100644 --- a/tasks/mevshare.ts +++ b/tasks/mevshare.ts @@ -3,12 +3,12 @@ import { task, types } from 'hardhat/config' import { ethers, Wallet } from 'ethers' import { ConfidentialComputeRequest } from '../src/confidential-types' -import { SUAVE_CHAIN_ID, PRECOMPILES } from '../src/const' import { getEnvConfig as getBuildEnvConfig, ITaskConfig as IBuildConfig, doBlockBuilding } from './build-blocks' +import { SUAVE_CHAIN_ID, RIGIL_CHAIN_ID, PRECOMPILES } from './utils/const' import { Result } from './utils' import * as utils from './utils' @@ -21,7 +21,7 @@ task('mevshare-bundles', 'Send Mevshare Bundles for the next N blocks') .addOptionalParam('builder', 'Address of a Builder contract. By default fetch most recently deployed one.') .addFlag('build', 'Whether to build blocks or not') .setAction(async function (taskArgs: any, hre: HRE) { - utils.checkChain(hre, SUAVE_CHAIN_ID) + utils.checkChain(hre, [SUAVE_CHAIN_ID, RIGIL_CHAIN_ID]) const config = await getConfig(hre, taskArgs) console.log(`Sending bundles for the next ${config.nslots} blocks`) @@ -50,6 +50,7 @@ async function submitAndBuild(c: ITaskConfig) { const buildConfig: IBuildConfig = { ...getBuildEnvConfig(), executionNodeAdd: c.executionNodeAdd, + suaveSigner: c.suaveSigner, builderAdd: c.builderAdd, nSlots: c.nslots, } @@ -119,7 +120,8 @@ async function getConfig(hre: HRE, taskArgs: any): Promise { const { nslots, mevshareAdd, builderAdd } = await parseTaskArgs(hre, taskArgs) const executionNodeAdd = utils.getEnvValSafe('EXECUTION_NODE') const goerliSigner = utils.makeGoerliSigner() - const suaveSigner = utils.makeSuaveSigner() + const useTestnet = utils.getNetworkChainId(hre) === RIGIL_CHAIN_ID + const suaveSigner = utils.makeSuaveSigner(useTestnet) return { nslots, mevshareAdd, diff --git a/tasks/beacon.ts b/tasks/utils/beacon.ts similarity index 98% rename from tasks/beacon.ts rename to tasks/utils/beacon.ts index b90c656..a1232fc 100644 --- a/tasks/beacon.ts +++ b/tasks/utils/beacon.ts @@ -45,7 +45,7 @@ export class BeaconPAListener { const lastKnownSlot = this.lastSlot return new Promise((resolve) => { const interval = setInterval(() => { - if (this.lastSlot > lastKnownSlot) { + if (this.lastBeaconMsg && this.lastSlot > lastKnownSlot) { clearInterval(interval) resolve(this.lastBeaconMsg) } @@ -126,6 +126,4 @@ export async function getValidatorForSlot(relayUrl: string, slot: number): Promi gasLimit: parseInt(vmsg.gas_limit), timestamp: parseInt(vmsg.timestamp), } -} - - +} \ No newline at end of file diff --git a/tasks/utils/const.ts b/tasks/utils/const.ts new file mode 100644 index 0000000..0a202bf --- /dev/null +++ b/tasks/utils/const.ts @@ -0,0 +1,13 @@ +import * as cnst from '../../src/const' + +const constants = { + GOERLI_CHAIN_ID: 5, + RIGIL_CHAIN_ID: 16813125, + ...cnst +} + +export const SUAVE_CHAIN_ID = constants.SUAVE_CHAIN_ID +export const GOERLI_CHAIN_ID = constants.GOERLI_CHAIN_ID +export const RIGIL_CHAIN_ID = constants.RIGIL_CHAIN_ID +export const PRECOMPILES = constants.PRECOMPILES + diff --git a/tasks/utils.ts b/tasks/utils/index.ts similarity index 84% rename from tasks/utils.ts rename to tasks/utils/index.ts index 2f864a0..93584a7 100644 --- a/tasks/utils.ts +++ b/tasks/utils/index.ts @@ -1,8 +1,8 @@ import { HardhatRuntimeEnvironment as HRE } from 'hardhat/types' import { ethers, Wallet, BigNumber } from 'ethers' -import { ConfidentialComputeRecord } from '../src/confidential-types' -import { getEnvValSafe, fetchAbis } from '../src/utils' +import { ConfidentialComputeRecord } from '../../src/confidential-types' +import { getEnvValSafe, fetchAbis } from '../../src/utils' const abis = fetchAbis() @@ -84,8 +84,10 @@ export function makeGoerliSigner() { return makeSigner(getEnvValSafe('GOERLI_RPC'), getEnvValSafe('GOERLI_PK')) } -export function makeSuaveSigner() { - return makeSigner(getEnvValSafe('SUAVE_RPC'), getEnvValSafe('SUAVE_PK')) +export function makeSuaveSigner(useTestnet: boolean) { + const rpcUrl = getEnvValSafe(useTestnet ? 'RIGIL_RPC' : 'SUAVE_RPC') + const pk = getEnvValSafe(useTestnet ? 'RIGIL_PK' : 'SUAVE_PK') + return makeSigner(rpcUrl, pk) } export function makeSigner(rpcUrl: string, pk: string) { @@ -100,31 +102,40 @@ export async function signTransactionNonRlp(signer, tx) { } export async function fetchDeployedContract(hre: HRE, deploymentName: string) { - return (hre.ethers as any).getContract(deploymentName) + return (hre as any).ethers.getContract(deploymentName) } -export function checkChain(hre: HRE, desiredChain: number) { - const chainId = hre.network.config.chainId - if (chainId != desiredChain) { - throw Error(`Expected Suave chain-id(${desiredChain}), got ${chainId}`) +export function checkChain(hre: HRE, desiredChains: number[]) { + const chainId = getNetworkChainId(hre) + if (chainId && !desiredChains.includes(chainId)) { + throw Error(`Expected one of ${desiredChains}; got ${chainId}`) } } +export function getNetworkChainId(hre: HRE) { + return hre.network.config.chainId +} + export function sleep(ms: number): Promise { return new Promise(resolve => setTimeout(resolve, ms)) } -export async function getNextBaseFee(provider: ethers.providers.Provider) { - return provider.getBlock('pending').then(b => b.baseFeePerGas) +export async function getNextBaseFee(provider: ethers.providers.Provider): Promise { + return provider.getBlock('pending').then(b =>{ + const bfee = b?.baseFeePerGas + if (!bfee) + throw Error('No baseFeePerGas') + return bfee.toNumber() + }) } export async function submitRawTxPrettyRes( provider: ethers.providers.Provider, inputBytes: string, iface: ethers.utils.Interface, - label?: string + label_?: string ): Promise>> { - label = label ? `'${label}'` : '' + const label: string = label_ ? `'${label_}'` : '' return (provider as any).send('eth_sendRawTransaction', [inputBytes]) .then(r => [handleNewSubmission(iface, provider, r, label), null]) .catch(err => [null, handleSubmissionErr(iface, err, label)])