agents/contracts/test/requestharness/requestharness.contractinfo.json
{"solidity/RequestHarness.t.sol:RequestHarness":{"code":"0x608060405234801561001057600080fd5b506102af806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c8063b057c8c111610050578063b057c8c114610102578063ce29602614610132578063d3cbde311461015e57600080fd5b8063138ac42f1461006c57806357c3882b146100ad575b600080fd5b61007f61007a3660046101ee565b610186565b60405177ffffffffffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b61007f6100bb366004610207565b60008063ffffffff8316602085901b6bffffffffffffffff0000000016606087901b77ffffffffffffffffffffffff00000000000000000000000016171795945050505050565b6101156101103660046101ee565b610190565b6040516bffffffffffffffffffffffff90911681526020016100a4565b6101456101403660046101ee565b6101aa565b60405167ffffffffffffffff90911681526020016100a4565b61017161016c3660046101ee565b6101cc565b60405163ffffffff90911681526020016100a4565b6000815b92915050565b600061018a8260601c6bffffffffffffffffffffffff1690565b600061018a8260201c73ffffffffffffffffffffffffffffffffffffffff1690565b600077ffffffffffffffffffffffffffffffffffffffffffffffff821661018a565b60006020828403121561020057600080fd5b5035919050565b60008060006060848603121561021c57600080fd5b83356bffffffffffffffffffffffff8116811461023857600080fd5b9250602084013567ffffffffffffffff8116811461025557600080fd5b9150604084013563ffffffff8116811461026e57600080fd5b80915050925092509256fea264697066735822122068983143870c4526c4944e55ef31f4fe17c96abaf92a10dd739f770e2c9b8d2764736f6c63430008110033","runtime-code":"0x608060405234801561001057600080fd5b50600436106100675760003560e01c8063b057c8c111610050578063b057c8c114610102578063ce29602614610132578063d3cbde311461015e57600080fd5b8063138ac42f1461006c57806357c3882b146100ad575b600080fd5b61007f61007a3660046101ee565b610186565b60405177ffffffffffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b61007f6100bb366004610207565b60008063ffffffff8316602085901b6bffffffffffffffff0000000016606087901b77ffffffffffffffffffffffff00000000000000000000000016171795945050505050565b6101156101103660046101ee565b610190565b6040516bffffffffffffffffffffffff90911681526020016100a4565b6101456101403660046101ee565b6101aa565b60405167ffffffffffffffff90911681526020016100a4565b61017161016c3660046101ee565b6101cc565b60405163ffffffff90911681526020016100a4565b6000815b92915050565b600061018a8260601c6bffffffffffffffffffffffff1690565b600061018a8260201c73ffffffffffffffffffffffffffffffffffffffff1690565b600077ffffffffffffffffffffffffffffffffffffffffffffffff821661018a565b60006020828403121561020057600080fd5b5035919050565b60008060006060848603121561021c57600080fd5b83356bffffffffffffffffffffffff8116811461023857600080fd5b9250602084013567ffffffffffffffff8116811461025557600080fd5b9150604084013563ffffffff8116811461026e57600080fd5b80915050925092509256fea264697066735822122068983143870c4526c4944e55ef31f4fe17c96abaf92a10dd739f770e2c9b8d2764736f6c63430008110033","info":{"source":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.17;\n\n// contracts/libs/stack/Request.sol\n\n/// Request is encoded data with \"message execution request\".\ntype Request is uint192;\n\nusing RequestLib for Request global;\n\n/// Library for formatting _the request part_ of _the base messages_.\n/// - Request represents a message sender requirements for the message execution on the destination chain.\n/// - Request occupies a single storage word, and thus is stored on stack instead of being stored in memory.\n/// \u003e gasDrop field is included for future compatibility and is ignored at the moment.\n///\n/// # Request stack layout (from highest bits to lowest)\n///\n/// | Position | Field | Type | Bytes | Description |\n/// | ---------- | -------- | ------ | ----- | ---------------------------------------------------- |\n/// | (024..012] | gasDrop | uint96 | 12 | Minimum amount of gas token to drop to the recipient |\n/// | (012..004] | gasLimit | uint64 | 8 | Minimum amount of gas units to supply for execution |\n/// | (004..000] | version | uint32 | 4 | Base message version to pass to the recipient |\n\nlibrary RequestLib {\n /// @dev Amount of bits to shift to gasDrop field\n uint192 private constant SHIFT_GAS_DROP = 12 * 8;\n /// @dev Amount of bits to shift to gasLimit field\n uint192 private constant SHIFT_GAS_LIMIT = 4 * 8;\n\n /// @notice Returns an encoded request with the given fields\n /// @param gasDrop_ Minimum amount of gas token to drop to the recipient (ignored at the moment)\n /// @param gasLimit_ Minimum amount of gas units to supply for execution\n /// @param version_ Base message version to pass to the recipient\n function encodeRequest(uint96 gasDrop_, uint64 gasLimit_, uint32 version_) internal pure returns (Request) {\n // Casts below are upcasts, so they are safe\n return Request.wrap(uint192(gasDrop_) \u003c\u003c SHIFT_GAS_DROP | uint192(gasLimit_) \u003c\u003c SHIFT_GAS_LIMIT | version_);\n }\n\n /// @notice Wraps the padded encoded request into a Request-typed value.\n /// @dev The \"padded\" request is simply an encoded request casted to uint256 (highest bits are set to zero).\n /// Casting to uint256 is done automatically in Solidity, so no extra actions from consumers are needed.\n /// The highest bits are discarded, so that the contracts dealing with encoded requests\n /// don't need to be updated, if a new field is added.\n function wrapPadded(uint256 paddedRequest) internal pure returns (Request) {\n // Casting to uint192 will truncate the highest bits, which is the behavior we want\n return Request.wrap(uint192(paddedRequest));\n }\n\n /// @notice Returns the requested of gas token to drop to the recipient.\n function gasDrop(Request request) internal pure returns (uint96) {\n // Casting to uint96 will truncate the highest bits, which is the behavior we want\n return uint96(Request.unwrap(request) \u003e\u003e SHIFT_GAS_DROP);\n }\n\n /// @notice Returns the requested minimum amount of gas units to supply for execution.\n function gasLimit(Request request) internal pure returns (uint64) {\n // Casting to uint64 will truncate the highest bits, which is the behavior we want\n return uint64(Request.unwrap(request) \u003e\u003e SHIFT_GAS_LIMIT);\n }\n\n /// @notice Returns the requested base message version to pass to the recipient.\n function version(Request request) internal pure returns (uint32) {\n // Casting to uint32 will truncate the highest bits, which is the behavior we want\n return uint32(Request.unwrap(request));\n }\n}\n\n// test/harnesses/libs/stack/RequestHarness.t.sol\n\n// solhint-disable ordering\ncontract RequestHarness {\n // Note: we don't add an empty test() function here, as it currently leads\n // to zero coverage on the corresponding library.\n\n function encodeRequest(uint96 gasDrop_, uint64 gasLimit_, uint32 version_) public pure returns (uint192) {\n // Walkaround to get the forge coverage working on libraries, see\n // https://github.com/foundry-rs/foundry/pull/3128#issuecomment-1241245086\n Request request = RequestLib.encodeRequest(gasDrop_, gasLimit_, version_);\n return Request.unwrap(request);\n }\n\n function wrapPadded(uint256 paddedRequest) public pure returns (uint192) {\n return Request.unwrap(RequestLib.wrapPadded(paddedRequest));\n }\n\n function gasLimit(uint256 paddedRequest) public pure returns (uint64) {\n return RequestLib.wrapPadded(paddedRequest).gasLimit();\n }\n\n function gasDrop(uint256 paddedRequest) public pure returns (uint96) {\n return RequestLib.wrapPadded(paddedRequest).gasDrop();\n }\n\n function version(uint256 paddedRequest) public pure returns (uint32) {\n return RequestLib.wrapPadded(paddedRequest).version();\n }\n}\n","language":"Solidity","languageVersion":"0.8.17","compilerVersion":"0.8.17","compilerOptions":"--combined-json bin,bin-runtime,srcmap,srcmap-runtime,abi,userdoc,devdoc,metadata,hashes --optimize --optimize-runs 10000 --allow-paths ., ./, ../","srcMap":"3729:1150:0:-:0;;;;;;;;;;;;;;;;;;;","srcMapRuntime":"3729:1150:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4291:149;;;;;;:::i;:::-;;:::i;:::-;;;375:50:1;363:63;;;345:82;;333:2;318:18;4291:149:0;;;;;;;;3893:392;;;;;;:::i;:::-;3989:7;;1927:86;;;1401:5;1965:37;;;;;1291:6;1927:35;;;;;:75;:86;4165:73;3893:392;-1:-1:-1;;;;;3893:392:0;4593:139;;;;;;:::i;:::-;;:::i;:::-;;;1261:26:1;1249:39;;;1231:58;;1219:2;1204:18;4593:139:0;1087:208:1;4446:141:0;;;;;;:::i;:::-;;:::i;:::-;;;1474:18:1;1462:31;;;1444:50;;1432:2;1417:18;4446:141:0;1300:200:1;4738:139:0;;;;;;:::i;:::-;;:::i;:::-;;;1679:10:1;1667:23;;;1649:42;;1637:2;1622:18;4738:139:0;1505:192:1;4291:149:0;4355:7;4418:13;4396:36;4374:59;4291:149;-1:-1:-1;;4291:149:0:o;4593:139::-;4654:6;4679:46;4701:13;1291:6;2967:41;;;;2787:229;4446:141;4508:6;4533:47;4555:13;1401:5;3294:42;;;;3113:231;4738:139;4799:6;4824:44;;;:46;2477:227;14:180:1;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:1;;14:180;-1:-1:-1;14:180:1:o;438:644::-;512:6;520;528;581:2;569:9;560:7;556:23;552:32;549:52;;;597:1;594;587:12;549:52;636:9;623:23;686:26;679:5;675:38;668:5;665:49;655:77;;728:1;725;718:12;655:77;751:5;-1:-1:-1;808:2:1;793:18;;780:32;856:18;843:32;;831:45;;821:73;;890:1;887;880:12;821:73;913:7;-1:-1:-1;972:2:1;957:18;;944:32;1020:10;1007:24;;995:37;;985:65;;1046:1;1043;1036:12;985:65;1069:7;1059:17;;;438:644;;;;;:::o","abiDefinition":[{"inputs":[{"internalType":"uint96","name":"gasDrop_","type":"uint96"},{"internalType":"uint64","name":"gasLimit_","type":"uint64"},{"internalType":"uint32","name":"version_","type":"uint32"}],"name":"encodeRequest","outputs":[{"internalType":"uint192","name":"","type":"uint192"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"paddedRequest","type":"uint256"}],"name":"gasDrop","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"paddedRequest","type":"uint256"}],"name":"gasLimit","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"paddedRequest","type":"uint256"}],"name":"version","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"paddedRequest","type":"uint256"}],"name":"wrapPadded","outputs":[{"internalType":"uint192","name":"","type":"uint192"}],"stateMutability":"pure","type":"function"}],"userDoc":{"kind":"user","methods":{},"version":1},"developerDoc":{"kind":"dev","methods":{},"version":1},"metadata":"{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint96\",\"name\":\"gasDrop_\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"gasLimit_\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"version_\",\"type\":\"uint32\"}],\"name\":\"encodeRequest\",\"outputs\":[{\"internalType\":\"uint192\",\"name\":\"\",\"type\":\"uint192\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"paddedRequest\",\"type\":\"uint256\"}],\"name\":\"gasDrop\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"paddedRequest\",\"type\":\"uint256\"}],\"name\":\"gasLimit\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"paddedRequest\",\"type\":\"uint256\"}],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"paddedRequest\",\"type\":\"uint256\"}],\"name\":\"wrapPadded\",\"outputs\":[{\"internalType\":\"uint192\",\"name\":\"\",\"type\":\"uint192\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solidity/RequestHarness.t.sol\":\"RequestHarness\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"solidity/RequestHarness.t.sol\":{\"keccak256\":\"0x053cbc5f1a2df08115ef4e5f4da39d69d3d696c9b4b56cedcefb173efbfff360\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://75948e75f52a744c8e3f59e56a2b0f367a5557a8dd043fec93dbd4895d1bd84b\",\"dweb:/ipfs/QmWWQ5h5vUbRF7kLzrWgHmRy3KmdK1w8grenn4BAnhqByS\"]}},\"version\":1}"},"hashes":{"encodeRequest(uint96,uint64,uint32)":"57c3882b","gasDrop(uint256)":"b057c8c1","gasLimit(uint256)":"ce296026","version(uint256)":"d3cbde31","wrapPadded(uint256)":"138ac42f"}},"solidity/RequestHarness.t.sol:RequestLib":{"code":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220eb84b70300acbf1119e00e6e3671d787ead3d54023c3c96319c13e090285aa3264736f6c63430008110033","runtime-code":"0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220eb84b70300acbf1119e00e6e3671d787ead3d54023c3c96319c13e090285aa3264736f6c63430008110033","info":{"source":"// SPDX-License-Identifier: MIT\npragma solidity =0.8.17;\n\n// contracts/libs/stack/Request.sol\n\n/// Request is encoded data with \"message execution request\".\ntype Request is uint192;\n\nusing RequestLib for Request global;\n\n/// Library for formatting _the request part_ of _the base messages_.\n/// - Request represents a message sender requirements for the message execution on the destination chain.\n/// - Request occupies a single storage word, and thus is stored on stack instead of being stored in memory.\n/// \u003e gasDrop field is included for future compatibility and is ignored at the moment.\n///\n/// # Request stack layout (from highest bits to lowest)\n///\n/// | Position | Field | Type | Bytes | Description |\n/// | ---------- | -------- | ------ | ----- | ---------------------------------------------------- |\n/// | (024..012] | gasDrop | uint96 | 12 | Minimum amount of gas token to drop to the recipient |\n/// | (012..004] | gasLimit | uint64 | 8 | Minimum amount of gas units to supply for execution |\n/// | (004..000] | version | uint32 | 4 | Base message version to pass to the recipient |\n\nlibrary RequestLib {\n /// @dev Amount of bits to shift to gasDrop field\n uint192 private constant SHIFT_GAS_DROP = 12 * 8;\n /// @dev Amount of bits to shift to gasLimit field\n uint192 private constant SHIFT_GAS_LIMIT = 4 * 8;\n\n /// @notice Returns an encoded request with the given fields\n /// @param gasDrop_ Minimum amount of gas token to drop to the recipient (ignored at the moment)\n /// @param gasLimit_ Minimum amount of gas units to supply for execution\n /// @param version_ Base message version to pass to the recipient\n function encodeRequest(uint96 gasDrop_, uint64 gasLimit_, uint32 version_) internal pure returns (Request) {\n // Casts below are upcasts, so they are safe\n return Request.wrap(uint192(gasDrop_) \u003c\u003c SHIFT_GAS_DROP | uint192(gasLimit_) \u003c\u003c SHIFT_GAS_LIMIT | version_);\n }\n\n /// @notice Wraps the padded encoded request into a Request-typed value.\n /// @dev The \"padded\" request is simply an encoded request casted to uint256 (highest bits are set to zero).\n /// Casting to uint256 is done automatically in Solidity, so no extra actions from consumers are needed.\n /// The highest bits are discarded, so that the contracts dealing with encoded requests\n /// don't need to be updated, if a new field is added.\n function wrapPadded(uint256 paddedRequest) internal pure returns (Request) {\n // Casting to uint192 will truncate the highest bits, which is the behavior we want\n return Request.wrap(uint192(paddedRequest));\n }\n\n /// @notice Returns the requested of gas token to drop to the recipient.\n function gasDrop(Request request) internal pure returns (uint96) {\n // Casting to uint96 will truncate the highest bits, which is the behavior we want\n return uint96(Request.unwrap(request) \u003e\u003e SHIFT_GAS_DROP);\n }\n\n /// @notice Returns the requested minimum amount of gas units to supply for execution.\n function gasLimit(Request request) internal pure returns (uint64) {\n // Casting to uint64 will truncate the highest bits, which is the behavior we want\n return uint64(Request.unwrap(request) \u003e\u003e SHIFT_GAS_LIMIT);\n }\n\n /// @notice Returns the requested base message version to pass to the recipient.\n function version(Request request) internal pure returns (uint32) {\n // Casting to uint32 will truncate the highest bits, which is the behavior we want\n return uint32(Request.unwrap(request));\n }\n}\n\n// test/harnesses/libs/stack/RequestHarness.t.sol\n\n// solhint-disable ordering\ncontract RequestHarness {\n // Note: we don't add an empty test() function here, as it currently leads\n // to zero coverage on the corresponding library.\n\n function encodeRequest(uint96 gasDrop_, uint64 gasLimit_, uint32 version_) public pure returns (uint192) {\n // Walkaround to get the forge coverage working on libraries, see\n // https://github.com/foundry-rs/foundry/pull/3128#issuecomment-1241245086\n Request request = RequestLib.encodeRequest(gasDrop_, gasLimit_, version_);\n return Request.unwrap(request);\n }\n\n function wrapPadded(uint256 paddedRequest) public pure returns (uint192) {\n return Request.unwrap(RequestLib.wrapPadded(paddedRequest));\n }\n\n function gasLimit(uint256 paddedRequest) public pure returns (uint64) {\n return RequestLib.wrapPadded(paddedRequest).gasLimit();\n }\n\n function gasDrop(uint256 paddedRequest) public pure returns (uint96) {\n return RequestLib.wrapPadded(paddedRequest).gasDrop();\n }\n\n function version(uint256 paddedRequest) public pure returns (uint32) {\n return RequestLib.wrapPadded(paddedRequest).version();\n }\n}\n","language":"Solidity","languageVersion":"0.8.17","compilerVersion":"0.8.17","compilerOptions":"--combined-json bin,bin-runtime,srcmap,srcmap-runtime,abi,userdoc,devdoc,metadata,hashes --optimize --optimize-runs 10000 --allow-paths ., ./, ../","srcMap":"1170:2478:0:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;1170:2478:0;;;;;;;;;;;;;;;;;","srcMapRuntime":"1170:2478:0:-:0;;;;;;;;","abiDefinition":[],"userDoc":{"kind":"user","methods":{},"notice":"Library for formatting _the request part_ of _the base messages_. - Request represents a message sender requirements for the message execution on the destination chain. - Request occupies a single storage word, and thus is stored on stack instead of being stored in memory. \u003e gasDrop field is included for future compatibility and is ignored at the moment. # Request stack layout (from highest bits to lowest) | Position | Field | Type | Bytes | Description | | ---------- | -------- | ------ | ----- | ---------------------------------------------------- | | (024..012] | gasDrop | uint96 | 12 | Minimum amount of gas token to drop to the recipient | | (012..004] | gasLimit | uint64 | 8 | Minimum amount of gas units to supply for execution | | (004..000] | version | uint32 | 4 | Base message version to pass to the recipient |","version":1},"developerDoc":{"kind":"dev","methods":{},"stateVariables":{"SHIFT_GAS_DROP":{"details":"Amount of bits to shift to gasDrop field"},"SHIFT_GAS_LIMIT":{"details":"Amount of bits to shift to gasLimit field"}},"version":1},"metadata":"{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"stateVariables\":{\"SHIFT_GAS_DROP\":{\"details\":\"Amount of bits to shift to gasDrop field\"},\"SHIFT_GAS_LIMIT\":{\"details\":\"Amount of bits to shift to gasLimit field\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Library for formatting _the request part_ of _the base messages_. - Request represents a message sender requirements for the message execution on the destination chain. - Request occupies a single storage word, and thus is stored on stack instead of being stored in memory. \u003e gasDrop field is included for future compatibility and is ignored at the moment. # Request stack layout (from highest bits to lowest) | Position | Field | Type | Bytes | Description | | ---------- | -------- | ------ | ----- | ---------------------------------------------------- | | (024..012] | gasDrop | uint96 | 12 | Minimum amount of gas token to drop to the recipient | | (012..004] | gasLimit | uint64 | 8 | Minimum amount of gas units to supply for execution | | (004..000] | version | uint32 | 4 | Base message version to pass to the recipient |\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solidity/RequestHarness.t.sol\":\"RequestLib\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"solidity/RequestHarness.t.sol\":{\"keccak256\":\"0x053cbc5f1a2df08115ef4e5f4da39d69d3d696c9b4b56cedcefb173efbfff360\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://75948e75f52a744c8e3f59e56a2b0f367a5557a8dd043fec93dbd4895d1bd84b\",\"dweb:/ipfs/QmWWQ5h5vUbRF7kLzrWgHmRy3KmdK1w8grenn4BAnhqByS\"]}},\"version\":1}"},"hashes":{}}}