{ "address": "0x7EAdEE2ca1b4D06a0d82fDF03D715550c26AA12F", "abi": [ { "inputs": [ { "internalType": "contract Router", "name": "_router", "type": "address" }, { "internalType": "contract RoleStore", "name": "_roleStore", "type": "address" }, { "internalType": "contract DataStore", "name": "_dataStore", "type": "address" }, { "internalType": "contract EventEmitter", "name": "_eventEmitter", "type": "address" }, { "internalType": "contract IGlvDepositHandler", "name": "_glvDepositHandler", "type": "address" }, { "internalType": "contract IGlvWithdrawalHandler", "name": "_glvWithdrawalHandler", "type": "address" }, { "internalType": "contract IExternalHandler", "name": "_externalHandler", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "EmptyGlvDeposit", "type": "error" }, { "inputs": [], "name": "EmptyGlvWithdrawal", "type": "error" }, { "inputs": [], "name": "EmptyHoldingAddress", "type": "error" }, { "inputs": [], "name": "EmptyReceiver", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" } ], "name": "EmptyTokenTranferGasLimit", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "msgSender", "type": "address" } ], "name": "InvalidNativeTokenSender", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "address", "name": "receiver", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "TokenTransferError", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "msgSender", "type": "address" }, { "internalType": "string", "name": "role", "type": "string" } ], "name": "Unauthorized", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "string", "name": "reason", "type": "string" }, { "indexed": false, "internalType": "bytes", "name": "returndata", "type": "bytes" } ], "name": "TokenTransferReverted", "type": "event" }, { "inputs": [ { "internalType": "bytes32", "name": "key", "type": "bytes32" } ], "name": "cancelGlvDeposit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "key", "type": "bytes32" } ], "name": "cancelGlvWithdrawal", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "components": [ { "internalType": "address", "name": "glv", "type": "address" }, { "internalType": "address", "name": "market", "type": "address" }, { "internalType": "address", "name": "receiver", "type": "address" }, { "internalType": "address", "name": "callbackContract", "type": "address" }, { "internalType": "address", "name": "uiFeeReceiver", "type": "address" }, { "internalType": "address", "name": "initialLongToken", "type": "address" }, { "internalType": "address", "name": "initialShortToken", "type": "address" }, { "internalType": "address[]", "name": "longTokenSwapPath", "type": "address[]" }, { "internalType": "address[]", "name": "shortTokenSwapPath", "type": "address[]" } ], "internalType": "struct IGlvDepositUtils.CreateGlvDepositParamsAddresses", "name": "addresses", "type": "tuple" }, { "internalType": "uint256", "name": "minGlvTokens", "type": "uint256" }, { "internalType": "uint256", "name": "executionFee", "type": "uint256" }, { "internalType": "uint256", "name": "callbackGasLimit", "type": "uint256" }, { "internalType": "bool", "name": "shouldUnwrapNativeToken", "type": "bool" }, { "internalType": "bool", "name": "isMarketTokenDeposit", "type": "bool" }, { "internalType": "bytes32[]", "name": "dataList", "type": "bytes32[]" } ], "internalType": "struct IGlvDepositUtils.CreateGlvDepositParams", "name": "params", "type": "tuple" } ], "name": "createGlvDeposit", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "components": [ { "components": [ { "internalType": "address", "name": "receiver", "type": "address" }, { "internalType": "address", "name": "callbackContract", "type": "address" }, { "internalType": "address", "name": "uiFeeReceiver", "type": "address" }, { "internalType": "address", "name": "market", "type": "address" }, { "internalType": "address", "name": "glv", "type": "address" }, { "internalType": "address[]", "name": "longTokenSwapPath", "type": "address[]" }, { "internalType": "address[]", "name": "shortTokenSwapPath", "type": "address[]" } ], "internalType": "struct IGlvWithdrawalUtils.CreateGlvWithdrawalParamsAddresses", "name": "addresses", "type": "tuple" }, { "internalType": "uint256", "name": "minLongTokenAmount", "type": "uint256" }, { "internalType": "uint256", "name": "minShortTokenAmount", "type": "uint256" }, { "internalType": "bool", "name": "shouldUnwrapNativeToken", "type": "bool" }, { "internalType": "uint256", "name": "executionFee", "type": "uint256" }, { "internalType": "uint256", "name": "callbackGasLimit", "type": "uint256" }, { "internalType": "bytes32[]", "name": "dataList", "type": "bytes32[]" } ], "internalType": "struct IGlvWithdrawalUtils.CreateGlvWithdrawalParams", "name": "params", "type": "tuple" } ], "name": "createGlvWithdrawal", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "dataStore", "outputs": [ { "internalType": "contract DataStore", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "eventEmitter", "outputs": [ { "internalType": "contract EventEmitter", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "externalHandler", "outputs": [ { "internalType": "contract IExternalHandler", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "glvDepositHandler", "outputs": [ { "internalType": "contract IGlvDepositHandler", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "glvWithdrawalHandler", "outputs": [ { "internalType": "contract IGlvWithdrawalHandler", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "externalCallTargets", "type": "address[]" }, { "internalType": "bytes[]", "name": "externalCallDataList", "type": "bytes[]" }, { "internalType": "address[]", "name": "refundTokens", "type": "address[]" }, { "internalType": "address[]", "name": "refundReceivers", "type": "address[]" } ], "name": "makeExternalCalls", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "bytes[]", "name": "data", "type": "bytes[]" } ], "name": "multicall", "outputs": [ { "internalType": "bytes[]", "name": "results", "type": "bytes[]" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "roleStore", "outputs": [ { "internalType": "contract RoleStore", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "router", "outputs": [ { "internalType": "contract Router", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "receiver", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "sendNativeToken", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "address", "name": "receiver", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "sendTokens", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "receiver", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "sendWnt", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "key", "type": "bytes32" }, { "components": [ { "internalType": "address[]", "name": "primaryTokens", "type": "address[]" }, { "components": [ { "internalType": "uint256", "name": "min", "type": "uint256" }, { "internalType": "uint256", "name": "max", "type": "uint256" } ], "internalType": "struct Price.Props[]", "name": "primaryPrices", "type": "tuple[]" }, { "internalType": "uint256", "name": "minTimestamp", "type": "uint256" }, { "internalType": "uint256", "name": "maxTimestamp", "type": "uint256" } ], "internalType": "struct OracleUtils.SimulatePricesParams", "name": "simulatedOracleParams", "type": "tuple" } ], "name": "simulateExecuteGlvDeposit", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "key", "type": "bytes32" }, { "components": [ { "internalType": "address[]", "name": "primaryTokens", "type": "address[]" }, { "components": [ { "internalType": "uint256", "name": "min", "type": "uint256" }, { "internalType": "uint256", "name": "max", "type": "uint256" } ], "internalType": "struct Price.Props[]", "name": "primaryPrices", "type": "tuple[]" }, { "internalType": "uint256", "name": "minTimestamp", "type": "uint256" }, { "internalType": "uint256", "name": "maxTimestamp", "type": "uint256" } ], "internalType": "struct OracleUtils.SimulatePricesParams", "name": "simulatedOracleParams", "type": "tuple" } ], "name": "simulateExecuteGlvWithdrawal", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "address[]", "name": "primaryTokens", "type": "address[]" }, { "components": [ { "internalType": "uint256", "name": "min", "type": "uint256" }, { "internalType": "uint256", "name": "max", "type": "uint256" } ], "internalType": "struct Price.Props[]", "name": "primaryPrices", "type": "tuple[]" }, { "internalType": "uint256", "name": "minTimestamp", "type": "uint256" }, { "internalType": "uint256", "name": "maxTimestamp", "type": "uint256" } ], "internalType": "struct OracleUtils.SimulatePricesParams", "name": "simulatedOracleParams", "type": "tuple" } ], "name": "simulateExecuteLatestGlvDeposit", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "address[]", "name": "primaryTokens", "type": "address[]" }, { "components": [ { "internalType": "uint256", "name": "min", "type": "uint256" }, { "internalType": "uint256", "name": "max", "type": "uint256" } ], "internalType": "struct Price.Props[]", "name": "primaryPrices", "type": "tuple[]" }, { "internalType": "uint256", "name": "minTimestamp", "type": "uint256" }, { "internalType": "uint256", "name": "maxTimestamp", "type": "uint256" } ], "internalType": "struct OracleUtils.SimulatePricesParams", "name": "simulatedOracleParams", "type": "tuple" } ], "name": "simulateExecuteLatestGlvWithdrawal", "outputs": [], "stateMutability": "payable", "type": "function" }, { "stateMutability": "payable", "type": "receive" } ], "transactionHash": "0x847321d1240ff31c13c0c7f9ba37b368228448617b10cdcad55cff2bb9ecb6d5", "receipt": { "to": null, "from": "0xE7BfFf2aB721264887230037940490351700a068", "contractAddress": "0x7EAdEE2ca1b4D06a0d82fDF03D715550c26AA12F", "transactionIndex": 9, "gasUsed": "2388460", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "blockHash": "0x24dca8ce423416f42d8777f53b539c0dcbcbb97a730ab42c79cb1845fe8bf261", "transactionHash": "0x847321d1240ff31c13c0c7f9ba37b368228448617b10cdcad55cff2bb9ecb6d5", "logs": [], "blockNumber": 401119848, "cumulativeGasUsed": "3952185", "status": 1, "byzantium": true }, "args": [ "0x7452c558d45f8afC8c83dAe62C3f8A5BE19c71f6", "0x3c3d99FD298f679DBC2CEcd132b4eC4d0F5e6e72", "0xFD70de6b91282D8017aA4E741e9Ae325CAb992d8", "0xC8ee91A54287DB53897056e12D9819156D3822Fb", "0x749291a06b1Eb031288A5c864F68de83e4091Ff8", "0x1EEA01a3592b8943737977b93ed24be7842D2427", "0x389CEf541397e872dC04421f166B5Bc2E0b374a5" ], "numDeployments": 13, "solcInputHash": "a8f08a50b1857f459bad4d5d99a5e97c", "metadata": "{\"compiler\":{\"version\":\"0.8.29+commit.ab55807c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract Router\",\"name\":\"_router\",\"type\":\"address\"},{\"internalType\":\"contract RoleStore\",\"name\":\"_roleStore\",\"type\":\"address\"},{\"internalType\":\"contract DataStore\",\"name\":\"_dataStore\",\"type\":\"address\"},{\"internalType\":\"contract EventEmitter\",\"name\":\"_eventEmitter\",\"type\":\"address\"},{\"internalType\":\"contract IGlvDepositHandler\",\"name\":\"_glvDepositHandler\",\"type\":\"address\"},{\"internalType\":\"contract IGlvWithdrawalHandler\",\"name\":\"_glvWithdrawalHandler\",\"type\":\"address\"},{\"internalType\":\"contract IExternalHandler\",\"name\":\"_externalHandler\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"EmptyGlvDeposit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EmptyGlvWithdrawal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EmptyHoldingAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EmptyReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"EmptyTokenTranferGasLimit\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"msgSender\",\"type\":\"address\"}],\"name\":\"InvalidNativeTokenSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenTransferError\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"msgSender\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"role\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"returndata\",\"type\":\"bytes\"}],\"name\":\"TokenTransferReverted\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"}],\"name\":\"cancelGlvDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"}],\"name\":\"cancelGlvWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"glv\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"callbackContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"uiFeeReceiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"initialLongToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"initialShortToken\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"longTokenSwapPath\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"shortTokenSwapPath\",\"type\":\"address[]\"}],\"internalType\":\"struct IGlvDepositUtils.CreateGlvDepositParamsAddresses\",\"name\":\"addresses\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"minGlvTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"executionFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"callbackGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"shouldUnwrapNativeToken\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isMarketTokenDeposit\",\"type\":\"bool\"},{\"internalType\":\"bytes32[]\",\"name\":\"dataList\",\"type\":\"bytes32[]\"}],\"internalType\":\"struct IGlvDepositUtils.CreateGlvDepositParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"createGlvDeposit\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"callbackContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"uiFeeReceiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"glv\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"longTokenSwapPath\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"shortTokenSwapPath\",\"type\":\"address[]\"}],\"internalType\":\"struct IGlvWithdrawalUtils.CreateGlvWithdrawalParamsAddresses\",\"name\":\"addresses\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"minLongTokenAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minShortTokenAmount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"shouldUnwrapNativeToken\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"executionFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"callbackGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"dataList\",\"type\":\"bytes32[]\"}],\"internalType\":\"struct IGlvWithdrawalUtils.CreateGlvWithdrawalParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"createGlvWithdrawal\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dataStore\",\"outputs\":[{\"internalType\":\"contract DataStore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"eventEmitter\",\"outputs\":[{\"internalType\":\"contract EventEmitter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"externalHandler\",\"outputs\":[{\"internalType\":\"contract IExternalHandler\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"glvDepositHandler\",\"outputs\":[{\"internalType\":\"contract IGlvDepositHandler\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"glvWithdrawalHandler\",\"outputs\":[{\"internalType\":\"contract IGlvWithdrawalHandler\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"externalCallTargets\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"externalCallDataList\",\"type\":\"bytes[]\"},{\"internalType\":\"address[]\",\"name\":\"refundTokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"refundReceivers\",\"type\":\"address[]\"}],\"name\":\"makeExternalCalls\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"}],\"name\":\"multicall\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"results\",\"type\":\"bytes[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"roleStore\",\"outputs\":[{\"internalType\":\"contract RoleStore\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"contract Router\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sendNativeToken\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sendTokens\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sendWnt\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"primaryTokens\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"internalType\":\"struct Price.Props[]\",\"name\":\"primaryPrices\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"minTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxTimestamp\",\"type\":\"uint256\"}],\"internalType\":\"struct OracleUtils.SimulatePricesParams\",\"name\":\"simulatedOracleParams\",\"type\":\"tuple\"}],\"name\":\"simulateExecuteGlvDeposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"primaryTokens\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"internalType\":\"struct Price.Props[]\",\"name\":\"primaryPrices\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"minTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxTimestamp\",\"type\":\"uint256\"}],\"internalType\":\"struct OracleUtils.SimulatePricesParams\",\"name\":\"simulatedOracleParams\",\"type\":\"tuple\"}],\"name\":\"simulateExecuteGlvWithdrawal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"primaryTokens\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"internalType\":\"struct Price.Props[]\",\"name\":\"primaryPrices\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"minTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxTimestamp\",\"type\":\"uint256\"}],\"internalType\":\"struct OracleUtils.SimulatePricesParams\",\"name\":\"simulatedOracleParams\",\"type\":\"tuple\"}],\"name\":\"simulateExecuteLatestGlvDeposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"primaryTokens\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"internalType\":\"struct Price.Props[]\",\"name\":\"primaryPrices\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"minTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxTimestamp\",\"type\":\"uint256\"}],\"internalType\":\"struct OracleUtils.SimulatePricesParams\",\"name\":\"simulatedOracleParams\",\"type\":\"tuple\"}],\"name\":\"simulateExecuteLatestGlvWithdrawal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"multicall(bytes[])\":{\"details\":\"Receives and executes a batch of function calls on this contract.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/router/GlvRouter.sol\":\"GlvRouter\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n constructor() {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa535a5df777d44e945dd24aa43a11e44b024140fc340ad0dfe42acf4002aade1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)\\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n /**\\n * @dev Returns the downcasted uint248 from uint256, reverting on\\n * overflow (when the input is greater than largest uint248).\\n *\\n * Counterpart to Solidity's `uint248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint248(uint256 value) internal pure returns (uint248) {\\n require(value <= type(uint248).max, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n return uint248(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint240 from uint256, reverting on\\n * overflow (when the input is greater than largest uint240).\\n *\\n * Counterpart to Solidity's `uint240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint240(uint256 value) internal pure returns (uint240) {\\n require(value <= type(uint240).max, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n return uint240(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint232 from uint256, reverting on\\n * overflow (when the input is greater than largest uint232).\\n *\\n * Counterpart to Solidity's `uint232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint232(uint256 value) internal pure returns (uint232) {\\n require(value <= type(uint232).max, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n return uint232(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint224 from uint256, reverting on\\n * overflow (when the input is greater than largest uint224).\\n *\\n * Counterpart to Solidity's `uint224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint224(uint256 value) internal pure returns (uint224) {\\n require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint216 from uint256, reverting on\\n * overflow (when the input is greater than largest uint216).\\n *\\n * Counterpart to Solidity's `uint216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint216(uint256 value) internal pure returns (uint216) {\\n require(value <= type(uint216).max, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n return uint216(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint208 from uint256, reverting on\\n * overflow (when the input is greater than largest uint208).\\n *\\n * Counterpart to Solidity's `uint208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint208(uint256 value) internal pure returns (uint208) {\\n require(value <= type(uint208).max, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n return uint208(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint200 from uint256, reverting on\\n * overflow (when the input is greater than largest uint200).\\n *\\n * Counterpart to Solidity's `uint200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint200(uint256 value) internal pure returns (uint200) {\\n require(value <= type(uint200).max, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n return uint200(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint192 from uint256, reverting on\\n * overflow (when the input is greater than largest uint192).\\n *\\n * Counterpart to Solidity's `uint192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint192(uint256 value) internal pure returns (uint192) {\\n require(value <= type(uint192).max, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n return uint192(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint184 from uint256, reverting on\\n * overflow (when the input is greater than largest uint184).\\n *\\n * Counterpart to Solidity's `uint184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint184(uint256 value) internal pure returns (uint184) {\\n require(value <= type(uint184).max, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n return uint184(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint176 from uint256, reverting on\\n * overflow (when the input is greater than largest uint176).\\n *\\n * Counterpart to Solidity's `uint176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint176(uint256 value) internal pure returns (uint176) {\\n require(value <= type(uint176).max, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n return uint176(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint168 from uint256, reverting on\\n * overflow (when the input is greater than largest uint168).\\n *\\n * Counterpart to Solidity's `uint168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint168(uint256 value) internal pure returns (uint168) {\\n require(value <= type(uint168).max, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n return uint168(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint160 from uint256, reverting on\\n * overflow (when the input is greater than largest uint160).\\n *\\n * Counterpart to Solidity's `uint160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint160(uint256 value) internal pure returns (uint160) {\\n require(value <= type(uint160).max, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n return uint160(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint152 from uint256, reverting on\\n * overflow (when the input is greater than largest uint152).\\n *\\n * Counterpart to Solidity's `uint152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint152(uint256 value) internal pure returns (uint152) {\\n require(value <= type(uint152).max, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n return uint152(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint144 from uint256, reverting on\\n * overflow (when the input is greater than largest uint144).\\n *\\n * Counterpart to Solidity's `uint144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint144(uint256 value) internal pure returns (uint144) {\\n require(value <= type(uint144).max, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n return uint144(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint136 from uint256, reverting on\\n * overflow (when the input is greater than largest uint136).\\n *\\n * Counterpart to Solidity's `uint136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint136(uint256 value) internal pure returns (uint136) {\\n require(value <= type(uint136).max, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n return uint136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint120 from uint256, reverting on\\n * overflow (when the input is greater than largest uint120).\\n *\\n * Counterpart to Solidity's `uint120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint120(uint256 value) internal pure returns (uint120) {\\n require(value <= type(uint120).max, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n return uint120(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint112 from uint256, reverting on\\n * overflow (when the input is greater than largest uint112).\\n *\\n * Counterpart to Solidity's `uint112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint112(uint256 value) internal pure returns (uint112) {\\n require(value <= type(uint112).max, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n return uint112(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint104 from uint256, reverting on\\n * overflow (when the input is greater than largest uint104).\\n *\\n * Counterpart to Solidity's `uint104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint104(uint256 value) internal pure returns (uint104) {\\n require(value <= type(uint104).max, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n return uint104(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint96 from uint256, reverting on\\n * overflow (when the input is greater than largest uint96).\\n *\\n * Counterpart to Solidity's `uint96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint96(uint256 value) internal pure returns (uint96) {\\n require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint88 from uint256, reverting on\\n * overflow (when the input is greater than largest uint88).\\n *\\n * Counterpart to Solidity's `uint88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint88(uint256 value) internal pure returns (uint88) {\\n require(value <= type(uint88).max, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n return uint88(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint80 from uint256, reverting on\\n * overflow (when the input is greater than largest uint80).\\n *\\n * Counterpart to Solidity's `uint80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint80(uint256 value) internal pure returns (uint80) {\\n require(value <= type(uint80).max, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n return uint80(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint72 from uint256, reverting on\\n * overflow (when the input is greater than largest uint72).\\n *\\n * Counterpart to Solidity's `uint72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint72(uint256 value) internal pure returns (uint72) {\\n require(value <= type(uint72).max, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n return uint72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint56 from uint256, reverting on\\n * overflow (when the input is greater than largest uint56).\\n *\\n * Counterpart to Solidity's `uint56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint56(uint256 value) internal pure returns (uint56) {\\n require(value <= type(uint56).max, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n return uint56(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint48 from uint256, reverting on\\n * overflow (when the input is greater than largest uint48).\\n *\\n * Counterpart to Solidity's `uint48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint48(uint256 value) internal pure returns (uint48) {\\n require(value <= type(uint48).max, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n return uint48(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint40 from uint256, reverting on\\n * overflow (when the input is greater than largest uint40).\\n *\\n * Counterpart to Solidity's `uint40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint40(uint256 value) internal pure returns (uint40) {\\n require(value <= type(uint40).max, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n return uint40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint24 from uint256, reverting on\\n * overflow (when the input is greater than largest uint24).\\n *\\n * Counterpart to Solidity's `uint24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint24(uint256 value) internal pure returns (uint24) {\\n require(value <= type(uint24).max, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n return uint24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n *\\n * _Available since v3.0._\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int248 from int256, reverting on\\n * overflow (when the input is less than smallest int248 or\\n * greater than largest int248).\\n *\\n * Counterpart to Solidity's `int248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\\n downcasted = int248(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int240 from int256, reverting on\\n * overflow (when the input is less than smallest int240 or\\n * greater than largest int240).\\n *\\n * Counterpart to Solidity's `int240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\\n downcasted = int240(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int232 from int256, reverting on\\n * overflow (when the input is less than smallest int232 or\\n * greater than largest int232).\\n *\\n * Counterpart to Solidity's `int232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\\n downcasted = int232(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int224 from int256, reverting on\\n * overflow (when the input is less than smallest int224 or\\n * greater than largest int224).\\n *\\n * Counterpart to Solidity's `int224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\\n downcasted = int224(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int216 from int256, reverting on\\n * overflow (when the input is less than smallest int216 or\\n * greater than largest int216).\\n *\\n * Counterpart to Solidity's `int216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\\n downcasted = int216(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int208 from int256, reverting on\\n * overflow (when the input is less than smallest int208 or\\n * greater than largest int208).\\n *\\n * Counterpart to Solidity's `int208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\\n downcasted = int208(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int200 from int256, reverting on\\n * overflow (when the input is less than smallest int200 or\\n * greater than largest int200).\\n *\\n * Counterpart to Solidity's `int200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\\n downcasted = int200(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int192 from int256, reverting on\\n * overflow (when the input is less than smallest int192 or\\n * greater than largest int192).\\n *\\n * Counterpart to Solidity's `int192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\\n downcasted = int192(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int184 from int256, reverting on\\n * overflow (when the input is less than smallest int184 or\\n * greater than largest int184).\\n *\\n * Counterpart to Solidity's `int184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\\n downcasted = int184(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int176 from int256, reverting on\\n * overflow (when the input is less than smallest int176 or\\n * greater than largest int176).\\n *\\n * Counterpart to Solidity's `int176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\\n downcasted = int176(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int168 from int256, reverting on\\n * overflow (when the input is less than smallest int168 or\\n * greater than largest int168).\\n *\\n * Counterpart to Solidity's `int168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\\n downcasted = int168(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int160 from int256, reverting on\\n * overflow (when the input is less than smallest int160 or\\n * greater than largest int160).\\n *\\n * Counterpart to Solidity's `int160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\\n downcasted = int160(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int152 from int256, reverting on\\n * overflow (when the input is less than smallest int152 or\\n * greater than largest int152).\\n *\\n * Counterpart to Solidity's `int152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\\n downcasted = int152(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int144 from int256, reverting on\\n * overflow (when the input is less than smallest int144 or\\n * greater than largest int144).\\n *\\n * Counterpart to Solidity's `int144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\\n downcasted = int144(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int136 from int256, reverting on\\n * overflow (when the input is less than smallest int136 or\\n * greater than largest int136).\\n *\\n * Counterpart to Solidity's `int136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\\n downcasted = int136(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\\n downcasted = int128(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int120 from int256, reverting on\\n * overflow (when the input is less than smallest int120 or\\n * greater than largest int120).\\n *\\n * Counterpart to Solidity's `int120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\\n downcasted = int120(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int112 from int256, reverting on\\n * overflow (when the input is less than smallest int112 or\\n * greater than largest int112).\\n *\\n * Counterpart to Solidity's `int112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\\n downcasted = int112(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int104 from int256, reverting on\\n * overflow (when the input is less than smallest int104 or\\n * greater than largest int104).\\n *\\n * Counterpart to Solidity's `int104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\\n downcasted = int104(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int96 from int256, reverting on\\n * overflow (when the input is less than smallest int96 or\\n * greater than largest int96).\\n *\\n * Counterpart to Solidity's `int96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\\n downcasted = int96(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int88 from int256, reverting on\\n * overflow (when the input is less than smallest int88 or\\n * greater than largest int88).\\n *\\n * Counterpart to Solidity's `int88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\\n downcasted = int88(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int80 from int256, reverting on\\n * overflow (when the input is less than smallest int80 or\\n * greater than largest int80).\\n *\\n * Counterpart to Solidity's `int80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\\n downcasted = int80(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int72 from int256, reverting on\\n * overflow (when the input is less than smallest int72 or\\n * greater than largest int72).\\n *\\n * Counterpart to Solidity's `int72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\\n downcasted = int72(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\\n downcasted = int64(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int56 from int256, reverting on\\n * overflow (when the input is less than smallest int56 or\\n * greater than largest int56).\\n *\\n * Counterpart to Solidity's `int56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\\n downcasted = int56(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int48 from int256, reverting on\\n * overflow (when the input is less than smallest int48 or\\n * greater than largest int48).\\n *\\n * Counterpart to Solidity's `int48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\\n downcasted = int48(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int40 from int256, reverting on\\n * overflow (when the input is less than smallest int40 or\\n * greater than largest int40).\\n *\\n * Counterpart to Solidity's `int40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\\n downcasted = int40(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\\n downcasted = int32(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int24 from int256, reverting on\\n * overflow (when the input is less than smallest int24 or\\n * greater than largest int24).\\n *\\n * Counterpart to Solidity's `int24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\\n downcasted = int24(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\\n downcasted = int16(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\\n downcasted = int8(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n *\\n * _Available since v3.0._\\n */\\n function toInt256(uint256 value) internal pure returns (int256) {\\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\\n require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x52a8cfb0f5239d11b457dcdd1b326992ef672714ca8da71a157255bddd13f3ad\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/data/DataStore.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../role/RoleModule.sol\\\";\\nimport \\\"../utils/Calc.sol\\\";\\n\\n// @title DataStore\\n// @dev DataStore for all general state values\\ncontract DataStore is RoleModule {\\n using SafeCast for int256;\\n\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n using EnumerableSet for EnumerableSet.AddressSet;\\n using EnumerableSet for EnumerableSet.UintSet;\\n using EnumerableValues for EnumerableSet.Bytes32Set;\\n using EnumerableValues for EnumerableSet.AddressSet;\\n using EnumerableValues for EnumerableSet.UintSet;\\n\\n // store for uint values\\n mapping(bytes32 => uint256) public uintValues;\\n // store for int values\\n mapping(bytes32 => int256) public intValues;\\n // store for address values\\n mapping(bytes32 => address) public addressValues;\\n // store for bool values\\n mapping(bytes32 => bool) public boolValues;\\n // store for string values\\n mapping(bytes32 => string) public stringValues;\\n // store for bytes32 values\\n mapping(bytes32 => bytes32) public bytes32Values;\\n\\n // store for uint[] values\\n mapping(bytes32 => uint256[]) public uintArrayValues;\\n // store for int[] values\\n mapping(bytes32 => int256[]) public intArrayValues;\\n // store for address[] values\\n mapping(bytes32 => address[]) public addressArrayValues;\\n // store for bool[] values\\n mapping(bytes32 => bool[]) public boolArrayValues;\\n // store for string[] values\\n mapping(bytes32 => string[]) public stringArrayValues;\\n // store for bytes32[] values\\n mapping(bytes32 => bytes32[]) public bytes32ArrayValues;\\n\\n // store for bytes32 sets\\n mapping(bytes32 => EnumerableSet.Bytes32Set) internal bytes32Sets;\\n // store for address sets\\n mapping(bytes32 => EnumerableSet.AddressSet) internal addressSets;\\n // store for uint256 sets\\n mapping(bytes32 => EnumerableSet.UintSet) internal uintSets;\\n\\n constructor(RoleStore _roleStore) RoleModule(_roleStore) {}\\n\\n // @dev get the uint value for the given key\\n // @param key the key of the value\\n // @return the uint value for the key\\n function getUint(bytes32 key) external view returns (uint256) {\\n return uintValues[key];\\n }\\n\\n // @dev set the uint value for the given key\\n // @param key the key of the value\\n // @param value the value to set\\n // @return the uint value for the key\\n function setUint(bytes32 key, uint256 value) external onlyController returns (uint256) {\\n uintValues[key] = value;\\n return value;\\n }\\n\\n // @dev delete the uint value for the given key\\n // @param key the key of the value\\n function removeUint(bytes32 key) external onlyController {\\n delete uintValues[key];\\n }\\n\\n // @dev add the input int value to the existing uint value\\n // @param key the key of the value\\n // @param value the input int value\\n // @return the new uint value\\n function applyDeltaToUint(bytes32 key, int256 value, string memory errorMessage) external onlyController returns (uint256) {\\n uint256 currValue = uintValues[key];\\n if (value < 0 && (-value).toUint256() > currValue) {\\n revert(errorMessage);\\n }\\n uint256 nextUint = Calc.sumReturnUint256(currValue, value);\\n uintValues[key] = nextUint;\\n return nextUint;\\n }\\n\\n // @dev add the input uint value to the existing uint value\\n // @param key the key of the value\\n // @param value the input int value\\n // @return the new uint value\\n function applyDeltaToUint(bytes32 key, uint256 value) external onlyController returns (uint256) {\\n uint256 currValue = uintValues[key];\\n uint256 nextUint = currValue + value;\\n uintValues[key] = nextUint;\\n return nextUint;\\n }\\n\\n // @dev add the input int value to the existing uint value, prevent the uint\\n // value from becoming negative\\n // @param key the key of the value\\n // @param value the input int value\\n // @return the new uint value\\n function applyBoundedDeltaToUint(bytes32 key, int256 value) external onlyController returns (uint256) {\\n uint256 uintValue = uintValues[key];\\n if (value < 0 && (-value).toUint256() > uintValue) {\\n uintValues[key] = 0;\\n return 0;\\n }\\n\\n uint256 nextUint = Calc.sumReturnUint256(uintValue, value);\\n uintValues[key] = nextUint;\\n return nextUint;\\n }\\n\\n // @dev add the input uint value to the existing uint value\\n // @param key the key of the value\\n // @param value the input uint value\\n // @return the new uint value\\n function incrementUint(bytes32 key, uint256 value) external onlyController returns (uint256) {\\n uint256 nextUint = uintValues[key] + value;\\n uintValues[key] = nextUint;\\n return nextUint;\\n }\\n\\n // @dev subtract the input uint value from the existing uint value\\n // @param key the key of the value\\n // @param value the input uint value\\n // @return the new uint value\\n function decrementUint(bytes32 key, uint256 value) external onlyController returns (uint256) {\\n uint256 nextUint = uintValues[key] - value;\\n uintValues[key] = nextUint;\\n return nextUint;\\n }\\n\\n // @dev get the int value for the given key\\n // @param key the key of the value\\n // @return the int value for the key\\n function getInt(bytes32 key) external view returns (int256) {\\n return intValues[key];\\n }\\n\\n // @dev set the int value for the given key\\n // @param key the key of the value\\n // @param value the value to set\\n // @return the int value for the key\\n function setInt(bytes32 key, int256 value) external onlyController returns (int256) {\\n intValues[key] = value;\\n return value;\\n }\\n\\n function removeInt(bytes32 key) external onlyController {\\n delete intValues[key];\\n }\\n\\n // @dev add the input int value to the existing int value\\n // @param key the key of the value\\n // @param value the input int value\\n // @return the new int value\\n function applyDeltaToInt(bytes32 key, int256 value) external onlyController returns (int256) {\\n int256 nextInt = intValues[key] + value;\\n intValues[key] = nextInt;\\n return nextInt;\\n }\\n\\n // @dev add the input int value to the existing int value\\n // @param key the key of the value\\n // @param value the input int value\\n // @return the new int value\\n function incrementInt(bytes32 key, int256 value) external onlyController returns (int256) {\\n int256 nextInt = intValues[key] + value;\\n intValues[key] = nextInt;\\n return nextInt;\\n }\\n\\n // @dev subtract the input int value from the existing int value\\n // @param key the key of the value\\n // @param value the input int value\\n // @return the new int value\\n function decrementInt(bytes32 key, int256 value) external onlyController returns (int256) {\\n int256 nextInt = intValues[key] - value;\\n intValues[key] = nextInt;\\n return nextInt;\\n }\\n\\n // @dev get the address value for the given key\\n // @param key the key of the value\\n // @return the address value for the key\\n function getAddress(bytes32 key) external view returns (address) {\\n return addressValues[key];\\n }\\n\\n // @dev set the address value for the given key\\n // @param key the key of the value\\n // @param value the value to set\\n // @return the address value for the key\\n function setAddress(bytes32 key, address value) external onlyController returns (address) {\\n addressValues[key] = value;\\n return value;\\n }\\n\\n // @dev delete the address value for the given key\\n // @param key the key of the value\\n function removeAddress(bytes32 key) external onlyController {\\n delete addressValues[key];\\n }\\n\\n // @dev get the bool value for the given key\\n // @param key the key of the value\\n // @return the bool value for the key\\n function getBool(bytes32 key) external view returns (bool) {\\n return boolValues[key];\\n }\\n\\n // @dev set the bool value for the given key\\n // @param key the key of the value\\n // @param value the value to set\\n // @return the bool value for the key\\n function setBool(bytes32 key, bool value) external onlyController returns (bool) {\\n boolValues[key] = value;\\n return value;\\n }\\n\\n // @dev delete the bool value for the given key\\n // @param key the key of the value\\n function removeBool(bytes32 key) external onlyController {\\n delete boolValues[key];\\n }\\n\\n // @dev get the string value for the given key\\n // @param key the key of the value\\n // @return the string value for the key\\n function getString(bytes32 key) external view returns (string memory) {\\n return stringValues[key];\\n }\\n\\n // @dev set the string value for the given key\\n // @param key the key of the value\\n // @param value the value to set\\n // @return the string value for the key\\n function setString(bytes32 key, string memory value) external onlyController returns (string memory) {\\n stringValues[key] = value;\\n return value;\\n }\\n\\n // @dev delete the string value for the given key\\n // @param key the key of the value\\n function removeString(bytes32 key) external onlyController {\\n delete stringValues[key];\\n }\\n\\n // @dev get the bytes32 value for the given key\\n // @param key the key of the value\\n // @return the bytes32 value for the key\\n function getBytes32(bytes32 key) external view returns (bytes32) {\\n return bytes32Values[key];\\n }\\n\\n // @dev set the bytes32 value for the given key\\n // @param key the key of the value\\n // @param value the value to set\\n // @return the bytes32 value for the key\\n function setBytes32(bytes32 key, bytes32 value) external onlyController returns (bytes32) {\\n bytes32Values[key] = value;\\n return value;\\n }\\n\\n // @dev delete the bytes32 value for the given key\\n // @param key the key of the value\\n function removeBytes32(bytes32 key) external onlyController {\\n delete bytes32Values[key];\\n }\\n\\n // @dev get the uint array for the given key\\n // @param key the key of the uint array\\n // @return the uint array for the key\\n function getUintArray(bytes32 key) external view returns (uint256[] memory) {\\n return uintArrayValues[key];\\n }\\n\\n // @dev set the uint array for the given key\\n // @param key the key of the uint array\\n // @param value the value of the uint array\\n function setUintArray(bytes32 key, uint256[] memory value) external onlyController {\\n uintArrayValues[key] = value;\\n }\\n\\n // @dev delete the uint array for the given key\\n // @param key the key of the uint array\\n // @param value the value of the uint array\\n function removeUintArray(bytes32 key) external onlyController {\\n delete uintArrayValues[key];\\n }\\n\\n // @dev get the int array for the given key\\n // @param key the key of the int array\\n // @return the int array for the key\\n function getIntArray(bytes32 key) external view returns (int256[] memory) {\\n return intArrayValues[key];\\n }\\n\\n // @dev set the int array for the given key\\n // @param key the key of the int array\\n // @param value the value of the int array\\n function setIntArray(bytes32 key, int256[] memory value) external onlyController {\\n intArrayValues[key] = value;\\n }\\n\\n // @dev delete the int array for the given key\\n // @param key the key of the int array\\n // @param value the value of the int array\\n function removeIntArray(bytes32 key) external onlyController {\\n delete intArrayValues[key];\\n }\\n\\n // @dev get the address array for the given key\\n // @param key the key of the address array\\n // @return the address array for the key\\n function getAddressArray(bytes32 key) external view returns (address[] memory) {\\n return addressArrayValues[key];\\n }\\n\\n // @dev set the address array for the given key\\n // @param key the key of the address array\\n // @param value the value of the address array\\n function setAddressArray(bytes32 key, address[] memory value) external onlyController {\\n addressArrayValues[key] = value;\\n }\\n\\n // @dev delete the address array for the given key\\n // @param key the key of the address array\\n // @param value the value of the address array\\n function removeAddressArray(bytes32 key) external onlyController {\\n delete addressArrayValues[key];\\n }\\n\\n // @dev get the bool array for the given key\\n // @param key the key of the bool array\\n // @return the bool array for the key\\n function getBoolArray(bytes32 key) external view returns (bool[] memory) {\\n return boolArrayValues[key];\\n }\\n\\n // @dev set the bool array for the given key\\n // @param key the key of the bool array\\n // @param value the value of the bool array\\n function setBoolArray(bytes32 key, bool[] memory value) external onlyController {\\n boolArrayValues[key] = value;\\n }\\n\\n // @dev delete the bool array for the given key\\n // @param key the key of the bool array\\n // @param value the value of the bool array\\n function removeBoolArray(bytes32 key) external onlyController {\\n delete boolArrayValues[key];\\n }\\n\\n // @dev get the string array for the given key\\n // @param key the key of the string array\\n // @return the string array for the key\\n function getStringArray(bytes32 key) external view returns (string[] memory) {\\n return stringArrayValues[key];\\n }\\n\\n // @dev set the string array for the given key\\n // @param key the key of the string array\\n // @param value the value of the string array\\n function setStringArray(bytes32 key, string[] memory value) external onlyController {\\n stringArrayValues[key] = value;\\n }\\n\\n // @dev delete the string array for the given key\\n // @param key the key of the string array\\n // @param value the value of the string array\\n function removeStringArray(bytes32 key) external onlyController {\\n delete stringArrayValues[key];\\n }\\n\\n // @dev get the bytes32 array for the given key\\n // @param key the key of the bytes32 array\\n // @return the bytes32 array for the key\\n function getBytes32Array(bytes32 key) external view returns (bytes32[] memory) {\\n return bytes32ArrayValues[key];\\n }\\n\\n // @dev set the bytes32 array for the given key\\n // @param key the key of the bytes32 array\\n // @param value the value of the bytes32 array\\n function setBytes32Array(bytes32 key, bytes32[] memory value) external onlyController {\\n bytes32ArrayValues[key] = value;\\n }\\n\\n // @dev delete the bytes32 array for the given key\\n // @param key the key of the bytes32 array\\n // @param value the value of the bytes32 array\\n function removeBytes32Array(bytes32 key) external onlyController {\\n delete bytes32ArrayValues[key];\\n }\\n\\n // @dev check whether the given value exists in the set\\n // @param setKey the key of the set\\n // @param value the value to check\\n function containsBytes32(bytes32 setKey, bytes32 value) external view returns (bool) {\\n return bytes32Sets[setKey].contains(value);\\n }\\n\\n // @dev get the length of the set\\n // @param setKey the key of the set\\n function getBytes32Count(bytes32 setKey) external view returns (uint256) {\\n return bytes32Sets[setKey].length();\\n }\\n\\n // @dev get the values of the set in the given range\\n // @param setKey the key of the set\\n // @param the start of the range, values at the start index will be returned\\n // in the result\\n // @param the end of the range, values at the end index will not be returned\\n // in the result\\n function getBytes32ValuesAt(bytes32 setKey, uint256 start, uint256 end) external view returns (bytes32[] memory) {\\n return bytes32Sets[setKey].valuesAt(start, end);\\n }\\n\\n // @dev add the given value to the set\\n // @param setKey the key of the set\\n // @param value the value to add\\n function addBytes32(bytes32 setKey, bytes32 value) external onlyController {\\n bytes32Sets[setKey].add(value);\\n }\\n\\n // @dev remove the given value from the set\\n // @param setKey the key of the set\\n // @param value the value to remove\\n function removeBytes32(bytes32 setKey, bytes32 value) external onlyController {\\n bytes32Sets[setKey].remove(value);\\n }\\n\\n // @dev check whether the given value exists in the set\\n // @param setKey the key of the set\\n // @param value the value to check\\n function containsAddress(bytes32 setKey, address value) external view returns (bool) {\\n return addressSets[setKey].contains(value);\\n }\\n\\n // @dev get the length of the set\\n // @param setKey the key of the set\\n function getAddressCount(bytes32 setKey) external view returns (uint256) {\\n return addressSets[setKey].length();\\n }\\n\\n // @dev get the values of the set in the given range\\n // @param setKey the key of the set\\n // @param the start of the range, values at the start index will be returned\\n // in the result\\n // @param the end of the range, values at the end index will not be returned\\n // in the result\\n function getAddressValuesAt(bytes32 setKey, uint256 start, uint256 end) external view returns (address[] memory) {\\n return addressSets[setKey].valuesAt(start, end);\\n }\\n\\n // @dev add the given value to the set\\n // @param setKey the key of the set\\n // @param value the value to add\\n function addAddress(bytes32 setKey, address value) external onlyController {\\n addressSets[setKey].add(value);\\n }\\n\\n // @dev remove the given value from the set\\n // @param setKey the key of the set\\n // @param value the value to remove\\n function removeAddress(bytes32 setKey, address value) external onlyController {\\n addressSets[setKey].remove(value);\\n }\\n\\n // @dev check whether the given value exists in the set\\n // @param setKey the key of the set\\n // @param value the value to check\\n function containsUint(bytes32 setKey, uint256 value) external view returns (bool) {\\n return uintSets[setKey].contains(value);\\n }\\n\\n // @dev get the length of the set\\n // @param setKey the key of the set\\n function getUintCount(bytes32 setKey) external view returns (uint256) {\\n return uintSets[setKey].length();\\n }\\n\\n // @dev get the values of the set in the given range\\n // @param setKey the key of the set\\n // @param the start of the range, values at the start index will be returned\\n // in the result\\n // @param the end of the range, values at the end index will not be returned\\n // in the result\\n function getUintValuesAt(bytes32 setKey, uint256 start, uint256 end) external view returns (uint256[] memory) {\\n return uintSets[setKey].valuesAt(start, end);\\n }\\n\\n // @dev add the given value to the set\\n // @param setKey the key of the set\\n // @param value the value to add\\n function addUint(bytes32 setKey, uint256 value) external onlyController {\\n uintSets[setKey].add(value);\\n }\\n\\n // @dev remove the given value from the set\\n // @param setKey the key of the set\\n // @param value the value to remove\\n function removeUint(bytes32 setKey, uint256 value) external onlyController {\\n uintSets[setKey].remove(value);\\n }\\n}\\n\",\"keccak256\":\"0x38684fbf5eaa5e5c4ae0d220b28b7ceb3ddd6be8d983f162ac4430e7479dd90c\",\"license\":\"BUSL-1.1\"},\"contracts/data/Keys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\n// @title Keys\\n// @dev Keys for values in the DataStore\\nlibrary Keys {\\n // @dev key for the address of the wrapped native token\\n bytes32 public constant WNT = keccak256(abi.encode(\\\"WNT\\\"));\\n // @dev key for the nonce value used in NonceUtils\\n bytes32 public constant NONCE = keccak256(abi.encode(\\\"NONCE\\\"));\\n\\n // @dev for sending received fees\\n bytes32 public constant FEE_RECEIVER = keccak256(abi.encode(\\\"FEE_RECEIVER\\\"));\\n\\n // @dev for holding tokens that could not be sent out\\n bytes32 public constant HOLDING_ADDRESS = keccak256(abi.encode(\\\"HOLDING_ADDRESS\\\"));\\n bytes32 public constant RELAY_FEE_ADDRESS = keccak256(abi.encode(\\\"RELAY_FEE_ADDRESS\\\"));\\n\\n // @dev key for the minimum gas for execution error\\n bytes32 public constant MIN_HANDLE_EXECUTION_ERROR_GAS = keccak256(abi.encode(\\\"MIN_HANDLE_EXECUTION_ERROR_GAS\\\"));\\n\\n // @dev key for the minimum gas that should be forwarded for execution error handling\\n bytes32 public constant MIN_HANDLE_EXECUTION_ERROR_GAS_TO_FORWARD = keccak256(abi.encode(\\\"MIN_HANDLE_EXECUTION_ERROR_GAS_TO_FORWARD\\\"));\\n\\n // @dev key for the min additional gas for execution\\n bytes32 public constant MIN_ADDITIONAL_GAS_FOR_EXECUTION = keccak256(abi.encode(\\\"MIN_ADDITIONAL_GAS_FOR_EXECUTION\\\"));\\n\\n // @dev for a global reentrancy guard\\n bytes32 public constant REENTRANCY_GUARD_STATUS = keccak256(abi.encode(\\\"REENTRANCY_GUARD_STATUS\\\"));\\n\\n // @dev key for deposit fees\\n bytes32 public constant DEPOSIT_FEE_TYPE = keccak256(abi.encode(\\\"DEPOSIT_FEE_TYPE\\\"));\\n // @dev key for withdrawal fees\\n bytes32 public constant WITHDRAWAL_FEE_TYPE = keccak256(abi.encode(\\\"WITHDRAWAL_FEE_TYPE\\\"));\\n // @dev key for swap fees\\n bytes32 public constant SWAP_FEE_TYPE = keccak256(abi.encode(\\\"SWAP_FEE_TYPE\\\"));\\n bytes32 public constant ATOMIC_SWAP_FEE_TYPE = keccak256(abi.encode(\\\"ATOMIC_SWAP_FEE_TYPE\\\"));\\n // @dev key for position fees\\n bytes32 public constant POSITION_FEE_TYPE = keccak256(abi.encode(\\\"POSITION_FEE_TYPE\\\"));\\n // @dev key for ui deposit fees\\n bytes32 public constant UI_DEPOSIT_FEE_TYPE = keccak256(abi.encode(\\\"UI_DEPOSIT_FEE_TYPE\\\"));\\n // @dev key for ui withdrawal fees\\n bytes32 public constant UI_WITHDRAWAL_FEE_TYPE = keccak256(abi.encode(\\\"UI_WITHDRAWAL_FEE_TYPE\\\"));\\n // @dev key for ui swap fees\\n bytes32 public constant UI_SWAP_FEE_TYPE = keccak256(abi.encode(\\\"UI_SWAP_FEE_TYPE\\\"));\\n // @dev key for ui position fees\\n bytes32 public constant UI_POSITION_FEE_TYPE = keccak256(abi.encode(\\\"UI_POSITION_FEE_TYPE\\\"));\\n\\n // @dev key for ui fee factor\\n bytes32 public constant UI_FEE_FACTOR = keccak256(abi.encode(\\\"UI_FEE_FACTOR\\\"));\\n // @dev key for max ui fee receiver factor\\n bytes32 public constant MAX_UI_FEE_FACTOR = keccak256(abi.encode(\\\"MAX_UI_FEE_FACTOR\\\"));\\n\\n // @dev key for the claimable fee amount\\n bytes32 public constant CLAIMABLE_FEE_AMOUNT = keccak256(abi.encode(\\\"CLAIMABLE_FEE_AMOUNT\\\"));\\n // @dev key for the claimable ui fee amount\\n bytes32 public constant CLAIMABLE_UI_FEE_AMOUNT = keccak256(abi.encode(\\\"CLAIMABLE_UI_FEE_AMOUNT\\\"));\\n // @dev key for the max number of auto cancel orders\\n bytes32 public constant MAX_AUTO_CANCEL_ORDERS = keccak256(abi.encode(\\\"MAX_AUTO_CANCEL_ORDERS\\\"));\\n // @dev key for the max total callback gas limit for auto cancel orders\\n bytes32 public constant MAX_TOTAL_CALLBACK_GAS_LIMIT_FOR_AUTO_CANCEL_ORDERS = keccak256(abi.encode(\\\"MAX_TOTAL_CALLBACK_GAS_LIMIT_FOR_AUTO_CANCEL_ORDERS\\\"));\\n\\n // @dev key for the market list\\n bytes32 public constant MARKET_LIST = keccak256(abi.encode(\\\"MARKET_LIST\\\"));\\n\\n // @dev key for the fee batch list\\n bytes32 public constant FEE_BATCH_LIST = keccak256(abi.encode(\\\"FEE_BATCH_LIST\\\"));\\n\\n // @dev key for the deposit list\\n bytes32 public constant DEPOSIT_LIST = keccak256(abi.encode(\\\"DEPOSIT_LIST\\\"));\\n // @dev key for the account deposit list\\n bytes32 public constant ACCOUNT_DEPOSIT_LIST = keccak256(abi.encode(\\\"ACCOUNT_DEPOSIT_LIST\\\"));\\n\\n // @dev key for the withdrawal list\\n bytes32 public constant WITHDRAWAL_LIST = keccak256(abi.encode(\\\"WITHDRAWAL_LIST\\\"));\\n // @dev key for the account withdrawal list\\n bytes32 public constant ACCOUNT_WITHDRAWAL_LIST = keccak256(abi.encode(\\\"ACCOUNT_WITHDRAWAL_LIST\\\"));\\n\\n // @dev key for the shift list\\n bytes32 public constant SHIFT_LIST = keccak256(abi.encode(\\\"SHIFT_LIST\\\"));\\n // @dev key for the account shift list\\n bytes32 public constant ACCOUNT_SHIFT_LIST = keccak256(abi.encode(\\\"ACCOUNT_SHIFT_LIST\\\"));\\n\\n bytes32 public constant GLV_LIST = keccak256(abi.encode(\\\"GLV_LIST\\\"));\\n bytes32 public constant GLV_DEPOSIT_LIST = keccak256(abi.encode(\\\"GLV_DEPOSIT_LIST\\\"));\\n bytes32 public constant GLV_SHIFT_LIST = keccak256(abi.encode(\\\"GLV_SHIFT_LIST\\\"));\\n bytes32 public constant ACCOUNT_GLV_DEPOSIT_LIST = keccak256(abi.encode(\\\"ACCOUNT_GLV_DEPOSIT_LIST\\\"));\\n bytes32 public constant GLV_WITHDRAWAL_LIST = keccak256(abi.encode(\\\"GLV_WITHDRAWAL_LIST\\\"));\\n bytes32 public constant ACCOUNT_GLV_WITHDRAWAL_LIST = keccak256(abi.encode(\\\"ACCOUNT_GLV_WITHDRAWAL_LIST\\\"));\\n bytes32 public constant GLV_SUPPORTED_MARKET_LIST = keccak256(abi.encode(\\\"GLV_SUPPORTED_MARKET_LIST\\\"));\\n\\n // @dev key for the position list\\n bytes32 public constant POSITION_LIST = keccak256(abi.encode(\\\"POSITION_LIST\\\"));\\n // @dev key for the account position list\\n bytes32 public constant ACCOUNT_POSITION_LIST = keccak256(abi.encode(\\\"ACCOUNT_POSITION_LIST\\\"));\\n\\n // @dev key for the order list\\n bytes32 public constant ORDER_LIST = keccak256(abi.encode(\\\"ORDER_LIST\\\"));\\n // @dev key for the account order list\\n bytes32 public constant ACCOUNT_ORDER_LIST = keccak256(abi.encode(\\\"ACCOUNT_ORDER_LIST\\\"));\\n\\n // @dev key for the subaccount list\\n bytes32 public constant SUBACCOUNT_LIST = keccak256(abi.encode(\\\"SUBACCOUNT_LIST\\\"));\\n\\n // @dev key for the auto cancel order list\\n bytes32 public constant AUTO_CANCEL_ORDER_LIST = keccak256(abi.encode(\\\"AUTO_CANCEL_ORDER_LIST\\\"));\\n\\n // @dev key for is market disabled\\n bytes32 public constant IS_MARKET_DISABLED = keccak256(abi.encode(\\\"IS_MARKET_DISABLED\\\"));\\n\\n // @dev key for the max swap path length allowed\\n bytes32 public constant MAX_SWAP_PATH_LENGTH = keccak256(abi.encode(\\\"MAX_SWAP_PATH_LENGTH\\\"));\\n // @dev key used to store markets observed in a swap path, to ensure that a swap path contains unique markets\\n bytes32 public constant SWAP_PATH_MARKET_FLAG = keccak256(abi.encode(\\\"SWAP_PATH_MARKET_FLAG\\\"));\\n // @dev key used to store the min market tokens for the first deposit for a market\\n bytes32 public constant MIN_MARKET_TOKENS_FOR_FIRST_DEPOSIT = keccak256(abi.encode(\\\"MIN_MARKET_TOKENS_FOR_FIRST_DEPOSIT\\\"));\\n\\n bytes32 public constant CREATE_GLV_DEPOSIT_FEATURE_DISABLED = keccak256(abi.encode(\\\"CREATE_GLV_DEPOSIT_FEATURE_DISABLED\\\"));\\n bytes32 public constant CANCEL_GLV_DEPOSIT_FEATURE_DISABLED = keccak256(abi.encode(\\\"CANCEL_GLV_DEPOSIT_FEATURE_DISABLED\\\"));\\n bytes32 public constant EXECUTE_GLV_DEPOSIT_FEATURE_DISABLED = keccak256(abi.encode(\\\"EXECUTE_GLV_DEPOSIT_FEATURE_DISABLED\\\"));\\n\\n bytes32 public constant CREATE_GLV_WITHDRAWAL_FEATURE_DISABLED = keccak256(abi.encode(\\\"CREATE_GLV_WITHDRAWAL_FEATURE_DISABLED\\\"));\\n bytes32 public constant CANCEL_GLV_WITHDRAWAL_FEATURE_DISABLED = keccak256(abi.encode(\\\"CANCEL_GLV_WITHDRAWAL_FEATURE_DISABLED\\\"));\\n bytes32 public constant EXECUTE_GLV_WITHDRAWAL_FEATURE_DISABLED = keccak256(abi.encode(\\\"EXECUTE_GLV_WITHDRAWAL_FEATURE_DISABLED\\\"));\\n\\n bytes32 public constant CREATE_GLV_SHIFT_FEATURE_DISABLED = keccak256(abi.encode(\\\"CREATE_GLV_SHIFT_FEATURE_DISABLED\\\"));\\n bytes32 public constant EXECUTE_GLV_SHIFT_FEATURE_DISABLED = keccak256(abi.encode(\\\"EXECUTE_GLV_SHIFT_FEATURE_DISABLED\\\"));\\n\\n bytes32 public constant JIT_FEATURE_DISABLED = keccak256(abi.encode(\\\"JIT_FEATURE_DISABLED\\\"));\\n\\n // @dev key for whether the create deposit feature is disabled\\n bytes32 public constant CREATE_DEPOSIT_FEATURE_DISABLED = keccak256(abi.encode(\\\"CREATE_DEPOSIT_FEATURE_DISABLED\\\"));\\n // @dev key for whether the cancel deposit feature is disabled\\n bytes32 public constant CANCEL_DEPOSIT_FEATURE_DISABLED = keccak256(abi.encode(\\\"CANCEL_DEPOSIT_FEATURE_DISABLED\\\"));\\n // @dev key for whether the execute deposit feature is disabled\\n bytes32 public constant EXECUTE_DEPOSIT_FEATURE_DISABLED = keccak256(abi.encode(\\\"EXECUTE_DEPOSIT_FEATURE_DISABLED\\\"));\\n\\n // @dev key for whether the create withdrawal feature is disabled\\n bytes32 public constant CREATE_WITHDRAWAL_FEATURE_DISABLED = keccak256(abi.encode(\\\"CREATE_WITHDRAWAL_FEATURE_DISABLED\\\"));\\n // @dev key for whether the cancel withdrawal feature is disabled\\n bytes32 public constant CANCEL_WITHDRAWAL_FEATURE_DISABLED = keccak256(abi.encode(\\\"CANCEL_WITHDRAWAL_FEATURE_DISABLED\\\"));\\n // @dev key for whether the execute withdrawal feature is disabled\\n bytes32 public constant EXECUTE_WITHDRAWAL_FEATURE_DISABLED = keccak256(abi.encode(\\\"EXECUTE_WITHDRAWAL_FEATURE_DISABLED\\\"));\\n // @dev key for whether the execute atomic withdrawal feature is disabled\\n bytes32 public constant EXECUTE_ATOMIC_WITHDRAWAL_FEATURE_DISABLED = keccak256(abi.encode(\\\"EXECUTE_ATOMIC_WITHDRAWAL_FEATURE_DISABLED\\\"));\\n\\n // @dev key for whether the create shift feature is disabled\\n bytes32 public constant CREATE_SHIFT_FEATURE_DISABLED = keccak256(abi.encode(\\\"CREATE_SHIFT_FEATURE_DISABLED\\\"));\\n // @dev key for whether the cancel shift feature is disabled\\n bytes32 public constant CANCEL_SHIFT_FEATURE_DISABLED = keccak256(abi.encode(\\\"CANCEL_SHIFT_FEATURE_DISABLED\\\"));\\n // @dev key for whether the execute shift feature is disabled\\n bytes32 public constant EXECUTE_SHIFT_FEATURE_DISABLED = keccak256(abi.encode(\\\"EXECUTE_SHIFT_FEATURE_DISABLED\\\"));\\n\\n // @dev key for whether the create order feature is disabled\\n bytes32 public constant CREATE_ORDER_FEATURE_DISABLED = keccak256(abi.encode(\\\"CREATE_ORDER_FEATURE_DISABLED\\\"));\\n // @dev key for whether the execute order feature is disabled\\n bytes32 public constant EXECUTE_ORDER_FEATURE_DISABLED = keccak256(abi.encode(\\\"EXECUTE_ORDER_FEATURE_DISABLED\\\"));\\n // @dev key for whether the execute adl feature is disabled\\n // for liquidations, it can be disabled by using the EXECUTE_ORDER_FEATURE_DISABLED key with the Liquidation\\n // order type, ADL orders have a MarketDecrease order type, so a separate key is needed to disable it\\n bytes32 public constant EXECUTE_ADL_FEATURE_DISABLED = keccak256(abi.encode(\\\"EXECUTE_ADL_FEATURE_DISABLED\\\"));\\n // @dev key for whether the update order feature is disabled\\n bytes32 public constant UPDATE_ORDER_FEATURE_DISABLED = keccak256(abi.encode(\\\"UPDATE_ORDER_FEATURE_DISABLED\\\"));\\n // @dev key for whether the cancel order feature is disabled\\n bytes32 public constant CANCEL_ORDER_FEATURE_DISABLED = keccak256(abi.encode(\\\"CANCEL_ORDER_FEATURE_DISABLED\\\"));\\n\\n bytes32 public constant CLAIM_FUNDING_FEES_FEATURE_DISABLED = keccak256(abi.encode(\\\"CLAIM_FUNDING_FEES_FEATURE_DISABLED\\\"));\\n bytes32 public constant CLAIM_COLLATERAL_FEATURE_DISABLED = keccak256(abi.encode(\\\"CLAIM_COLLATERAL_FEATURE_DISABLED\\\"));\\n bytes32 public constant CLAIM_AFFILIATE_REWARDS_FEATURE_DISABLED = keccak256(abi.encode(\\\"CLAIM_AFFILIATE_REWARDS_FEATURE_DISABLED\\\"));\\n bytes32 public constant CLAIM_UI_FEES_FEATURE_DISABLED = keccak256(abi.encode(\\\"CLAIM_UI_FEES_FEATURE_DISABLED\\\"));\\n bytes32 public constant SUBACCOUNT_FEATURE_DISABLED = keccak256(abi.encode(\\\"SUBACCOUNT_FEATURE_DISABLED\\\"));\\n bytes32 public constant GASLESS_FEATURE_DISABLED = keccak256(abi.encode(\\\"GASLESS_FEATURE_DISABLED\\\"));\\n bytes32 public constant GENERAL_CLAIM_FEATURE_DISABLED = keccak256(abi.encode(\\\"GENERAL_CLAIM_FEATURE_DISABLED\\\"));\\n\\n // @dev key for the minimum required oracle signers for an oracle observation\\n bytes32 public constant MIN_ORACLE_SIGNERS = keccak256(abi.encode(\\\"MIN_ORACLE_SIGNERS\\\"));\\n // @dev key for the minimum block confirmations before blockhash can be excluded for oracle signature validation\\n bytes32 public constant MIN_ORACLE_BLOCK_CONFIRMATIONS = keccak256(abi.encode(\\\"MIN_ORACLE_BLOCK_CONFIRMATIONS\\\"));\\n // @dev key for the maximum usable oracle price age in seconds\\n bytes32 public constant MAX_ORACLE_PRICE_AGE = keccak256(abi.encode(\\\"MAX_ORACLE_PRICE_AGE\\\"));\\n // @dev key for the maximum usable atomic oracle price age in seconds\\n bytes32 public constant MAX_ATOMIC_ORACLE_PRICE_AGE = keccak256(abi.encode(\\\"MAX_ATOMIC_ORACLE_PRICE_AGE\\\"));\\n // @dev key for the maximum oracle timestamp range\\n bytes32 public constant MAX_ORACLE_TIMESTAMP_RANGE = keccak256(abi.encode(\\\"MAX_ORACLE_TIMESTAMP_RANGE\\\"));\\n // @dev key for the maximum oracle price deviation factor from the ref price\\n bytes32 public constant MAX_ORACLE_REF_PRICE_DEVIATION_FACTOR = keccak256(abi.encode(\\\"MAX_ORACLE_REF_PRICE_DEVIATION_FACTOR\\\"));\\n // @dev key for whether an oracle provider is enabled\\n bytes32 public constant IS_ORACLE_PROVIDER_ENABLED = keccak256(abi.encode(\\\"IS_ORACLE_PROVIDER_ENABLED\\\"));\\n // @dev key for whether an oracle provider can be used for atomic actions\\n bytes32 public constant IS_ATOMIC_ORACLE_PROVIDER = keccak256(abi.encode(\\\"IS_ATOMIC_ORACLE_PROVIDER\\\"));\\n // @dev key for oracle timestamp adjustment\\n bytes32 public constant ORACLE_TIMESTAMP_ADJUSTMENT = keccak256(abi.encode(\\\"ORACLE_TIMESTAMP_ADJUSTMENT\\\"));\\n // @dev key for oracle provider for token\\n bytes32 public constant ORACLE_PROVIDER_FOR_TOKEN = keccak256(abi.encode(\\\"ORACLE_PROVIDER_FOR_TOKEN\\\"));\\n // @dev key for oracle provider updated time\\n bytes32 public constant ORACLE_PROVIDER_UPDATED_AT = keccak256(abi.encode(\\\"ORACLE_PROVIDER_UPDATED_AT\\\"));\\n // @dev key for oracle provider same value delay\\n bytes32 public constant ORACLE_PROVIDER_MIN_CHANGE_DELAY = keccak256(abi.encode(\\\"ORACLE_PROVIDER_MIN_CHANGE_DELAY\\\"));\\n // @dev key for the chainlink payment token\\n bytes32 public constant CHAINLINK_PAYMENT_TOKEN = keccak256(abi.encode(\\\"CHAINLINK_PAYMENT_TOKEN\\\"));\\n // @dev key for the sequencer grace duration\\n bytes32 public constant SEQUENCER_GRACE_DURATION = keccak256(abi.encode(\\\"SEQUENCER_GRACE_DURATION\\\"));\\n\\n // @dev key for the percentage amount of position fees to be received\\n bytes32 public constant POSITION_FEE_RECEIVER_FACTOR = keccak256(abi.encode(\\\"POSITION_FEE_RECEIVER_FACTOR\\\"));\\n // @dev key for the percentage amount of liquidation fees to be received\\n bytes32 public constant LIQUIDATION_FEE_RECEIVER_FACTOR = keccak256(abi.encode(\\\"LIQUIDATION_FEE_RECEIVER_FACTOR\\\"));\\n // @dev key for the percentage amount of swap fees to be received\\n bytes32 public constant SWAP_FEE_RECEIVER_FACTOR = keccak256(abi.encode(\\\"SWAP_FEE_RECEIVER_FACTOR\\\"));\\n // @dev key for the percentage amount of borrowing fees to be received\\n bytes32 public constant BORROWING_FEE_RECEIVER_FACTOR = keccak256(abi.encode(\\\"BORROWING_FEE_RECEIVER_FACTOR\\\"));\\n\\n // @dev key for the base gas limit used when estimating execution fee\\n bytes32 public constant ESTIMATED_GAS_FEE_BASE_AMOUNT_V2_1 = keccak256(abi.encode(\\\"ESTIMATED_GAS_FEE_BASE_AMOUNT_V2_1\\\"));\\n // @dev key for the gas limit used for each oracle price when estimating execution fee\\n bytes32 public constant ESTIMATED_GAS_FEE_PER_ORACLE_PRICE = keccak256(abi.encode(\\\"ESTIMATED_GAS_FEE_PER_ORACLE_PRICE\\\"));\\n // @dev key for the multiplier used when estimating execution fee\\n bytes32 public constant ESTIMATED_GAS_FEE_MULTIPLIER_FACTOR = keccak256(abi.encode(\\\"ESTIMATED_GAS_FEE_MULTIPLIER_FACTOR\\\"));\\n\\n // @dev key for the base gas limit used when calculating execution fee\\n bytes32 public constant EXECUTION_GAS_FEE_BASE_AMOUNT_V2_1 = keccak256(abi.encode(\\\"EXECUTION_GAS_FEE_BASE_AMOUNT_V2_1\\\"));\\n // @dev key for the gas limit used for each oracle price\\n bytes32 public constant EXECUTION_GAS_FEE_PER_ORACLE_PRICE = keccak256(abi.encode(\\\"EXECUTION_GAS_FEE_PER_ORACLE_PRICE\\\"));\\n // @dev key for the multiplier used when calculating execution fee\\n bytes32 public constant EXECUTION_GAS_FEE_MULTIPLIER_FACTOR = keccak256(abi.encode(\\\"EXECUTION_GAS_FEE_MULTIPLIER_FACTOR\\\"));\\n\\n // @dev key for the max execution fee multiplier\\n bytes32 public constant MAX_EXECUTION_FEE_MULTIPLIER_FACTOR = keccak256(abi.encode(\\\"MAX_EXECUTION_FEE_MULTIPLIER_FACTOR\\\"));\\n\\n bytes32 public constant MAX_RELAY_FEE_SWAP_USD_FOR_SUBACCOUNT = keccak256(abi.encode(\\\"MAX_RELAY_FEE_SWAP_USD_FOR_SUBACCOUNT\\\"));\\n bytes32 public constant GELATO_RELAY_FEE_MULTIPLIER_FACTOR = keccak256(abi.encode(\\\"GELATO_RELAY_FEE_MULTIPLIER_FACTOR\\\"));\\n bytes32 public constant GELATO_RELAY_FEE_BASE_AMOUNT = keccak256(abi.encode(\\\"GELATO_RELAY_FEE_BASE_AMOUNT\\\"));\\n bytes32 public constant CREATE_DEPOSIT_GAS_LIMIT = keccak256(abi.encode(\\\"CREATE_DEPOSIT_GAS_LIMIT\\\"));\\n bytes32 public constant DEPOSIT_GAS_LIMIT = keccak256(abi.encode(\\\"DEPOSIT_GAS_LIMIT\\\"));\\n bytes32 public constant CREATE_WITHDRAWAL_GAS_LIMIT = keccak256(abi.encode(\\\"CREATE_WITHDRAWAL_GAS_LIMIT\\\"));\\n bytes32 public constant WITHDRAWAL_GAS_LIMIT = keccak256(abi.encode(\\\"WITHDRAWAL_GAS_LIMIT\\\"));\\n bytes32 public constant CREATE_GLV_DEPOSIT_GAS_LIMIT = keccak256(abi.encode(\\\"CREATE_GLV_DEPOSIT_GAS_LIMIT\\\"));\\n bytes32 public constant GLV_DEPOSIT_GAS_LIMIT = keccak256(abi.encode(\\\"GLV_DEPOSIT_GAS_LIMIT\\\"));\\n bytes32 public constant CREATE_GLV_WITHDRAWAL_GAS_LIMIT = keccak256(abi.encode(\\\"CREATE_GLV_WITHDRAWAL_GAS_LIMIT\\\"));\\n bytes32 public constant GLV_WITHDRAWAL_GAS_LIMIT = keccak256(abi.encode(\\\"GLV_WITHDRAWAL_GAS_LIMIT\\\"));\\n bytes32 public constant GLV_SHIFT_GAS_LIMIT = keccak256(abi.encode(\\\"GLV_SHIFT_GAS_LIMIT\\\"));\\n bytes32 public constant GLV_PER_MARKET_GAS_LIMIT = keccak256(abi.encode(\\\"GLV_PER_MARKET_GAS_LIMIT\\\"));\\n bytes32 public constant SHIFT_GAS_LIMIT = keccak256(abi.encode(\\\"SHIFT_GAS_LIMIT\\\"));\\n bytes32 public constant SINGLE_SWAP_GAS_LIMIT = keccak256(abi.encode(\\\"SINGLE_SWAP_GAS_LIMIT\\\"));\\n bytes32 public constant INCREASE_ORDER_GAS_LIMIT = keccak256(abi.encode(\\\"INCREASE_ORDER_GAS_LIMIT\\\"));\\n bytes32 public constant DECREASE_ORDER_GAS_LIMIT = keccak256(abi.encode(\\\"DECREASE_ORDER_GAS_LIMIT\\\"));\\n bytes32 public constant SWAP_ORDER_GAS_LIMIT = keccak256(abi.encode(\\\"SWAP_ORDER_GAS_LIMIT\\\"));\\n bytes32 public constant SET_TRADER_REFERRAL_CODE_GAS_LIMIT = keccak256(abi.encode(\\\"SET_TRADER_REFERRAL_CODE_GAS_LIMIT\\\"));\\n bytes32 public constant REGISTER_CODE_GAS_LIMIT = keccak256(abi.encode(\\\"REGISTER_CODE_GAS_LIMIT\\\"));\\n\\n bytes32 public constant TOKEN_TRANSFER_GAS_LIMIT = keccak256(abi.encode(\\\"TOKEN_TRANSFER_GAS_LIMIT\\\"));\\n bytes32 public constant NATIVE_TOKEN_TRANSFER_GAS_LIMIT = keccak256(abi.encode(\\\"NATIVE_TOKEN_TRANSFER_GAS_LIMIT\\\"));\\n\\n bytes32 public constant REQUEST_EXPIRATION_TIME = keccak256(abi.encode(\\\"REQUEST_EXPIRATION_TIME\\\"));\\n\\n bytes32 public constant MAX_CALLBACK_GAS_LIMIT = keccak256(abi.encode(\\\"MAX_CALLBACK_GAS_LIMIT\\\"));\\n bytes32 public constant REFUND_EXECUTION_FEE_GAS_LIMIT = keccak256(abi.encode(\\\"REFUND_EXECUTION_FEE_GAS_LIMIT\\\"));\\n bytes32 public constant SAVED_CALLBACK_CONTRACT = keccak256(abi.encode(\\\"SAVED_CALLBACK_CONTRACT\\\"));\\n\\n // @dev key for the min collateral factor\\n bytes32 public constant MIN_COLLATERAL_FACTOR = keccak256(abi.encode(\\\"MIN_COLLATERAL_FACTOR\\\"));\\n // @dev key for the min collateral factor for open interest multiplier\\n bytes32 public constant MIN_COLLATERAL_FACTOR_FOR_OPEN_INTEREST_MULTIPLIER = keccak256(abi.encode(\\\"MIN_COLLATERAL_FACTOR_FOR_OPEN_INTEREST_MULTIPLIER\\\"));\\n // @dev key for the min allowed collateral in USD\\n bytes32 public constant MIN_COLLATERAL_USD = keccak256(abi.encode(\\\"MIN_COLLATERAL_USD\\\"));\\n // @dev key for the min allowed collateral factor which is using for some new markets to limit allowed leverage\\n bytes32 public constant MIN_COLLATERAL_FACTOR_FOR_LIQUIDATION = keccak256(abi.encode(\\\"MIN_COLLATERAL_FACTOR_FOR_LIQUIDATION\\\"));\\n // @dev key for the min allowed position size in USD\\n bytes32 public constant MIN_POSITION_SIZE_USD = keccak256(abi.encode(\\\"MIN_POSITION_SIZE_USD\\\"));\\n\\n bytes32 public constant VIRTUAL_TOKEN_ID = keccak256(abi.encode(\\\"VIRTUAL_TOKEN_ID\\\"));\\n bytes32 public constant VIRTUAL_MARKET_ID = keccak256(abi.encode(\\\"VIRTUAL_MARKET_ID\\\"));\\n bytes32 public constant VIRTUAL_INVENTORY_FOR_SWAPS = keccak256(abi.encode(\\\"VIRTUAL_INVENTORY_FOR_SWAPS\\\"));\\n bytes32 public constant VIRTUAL_INVENTORY_FOR_POSITIONS = keccak256(abi.encode(\\\"VIRTUAL_INVENTORY_FOR_POSITIONS\\\"));\\n bytes32 public constant VIRTUAL_INVENTORY_FOR_POSITIONS_IN_TOKENS = keccak256(abi.encode(\\\"VIRTUAL_INVENTORY_FOR_POSITIONS_IN_TOKENS\\\"));\\n\\n // @dev key for the position impact factor\\n bytes32 public constant POSITION_IMPACT_FACTOR = keccak256(abi.encode(\\\"POSITION_IMPACT_FACTOR\\\"));\\n // @dev key for the position impact exponent factor\\n bytes32 public constant POSITION_IMPACT_EXPONENT_FACTOR = keccak256(abi.encode(\\\"POSITION_IMPACT_EXPONENT_FACTOR\\\"));\\n // @dev key for the max decrease position impact factor\\n bytes32 public constant MAX_POSITION_IMPACT_FACTOR = keccak256(abi.encode(\\\"MAX_POSITION_IMPACT_FACTOR\\\"));\\n // @dev key for the max position impact factor for liquidations\\n bytes32 public constant MAX_POSITION_IMPACT_FACTOR_FOR_LIQUIDATIONS = keccak256(abi.encode(\\\"MAX_POSITION_IMPACT_FACTOR_FOR_LIQUIDATIONS\\\"));\\n // @dev key for the position fee factor\\n bytes32 public constant POSITION_FEE_FACTOR = keccak256(abi.encode(\\\"POSITION_FEE_FACTOR\\\"));\\n bytes32 public constant PRO_TRADER_TIER = keccak256(abi.encode(\\\"PRO_TRADER_TIER\\\"));\\n bytes32 public constant PRO_DISCOUNT_FACTOR = keccak256(abi.encode(\\\"PRO_DISCOUNT_FACTOR\\\"));\\n // @dev key for the liquidation fee factor\\n bytes32 public constant LIQUIDATION_FEE_FACTOR = keccak256(abi.encode(\\\"LIQUIDATION_FEE_FACTOR\\\"));\\n // @dev key for the swap impact factor\\n bytes32 public constant SWAP_IMPACT_FACTOR = keccak256(abi.encode(\\\"SWAP_IMPACT_FACTOR\\\"));\\n // @dev key for the swap impact exponent factor\\n bytes32 public constant SWAP_IMPACT_EXPONENT_FACTOR = keccak256(abi.encode(\\\"SWAP_IMPACT_EXPONENT_FACTOR\\\"));\\n // @dev key for the swap fee factor\\n bytes32 public constant SWAP_FEE_FACTOR = keccak256(abi.encode(\\\"SWAP_FEE_FACTOR\\\"));\\n // @dev key for the atomic swap fee factor\\n bytes32 public constant ATOMIC_SWAP_FEE_FACTOR = keccak256(abi.encode(\\\"ATOMIC_SWAP_FEE_FACTOR\\\"));\\n bytes32 public constant ATOMIC_WITHDRAWAL_FEE_FACTOR = keccak256(abi.encode(\\\"ATOMIC_WITHDRAWAL_FEE_FACTOR\\\"));\\n bytes32 public constant DEPOSIT_FEE_FACTOR = keccak256(abi.encode(\\\"DEPOSIT_FEE_FACTOR\\\"));\\n bytes32 public constant WITHDRAWAL_FEE_FACTOR = keccak256(abi.encode(\\\"WITHDRAWAL_FEE_FACTOR\\\"));\\n // @dev key for the oracle type\\n bytes32 public constant ORACLE_TYPE = keccak256(abi.encode(\\\"ORACLE_TYPE\\\"));\\n // @dev key for open interest\\n bytes32 public constant OPEN_INTEREST = keccak256(abi.encode(\\\"OPEN_INTEREST\\\"));\\n // @dev key for open interest in tokens\\n bytes32 public constant OPEN_INTEREST_IN_TOKENS = keccak256(abi.encode(\\\"OPEN_INTEREST_IN_TOKENS\\\"));\\n bytes32 public constant COLLATERAL_SUM = keccak256(abi.encode(\\\"COLLATERAL_SUM\\\"));\\n bytes32 public constant MAX_COLLATERAL_SUM = keccak256(abi.encode(\\\"MAX_COLLATERAL_SUM\\\"));\\n // @dev key for pool amount\\n bytes32 public constant POOL_AMOUNT = keccak256(abi.encode(\\\"POOL_AMOUNT\\\"));\\n // @dev key for max pool amount\\n bytes32 public constant MAX_POOL_AMOUNT = keccak256(abi.encode(\\\"MAX_POOL_AMOUNT\\\"));\\n // @dev key for max pool usd for deposit\\n bytes32 public constant MAX_POOL_USD_FOR_DEPOSIT = keccak256(abi.encode(\\\"MAX_POOL_USD_FOR_DEPOSIT\\\"));\\n // @dev key for max open interest\\n bytes32 public constant MAX_OPEN_INTEREST = keccak256(abi.encode(\\\"MAX_OPEN_INTEREST\\\"));\\n // @dev key for position impact pool amount\\n bytes32 public constant POSITION_IMPACT_POOL_AMOUNT = keccak256(abi.encode(\\\"POSITION_IMPACT_POOL_AMOUNT\\\"));\\n // @dev key for lent position impact pool amount\\n bytes32 public constant LENT_POSITION_IMPACT_POOL_AMOUNT = keccak256(abi.encode(\\\"LENT_POSITION_IMPACT_POOL_AMOUNT\\\"));\\n bytes32 public constant MAX_LENDABLE_IMPACT_FACTOR = keccak256(abi.encode(\\\"MAX_LENDABLE_IMPACT_FACTOR\\\"));\\n bytes32 public constant MAX_LENDABLE_IMPACT_FACTOR_FOR_WITHDRAWALS = keccak256(abi.encode(\\\"MAX_LENDABLE_IMPACT_FACTOR_FOR_WITHDRAWALS\\\"));\\n bytes32 public constant MAX_LENDABLE_IMPACT_USD = keccak256(abi.encode(\\\"MAX_LENDABLE_IMPACT_USD\\\"));\\n // @dev key for total pending position impact amount\\n bytes32 public constant TOTAL_PENDING_IMPACT_AMOUNT = keccak256(abi.encode(\\\"TOTAL_PENDING_IMPACT_AMOUNT\\\"));\\n // @dev key for min position impact pool amount\\n bytes32 public constant MIN_POSITION_IMPACT_POOL_AMOUNT = keccak256(abi.encode(\\\"MIN_POSITION_IMPACT_POOL_AMOUNT\\\"));\\n // @dev key for position impact pool distribution rate\\n bytes32 public constant POSITION_IMPACT_POOL_DISTRIBUTION_RATE = keccak256(abi.encode(\\\"POSITION_IMPACT_POOL_DISTRIBUTION_RATE\\\"));\\n // @dev key for position impact pool distributed at\\n bytes32 public constant POSITION_IMPACT_POOL_DISTRIBUTED_AT = keccak256(abi.encode(\\\"POSITION_IMPACT_POOL_DISTRIBUTED_AT\\\"));\\n // @dev key for swap impact pool amount\\n bytes32 public constant SWAP_IMPACT_POOL_AMOUNT = keccak256(abi.encode(\\\"SWAP_IMPACT_POOL_AMOUNT\\\"));\\n // @dev key for price feed\\n bytes32 public constant PRICE_FEED = keccak256(abi.encode(\\\"PRICE_FEED\\\"));\\n // @dev key for price feed multiplier\\n bytes32 public constant PRICE_FEED_MULTIPLIER = keccak256(abi.encode(\\\"PRICE_FEED_MULTIPLIER\\\"));\\n // @dev key for price feed heartbeat\\n bytes32 public constant PRICE_FEED_HEARTBEAT_DURATION = keccak256(abi.encode(\\\"PRICE_FEED_HEARTBEAT_DURATION\\\"));\\n // @dev key for data stream feed id\\n bytes32 public constant DATA_STREAM_ID = keccak256(abi.encode(\\\"DATA_STREAM_ID\\\"));\\n bytes32 public constant EDGE_DATA_STREAM_ID = keccak256(abi.encode(\\\"EDGE_DATA_STREAM_ID\\\"));\\n bytes32 public constant EDGE_DATA_STREAM_TOKEN_DECIMALS = keccak256(abi.encode(\\\"EDGE_DATA_STREAM_TOKEN_DECIMALS\\\"));\\n // @dev key for data stream feed multiplier\\n bytes32 public constant DATA_STREAM_MULTIPLIER = keccak256(abi.encode(\\\"DATA_STREAM_MULTIPLIER\\\"));\\n bytes32 public constant DATA_STREAM_SPREAD_REDUCTION_FACTOR = keccak256(abi.encode(\\\"DATA_STREAM_SPREAD_REDUCTION_FACTOR\\\"));\\n // @dev key for stable price\\n bytes32 public constant STABLE_PRICE = keccak256(abi.encode(\\\"STABLE_PRICE\\\"));\\n // @dev key for reserve factor\\n bytes32 public constant RESERVE_FACTOR = keccak256(abi.encode(\\\"RESERVE_FACTOR\\\"));\\n // @dev key for open interest reserve factor\\n bytes32 public constant OPEN_INTEREST_RESERVE_FACTOR = keccak256(abi.encode(\\\"OPEN_INTEREST_RESERVE_FACTOR\\\"));\\n // @dev key for max pnl factor\\n bytes32 public constant MAX_PNL_FACTOR = keccak256(abi.encode(\\\"MAX_PNL_FACTOR\\\"));\\n // @dev key for max pnl factor\\n bytes32 public constant MAX_PNL_FACTOR_FOR_TRADERS = keccak256(abi.encode(\\\"MAX_PNL_FACTOR_FOR_TRADERS\\\"));\\n // @dev key for max pnl factor for adl\\n bytes32 public constant MAX_PNL_FACTOR_FOR_ADL = keccak256(abi.encode(\\\"MAX_PNL_FACTOR_FOR_ADL\\\"));\\n // @dev key for min pnl factor for adl\\n bytes32 public constant MIN_PNL_FACTOR_AFTER_ADL = keccak256(abi.encode(\\\"MIN_PNL_FACTOR_AFTER_ADL\\\"));\\n // @dev key for max pnl factor\\n bytes32 public constant MAX_PNL_FACTOR_FOR_DEPOSITS = keccak256(abi.encode(\\\"MAX_PNL_FACTOR_FOR_DEPOSITS\\\"));\\n // @dev key for max pnl factor for withdrawals\\n bytes32 public constant MAX_PNL_FACTOR_FOR_WITHDRAWALS = keccak256(abi.encode(\\\"MAX_PNL_FACTOR_FOR_WITHDRAWALS\\\"));\\n // @dev key for latest ADL at\\n bytes32 public constant LATEST_ADL_AT = keccak256(abi.encode(\\\"LATEST_ADL_AT\\\"));\\n // @dev key for whether ADL is enabled\\n bytes32 public constant IS_ADL_ENABLED = keccak256(abi.encode(\\\"IS_ADL_ENABLED\\\"));\\n // @dev key for funding factor\\n bytes32 public constant FUNDING_FACTOR = keccak256(abi.encode(\\\"FUNDING_FACTOR\\\"));\\n // @dev key for funding exponent factor\\n bytes32 public constant FUNDING_EXPONENT_FACTOR = keccak256(abi.encode(\\\"FUNDING_EXPONENT_FACTOR\\\"));\\n // @dev key for saved funding factor\\n bytes32 public constant SAVED_FUNDING_FACTOR_PER_SECOND = keccak256(abi.encode(\\\"SAVED_FUNDING_FACTOR_PER_SECOND\\\"));\\n // @dev key for funding increase factor\\n bytes32 public constant FUNDING_INCREASE_FACTOR_PER_SECOND = keccak256(abi.encode(\\\"FUNDING_INCREASE_FACTOR_PER_SECOND\\\"));\\n // @dev key for funding decrease factor\\n bytes32 public constant FUNDING_DECREASE_FACTOR_PER_SECOND = keccak256(abi.encode(\\\"FUNDING_DECREASE_FACTOR_PER_SECOND\\\"));\\n // @dev key for min funding factor\\n bytes32 public constant MIN_FUNDING_FACTOR_PER_SECOND = keccak256(abi.encode(\\\"MIN_FUNDING_FACTOR_PER_SECOND\\\"));\\n // @dev key for max funding factor\\n bytes32 public constant MAX_FUNDING_FACTOR_PER_SECOND = keccak256(abi.encode(\\\"MAX_FUNDING_FACTOR_PER_SECOND\\\"));\\n // @dev key for threshold for stable funding\\n bytes32 public constant THRESHOLD_FOR_STABLE_FUNDING = keccak256(abi.encode(\\\"THRESHOLD_FOR_STABLE_FUNDING\\\"));\\n // @dev key for threshold for decrease funding\\n bytes32 public constant THRESHOLD_FOR_DECREASE_FUNDING = keccak256(abi.encode(\\\"THRESHOLD_FOR_DECREASE_FUNDING\\\"));\\n // @dev key for funding fee amount per size\\n bytes32 public constant FUNDING_FEE_AMOUNT_PER_SIZE = keccak256(abi.encode(\\\"FUNDING_FEE_AMOUNT_PER_SIZE\\\"));\\n // @dev key for claimable funding amount per size\\n bytes32 public constant CLAIMABLE_FUNDING_AMOUNT_PER_SIZE = keccak256(abi.encode(\\\"CLAIMABLE_FUNDING_AMOUNT_PER_SIZE\\\"));\\n // @dev key for when funding was last updated at\\n bytes32 public constant FUNDING_UPDATED_AT = keccak256(abi.encode(\\\"FUNDING_UPDATED_AT\\\"));\\n // @dev key for claimable funding amount\\n bytes32 public constant CLAIMABLE_FUNDING_AMOUNT = keccak256(abi.encode(\\\"CLAIMABLE_FUNDING_AMOUNT\\\"));\\n // @dev key for claimable collateral amount\\n bytes32 public constant CLAIMABLE_COLLATERAL_AMOUNT = keccak256(abi.encode(\\\"CLAIMABLE_COLLATERAL_AMOUNT\\\"));\\n // @dev key for claimable collateral factor\\n bytes32 public constant CLAIMABLE_COLLATERAL_FACTOR = keccak256(abi.encode(\\\"CLAIMABLE_COLLATERAL_FACTOR\\\"));\\n // @dev key for claimable collateral reduction factor\\n bytes32 public constant CLAIMABLE_COLLATERAL_REDUCTION_FACTOR = keccak256(abi.encode(\\\"CLAIMABLE_COLLATERAL_REDUCTION_FACTOR\\\"));\\n // @dev key for claimable collateral time divisor\\n bytes32 public constant CLAIMABLE_COLLATERAL_TIME_DIVISOR = keccak256(abi.encode(\\\"CLAIMABLE_COLLATERAL_TIME_DIVISOR\\\"));\\n // @dev key for claimable collateral delay\\n bytes32 public constant CLAIMABLE_COLLATERAL_DELAY = keccak256(abi.encode(\\\"CLAIMABLE_COLLATERAL_DELAY\\\"));\\n // @dev key for claimed collateral amount\\n bytes32 public constant CLAIMED_COLLATERAL_AMOUNT = keccak256(abi.encode(\\\"CLAIMED_COLLATERAL_AMOUNT\\\"));\\n\\n bytes32 public constant OPTIMAL_USAGE_FACTOR = keccak256(abi.encode(\\\"OPTIMAL_USAGE_FACTOR\\\"));\\n bytes32 public constant BASE_BORROWING_FACTOR = keccak256(abi.encode(\\\"BASE_BORROWING_FACTOR\\\"));\\n bytes32 public constant ABOVE_OPTIMAL_USAGE_BORROWING_FACTOR = keccak256(abi.encode(\\\"ABOVE_OPTIMAL_USAGE_BORROWING_FACTOR\\\"));\\n bytes32 public constant BORROWING_FACTOR = keccak256(abi.encode(\\\"BORROWING_FACTOR\\\"));\\n bytes32 public constant BORROWING_EXPONENT_FACTOR = keccak256(abi.encode(\\\"BORROWING_EXPONENT_FACTOR\\\"));\\n bytes32 public constant SKIP_BORROWING_FEE_FOR_SMALLER_SIDE = keccak256(abi.encode(\\\"SKIP_BORROWING_FEE_FOR_SMALLER_SIDE\\\"));\\n bytes32 public constant CUMULATIVE_BORROWING_FACTOR = keccak256(abi.encode(\\\"CUMULATIVE_BORROWING_FACTOR\\\"));\\n bytes32 public constant CUMULATIVE_BORROWING_FACTOR_UPDATED_AT = keccak256(abi.encode(\\\"CUMULATIVE_BORROWING_FACTOR_UPDATED_AT\\\"));\\n bytes32 public constant TOTAL_BORROWING = keccak256(abi.encode(\\\"TOTAL_BORROWING\\\"));\\n\\n bytes32 public constant USE_OPEN_INTEREST_IN_TOKENS_FOR_BALANCE = keccak256(abi.encode(\\\"USE_OPEN_INTEREST_IN_TOKENS_FOR_BALANCE\\\"));\\n\\n // @dev key for affiliate reward\\n bytes32 public constant MIN_AFFILIATE_REWARD_FACTOR = keccak256(abi.encode(\\\"MIN_AFFILIATE_REWARD_FACTOR\\\"));\\n bytes32 public constant AFFILIATE_REWARD = keccak256(abi.encode(\\\"AFFILIATE_REWARD\\\"));\\n // @dev key for max allowed subaccount action count\\n bytes32 public constant MAX_ALLOWED_SUBACCOUNT_ACTION_COUNT = keccak256(abi.encode(\\\"MAX_ALLOWED_SUBACCOUNT_ACTION_COUNT\\\"));\\n bytes32 public constant SUBACCOUNT_EXPIRES_AT = keccak256(abi.encode(\\\"SUBACCOUNT_EXPIRES_AT\\\"));\\n // @dev key for subaccount action count\\n bytes32 public constant SUBACCOUNT_ACTION_COUNT = keccak256(abi.encode(\\\"SUBACCOUNT_ACTION_COUNT\\\"));\\n // @dev key for subaccount auto top up amount\\n bytes32 public constant SUBACCOUNT_AUTO_TOP_UP_AMOUNT = keccak256(abi.encode(\\\"SUBACCOUNT_AUTO_TOP_UP_AMOUNT\\\"));\\n // @dev key for subaccount order action\\n bytes32 public constant SUBACCOUNT_ORDER_ACTION = keccak256(abi.encode(\\\"SUBACCOUNT_ORDER_ACTION\\\"));\\n // @dev key for subaccount integration id\\n bytes32 public constant SUBACCOUNT_INTEGRATION_ID = keccak256(abi.encode(\\\"SUBACCOUNT_INTEGRATION_ID\\\"));\\n // @dev key for subaccount integration id disabled status\\n bytes32 public constant SUBACCOUNT_INTEGRATION_DISABLED = keccak256(abi.encode(\\\"SUBACCOUNT_INTEGRATION_DISABLED\\\"));\\n // @dev key for fee distributor swap order token index\\n bytes32 public constant FEE_DISTRIBUTOR_SWAP_TOKEN_INDEX = keccak256(abi.encode(\\\"FEE_DISTRIBUTOR_SWAP_TOKEN_INDEX\\\"));\\n // @dev key for fee distributor swap fee batch\\n bytes32 public constant FEE_DISTRIBUTOR_SWAP_FEE_BATCH = keccak256(abi.encode(\\\"FEE_DISTRIBUTOR_SWAP_FEE_BATCH\\\"));\\n\\n bytes32 public constant GLV_MAX_MARKET_COUNT = keccak256(abi.encode(\\\"GLV_MAX_MARKET_COUNT\\\"));\\n bytes32 public constant GLV_MAX_MARKET_TOKEN_BALANCE_USD = keccak256(abi.encode(\\\"GLV_MAX_MARKET_TOKEN_BALANCE_USD\\\"));\\n bytes32 public constant GLV_MAX_MARKET_TOKEN_BALANCE_AMOUNT = keccak256(abi.encode(\\\"GLV_MAX_MARKET_TOKEN_BALANCE_AMOUNT\\\"));\\n bytes32 public constant IS_GLV_MARKET_DISABLED = keccak256(abi.encode(\\\"IS_GLV_MARKET_DISABLED\\\"));\\n bytes32 public constant GLV_SHIFT_MAX_LOSS_FACTOR = keccak256(abi.encode(\\\"GLV_SHIFT_MAX_LOSS_FACTOR\\\"));\\n bytes32 public constant GLV_SHIFT_LAST_EXECUTED_AT = keccak256(abi.encode(\\\"GLV_SHIFT_LAST_EXECUTED_AT\\\"));\\n bytes32 public constant GLV_SHIFT_MIN_INTERVAL = keccak256(abi.encode(\\\"GLV_SHIFT_MIN_INTERVAL\\\"));\\n bytes32 public constant MIN_GLV_TOKENS_FOR_FIRST_DEPOSIT = keccak256(abi.encode(\\\"MIN_GLV_TOKENS_FOR_FIRST_DEPOSIT\\\"));\\n\\n // @dev key for disabling automatic parameter updates via ConfigSyncer\\n bytes32 public constant SYNC_CONFIG_FEATURE_DISABLED = keccak256(abi.encode(\\\"SYNC_CONFIG_FEATURE_DISABLED\\\"));\\n // @dev key for disabling all parameter updates for a specific market via ConfigSyncer\\n bytes32 public constant SYNC_CONFIG_MARKET_DISABLED = keccak256(abi.encode(\\\"SYNC_CONFIG_MARKET_DISABLED\\\"));\\n // @dev key for disabling all updates for a specific parameter via ConfigSyncer\\n bytes32 public constant SYNC_CONFIG_PARAMETER_DISABLED = keccak256(abi.encode(\\\"SYNC_CONFIG_PARAMETER_DISABLED\\\"));\\n // @dev key for disabling all updates for a specific market parameter via ConfigSyncer\\n bytes32 public constant SYNC_CONFIG_MARKET_PARAMETER_DISABLED = keccak256(abi.encode(\\\"SYNC_CONFIG_MARKET_PARAMETER_DISABLED\\\"));\\n // @dev key for tracking which updateIds have already been applied by ConfigSyncer\\n bytes32 public constant SYNC_CONFIG_UPDATE_COMPLETED = keccak256(abi.encode(\\\"SYNC_CONFIG_UPDATE_COMPLETED\\\"));\\n // @dev key for the latest updateId that has been applied by ConfigSyncer\\n bytes32 public constant SYNC_CONFIG_LATEST_UPDATE_ID = keccak256(abi.encode(\\\"SYNC_CONFIG_LATEST_UPDATE_ID\\\"));\\n\\n bytes32 public constant CONTRIBUTOR_ACCOUNT_LIST = keccak256(abi.encode(\\\"CONTRIBUTOR_ACCOUNT_LIST\\\"));\\n bytes32 public constant CONTRIBUTOR_TOKEN_LIST = keccak256(abi.encode(\\\"CONTRIBUTOR_TOKEN_LIST\\\"));\\n bytes32 public constant CONTRIBUTOR_TOKEN_AMOUNT = keccak256(abi.encode(\\\"CONTRIBUTOR_TOKEN_AMOUNT\\\"));\\n bytes32 public constant MAX_TOTAL_CONTRIBUTOR_TOKEN_AMOUNT = keccak256(abi.encode(\\\"MAX_TOTAL_CONTRIBUTOR_TOKEN_AMOUNT\\\"));\\n bytes32 public constant CONTRIBUTOR_FUNDING_ACCOUNT = keccak256(abi.encode(\\\"CONTRIBUTOR_FUNDING_ACCOUNT\\\"));\\n bytes32 public constant CUSTOM_CONTRIBUTOR_FUNDING_ACCOUNT = keccak256(abi.encode(\\\"CUSTOM_CONTRIBUTOR_FUNDING_ACCOUNT\\\"));\\n bytes32 public constant CONTRIBUTOR_LAST_PAYMENT_AT = keccak256(abi.encode(\\\"CONTRIBUTOR_LAST_PAYMENT_AT\\\"));\\n bytes32 public constant MIN_CONTRIBUTOR_PAYMENT_INTERVAL = keccak256(abi.encode(\\\"MIN_CONTRIBUTOR_PAYMENT_INTERVAL\\\"));\\n\\n // @dev key for the buyback batch amount used when claiming and swapping fees\\n bytes32 public constant BUYBACK_BATCH_AMOUNT = keccak256(abi.encode(\\\"BUYBACK_BATCH_AMOUNT\\\"));\\n // @dev key for the buyback available fees\\n bytes32 public constant BUYBACK_AVAILABLE_FEE_AMOUNT = keccak256(abi.encode(\\\"BUYBACK_AVAILABLE_FEE_AMOUNT\\\"));\\n // @dev key for the buyback gmx fee factor used in calculating fees by GMX/WNT\\n bytes32 public constant BUYBACK_GMX_FACTOR = keccak256(abi.encode(\\\"BUYBACK_GMX_FACTOR\\\"));\\n // @dev key for the FeeHandler max price impact when buying back fees\\n bytes32 public constant BUYBACK_MAX_PRICE_IMPACT_FACTOR = keccak256(abi.encode(\\\"BUYBACK_MAX_PRICE_IMPACT_FACTOR\\\"));\\n // @dev key for the maximum price delay in seconds when buying back fees\\n bytes32 public constant BUYBACK_MAX_PRICE_AGE = keccak256(abi.encode(\\\"BUYBACK_MAX_PRICE_AGE\\\"));\\n // @dev key for the buyback withdrawable fees\\n bytes32 public constant WITHDRAWABLE_BUYBACK_TOKEN_AMOUNT = keccak256(abi.encode(\\\"WITHDRAWABLE_BUYBACK_TOKEN_AMOUNT\\\"));\\n\\n // @dev key for user's multichain balance\\n bytes32 public constant MULTICHAIN_BALANCE = keccak256(abi.encode(\\\"MULTICHAIN_BALANCE\\\"));\\n // @dev key for the flag if a multichain provider is enabled\\n bytes32 public constant IS_MULTICHAIN_PROVIDER_ENABLED = keccak256(abi.encode(\\\"IS_MULTICHAIN_PROVIDER_ENABLED\\\"));\\n // @dev key for the flag if a multichain endpoint is enabled\\n bytes32 public constant IS_MULTICHAIN_ENDPOINT_ENABLED = keccak256(abi.encode(\\\"IS_MULTICHAIN_ENDPOINT_ENABLED\\\"));\\n // @dev key for the flag if the relay fee is excluded for the caller\\n bytes32 public constant IS_RELAY_FEE_EXCLUDED = keccak256(abi.encode(\\\"IS_RELAY_FEE_EXCLUDED\\\"));\\n // @dev key for the flag if a src chain is enabled\\n bytes32 public constant IS_SRC_CHAIN_ID_ENABLED = keccak256(abi.encode(\\\"IS_SRC_CHAIN_ID_ENABLED\\\"));\\n // @dev key for the last src chain id from which the user last managed his position\\n bytes32 public constant POSITION_LAST_SRC_CHAIN_ID = keccak256(abi.encode(\\\"POSITION_LAST_SRC_CHAIN_ID\\\"));\\n // @dev key for the source chain id mapped from the endpoint id\\n bytes32 public constant EID_TO_SRC_CHAIN_ID = keccak256(abi.encode(\\\"EID_TO_SRC_CHAIN_ID\\\"));\\n\\n // @dev key for the maximum length for data list array of bytes32\\n bytes32 public constant MAX_DATA_LENGTH = keccak256(abi.encode(\\\"MAX_DATA_LENGTH\\\"));\\n // @dev key for the action data\\n bytes32 public constant GMX_DATA_ACTION = keccak256(abi.encode(\\\"GMX_DATA_ACTION\\\"));\\n // @dev key for the claimable fund amount for a specific account and token\\n bytes32 public constant CLAIMABLE_FUNDS_AMOUNT = keccak256(abi.encode(\\\"CLAIMABLE_FUNDS_AMOUNT\\\"));\\n // @dev key for the total claimable amount for a specific token\\n bytes32 public constant TOTAL_CLAIMABLE_FUNDS_AMOUNT = keccak256(abi.encode(\\\"TOTAL_CLAIMABLE_FUNDS_AMOUNT\\\"));\\n // @dev key for the terms for a specific distribution\\n bytes32 public constant CLAIM_TERMS = keccak256(abi.encode(\\\"CLAIM_TERMS\\\"));\\n // @dev key for the terms hash for a specific distribution\\n bytes32 public constant CLAIM_TERMS_BACKREF = keccak256(abi.encode(\\\"CLAIM_TERMS_BACKREF\\\"));\\n\\n // @dev constant for user initiated cancel reason\\n string public constant USER_INITIATED_CANCEL = \\\"USER_INITIATED_CANCEL\\\";\\n\\n // @dev function used to calculate fullKey for a given market parameter\\n // @param baseKey the base key for the market parameter\\n // @param data the additional data for the market parameter\\n function getFullKey(bytes32 baseKey, bytes memory data) internal pure returns (bytes32) {\\n if (data.length == 0) {\\n return baseKey;\\n }\\n\\n return keccak256(bytes.concat(baseKey, data));\\n }\\n\\n // @dev key for the account deposit list\\n // @param account the account for the list\\n function accountDepositListKey(address account) internal pure returns (bytes32) {\\n return keccak256(abi.encode(ACCOUNT_DEPOSIT_LIST, account));\\n }\\n\\n // @dev key for the account withdrawal list\\n // @param account the account for the list\\n function accountWithdrawalListKey(address account) internal pure returns (bytes32) {\\n return keccak256(abi.encode(ACCOUNT_WITHDRAWAL_LIST, account));\\n }\\n\\n // @dev key for the account shift list\\n // @param account the account for the list\\n function accountShiftListKey(address account) internal pure returns (bytes32) {\\n return keccak256(abi.encode(ACCOUNT_SHIFT_LIST, account));\\n }\\n\\n // @dev key for the account glv deposit list\\n // @param account the account for the list\\n function accountGlvDepositListKey(address account) internal pure returns (bytes32) {\\n return keccak256(abi.encode(ACCOUNT_GLV_DEPOSIT_LIST, account));\\n }\\n\\n // @dev key for the account glv deposit list\\n // @param account the account for the list\\n function accountGlvWithdrawalListKey(address account) internal pure returns (bytes32) {\\n return keccak256(abi.encode(ACCOUNT_GLV_WITHDRAWAL_LIST, account));\\n }\\n\\n // @dev key for the glv supported market list\\n // @param glv the glv for the supported market list\\n function glvSupportedMarketListKey(address glv) internal pure returns (bytes32) {\\n return keccak256(abi.encode(GLV_SUPPORTED_MARKET_LIST, glv));\\n }\\n\\n // @dev key for the account position list\\n // @param account the account for the list\\n function accountPositionListKey(address account) internal pure returns (bytes32) {\\n return keccak256(abi.encode(ACCOUNT_POSITION_LIST, account));\\n }\\n\\n // @dev key for the account order list\\n // @param account the account for the list\\n function accountOrderListKey(address account) internal pure returns (bytes32) {\\n return keccak256(abi.encode(ACCOUNT_ORDER_LIST, account));\\n }\\n\\n // @dev key for the subaccount list\\n // @param account the account for the list\\n function subaccountListKey(address account) internal pure returns (bytes32) {\\n return keccak256(abi.encode(SUBACCOUNT_LIST, account));\\n }\\n\\n // @dev key for the auto cancel order list\\n // @param position key the position key for the list\\n function autoCancelOrderListKey(bytes32 positionKey) internal pure returns (bytes32) {\\n return keccak256(abi.encode(AUTO_CANCEL_ORDER_LIST, positionKey));\\n }\\n\\n // @dev key for the claimable fee amount\\n // @param market the market for the fee\\n // @param token the token for the fee\\n function claimableFeeAmountKey(address market, address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(CLAIMABLE_FEE_AMOUNT, market, token));\\n }\\n\\n // @dev key for the claimable ui fee amount\\n // @param market the market for the fee\\n // @param token the token for the fee\\n // @param account the account that can claim the ui fee\\n function claimableUiFeeAmountKey(address market, address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(CLAIMABLE_UI_FEE_AMOUNT, market, token));\\n }\\n\\n // @dev key for the claimable ui fee amount for account\\n // @param market the market for the fee\\n // @param token the token for the fee\\n // @param account the account that can claim the ui fee\\n function claimableUiFeeAmountKey(address market, address token, address account) internal pure returns (bytes32) {\\n return keccak256(abi.encode(CLAIMABLE_UI_FEE_AMOUNT, market, token, account));\\n }\\n\\n // @dev key for deposit gas limit\\n // @param singleToken whether a single token or pair tokens are being deposited\\n // @return key for deposit gas limit\\n function depositGasLimitKey() internal pure returns (bytes32) {\\n return DEPOSIT_GAS_LIMIT;\\n }\\n\\n // @dev key for withdrawal gas limit\\n // @return key for withdrawal gas limit\\n function withdrawalGasLimitKey() internal pure returns (bytes32) {\\n return WITHDRAWAL_GAS_LIMIT;\\n }\\n\\n // @dev key for shift gas limit\\n // @return key for shift gas limit\\n function shiftGasLimitKey() internal pure returns (bytes32) {\\n return SHIFT_GAS_LIMIT;\\n }\\n\\n function glvDepositGasLimitKey() internal pure returns (bytes32) {\\n return GLV_DEPOSIT_GAS_LIMIT;\\n }\\n\\n function glvWithdrawalGasLimitKey() internal pure returns (bytes32) {\\n return GLV_WITHDRAWAL_GAS_LIMIT;\\n }\\n\\n function glvShiftGasLimitKey() internal pure returns (bytes32) {\\n return GLV_SHIFT_GAS_LIMIT;\\n }\\n\\n function glvPerMarketGasLimitKey() internal pure returns (bytes32) {\\n return GLV_PER_MARKET_GAS_LIMIT;\\n }\\n\\n // @dev key for single swap gas limit\\n // @return key for single swap gas limit\\n function singleSwapGasLimitKey() internal pure returns (bytes32) {\\n return SINGLE_SWAP_GAS_LIMIT;\\n }\\n\\n // @dev key for increase order gas limit\\n // @return key for increase order gas limit\\n function increaseOrderGasLimitKey() internal pure returns (bytes32) {\\n return INCREASE_ORDER_GAS_LIMIT;\\n }\\n\\n // @dev key for decrease order gas limit\\n // @return key for decrease order gas limit\\n function decreaseOrderGasLimitKey() internal pure returns (bytes32) {\\n return DECREASE_ORDER_GAS_LIMIT;\\n }\\n\\n // @dev key for swap order gas limit\\n // @return key for swap order gas limit\\n function swapOrderGasLimitKey() internal pure returns (bytes32) {\\n return SWAP_ORDER_GAS_LIMIT;\\n }\\n\\n function swapPathMarketFlagKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n SWAP_PATH_MARKET_FLAG,\\n market\\n ));\\n }\\n\\n // @dev key for whether create glv deposit is disabled\\n // @param the create deposit module\\n // @return key for whether create deposit is disabled\\n function createGlvDepositFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CREATE_GLV_DEPOSIT_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether cancel glv deposit is disabled\\n // @param the cancel deposit module\\n // @return key for whether cancel deposit is disabled\\n function cancelGlvDepositFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CANCEL_GLV_DEPOSIT_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether execute glv deposit is disabled\\n // @param the execute deposit module\\n // @return key for whether execute deposit is disabled\\n function executeGlvDepositFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n EXECUTE_GLV_DEPOSIT_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether create glv withdrawal is disabled\\n // @param the create withdrawal module\\n // @return key for whether create withdrawal is disabled\\n function createGlvWithdrawalFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CREATE_GLV_WITHDRAWAL_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether cancel glv withdrawal is disabled\\n // @param the cancel withdrawal module\\n // @return key for whether cancel withdrawal is disabled\\n function cancelGlvWithdrawalFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CANCEL_GLV_WITHDRAWAL_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether execute glv withdrawal is disabled\\n // @param the execute withdrawal module\\n // @return key for whether execute withdrawal is disabled\\n function executeGlvWithdrawalFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n EXECUTE_GLV_WITHDRAWAL_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n function createGlvShiftFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CREATE_GLV_SHIFT_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n function executeGlvShiftFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n EXECUTE_GLV_SHIFT_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n function jitFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n JIT_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n\\n // @dev key for whether create deposit is disabled\\n // @param the create deposit module\\n // @return key for whether create deposit is disabled\\n function createDepositFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CREATE_DEPOSIT_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether cancel deposit is disabled\\n // @param the cancel deposit module\\n // @return key for whether cancel deposit is disabled\\n function cancelDepositFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CANCEL_DEPOSIT_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether execute deposit is disabled\\n // @param the execute deposit module\\n // @return key for whether execute deposit is disabled\\n function executeDepositFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n EXECUTE_DEPOSIT_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether create withdrawal is disabled\\n // @param the create withdrawal module\\n // @return key for whether create withdrawal is disabled\\n function createWithdrawalFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CREATE_WITHDRAWAL_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether cancel withdrawal is disabled\\n // @param the cancel withdrawal module\\n // @return key for whether cancel withdrawal is disabled\\n function cancelWithdrawalFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CANCEL_WITHDRAWAL_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether execute withdrawal is disabled\\n // @param the execute withdrawal module\\n // @return key for whether execute withdrawal is disabled\\n function executeWithdrawalFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n EXECUTE_WITHDRAWAL_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether execute atomic withdrawal is disabled\\n // @param the execute atomic withdrawal module\\n // @return key for whether execute atomic withdrawal is disabled\\n function executeAtomicWithdrawalFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n EXECUTE_ATOMIC_WITHDRAWAL_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether create shift is disabled\\n // @param the create shift module\\n // @return key for whether create shift is disabled\\n function createShiftFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CREATE_SHIFT_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether cancel shift is disabled\\n // @param the cancel shift module\\n // @return key for whether cancel shift is disabled\\n function cancelShiftFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CANCEL_SHIFT_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether execute shift is disabled\\n // @param the execute shift module\\n // @return key for whether execute shift is disabled\\n function executeShiftFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n EXECUTE_SHIFT_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether create order is disabled\\n // @param the create order module\\n // @return key for whether create order is disabled\\n function createOrderFeatureDisabledKey(address module, uint256 orderType) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CREATE_ORDER_FEATURE_DISABLED,\\n module,\\n orderType\\n ));\\n }\\n\\n // @dev key for whether execute order is disabled\\n // @param the execute order module\\n // @return key for whether execute order is disabled\\n function executeOrderFeatureDisabledKey(address module, uint256 orderType) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n EXECUTE_ORDER_FEATURE_DISABLED,\\n module,\\n orderType\\n ));\\n }\\n\\n // @dev key for whether execute adl is disabled\\n // @param the execute adl module\\n // @return key for whether execute adl is disabled\\n function executeAdlFeatureDisabledKey(address module, uint256 orderType) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n EXECUTE_ADL_FEATURE_DISABLED,\\n module,\\n orderType\\n ));\\n }\\n\\n // @dev key for whether update order is disabled\\n // @param the update order module\\n // @return key for whether update order is disabled\\n function updateOrderFeatureDisabledKey(address module, uint256 orderType) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n UPDATE_ORDER_FEATURE_DISABLED,\\n module,\\n orderType\\n ));\\n }\\n\\n // @dev key for whether cancel order is disabled\\n // @param the cancel order module\\n // @return key for whether cancel order is disabled\\n function cancelOrderFeatureDisabledKey(address module, uint256 orderType) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CANCEL_ORDER_FEATURE_DISABLED,\\n module,\\n orderType\\n ));\\n }\\n\\n // @dev key for whether claim funding fees is disabled\\n // @param the claim funding fees module\\n function claimFundingFeesFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CLAIM_FUNDING_FEES_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether claim colltareral is disabled\\n // @param the claim funding fees module\\n function claimCollateralFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CLAIM_COLLATERAL_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether claim affiliate rewards is disabled\\n // @param the claim affiliate rewards module\\n function claimAffiliateRewardsFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CLAIM_AFFILIATE_REWARDS_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether claim ui fees is disabled\\n // @param the claim ui fees module\\n function claimUiFeesFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CLAIM_UI_FEES_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether subaccounts are disabled\\n // @param the subaccount module\\n function subaccountFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n SUBACCOUNT_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether subaccounts are disabled\\n // @param the gasless module\\n function gaslessFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n GASLESS_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n function generalClaimFeatureDisabled(uint256 distributionId) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n GENERAL_CLAIM_FEATURE_DISABLED,\\n distributionId\\n ));\\n }\\n\\n // @dev key for ui fee factor\\n // @param account the fee receiver account\\n // @return key for ui fee factor\\n function uiFeeFactorKey(address account) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n UI_FEE_FACTOR,\\n account\\n ));\\n }\\n\\n // @dev key for whether an oracle provider is enabled\\n // @param provider the oracle provider\\n // @return key for whether an oracle provider is enabled\\n function isOracleProviderEnabledKey(address provider) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n IS_ORACLE_PROVIDER_ENABLED,\\n provider\\n ));\\n }\\n\\n // @dev key for whether an oracle provider is allowed to be used for atomic actions\\n // @param provider the oracle provider\\n // @return key for whether an oracle provider is allowed to be used for atomic actions\\n function isAtomicOracleProviderKey(address provider) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n IS_ATOMIC_ORACLE_PROVIDER,\\n provider\\n ));\\n }\\n\\n // @dev key for oracle timestamp adjustment\\n // @param provider the oracle provider\\n // @param token the token\\n // @return key for oracle timestamp adjustment\\n function oracleTimestampAdjustmentKey(address provider, address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n ORACLE_TIMESTAMP_ADJUSTMENT,\\n provider,\\n token\\n ));\\n }\\n\\n function oracleProviderForTokenKey(address oracle, address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n ORACLE_PROVIDER_FOR_TOKEN,\\n oracle,\\n token\\n ));\\n }\\n\\n function oracleProviderForTokenKey(address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n ORACLE_PROVIDER_FOR_TOKEN,\\n token\\n ));\\n }\\n\\n // @dev key for oracle provider update time\\n // @param token the token\\n // @param provider address\\n // @return key for oracle provider updated time\\n function oracleProviderUpdatedAt(address token, address provider) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n ORACLE_PROVIDER_UPDATED_AT,\\n token,\\n provider\\n ));\\n }\\n\\n // @dev key for gas to forward for token transfer\\n // @param the token to check\\n // @return key for gas to forward for token transfer\\n function tokenTransferGasLimit(address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n TOKEN_TRANSFER_GAS_LIMIT,\\n token\\n ));\\n }\\n\\n // @dev the default callback contract\\n // @param account the user's account\\n // @param market the address of the market\\n // @param callbackContract the callback contract\\n function savedCallbackContract(address account, address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n SAVED_CALLBACK_CONTRACT,\\n account,\\n market\\n ));\\n }\\n\\n // @dev the min collateral factor key\\n // @param the market for the min collateral factor\\n function minCollateralFactorKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MIN_COLLATERAL_FACTOR,\\n market\\n ));\\n }\\n\\n // @dev the min collateral factor for open interest multiplier key\\n // @param the market for the factor\\n function minCollateralFactorForOpenInterestMultiplierKey(address market, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MIN_COLLATERAL_FACTOR_FOR_OPEN_INTEREST_MULTIPLIER,\\n market,\\n isLong\\n ));\\n }\\n\\n // @dev the min collateral factor for open interest multiplier key\\n // @param the market for the factor\\n function minCollateralFactorForLiquidationKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MIN_COLLATERAL_FACTOR_FOR_LIQUIDATION,\\n market\\n ));\\n }\\n\\n // @dev the key for the virtual token id\\n // @param the token to get the virtual id for\\n function virtualTokenIdKey(address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n VIRTUAL_TOKEN_ID,\\n token\\n ));\\n }\\n\\n // @dev the key for the virtual market id\\n // @param the market to get the virtual id for\\n function virtualMarketIdKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n VIRTUAL_MARKET_ID,\\n market\\n ));\\n }\\n\\n function virtualInventoryForPositionsKey(bytes32 virtualTokenId) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n VIRTUAL_INVENTORY_FOR_POSITIONS,\\n virtualTokenId\\n ));\\n }\\n\\n function virtualInventoryForPositionsInTokensKey(bytes32 virtualTokenId) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n VIRTUAL_INVENTORY_FOR_POSITIONS_IN_TOKENS,\\n virtualTokenId\\n ));\\n }\\n\\n // @dev the key for the virtual inventory for swaps\\n // @param the virtualMarketId the virtual market id\\n // @param the token to check the inventory for\\n function virtualInventoryForSwapsKey(bytes32 virtualMarketId, bool isLongToken) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n VIRTUAL_INVENTORY_FOR_SWAPS,\\n virtualMarketId,\\n isLongToken\\n ));\\n }\\n\\n // @dev key for position impact factor\\n // @param market the market address to check\\n // @param isPositive whether the impact is positive or negative\\n // @return key for position impact factor\\n function positionImpactFactorKey(address market, bool isPositive) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n POSITION_IMPACT_FACTOR,\\n market,\\n isPositive\\n ));\\n }\\n\\n // @dev key for position impact exponent factor\\n // @param market the market address to check\\n // @return key for position impact exponent factor\\n function positionImpactExponentFactorKey(address market, bool isPositive) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n POSITION_IMPACT_EXPONENT_FACTOR,\\n market,\\n isPositive\\n ));\\n }\\n\\n // @dev key for the max position impact factor\\n // @param market the market address to check\\n // @return key for the max position impact factor\\n function maxPositionImpactFactorKey(address market, bool isPositive) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MAX_POSITION_IMPACT_FACTOR,\\n market,\\n isPositive\\n ));\\n }\\n\\n // @dev key for the max position impact factor for liquidations\\n // @param market the market address to check\\n // @return key for the max position impact factor\\n function maxPositionImpactFactorForLiquidationsKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MAX_POSITION_IMPACT_FACTOR_FOR_LIQUIDATIONS,\\n market\\n ));\\n }\\n\\n // @dev key for position fee factor\\n // @param market the market address to check\\n // @param balanceWasImproved whether the fee is for an action that has improved the balance\\n // @return key for position fee factor\\n function positionFeeFactorKey(address market, bool balanceWasImproved) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n POSITION_FEE_FACTOR,\\n market,\\n balanceWasImproved\\n ));\\n }\\n\\n // @dev key for pro trader's tier\\n function proTraderTierKey(address account) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n PRO_TRADER_TIER,\\n account\\n ));\\n }\\n\\n\\n // @dev key for pro discount factor for specific tier\\n function proDiscountFactorKey(uint256 proTier) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n PRO_DISCOUNT_FACTOR,\\n proTier\\n ));\\n }\\n\\n // @dev key for liquidation fee factor\\n // @param market the market address to check\\n // @return key for liquidation fee factor\\n function liquidationFeeFactorKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n LIQUIDATION_FEE_FACTOR,\\n market\\n ));\\n }\\n\\n // @dev key for swap impact factor\\n // @param market the market address to check\\n // @param isPositive whether the impact is positive or negative\\n // @return key for swap impact factor\\n function swapImpactFactorKey(address market, bool isPositive) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n SWAP_IMPACT_FACTOR,\\n market,\\n isPositive\\n ));\\n }\\n\\n // @dev key for swap impact exponent factor\\n // @param market the market address to check\\n // @return key for swap impact exponent factor\\n function swapImpactExponentFactorKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n SWAP_IMPACT_EXPONENT_FACTOR,\\n market\\n ));\\n }\\n\\n\\n // @dev key for swap fee factor\\n // @param market the market address to check\\n // @param balanceWasImproved whether the fee is for an action that has improved the balance\\n // @return key for swap fee factor\\n function swapFeeFactorKey(address market, bool balanceWasImproved) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n SWAP_FEE_FACTOR,\\n market,\\n balanceWasImproved\\n ));\\n }\\n\\n // @dev key for atomic swap fee factor\\n // @param market the market address to check\\n // @return key for atomic swap fee factor\\n function atomicSwapFeeFactorKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n ATOMIC_SWAP_FEE_FACTOR,\\n market\\n ));\\n }\\n\\n // @dev key for atomic withdrawal fee factor\\n // @param market the market address to check\\n // @return key for atomic withdrawal fee factor\\n function atomicWithdrawalFeeFactorKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n ATOMIC_WITHDRAWAL_FEE_FACTOR,\\n market\\n ));\\n }\\n\\n // @dev key for deposit fee factor\\n // @param balanceWasImproved whether the fee is for an action that has improved the balance\\n // @return key for deposit fee factor\\n function depositFeeFactorKey(address market, bool balanceWasImproved) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n DEPOSIT_FEE_FACTOR,\\n market,\\n balanceWasImproved\\n ));\\n }\\n\\n // @dev key for withdrawal fee factor\\n // @param market the market address to check\\n // @param balanceWasImproved whether the fee is for an action that has improved the balance\\n // @return key for withdrawal fee factor\\n function withdrawalFeeFactorKey(address market, bool balanceWasImproved) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n WITHDRAWAL_FEE_FACTOR,\\n market,\\n balanceWasImproved\\n ));\\n }\\n\\n // @dev key for oracle type\\n // @param token the token to check\\n // @return key for oracle type\\n function oracleTypeKey(address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n ORACLE_TYPE,\\n token\\n ));\\n }\\n\\n // @dev key for open interest\\n // @param market the market to check\\n // @param collateralToken the collateralToken to check\\n // @param isLong whether to check the long or short open interest\\n // @return key for open interest\\n function openInterestKey(address market, address collateralToken, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n OPEN_INTEREST,\\n market,\\n collateralToken,\\n isLong\\n ));\\n }\\n\\n // @dev key for open interest in tokens\\n // @param market the market to check\\n // @param collateralToken the collateralToken to check\\n // @param isLong whether to check the long or short open interest\\n // @return key for open interest in tokens\\n function openInterestInTokensKey(address market, address collateralToken, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n OPEN_INTEREST_IN_TOKENS,\\n market,\\n collateralToken,\\n isLong\\n ));\\n }\\n\\n // @dev key for collateral sum for a market\\n // @param market the market to check\\n // @param collateralToken the collateralToken to check\\n // @param isLong whether to check the long or short open interest\\n // @return key for collateral sum\\n function collateralSumKey(address market, address collateralToken, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n COLLATERAL_SUM,\\n market,\\n collateralToken,\\n isLong\\n ));\\n }\\n\\n function maxCollateralSumKey(address market, address collateralToken, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MAX_COLLATERAL_SUM,\\n market,\\n collateralToken,\\n isLong\\n ));\\n }\\n\\n // @dev key for amount of tokens in a market's pool\\n // @param market the market to check\\n // @param token the token to check\\n // @return key for amount of tokens in a market's pool\\n function poolAmountKey(address market, address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n POOL_AMOUNT,\\n market,\\n token\\n ));\\n }\\n\\n // @dev the key for the max amount of pool tokens\\n // @param market the market for the pool\\n // @param token the token for the pool\\n function maxPoolAmountKey(address market, address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MAX_POOL_AMOUNT,\\n market,\\n token\\n ));\\n }\\n\\n // @dev the key for the max usd of pool tokens for deposits\\n // @param market the market for the pool\\n // @param token the token for the pool\\n function maxPoolUsdForDepositKey(address market, address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MAX_POOL_USD_FOR_DEPOSIT,\\n market,\\n token\\n ));\\n }\\n\\n // @dev the key for the max open interest\\n // @param market the market for the pool\\n // @param isLong whether the key is for the long or short side\\n function maxOpenInterestKey(address market, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MAX_OPEN_INTEREST,\\n market,\\n isLong\\n ));\\n }\\n\\n // @dev key for amount of tokens in a market's position impact pool\\n // @param market the market to check\\n // @return key for amount of tokens in a market's position impact pool\\n function positionImpactPoolAmountKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n POSITION_IMPACT_POOL_AMOUNT,\\n market\\n ));\\n }\\n\\n function lentPositionImpactPoolAmountKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n LENT_POSITION_IMPACT_POOL_AMOUNT,\\n market\\n ));\\n }\\n\\n function maxLendableImpactFactorKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MAX_LENDABLE_IMPACT_FACTOR,\\n market\\n ));\\n }\\n\\n function maxLendableImpactFactorForWithdrawalsKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MAX_LENDABLE_IMPACT_FACTOR_FOR_WITHDRAWALS,\\n market\\n ));\\n }\\n\\n function maxLendableImpactUsdKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MAX_LENDABLE_IMPACT_USD,\\n market\\n ));\\n }\\n\\n function totalPendingImpactAmountKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n TOTAL_PENDING_IMPACT_AMOUNT,\\n market\\n ));\\n }\\n\\n // @dev key for min amount of tokens in a market's position impact pool\\n // @param market the market to check\\n // @return key for min amount of tokens in a market's position impact pool\\n function minPositionImpactPoolAmountKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MIN_POSITION_IMPACT_POOL_AMOUNT,\\n market\\n ));\\n }\\n\\n // @dev key for position impact pool distribution rate\\n // @param market the market to check\\n // @return key for position impact pool distribution rate\\n function positionImpactPoolDistributionRateKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n POSITION_IMPACT_POOL_DISTRIBUTION_RATE,\\n market\\n ));\\n }\\n\\n // @dev key for position impact pool distributed at\\n // @param market the market to check\\n // @return key for position impact pool distributed at\\n function positionImpactPoolDistributedAtKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n POSITION_IMPACT_POOL_DISTRIBUTED_AT,\\n market\\n ));\\n }\\n\\n // @dev key for amount of tokens in a market's swap impact pool\\n // @param market the market to check\\n // @param token the token to check\\n // @return key for amount of tokens in a market's swap impact pool\\n function swapImpactPoolAmountKey(address market, address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n SWAP_IMPACT_POOL_AMOUNT,\\n market,\\n token\\n ));\\n }\\n\\n // @dev key for reserve factor\\n // @param market the market to check\\n // @param isLong whether to get the key for the long or short side\\n // @return key for reserve factor\\n function reserveFactorKey(address market, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n RESERVE_FACTOR,\\n market,\\n isLong\\n ));\\n }\\n\\n // @dev key for open interest reserve factor\\n // @param market the market to check\\n // @param isLong whether to get the key for the long or short side\\n // @return key for open interest reserve factor\\n function openInterestReserveFactorKey(address market, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n OPEN_INTEREST_RESERVE_FACTOR,\\n market,\\n isLong\\n ));\\n }\\n\\n // @dev key for max pnl factor\\n // @param market the market to check\\n // @param isLong whether to get the key for the long or short side\\n // @return key for max pnl factor\\n function maxPnlFactorKey(bytes32 pnlFactorType, address market, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MAX_PNL_FACTOR,\\n pnlFactorType,\\n market,\\n isLong\\n ));\\n }\\n\\n // @dev the key for min PnL factor after ADL\\n // @param market the market for the pool\\n // @param isLong whether the key is for the long or short side\\n function minPnlFactorAfterAdlKey(address market, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MIN_PNL_FACTOR_AFTER_ADL,\\n market,\\n isLong\\n ));\\n }\\n\\n // @dev key for latest adl time\\n // @param market the market to check\\n // @param isLong whether to get the key for the long or short side\\n // @return key for latest adl time\\n function latestAdlAtKey(address market, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n LATEST_ADL_AT,\\n market,\\n isLong\\n ));\\n }\\n\\n // @dev key for whether adl is enabled\\n // @param market the market to check\\n // @param isLong whether to get the key for the long or short side\\n // @return key for whether adl is enabled\\n function isAdlEnabledKey(address market, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n IS_ADL_ENABLED,\\n market,\\n isLong\\n ));\\n }\\n\\n // @dev key for funding factor\\n // @param market the market to check\\n // @return key for funding factor\\n function fundingFactorKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n FUNDING_FACTOR,\\n market\\n ));\\n }\\n\\n // @dev the key for funding exponent\\n // @param market the market for the pool\\n function fundingExponentFactorKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n FUNDING_EXPONENT_FACTOR,\\n market\\n ));\\n }\\n\\n // @dev the key for saved funding factor\\n // @param market the market for the pool\\n function savedFundingFactorPerSecondKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n SAVED_FUNDING_FACTOR_PER_SECOND,\\n market\\n ));\\n }\\n\\n // @dev the key for funding increase factor\\n // @param market the market for the pool\\n function fundingIncreaseFactorPerSecondKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n FUNDING_INCREASE_FACTOR_PER_SECOND,\\n market\\n ));\\n }\\n\\n // @dev the key for funding decrease factor\\n // @param market the market for the pool\\n function fundingDecreaseFactorPerSecondKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n FUNDING_DECREASE_FACTOR_PER_SECOND,\\n market\\n ));\\n }\\n\\n // @dev the key for min funding factor\\n // @param market the market for the pool\\n function minFundingFactorPerSecondKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MIN_FUNDING_FACTOR_PER_SECOND,\\n market\\n ));\\n }\\n\\n // @dev the key for max funding factor\\n // @param market the market for the pool\\n function maxFundingFactorPerSecondKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MAX_FUNDING_FACTOR_PER_SECOND,\\n market\\n ));\\n }\\n\\n // @dev the key for threshold for stable funding\\n // @param market the market for the pool\\n function thresholdForStableFundingKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n THRESHOLD_FOR_STABLE_FUNDING,\\n market\\n ));\\n }\\n\\n // @dev the key for threshold for decreasing funding\\n // @param market the market for the pool\\n function thresholdForDecreaseFundingKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n THRESHOLD_FOR_DECREASE_FUNDING,\\n market\\n ));\\n }\\n\\n // @dev key for funding fee amount per size\\n // @param market the market to check\\n // @param collateralToken the collateralToken to get the key for\\n // @param isLong whether to get the key for the long or short side\\n // @return key for funding fee amount per size\\n function fundingFeeAmountPerSizeKey(address market, address collateralToken, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n FUNDING_FEE_AMOUNT_PER_SIZE,\\n market,\\n collateralToken,\\n isLong\\n ));\\n }\\n\\n // @dev key for claimabel funding amount per size\\n // @param market the market to check\\n // @param collateralToken the collateralToken to get the key for\\n // @param isLong whether to get the key for the long or short side\\n // @return key for claimable funding amount per size\\n function claimableFundingAmountPerSizeKey(address market, address collateralToken, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CLAIMABLE_FUNDING_AMOUNT_PER_SIZE,\\n market,\\n collateralToken,\\n isLong\\n ));\\n }\\n\\n // @dev key for when funding was last updated\\n // @param market the market to check\\n // @return key for when funding was last updated\\n function fundingUpdatedAtKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n FUNDING_UPDATED_AT,\\n market\\n ));\\n }\\n\\n // @dev key for claimable funding amount\\n // @param market the market to check\\n // @param token the token to check\\n // @return key for claimable funding amount\\n function claimableFundingAmountKey(address market, address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CLAIMABLE_FUNDING_AMOUNT,\\n market,\\n token\\n ));\\n }\\n\\n // @dev key for claimable funding amount by account\\n // @param market the market to check\\n // @param token the token to check\\n // @param account the account to check\\n // @return key for claimable funding amount\\n function claimableFundingAmountKey(address market, address token, address account) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CLAIMABLE_FUNDING_AMOUNT,\\n market,\\n token,\\n account\\n ));\\n }\\n\\n // @dev key for claimable collateral amount\\n // @param market the market to check\\n // @param token the token to check\\n // @param account the account to check\\n // @param timeKey the time key for the claimable amount\\n // @return key for claimable funding amount\\n function claimableCollateralAmountKey(address market, address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CLAIMABLE_COLLATERAL_AMOUNT,\\n market,\\n token\\n ));\\n }\\n\\n // @dev key for claimable collateral amount for a timeKey for an account\\n // @param market the market to check\\n // @param token the token to check\\n // @param account the account to check\\n // @param timeKey the time key for the claimable amount\\n // @return key for claimable funding amount\\n function claimableCollateralAmountKey(address market, address token, uint256 timeKey, address account) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CLAIMABLE_COLLATERAL_AMOUNT,\\n market,\\n token,\\n timeKey,\\n account\\n ));\\n }\\n\\n // @dev key for claimable collateral factor for a timeKey\\n // @param market the market to check\\n // @param token the token to check\\n // @param timeKey the time key for the claimable amount\\n // @return key for claimable funding amount\\n function claimableCollateralFactorKey(address market, address token, uint256 timeKey) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CLAIMABLE_COLLATERAL_FACTOR,\\n market,\\n token,\\n timeKey\\n ));\\n }\\n\\n // @dev key for claimable collateral factor for a timeKey for an account\\n // @param market the market to check\\n // @param token the token to check\\n // @param timeKey the time key for the claimable amount\\n // @param account the account to check\\n // @return key for claimable funding amount\\n function claimableCollateralFactorKey(address market, address token, uint256 timeKey, address account) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CLAIMABLE_COLLATERAL_FACTOR,\\n market,\\n token,\\n timeKey,\\n account\\n ));\\n }\\n\\n // @dev key for claimable collateral reduction factor for a timeKey for an account\\n // @param market the market to check\\n // @param token the token to check\\n // @param timeKey the time key for the claimable factor\\n // @param account the account to check\\n // @return key for claimable funding factor\\n function claimableCollateralReductionFactorKey(address market, address token, uint256 timeKey, address account) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CLAIMABLE_COLLATERAL_REDUCTION_FACTOR,\\n market,\\n token,\\n timeKey,\\n account\\n ));\\n }\\n\\n // @dev key for claimable collateral factor\\n // @param market the market to check\\n // @param token the token to check\\n // @param account the account to check\\n // @param timeKey the time key for the claimable amount\\n // @return key for claimable funding amount\\n function claimedCollateralAmountKey(address market, address token, uint256 timeKey, address account) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CLAIMED_COLLATERAL_AMOUNT,\\n market,\\n token,\\n timeKey,\\n account\\n ));\\n }\\n\\n // @dev key for optimal usage factor\\n // @param market the market to check\\n // @param isLong whether to get the key for the long or short side\\n // @return key for optimal usage factor\\n function optimalUsageFactorKey(address market, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n OPTIMAL_USAGE_FACTOR,\\n market,\\n isLong\\n ));\\n }\\n\\n // @dev key for base borrowing factor\\n // @param market the market to check\\n // @param isLong whether to get the key for the long or short side\\n // @return key for base borrowing factor\\n function baseBorrowingFactorKey(address market, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n BASE_BORROWING_FACTOR,\\n market,\\n isLong\\n ));\\n }\\n\\n // @dev key for above optimal usage borrowing factor\\n // @param market the market to check\\n // @param isLong whether to get the key for the long or short side\\n // @return key for above optimal usage borrowing factor\\n function aboveOptimalUsageBorrowingFactorKey(address market, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n ABOVE_OPTIMAL_USAGE_BORROWING_FACTOR,\\n market,\\n isLong\\n ));\\n }\\n\\n // @dev key for borrowing factor\\n // @param market the market to check\\n // @param isLong whether to get the key for the long or short side\\n // @return key for borrowing factor\\n function borrowingFactorKey(address market, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n BORROWING_FACTOR,\\n market,\\n isLong\\n ));\\n }\\n\\n // @dev the key for borrowing exponent\\n // @param market the market for the pool\\n // @param isLong whether to get the key for the long or short side\\n function borrowingExponentFactorKey(address market, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n BORROWING_EXPONENT_FACTOR,\\n market,\\n isLong\\n ));\\n }\\n\\n // @dev key for cumulative borrowing factor\\n // @param market the market to check\\n // @param isLong whether to get the key for the long or short side\\n // @return key for cumulative borrowing factor\\n function cumulativeBorrowingFactorKey(address market, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CUMULATIVE_BORROWING_FACTOR,\\n market,\\n isLong\\n ));\\n }\\n\\n // @dev key for cumulative borrowing factor updated at\\n // @param market the market to check\\n // @param isLong whether to get the key for the long or short side\\n // @return key for cumulative borrowing factor updated at\\n function cumulativeBorrowingFactorUpdatedAtKey(address market, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CUMULATIVE_BORROWING_FACTOR_UPDATED_AT,\\n market,\\n isLong\\n ));\\n }\\n\\n // @dev key for total borrowing amount\\n // @param market the market to check\\n // @param isLong whether to get the key for the long or short side\\n // @return key for total borrowing amount\\n function totalBorrowingKey(address market, bool isLong) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n TOTAL_BORROWING,\\n market,\\n isLong\\n ));\\n }\\n\\n // @dev key for affiliate reward amount\\n // @param market the market to check\\n // @param token the token to get the key for\\n // @param account the account to get the key for\\n // @return key for affiliate reward amount\\n function affiliateRewardKey(address market, address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n AFFILIATE_REWARD,\\n market,\\n token\\n ));\\n }\\n\\n function minAffiliateRewardFactorKey(uint256 referralTierLevel) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MIN_AFFILIATE_REWARD_FACTOR,\\n referralTierLevel\\n ));\\n }\\n\\n function maxAllowedSubaccountActionCountKey(address account, address subaccount, bytes32 actionType) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MAX_ALLOWED_SUBACCOUNT_ACTION_COUNT,\\n account,\\n subaccount,\\n actionType\\n ));\\n }\\n\\n function subaccountExpiresAtKey(address account, address subaccount, bytes32 actionType) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n SUBACCOUNT_EXPIRES_AT,\\n account,\\n subaccount,\\n actionType\\n ));\\n }\\n\\n function subaccountActionCountKey(address account, address subaccount, bytes32 actionType) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n SUBACCOUNT_ACTION_COUNT,\\n account,\\n subaccount,\\n actionType\\n ));\\n }\\n\\n function subaccountAutoTopUpAmountKey(address account, address subaccount) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n SUBACCOUNT_AUTO_TOP_UP_AMOUNT,\\n account,\\n subaccount\\n ));\\n }\\n\\n function subaccountIntegrationIdKey(address account, address subaccount) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n SUBACCOUNT_INTEGRATION_ID,\\n account,\\n subaccount\\n ));\\n }\\n\\n function subaccountIntegrationDisabledKey(bytes32 integrationId) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n SUBACCOUNT_INTEGRATION_DISABLED,\\n integrationId\\n ));\\n }\\n\\n // @dev key for affiliate reward amount for an account\\n // @param market the market to check\\n // @param token the token to get the key for\\n // @param account the account to get the key for\\n // @return key for affiliate reward amount\\n function affiliateRewardKey(address market, address token, address account) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n AFFILIATE_REWARD,\\n market,\\n token,\\n account\\n ));\\n }\\n\\n // @dev key for is market disabled\\n // @param market the market to check\\n // @return key for is market disabled\\n function isMarketDisabledKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n IS_MARKET_DISABLED,\\n market\\n ));\\n }\\n\\n // @dev key for min market tokens for first deposit\\n // @param market the market to check\\n // @return key for min market tokens for first deposit\\n function minMarketTokensForFirstDepositKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MIN_MARKET_TOKENS_FOR_FIRST_DEPOSIT,\\n market\\n ));\\n }\\n\\n // @dev key for price feed address\\n // @param token the token to get the key for\\n // @return key for price feed address\\n function priceFeedKey(address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n PRICE_FEED,\\n token\\n ));\\n }\\n\\n // @dev key for data stream feed ID\\n // @param token the token to get the key for\\n // @return key for data stream feed ID\\n function dataStreamIdKey(address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n DATA_STREAM_ID,\\n token\\n ));\\n }\\n\\n function edgeDataStreamIdKey(address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n EDGE_DATA_STREAM_ID,\\n token\\n ));\\n }\\n\\n function edgeDataStreamTokenDecimalsKey(address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n EDGE_DATA_STREAM_TOKEN_DECIMALS,\\n token\\n ));\\n }\\n\\n // @dev key for data stream feed multiplier\\n // @param token the token to get the key for\\n // @return key for data stream feed multiplier\\n function dataStreamMultiplierKey(address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n DATA_STREAM_MULTIPLIER,\\n token\\n ));\\n }\\n\\n function dataStreamSpreadReductionFactorKey(address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n DATA_STREAM_SPREAD_REDUCTION_FACTOR,\\n token\\n ));\\n }\\n\\n // @dev key for price feed multiplier\\n // @param token the token to get the key for\\n // @return key for price feed multiplier\\n function priceFeedMultiplierKey(address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n PRICE_FEED_MULTIPLIER,\\n token\\n ));\\n }\\n\\n function priceFeedHeartbeatDurationKey(address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n PRICE_FEED_HEARTBEAT_DURATION,\\n token\\n ));\\n }\\n\\n // @dev key for stable price value\\n // @param token the token to get the key for\\n // @return key for stable price value\\n function stablePriceKey(address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n STABLE_PRICE,\\n token\\n ));\\n }\\n\\n // @dev key for fee distributor swap token index\\n // @param orderKey the swap order key\\n // @return key for fee distributor swap token index\\n function feeDistributorSwapTokenIndexKey(bytes32 orderKey) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n FEE_DISTRIBUTOR_SWAP_TOKEN_INDEX,\\n orderKey\\n ));\\n }\\n\\n // @dev key for fee distributor swap fee batch key\\n // @param orderKey the swap order key\\n // @return key for fee distributor swap fee batch key\\n function feeDistributorSwapFeeBatchKey(bytes32 orderKey) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n FEE_DISTRIBUTOR_SWAP_FEE_BATCH,\\n orderKey\\n ));\\n }\\n\\n // @dev key for max market token balance usd\\n // it is used to limit amount of funds deposited into each market\\n function glvMaxMarketTokenBalanceUsdKey(address glv, address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(GLV_MAX_MARKET_TOKEN_BALANCE_USD, glv, market));\\n }\\n\\n // @dev key for max market token balance amount\\n // it is used to limit amount of funds deposited into each market\\n function glvMaxMarketTokenBalanceAmountKey(address glv, address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(GLV_MAX_MARKET_TOKEN_BALANCE_AMOUNT, glv, market));\\n }\\n\\n // @dev key for is glv market disabled\\n function isGlvMarketDisabledKey(address glv, address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n IS_GLV_MARKET_DISABLED,\\n glv,\\n market\\n ));\\n }\\n\\n // @dev key for max allowed price impact for glv shifts\\n // if effective price impact exceeds max price impact then glv shift fails\\n function glvShiftMaxLossFactorKey(address glv) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n GLV_SHIFT_MAX_LOSS_FACTOR,\\n glv\\n ));\\n }\\n\\n // @dev key for time when glv shift was executed last\\n // used to validate glv shifts are not executed too frequently\\n function glvShiftLastExecutedAtKey(address glv) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n GLV_SHIFT_LAST_EXECUTED_AT,\\n glv\\n ));\\n }\\n\\n // @dev key for min time interval between glv shifts in seconds\\n function glvShiftMinIntervalKey(address glv) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n GLV_SHIFT_MIN_INTERVAL,\\n glv\\n ));\\n }\\n\\n function minGlvTokensForFirstGlvDepositKey(address glv) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MIN_GLV_TOKENS_FOR_FIRST_DEPOSIT,\\n glv\\n ));\\n }\\n\\n // @dev key for whether the sync config feature is disabled\\n // @param module the sync config module\\n // @return key for sync config feature disabled\\n function syncConfigFeatureDisabledKey(address module) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n SYNC_CONFIG_FEATURE_DISABLED,\\n module\\n ));\\n }\\n\\n // @dev key for whether sync config updates are disabled for a market\\n // @param market the market to check\\n // @return key for sync config market disabled\\n function syncConfigMarketDisabledKey(address market) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n SYNC_CONFIG_MARKET_DISABLED,\\n market\\n ));\\n }\\n\\n // @dev key for whether sync config updates are disabled for a parameter\\n // @param parameter the parameter to check\\n // @return key for sync config parameter disabled\\n function syncConfigParameterDisabledKey(string memory parameter) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n SYNC_CONFIG_PARAMETER_DISABLED,\\n parameter\\n ));\\n }\\n\\n // @dev key for whether sync config updates are disabled for a market parameter\\n // @param market the market to check\\n // @param parameter the parameter to check\\n // @return key for sync config market parameter disabled\\n function syncConfigMarketParameterDisabledKey(address market, string memory parameter) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n SYNC_CONFIG_MARKET_PARAMETER_DISABLED,\\n market,\\n parameter\\n ));\\n }\\n\\n // @dev key for whether a sync config update is completed\\n // @param updateId the update id to check\\n // @return key for sync config market update completed\\n function syncConfigUpdateCompletedKey(uint256 updateId) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n SYNC_CONFIG_UPDATE_COMPLETED,\\n updateId\\n ));\\n }\\n\\n // @dev key for the latest sync config update that was completed\\n // @return key for sync config latest update id\\n function syncConfigLatestUpdateIdKey() internal pure returns (bytes32) {\\n return SYNC_CONFIG_LATEST_UPDATE_ID;\\n }\\n\\n // @dev key for the contributor token amount\\n // @param account the contributor account\\n // @param token the contributor token\\n // @return key for the contributor token amount\\n function contributorTokenAmountKey(address account, address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CONTRIBUTOR_TOKEN_AMOUNT,\\n account,\\n token\\n ));\\n }\\n\\n // @dev key for the max total contributor token amount\\n // @param token the contributor token\\n // @return key for the max contributor token amount\\n function maxTotalContributorTokenAmountKey(address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MAX_TOTAL_CONTRIBUTOR_TOKEN_AMOUNT,\\n token\\n ));\\n }\\n\\n function contributorFundingAccountKey(address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CONTRIBUTOR_FUNDING_ACCOUNT,\\n token\\n ));\\n }\\n\\n function customContributorFundingAccountKey(address account, address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CUSTOM_CONTRIBUTOR_FUNDING_ACCOUNT,\\n account,\\n token\\n ));\\n }\\n\\n // @dev key for the buyback batch amount\\n // @param token the token for which to retrieve batch amount (GMX or WNT)\\n // @return key for buyback batch amount for a given token\\n function buybackBatchAmountKey(address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n BUYBACK_BATCH_AMOUNT,\\n token\\n ));\\n }\\n\\n // @dev key for the buyback available fee amount\\n // @param feeToken the token in which the fees are denominated\\n // @param swapToken the token for which fees are accumulated (GMX or WNT)\\n // @return key for buyback available fee amount for a given token and feeToken\\n function buybackAvailableFeeAmountKey(address feeToken, address swapToken) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n BUYBACK_AVAILABLE_FEE_AMOUNT,\\n feeToken,\\n swapToken\\n ));\\n }\\n\\n // @dev key for the buyback withdrawable fee amount\\n // @param buybackToken the token that was bought back\\n // @return key for the buyback withdrawable fee amount\\n function withdrawableBuybackTokenAmountKey(address buybackToken) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n WITHDRAWABLE_BUYBACK_TOKEN_AMOUNT,\\n buybackToken\\n ));\\n }\\n\\n // @dev key for the buyback gmx fee factor\\n // @param version the version for which to retrieve the fee numerator\\n // @return key for buyback gmx fee factor for a given version\\n function buybackGmxFactorKey(uint256 version) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n BUYBACK_GMX_FACTOR,\\n version\\n ));\\n }\\n\\n // @dev key for the buyback max price impact factor\\n // @param token the token for which to retrieve the max price impact factor key\\n // @return key for buyback max price impact factor for a given token\\n function buybackMaxPriceImpactFactorKey(address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n BUYBACK_MAX_PRICE_IMPACT_FACTOR,\\n token\\n ));\\n }\\n\\n // @dev key for whether a multichain provider is enabled\\n // @param provider the multichain provider\\n // @return key for whether a multichain provider is enabled\\n function isMultichainProviderEnabledKey(address provider) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n IS_MULTICHAIN_PROVIDER_ENABLED,\\n provider\\n ));\\n }\\n\\n // @dev key for whether a multichain endpoint is enabled\\n // @param endpoint the multichain endpoint\\n // @return key for whether a multichain endpoint is enabled\\n function isMultichainEndpointEnabledKey(address endpoint) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n IS_MULTICHAIN_ENDPOINT_ENABLED,\\n endpoint\\n ));\\n }\\n\\n // @dev key for whether a relay fee is excluded for the caller\\n // @param sender the address of the sender\\n // @return key for whether a relay fee is excluded\\n function isRelayFeeExcludedKey(address sender) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n IS_RELAY_FEE_EXCLUDED,\\n sender\\n ));\\n }\\n\\n // @dev key for whether a multichain endpoint is enabled\\n // @param endpoint the multichain endpoint\\n // @return key for whether a multichain endpoint is enabled\\n function isSrcChainIdEnabledKey(uint256 srcChainId) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n IS_SRC_CHAIN_ID_ENABLED,\\n srcChainId\\n ));\\n }\\n\\n // @dev key for the last src chain id from which the user last managed his position\\n // @param positionKey the position key for which to retrieve the last src chain id\\n // @return key for the last src chain id from which the user last managed his position\\n function positionLastSrcChainId(bytes32 positionKey) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n POSITION_LAST_SRC_CHAIN_ID,\\n positionKey\\n ));\\n }\\n\\n // @dev key for the source chain id mapped from the endpoint id\\n // @param eid the endpoint id of the source chain\\n // @return key for the srcChainId\\n function eidToSrcChainId(uint32 eid) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n EID_TO_SRC_CHAIN_ID,\\n eid\\n ));\\n }\\n\\n // @dev key for user's multichain balance\\n // @param account the account for which to retrieve the user balance key\\n // @param token the token for which to retrieve the user balance key\\n // @return key for multichain balance for a given user and token\\n function multichainBalanceKey(address account, address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n MULTICHAIN_BALANCE,\\n account,\\n token\\n ));\\n }\\n\\n // @dev key for the claimable fund amount for a specific account and token\\n // @param account the account to claim funds for\\n // @param token the token to claim\\n // @param distributionId the distribution id to claim funds for\\n // @return key for claimable fund amount\\n function claimableFundsAmountKey(address account, address token, uint256 distributionId) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CLAIMABLE_FUNDS_AMOUNT,\\n account,\\n token,\\n distributionId\\n ));\\n }\\n\\n // @dev key for the total claimable amount for a specific token\\n // @param token the token for which to retrieve the total claimable amount\\n // @return key for total claimable amount\\n function totalClaimableFundsAmountKey(address token) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n TOTAL_CLAIMABLE_FUNDS_AMOUNT,\\n token\\n ));\\n }\\n\\n function claimTermsKey(uint256 distributionId) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CLAIM_TERMS,\\n distributionId\\n ));\\n }\\n\\n function claimTermsBackrefKey(bytes32 termsHash) internal pure returns (bytes32) {\\n return keccak256(abi.encode(\\n CLAIM_TERMS_BACKREF,\\n termsHash\\n ));\\n }\\n}\\n\",\"keccak256\":\"0x32313a19b7408d1b35e25c8fade5c08263bd4aea6a502d96860ba7abf84b162e\",\"license\":\"BUSL-1.1\"},\"contracts/error/ErrorUtils.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nlibrary ErrorUtils {\\n // To get the revert reason, referenced from https://ethereum.stackexchange.com/a/83577\\n function getRevertMessage(bytes memory result) internal pure returns (string memory, bool) {\\n // If the result length is less than 68, then the transaction either panicked or failed silently\\n if (result.length < 68) {\\n return (\\\"\\\", false);\\n }\\n\\n bytes4 errorSelector = getErrorSelectorFromData(result);\\n\\n // 0x08c379a0 is the selector for Error(string)\\n // referenced from https://blog.soliditylang.org/2021/04/21/custom-errors/\\n if (errorSelector == bytes4(0x08c379a0)) {\\n assembly {\\n result := add(result, 0x04)\\n }\\n\\n return (abi.decode(result, (string)), true);\\n }\\n\\n // error may be a custom error, return an empty string for this case\\n return (\\\"\\\", false);\\n }\\n\\n function getErrorSelectorFromData(bytes memory data) internal pure returns (bytes4) {\\n bytes4 errorSelector;\\n\\n assembly {\\n errorSelector := mload(add(data, 0x20))\\n }\\n\\n return errorSelector;\\n }\\n\\n function revertWithParsedMessage(bytes memory result) internal pure {\\n (string memory revertMessage, bool hasRevertMessage) = getRevertMessage(result);\\n\\n if (hasRevertMessage) {\\n revert(revertMessage);\\n } else {\\n revertWithCustomError(result);\\n }\\n }\\n\\n function revertWithCustomError(bytes memory result) internal pure {\\n // referenced from https://ethereum.stackexchange.com/a/123588\\n uint256 length = result.length;\\n assembly {\\n revert(add(result, 0x20), length)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8dad7020da39ccf5759e4d9cefeb8a943cab645ea96f3a27a4f6ce3168f3dcbc\",\"license\":\"BUSL-1.1\"},\"contracts/error/Errors.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nlibrary Errors {\\n // AdlHandler errors\\n error AdlNotRequired(int256 pnlToPoolFactor, uint256 maxPnlFactorForAdl);\\n error InvalidAdl(int256 nextPnlToPoolFactor, int256 pnlToPoolFactor);\\n error PnlOvercorrected(int256 nextPnlToPoolFactor, uint256 minPnlFactorForAdl);\\n\\n // AdlUtils errors\\n error InvalidSizeDeltaForAdl(uint256 sizeDeltaUsd, uint256 positionSizeInUsd);\\n error AdlNotEnabled();\\n\\n // AutoCancelUtils errors\\n error MaxAutoCancelOrdersExceeded(uint256 count, uint256 maxAutoCancelOrders);\\n\\n // Bank errors\\n error SelfTransferNotSupported(address receiver);\\n error InvalidNativeTokenSender(address msgSender);\\n\\n // BaseHandler errors\\n error RequestNotYetCancellable(uint256 requestAge, uint256 requestExpirationAge, string requestType);\\n\\n // CallbackUtils errors\\n error MaxCallbackGasLimitExceeded(uint256 callbackGasLimit, uint256 maxCallbackGasLimit);\\n error InsufficientGasLeftForCallback(uint256 gasToBeForwarded, uint256 callbackGasLimit);\\n\\n // Config errors\\n error InvalidBaseKey(bytes32 baseKey);\\n error ConfigValueExceedsAllowedRange(bytes32 baseKey, uint256 value);\\n error InvalidClaimableFactor(uint256 value);\\n error InvalidClaimableReductionFactor(uint256 value);\\n error OracleProviderAlreadyExistsForToken(address oracle, address token);\\n error OracleProviderMinChangeDelayNotYetPassed(address token, address provider);\\n error PriceFeedAlreadyExistsForToken(address token);\\n error DataStreamIdAlreadyExistsForToken(address token);\\n error EdgeDataStreamIdAlreadyExistsForToken(address token);\\n error MaxFundingFactorPerSecondLimitExceeded(uint256 maxFundingFactorPerSecond, uint256 limit);\\n error InvalidPositionImpactPoolDistributionRate(uint256 distributionAmount, uint256 positionImpactPoolAmount);\\n error MaxDataListLengthExceeded(uint256 dataLength, uint256 maxDataLength);\\n error EmptyToken();\\n\\n // ContributorHandler errors\\n error InvalidSetContributorPaymentInput(uint256 tokensLength, uint256 amountsLength);\\n error InvalidContributorToken(address token);\\n error MaxTotalContributorTokenAmountExceeded(address token, uint256 totalAmount, uint256 maxTotalAmount);\\n error MinContributorPaymentIntervalNotYetPassed(uint256 minPaymentInterval);\\n error MinContributorPaymentIntervalBelowAllowedRange(uint256 interval);\\n error InvalidSetMaxTotalContributorTokenAmountInput(uint256 tokensLength, uint256 amountsLength);\\n\\n // Timelock errors\\n error ActionAlreadySignalled();\\n error ActionNotSignalled();\\n error SignalTimeNotYetPassed(uint256 signalTime);\\n error InvalidTimelockDelay(uint256 timelockDelay);\\n error MaxTimelockDelayExceeded(uint256 timelockDelay);\\n error InvalidFeeReceiver(address receiver);\\n error InvalidOracleSigner(address signer);\\n error InvalidHoldingAddress(address account);\\n error EmptyPositionImpactWithdrawalAmount();\\n error OraclePriceOutdated();\\n error EmptyTarget();\\n error EmptyFundingAccount();\\n error EmptyReduceLentAmount();\\n error ReductionExceedsLentAmount(uint256 lentAmount, uint256 totalReductionAmount);\\n\\n // GlvDepositStoreUtils errors\\n error GlvDepositNotFound(bytes32 key);\\n // GlvShiftStoreUtils errors\\n error GlvShiftNotFound(bytes32 key);\\n // GlvWithdrawalStoreUtils errors\\n error GlvWithdrawalNotFound(bytes32 key);\\n // GlvDepositUtils errors\\n error EmptyGlvDepositAmounts();\\n error EmptyGlvMarketAmount();\\n error EmptyGlvDeposit();\\n error InvalidMinGlvTokensForFirstGlvDeposit(uint256 minGlvTokens, uint256 expectedMinGlvTokens);\\n error InvalidReceiverForFirstGlvDeposit(address receiver, address expectedReceiver);\\n // GlvWithdrawalUtils errors\\n error EmptyGlvWithdrawal();\\n error EmptyGlvWithdrawalAmount();\\n // GlvUtils errors\\n error EmptyGlv(address glv);\\n error EmptyGlvTokenSupply();\\n error GlvNegativeMarketPoolValue(address glv, address market);\\n error GlvUnsupportedMarket(address glv, address market);\\n error GlvDisabledMarket(address glv, address market);\\n error GlvEnabledMarket(address glv, address market);\\n error GlvNonZeroMarketBalance(address glv, address market);\\n error GlvMaxMarketCountExceeded(address glv, uint256 glvMaxMarketCount);\\n error GlvMaxMarketTokenBalanceUsdExceeded(address glv, address market, uint256 maxMarketTokenBalanceUsd, uint256 marketTokenBalanceUsd);\\n error GlvMaxMarketTokenBalanceAmountExceeded(address glv, address market, uint256 maxMarketTokenBalanceAmount, uint256 marketTokenBalanceAmount);\\n error GlvInsufficientMarketTokenBalance(address glv, address market, uint256 marketTokenBalance, uint256 marketTokenAmount);\\n error GlvMarketAlreadyExists(address glv, address market);\\n error GlvInvalidLongToken(address glv, address provided, address expected);\\n error GlvInvalidShortToken(address glv, address provided, address expected);\\n // GlvShiftUtils\\n error GlvShiftMaxLossExceeded(uint256 effectivePriceImpactFactor, uint256 glvMaxShiftPriceImpactFactor);\\n error GlvShiftIntervalNotYetPassed(uint256 currentTimestamp, uint256 lastGlvShiftExecutedAt, uint256 glvShiftMinInterval);\\n // GlvFactory\\n error GlvAlreadyExists(bytes32 salt, address glv);\\n error GlvSymbolTooLong();\\n error GlvNameTooLong();\\n // GlvStoreUtils\\n error GlvNotFound(address key);\\n // Jit\\n error JitInvalidToMarket(address market, address expectedMarket);\\n error JitEmptyShiftParams();\\n error JitUnsupportedOrderType(uint256 orderType);\\n\\n // DepositStoreUtils errors\\n error DepositNotFound(bytes32 key);\\n\\n // DepositUtils errors\\n error EmptyDeposit();\\n error EmptyDepositAmounts();\\n\\n // ExecuteDepositUtils errors\\n error MinMarketTokens(uint256 received, uint256 expected);\\n error EmptyDepositAmountsAfterSwap();\\n error InvalidPoolValueForDeposit(int256 poolValue);\\n error InvalidSwapOutputToken(address outputToken, address expectedOutputToken);\\n error InvalidReceiverForFirstDeposit(address receiver, address expectedReceiver);\\n error InvalidMinMarketTokensForFirstDeposit(uint256 minMarketTokens, uint256 expectedMinMarketTokens);\\n\\n // ExternalHandler errors\\n error ExternalCallFailed(bytes data);\\n error InvalidExternalCallInput(uint256 targetsLength, uint256 dataListLength);\\n error InvalidExternalReceiversInput(uint256 refundTokensLength, uint256 refundReceiversLength);\\n error InvalidExternalCallTarget(address target);\\n\\n // FeeBatchStoreUtils errors\\n error FeeBatchNotFound(bytes32 key);\\n\\n // FeeDistributor errors\\n error InvalidFeeBatchTokenIndex(uint256 tokenIndex, uint256 feeBatchTokensLength);\\n error InvalidAmountInForFeeBatch(uint256 amountIn, uint256 remainingAmount);\\n error InvalidSwapPathForV1(address[] path, address bridgingToken);\\n\\n // GlpMigrator errors\\n error InvalidGlpAmount(uint256 totalGlpAmountToRedeem, uint256 totalGlpAmount);\\n error InvalidExecutionFeeForMigration(uint256 totalExecutionFee, uint256 msgValue);\\n\\n // GlvHandler errors\\n error InvalidGlvDepositInitialLongToken(address initialLongToken);\\n error InvalidGlvDepositInitialShortToken(address initialShortToken);\\n error InvalidGlvDepositSwapPath(uint256 longTokenSwapPathLength, uint256 shortTokenSwapPathLength);\\n error MinGlvTokens(uint256 received, uint256 expected);\\n\\n // OrderHandler errors\\n error OrderNotUpdatable(uint256 orderType);\\n error InvalidKeeperForFrozenOrder(address keeper);\\n\\n // FeatureUtils errors\\n error DisabledFeature(bytes32 key);\\n\\n // FeeHandler errors\\n error InvalidBuybackToken(address buybackToken);\\n error InvalidVersion(uint256 version);\\n error InsufficientBuybackOutputAmount(address feeToken, address buybackToken, uint256 outputAmount, uint256 minOutputAmount);\\n error BuybackAndFeeTokenAreEqual(address feeToken, address buybackToken);\\n error AvailableFeeAmountIsZero(address feeToken, address buybackToken, uint256 availableFeeAmount);\\n error MaxBuybackPriceAgeExceeded(uint256 priceTimestamp, uint256 buybackMaxPriceAge, uint256 currentTimestamp);\\n error EmptyClaimFeesMarket();\\n\\n // GasUtils errors\\n error InsufficientExecutionFee(uint256 minExecutionFee, uint256 executionFee);\\n error InsufficientWntAmountForExecutionFee(uint256 wntAmount, uint256 executionFee);\\n error InsufficientNativeTokenAmount(uint256 msgValue, uint256 expectedNativeValue);\\n error InsufficientExecutionGasForErrorHandling(uint256 startingGas, uint256 minHandleErrorGas);\\n error InsufficientExecutionGas(uint256 startingGas, uint256 estimatedGasLimit, uint256 minAdditionalGasForExecution);\\n error InsufficientHandleExecutionErrorGas(uint256 gas, uint256 minHandleExecutionErrorGas);\\n error InsufficientGasForCancellation(uint256 gas, uint256 minHandleExecutionErrorGas);\\n error InsufficientGasForAutoCancellation(uint256 gas, uint256 minHandleExecutionErrorGas);\\n error InsufficientGasLeft(uint256 gas, uint256 estimatedGasLimit);\\n error InvalidExecutionFee(uint256 executionFee, uint256 minExecutionFee, uint256 maxExecutionFee);\\n error EmptyRelayFeeAddress();\\n\\n // MarketFactory errors\\n error MarketAlreadyExists(bytes32 salt, address existingMarketAddress);\\n\\n // MarketStoreUtils errors\\n error MarketNotFound(address key);\\n\\n // MarketUtils errors\\n error EmptyMarket();\\n error DisabledMarket(address market);\\n error MaxSwapPathLengthExceeded(uint256 swapPathLengh, uint256 maxSwapPathLength);\\n error InsufficientPoolAmount(uint256 poolAmount, uint256 amount);\\n error InsufficientReserve(uint256 reservedUsd, uint256 maxReservedUsd);\\n error InsufficientReserveForOpenInterest(uint256 reservedUsd, uint256 maxReservedUsd);\\n error UnableToGetOppositeToken(address inputToken, address market);\\n error UnexpectedTokenForVirtualInventory(address token, address market);\\n error EmptyMarketTokenSupply();\\n error InvalidSwapMarket(address market);\\n error UnableToGetCachedTokenPrice(address token, address market);\\n error CollateralAlreadyClaimed(uint256 adjustedClaimableAmount, uint256 claimedAmount);\\n error OpenInterestCannotBeUpdatedForSwapOnlyMarket(address market);\\n error MaxOpenInterestExceeded(uint256 openInterest, uint256 maxOpenInterest);\\n error MaxPoolAmountExceeded(uint256 poolAmount, uint256 maxPoolAmount);\\n error MaxCollateralSumExceeded(uint256 collateralSum, uint256 maxCollateralSum);\\n error MaxPoolUsdForDepositExceeded(uint256 poolUsd, uint256 maxPoolUsdForDeposit);\\n error UnexpectedBorrowingFactor(uint256 positionBorrowingFactor, uint256 cumulativeBorrowingFactor);\\n error UnableToGetBorrowingFactorEmptyPoolUsd();\\n error UnableToGetFundingFactorEmptyOpenInterest();\\n error InvalidPositionMarket(address market);\\n error InvalidCollateralTokenForMarket(address market, address token);\\n error PnlFactorExceededForLongs(int256 pnlToPoolFactor, uint256 maxPnlFactor);\\n error PnlFactorExceededForShorts(int256 pnlToPoolFactor, uint256 maxPnlFactor);\\n error InvalidUiFeeFactor(uint256 uiFeeFactor, uint256 maxUiFeeFactor);\\n error EmptyAddressInMarketTokenBalanceValidation(address market, address token);\\n error InvalidMarketTokenBalance(address market, address token, uint256 balance, uint256 expectedMinBalance);\\n error InvalidMarketTokenBalanceForCollateralAmount(address market, address token, uint256 balance, uint256 collateralAmount);\\n error InvalidMarketTokenBalanceForClaimableFunding(address market, address token, uint256 balance, uint256 claimableFundingFeeAmount);\\n error UnexpectedPoolValue(int256 poolValue);\\n\\n // MarketPositionImpactUtils errors\\n error InsufficientImpactPoolValueForWithdrawal(uint256 withdrawalAmount, uint256 poolValue, int256 totalPendingImpactAmount);\\n\\n // Oracle errors\\n error SequencerDown();\\n error SequencerGraceDurationNotYetPassed(uint256 timeSinceUp, uint256 sequencerGraceDuration);\\n error EmptyValidatedPrices(); // not used, kept for compatibility\\n error InvalidOracleProvider(address provider);\\n error InvalidOracleProviderForToken(address provider, address expectedProvider);\\n error GmEmptySigner(uint256 signerIndex);\\n error InvalidOracleSetPricesProvidersParam(uint256 tokensLength, uint256 providersLength);\\n error InvalidOracleSetPricesDataParam(uint256 tokensLength, uint256 dataLength);\\n error GmInvalidBlockNumber(uint256 minOracleBlockNumber, uint256 currentBlockNumber);\\n error GmInvalidMinMaxBlockNumber(uint256 minOracleBlockNumber, uint256 maxOracleBlockNumber);\\n error EmptyDataStreamFeedId(address token);\\n error InvalidDataStreamFeedId(address token, bytes32 feedId, bytes32 expectedFeedId);\\n error InvalidDataStreamBidAsk(address token, int192 bid, int192 ask);\\n error InvalidDataStreamPrices(address token, int192 bid, int192 ask);\\n error MaxPriceAgeExceeded(uint256 oracleTimestamp, uint256 currentTimestamp);\\n error MaxOracleTimestampRangeExceeded(uint256 range, uint256 maxRange);\\n error GmMinOracleSigners(uint256 oracleSigners, uint256 minOracleSigners);\\n error GmMaxOracleSigners(uint256 oracleSigners, uint256 maxOracleSigners);\\n error BlockNumbersNotSorted(uint256 minOracleBlockNumber, uint256 prevMinOracleBlockNumber);\\n error GmMinPricesNotSorted(address token, uint256 price, uint256 prevPrice);\\n error GmMaxPricesNotSorted(address token, uint256 price, uint256 prevPrice);\\n error EmptyChainlinkPriceFeedMultiplier(address token);\\n error EmptyDataStreamMultiplier(address token);\\n error InvalidDataStreamSpreadReductionFactor(address token, uint256 spreadReductionFactor);\\n error InvalidFeedPrice(address token, int256 price);\\n error ChainlinkPriceFeedNotUpdated(address token, uint256 timestamp, uint256 heartbeatDuration);\\n error GmMaxSignerIndex(uint256 signerIndex, uint256 maxSignerIndex);\\n error InvalidGmOraclePrice(address token);\\n error InvalidGmSignerMinMaxPrice(uint256 minPrice, uint256 maxPrice);\\n error InvalidGmMedianMinMaxPrice(uint256 minPrice, uint256 maxPrice);\\n error NonEmptyTokensWithPrices(uint256 tokensWithPricesLength);\\n error InvalidMinMaxForPrice(address token, uint256 min, uint256 max);\\n error EmptyChainlinkPriceFeed(address token);\\n error PriceAlreadySet(address token, uint256 minPrice, uint256 maxPrice);\\n error MaxRefPriceDeviationExceeded(\\n address token,\\n uint256 price,\\n uint256 refPrice,\\n uint256 maxRefPriceDeviationFactor\\n );\\n error InvalidBlockRangeSet(uint256 largestMinBlockNumber, uint256 smallestMaxBlockNumber);\\n error NonAtomicOracleProvider(address provider);\\n\\n // OracleModule errors\\n error InvalidPrimaryPricesForSimulation(uint256 primaryTokensLength, uint256 primaryPricesLength);\\n error EndOfOracleSimulation();\\n\\n // OracleUtils errors\\n error InvalidGmSignature(address recoveredSigner, address expectedSigner);\\n\\n error EmptyPrimaryPrice(address token);\\n\\n error OracleTimestampsAreSmallerThanRequired(uint256 minOracleTimestamp, uint256 expectedTimestamp);\\n error OracleTimestampsAreLargerThanRequestExpirationTime(uint256 maxOracleTimestamp, uint256 requestTimestamp, uint256 requestExpirationTime);\\n\\n // BaseOrderUtils errors\\n error EmptyOrder();\\n error UnsupportedOrderType(uint256 orderType);\\n error UnsupportedOrderTypeForAutoCancellation(uint256 orderType);\\n error InvalidOrderPrices(\\n uint256 primaryPriceMin,\\n uint256 primaryPriceMax,\\n uint256 triggerPrice,\\n uint256 orderType\\n );\\n error EmptySizeDeltaInTokens();\\n error PriceImpactLargerThanOrderSize(int256 priceImpactUsd, uint256 sizeDeltaUsd);\\n error NegativeExecutionPrice(int256 executionPrice, uint256 price, uint256 positionSizeInUsd, int256 priceImpactUsd, uint256 sizeDeltaUsd);\\n error OrderNotFulfillableAtAcceptablePrice(uint256 price, uint256 acceptablePrice);\\n error OrderValidFromTimeNotReached(uint256 validFromTime, uint256 currentTimestamp);\\n\\n // IncreaseOrderUtils errors\\n error UnexpectedPositionState();\\n\\n // OrderUtils errors\\n error OrderTypeCannotBeCreated(uint256 orderType);\\n error OrderAlreadyFrozen();\\n error MaxTotalCallbackGasLimitForAutoCancelOrdersExceeded(uint256 totalCallbackGasLimit, uint256 maxTotalCallbackGasLimit);\\n error InvalidReceiver(address receiver);\\n error UnexpectedValidFromTime(uint256 orderType);\\n\\n // OrderStoreUtils errors\\n error OrderNotFound(bytes32 key);\\n\\n // SwapOrderUtils errors\\n error UnexpectedMarket();\\n\\n // DecreasePositionCollateralUtils errors\\n error InsufficientFundsToPayForCosts(uint256 remainingCostUsd, string step);\\n error InvalidOutputToken(address tokenOut, address expectedTokenOut);\\n\\n // DecreasePositionUtils errors\\n error InvalidDecreaseOrderSize(uint256 sizeDeltaUsd, uint256 positionSizeInUsd);\\n error UnableToWithdrawCollateral(int256 estimatedRemainingCollateralUsd);\\n error InvalidDecreasePositionSwapType(uint256 decreasePositionSwapType);\\n error PositionShouldNotBeLiquidated(\\n string reason,\\n int256 remainingCollateralUsd,\\n int256 minCollateralUsd,\\n int256 minCollateralUsdForLeverage\\n );\\n\\n // IncreasePositionUtils errors\\n error InsufficientCollateralAmount(uint256 collateralAmount, int256 collateralDeltaAmount);\\n error InsufficientCollateralUsd(int256 remainingCollateralUsd);\\n\\n // PositionStoreUtils errors\\n error PositionNotFound(bytes32 key);\\n\\n // PositionUtils errors\\n error LiquidatablePosition(\\n string reason,\\n int256 remainingCollateralUsd,\\n int256 minCollateralUsd,\\n int256 minCollateralUsdForLeverage\\n );\\n\\n error EmptyPosition();\\n error InvalidPositionSizeValues(uint256 sizeInUsd, uint256 sizeInTokens);\\n error MinPositionSize(uint256 positionSizeInUsd, uint256 minPositionSizeUsd);\\n\\n // PositionPricingUtils errors\\n error UsdDeltaExceedsLongOpenInterest(int256 usdDelta, uint256 longOpenInterest);\\n error UsdDeltaExceedsShortOpenInterest(int256 usdDelta, uint256 shortOpenInterest);\\n\\n // ShiftStoreUtils errors\\n error ShiftNotFound(bytes32 key);\\n\\n // ShiftUtils errors\\n error EmptyShift();\\n error EmptyShiftAmount();\\n error ShiftFromAndToMarketAreEqual(address market);\\n error LongTokensAreNotEqual(address fromMarketLongToken, address toMarketLongToken);\\n error ShortTokensAreNotEqual(address fromMarketLongToken, address toMarketLongToken);\\n error BridgeOutNotSupportedDuringShift();\\n\\n // SwapPricingUtils errors\\n error UsdDeltaExceedsPoolValue(int256 usdDelta, uint256 poolUsd);\\n\\n // RoleModule errors\\n error Unauthorized(address msgSender, string role);\\n\\n // RoleStore errors\\n error ThereMustBeAtLeastOneRoleAdmin();\\n error ThereMustBeAtLeastOneTimelockMultiSig();\\n\\n // ExchangeRouter errors\\n error InvalidClaimFundingFeesInput(uint256 marketsLength, uint256 tokensLength);\\n error InvalidClaimCollateralInput(uint256 marketsLength, uint256 tokensLength, uint256 timeKeysLength);\\n error InvalidClaimAffiliateRewardsInput(uint256 marketsLength, uint256 tokensLength);\\n error InvalidClaimUiFeesInput(uint256 marketsLength, uint256 tokensLength);\\n\\n // SwapUtils errors\\n error InvalidTokenIn(address tokenIn, address market);\\n error InsufficientOutputAmount(uint256 outputAmount, uint256 minOutputAmount);\\n error InsufficientSwapOutputAmount(uint256 outputAmount, uint256 minOutputAmount);\\n error DuplicatedMarketInSwapPath(address market);\\n error SwapPriceImpactExceedsAmountIn(uint256 amountAfterFees, int256 negativeImpactAmount);\\n\\n // SubaccountRouter errors\\n error InvalidReceiverForSubaccountOrder(address receiver, address expectedReceiver);\\n error InvalidCancellationReceiverForSubaccountOrder(address cancellationReceiver, address expectedCancellationReceiver);\\n\\n // SubaccountUtils errors\\n error SubaccountNotAuthorized(address account, address subaccount);\\n error MaxSubaccountActionCountExceeded(address account, address subaccount, uint256 count, uint256 maxCount);\\n error SubaccountApprovalExpired(address account, address subaccount, uint256 deadline, uint256 currentTimestamp);\\n error SubaccountIntegrationIdDisabled(bytes32 integrationId);\\n\\n // TokenUtils errors\\n error TokenTransferError(address token, address receiver, uint256 amount);\\n error EmptyHoldingAddress();\\n // Note that Transfer is misspelled as Tranfer in the EmptyTokenTranferGasLimit error\\n // some contracts with this error cannot be re-deployed so it has been left as is\\n error EmptyTokenTranferGasLimit(address token);\\n\\n // AccountUtils errors\\n error EmptyAccount();\\n error EmptyReceiver();\\n error DataListLengthExceeded();\\n\\n // ClaimHandler errors\\n error EmptyAmount();\\n error EmptyClaimableAmount(address token);\\n error InvalidToken(address token);\\n error InvalidParams(string reason);\\n error InsufficientFunds(address token);\\n error InvalidClaimTermsSignature(address recoveredSigner, address expectedSigner);\\n error InvalidClaimTermsSignatureForContract(address expectedSigner);\\n error DuplicateClaimTerms(uint256 existingDistributionId);\\n\\n // Array errors\\n error CompactedArrayOutOfBounds(\\n uint256[] compactedValues,\\n uint256 index,\\n uint256 slotIndex,\\n string label\\n );\\n\\n error ArrayOutOfBoundsUint256(\\n uint256[] values,\\n uint256 index,\\n string label\\n );\\n\\n error ArrayOutOfBoundsBytes(\\n bytes[] values,\\n uint256 index,\\n string label\\n );\\n\\n // WithdrawalHandler errors\\n error SwapsNotAllowedForAtomicWithdrawal(uint256 longTokenSwapPathLength, uint256 shortTokenSwapPathLength);\\n\\n // WithdrawalStoreUtils errors\\n error WithdrawalNotFound(bytes32 key);\\n\\n // WithdrawalUtils errors\\n error EmptyWithdrawal();\\n error EmptyWithdrawalAmount();\\n error MinLongTokens(uint256 received, uint256 expected);\\n error MinShortTokens(uint256 received, uint256 expected);\\n error InsufficientMarketTokens(uint256 balance, uint256 expected);\\n error InvalidPoolValueForWithdrawal(int256 poolValue);\\n error MaxLendableFactorForWithdrawalsExceeded(uint256 poolUsd, uint256 maxLendableUsd, uint256 lentUsd);\\n\\n // Uint256Mask errors\\n error MaskIndexOutOfBounds(uint256 index, string label);\\n error DuplicatedIndex(uint256 index, string label);\\n\\n // Cast errors\\n error Uint256AsBytesLengthExceeds32Bytes(uint256 length);\\n\\n // ConfigSyncer errors\\n error SyncConfigInvalidInputLengths(uint256 marketsLength, uint256 parametersLength);\\n error SyncConfigUpdatesDisabledForMarket(address market);\\n error SyncConfigUpdatesDisabledForParameter(string parameter);\\n error SyncConfigUpdatesDisabledForMarketParameter(address market, string parameter);\\n error SyncConfigInvalidMarketFromData(address market, address marketFromData);\\n\\n // Reader errors\\n error EmptyMarketPrice(address market);\\n\\n // Multichain errors\\n error InvalidTransferRequestsLength();\\n error EmptyMultichainTransferInAmount(address account, address token);\\n error EmptyMultichainTransferOutAmount(address account, address token);\\n error InsufficientMultichainBalance(address account, address token, uint256 balance, uint256 amount);\\n error InvalidSrcChainId(uint256 srcChainId);\\n error InvalidEid(uint256 eid);\\n error InvalidDestinationChainId(uint256 desChainId);\\n error TokenPermitsNotAllowedForMultichain();\\n error InvalidInitializer();\\n error InvalidMultichainProvider(address provider);\\n error InvalidMultichainEndpoint(address endpoint);\\n error ReferralCodeAlreadyExists(bytes32 code);\\n error UnableToPayOrderFee();\\n error UnableToPayOrderFeeFromCollateral();\\n error InvalidBridgeOutToken(address token);\\n error InsufficientFee(uint256 feeProvided, uint256 feeRequired);\\n\\n enum SignatureType {\\n Call,\\n SubaccountApproval\\n }\\n\\n // Gelato relay errors\\n error InvalidSignature(string signatureType);\\n error InvalidRecoveredSigner(string signatureType, address recovered, address recoveredFromMinified, address expectedSigner);\\n // User sent incorrect fee token or incorrect swap path\\n error UnexpectedRelayFeeTokenAfterSwap(address feeToken, address expectedFeeToken);\\n error UnexpectedRelayFeeToken(address feeToken, address expectedFeeToken);\\n // Contract received unsupported fee token from Gelato relay\\n error UnsupportedRelayFeeToken(address feeToken, address expectedFeeToken);\\n error InvalidPermitSpender(address spender, address expectedSpender);\\n error InvalidUserDigest(bytes32 digest);\\n error SubaccountApprovalDeadlinePassed(uint256 currentTimestamp, uint256 deadline);\\n error InvalidSubaccountApprovalNonce(uint256 storedNonce, uint256 nonce);\\n error InvalidSubaccountApprovalDesChainId(uint256 desChainId);\\n error DeadlinePassed(uint256 currentTimestamp, uint256 deadline);\\n error InsufficientRelayFee(uint256 requiredRelayFee, uint256 availableFeeAmount);\\n error InvalidSubaccountApprovalSubaccount();\\n error NonEmptyExternalCallsForSubaccountOrder();\\n\\n // EventUtils error\\n error EventItemNotFound(string key);\\n\\n // EdgeOracle verifier errors\\n error InvalidTrustedSignerAddress();\\n error InvalidEdgeSigner();\\n error InvalidEdgeSignature(uint256 recoverError);\\n error InvalidEdgeDataStreamBidAsk(address token, uint256 bid, uint256 ask);\\n error InvalidEdgeDataStreamPrices(address token, uint256 bid, uint256 ask);\\n error InvalidEdgeDataStreamExpo(int256 expo);\\n error RelayEmptyBatch();\\n error RelayCalldataTooLong(uint256 calldataLength);\\n error InvalidExternalCalls(uint256 sendTokensLength, uint256 sendAmountsLength);\\n error MaxRelayFeeSwapForSubaccountExceeded(uint256 feeUsd, uint256 maxFeeUsd);\\n\\n error RemovalShouldNotBeSkipped(bytes32 listKey, bytes32 entityKey);\\n\\n // MultichainReader errors\\n error InsufficientMultichainNativeFee(uint256 msgValue);\\n error EmptyPeer(uint32 eid);\\n\\n // FeeDistributor errors\\n error FeeDistributionAlreadyCompleted(uint256 lastDistributionTime, uint256 startOfCurrentWeek);\\n error OutdatedReadResponse(uint256 timestamp);\\n error InvalidDistributionState(uint256 distributionStateUint);\\n error BridgedAmountNotSufficient(uint256 minRequiredFeeAmount, uint256 currentChainFeeAmount);\\n error BridgingTransactionFailed(bytes result);\\n error MaxWntReferralRewardsInUsdAmountExceeded(uint256 wntReferralRewardsInUsd, uint256 maxWntReferralRewardsInUsdAmount);\\n error MaxWntReferralRewardsInUsdExceeded(uint256 wntReferralRewardsInUsd, uint256 maxWntReferralRewardsInUsd);\\n error MaxEsGmxReferralRewardsAmountExceeded(uint256 tokensForReferralRewards, uint256 maxEsGmxReferralRewards);\\n error MaxReferralRewardsExceeded(address token, uint256 cumulativeTransferAmount, uint256 tokensForReferralRewards);\\n error MaxWntFromTreasuryExceeded(uint256 maxWntFromTreasury, uint256 additionalWntFromTreasury);\\n error KeeperArrayLengthMismatch(uint256 keepersLength, uint256 keeperTargetBalancesLength, uint256 keeperVersionsLength);\\n error SendEthToKeeperFailed(address keeper, uint256 sendAmount, bytes result);\\n error KeeperAmountMismatch(uint256 wntForKeepers, uint256 wntToKeepers);\\n error AttemptedBridgeAmountTooHigh(uint256 minRequiredFeeAmount, uint256 feeAmountCurrentChain, uint256 amountToBridgeOut);\\n error InvalidReferralRewardToken(address token);\\n error BridgingBalanceArrayMismatch(uint256 balancesLength, uint256 targetBalancesLength);\\n error ZeroTreasuryAddress();\\n}\\n\",\"keccak256\":\"0x4c9e9fdbf998ce32c8a06d5cb2917d277138c9e127c0dbe3a711ca0dfda8ddaf\",\"license\":\"BUSL-1.1\"},\"contracts/event/EventEmitter.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../role/RoleModule.sol\\\";\\nimport \\\"./EventUtils.sol\\\";\\n\\n// @title EventEmitter\\n// @dev Contract to emit events\\n// This allows main events to be emitted from a single contract\\n// Logic contracts can be updated while re-using the same eventEmitter contract\\n// Peripheral services like monitoring or analytics would be able to continue\\n// to work without an update and without segregating historical data\\ncontract EventEmitter is RoleModule {\\n event EventLog(\\n address msgSender,\\n string eventName,\\n string indexed eventNameHash,\\n EventUtils.EventLogData eventData\\n );\\n\\n event EventLog1(\\n address msgSender,\\n string eventName,\\n string indexed eventNameHash,\\n bytes32 indexed topic1,\\n EventUtils.EventLogData eventData\\n );\\n\\n event EventLog2(\\n address msgSender,\\n string eventName,\\n string indexed eventNameHash,\\n bytes32 indexed topic1,\\n bytes32 indexed topic2,\\n EventUtils.EventLogData eventData\\n );\\n\\n constructor(RoleStore _roleStore) RoleModule(_roleStore) {}\\n\\n // @dev emit a general event log\\n // @param eventName the name of the event\\n // @param eventData the event data\\n function emitEventLog(\\n string memory eventName,\\n EventUtils.EventLogData memory eventData\\n ) external onlyController {\\n emit EventLog(\\n msg.sender,\\n eventName,\\n eventName,\\n eventData\\n );\\n }\\n\\n // @dev emit a general event log\\n // @param eventName the name of the event\\n // @param topic1 topic1 for indexing\\n // @param eventData the event data\\n function emitEventLog1(\\n string memory eventName,\\n bytes32 topic1,\\n EventUtils.EventLogData memory eventData\\n ) external onlyController {\\n emit EventLog1(\\n msg.sender,\\n eventName,\\n eventName,\\n topic1,\\n eventData\\n );\\n }\\n\\n // @dev emit a general event log\\n // @param eventName the name of the event\\n // @param topic1 topic1 for indexing\\n // @param topic2 topic2 for indexing\\n // @param eventData the event data\\n function emitEventLog2(\\n string memory eventName,\\n bytes32 topic1,\\n bytes32 topic2,\\n EventUtils.EventLogData memory eventData\\n ) external onlyController {\\n emit EventLog2(\\n msg.sender,\\n eventName,\\n eventName,\\n topic1,\\n topic2,\\n eventData\\n );\\n }\\n\\n\\n\\n // @dev event log for general use\\n // @param topic1 event topic 1\\n // @param data additional data\\n function emitDataLog1(bytes32 topic1, bytes memory data) external onlyController {\\n uint256 len = data.length;\\n assembly {\\n log1(add(data, 32), len, topic1)\\n }\\n }\\n\\n // @dev event log for general use\\n // @param topic1 event topic 1\\n // @param topic2 event topic 2\\n // @param data additional data\\n function emitDataLog2(bytes32 topic1, bytes32 topic2, bytes memory data) external onlyController {\\n uint256 len = data.length;\\n assembly {\\n log2(add(data, 32), len, topic1, topic2)\\n }\\n }\\n\\n // @dev event log for general use\\n // @param topic1 event topic 1\\n // @param topic2 event topic 2\\n // @param topic3 event topic 3\\n // @param data additional data\\n function emitDataLog3(bytes32 topic1, bytes32 topic2, bytes32 topic3, bytes memory data) external onlyController {\\n uint256 len = data.length;\\n assembly {\\n log3(add(data, 32), len, topic1, topic2, topic3)\\n }\\n }\\n\\n // @dev event log for general use\\n // @param topic1 event topic 1\\n // @param topic2 event topic 2\\n // @param topic3 event topic 3\\n // @param topic4 event topic 4\\n // @param data additional data\\n function emitDataLog4(bytes32 topic1, bytes32 topic2, bytes32 topic3, bytes32 topic4, bytes memory data) external onlyController {\\n uint256 len = data.length;\\n assembly {\\n log4(add(data, 32), len, topic1, topic2, topic3, topic4)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8a99c1d3590daa8030345ffb09e3f769a93e0178e4c85986dc0e08cc84e8f82c\",\"license\":\"BUSL-1.1\"},\"contracts/event/EventUtils.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../error/Errors.sol\\\";\\nimport \\\"../utils/StringUtils.sol\\\";\\n\\nlibrary EventUtils {\\n\\n struct EmitPositionDecreaseParams {\\n bytes32 key;\\n address account;\\n address market;\\n address collateralToken;\\n bool isLong;\\n }\\n\\n struct EventLogData {\\n AddressItems addressItems;\\n UintItems uintItems;\\n IntItems intItems;\\n BoolItems boolItems;\\n Bytes32Items bytes32Items;\\n BytesItems bytesItems;\\n StringItems stringItems;\\n }\\n\\n struct AddressItems {\\n AddressKeyValue[] items;\\n AddressArrayKeyValue[] arrayItems;\\n }\\n\\n struct UintItems {\\n UintKeyValue[] items;\\n UintArrayKeyValue[] arrayItems;\\n }\\n\\n struct IntItems {\\n IntKeyValue[] items;\\n IntArrayKeyValue[] arrayItems;\\n }\\n\\n struct BoolItems {\\n BoolKeyValue[] items;\\n BoolArrayKeyValue[] arrayItems;\\n }\\n\\n struct Bytes32Items {\\n Bytes32KeyValue[] items;\\n Bytes32ArrayKeyValue[] arrayItems;\\n }\\n\\n struct BytesItems {\\n BytesKeyValue[] items;\\n BytesArrayKeyValue[] arrayItems;\\n }\\n\\n struct StringItems {\\n StringKeyValue[] items;\\n StringArrayKeyValue[] arrayItems;\\n }\\n\\n struct AddressKeyValue {\\n string key;\\n address value;\\n }\\n\\n struct AddressArrayKeyValue {\\n string key;\\n address[] value;\\n }\\n\\n struct UintKeyValue {\\n string key;\\n uint256 value;\\n }\\n\\n struct UintArrayKeyValue {\\n string key;\\n uint256[] value;\\n }\\n\\n struct IntKeyValue {\\n string key;\\n int256 value;\\n }\\n\\n struct IntArrayKeyValue {\\n string key;\\n int256[] value;\\n }\\n\\n struct BoolKeyValue {\\n string key;\\n bool value;\\n }\\n\\n struct BoolArrayKeyValue {\\n string key;\\n bool[] value;\\n }\\n\\n struct Bytes32KeyValue {\\n string key;\\n bytes32 value;\\n }\\n\\n struct Bytes32ArrayKeyValue {\\n string key;\\n bytes32[] value;\\n }\\n\\n struct BytesKeyValue {\\n string key;\\n bytes value;\\n }\\n\\n struct BytesArrayKeyValue {\\n string key;\\n bytes[] value;\\n }\\n\\n struct StringKeyValue {\\n string key;\\n string value;\\n }\\n\\n struct StringArrayKeyValue {\\n string key;\\n string[] value;\\n }\\n\\n function initItems(AddressItems memory items, uint256 size) internal pure {\\n items.items = new EventUtils.AddressKeyValue[](size);\\n }\\n\\n function initArrayItems(AddressItems memory items, uint256 size) internal pure {\\n items.arrayItems = new EventUtils.AddressArrayKeyValue[](size);\\n }\\n\\n function setItem(AddressItems memory items, uint256 index, string memory key, address value) internal pure {\\n items.items[index].key = key;\\n items.items[index].value = value;\\n }\\n\\n function setItem(AddressItems memory items, uint256 index, string memory key, address[] memory value) internal pure {\\n items.arrayItems[index].key = key;\\n items.arrayItems[index].value = value;\\n }\\n\\n function get(AddressItems memory addresses, string memory key) external pure returns(address) {\\n (bool found, address value) = getWithoutRevert(addresses, key);\\n if (!found) {\\n revert Errors.EventItemNotFound(key);\\n }\\n return value;\\n }\\n\\n function getWithoutRevert(AddressItems memory addresses, string memory key) public pure returns(bool, address) {\\n for (uint i = 0; i < addresses.items.length; i++) {\\n if (compareStrings(addresses.items[i].key, key)) {\\n return (true, addresses.items[i].value);\\n }\\n }\\n return (false, address(0));\\n }\\n\\n function getArray(AddressItems memory addresses, string memory key) external pure\\n returns(address[] memory) {\\n (bool found, address[] memory value) = getArrayWithoutRevert(addresses, key);\\n if (!found) {\\n revert Errors.EventItemNotFound(key);\\n }\\n return value;\\n }\\n\\n function getArrayWithoutRevert(AddressItems memory addresses, string memory key) public pure\\n returns(bool, address[] memory) {\\n for (uint i = 0; i < addresses.arrayItems.length; i++) {\\n if (compareStrings(addresses.arrayItems[i].key, key)) {\\n return (true, addresses.arrayItems[i].value);\\n }\\n }\\n address[] memory empty;\\n return (false, empty);\\n }\\n\\n function initItems(UintItems memory items, uint256 size) internal pure {\\n items.items = new EventUtils.UintKeyValue[](size);\\n }\\n\\n function initArrayItems(UintItems memory items, uint256 size) internal pure {\\n items.arrayItems = new EventUtils.UintArrayKeyValue[](size);\\n }\\n\\n function setItem(UintItems memory items, uint256 index, string memory key, uint256 value) internal pure {\\n items.items[index].key = key;\\n items.items[index].value = value;\\n }\\n\\n function setItem(UintItems memory items, uint256 index, string memory key, uint256[] memory value) internal pure {\\n items.arrayItems[index].key = key;\\n items.arrayItems[index].value = value;\\n }\\n\\n function get(UintItems memory items, string memory key) external pure returns(uint256) {\\n (bool found, uint256 value) = getWithoutRevert(items, key);\\n if (!found) {\\n revert Errors.EventItemNotFound(key);\\n }\\n return value;\\n }\\n\\n function getWithoutRevert(UintItems memory items, string memory key) public pure returns(bool, uint256) {\\n for (uint i = 0; i < items.items.length; i++) {\\n if (compareStrings(items.items[i].key, key)) {\\n return (true, items.items[i].value);\\n }\\n }\\n return (false, 0);\\n }\\n\\n function getArray(UintItems memory items, string memory key) external pure\\n returns(uint256[] memory) {\\n (bool found, uint256[] memory value) = getArrayWithoutRevert(items, key);\\n if (!found) {\\n revert Errors.EventItemNotFound(key);\\n }\\n return value;\\n }\\n\\n function getArrayWithoutRevert(UintItems memory items, string memory key) public pure\\n returns(bool, uint256[] memory) {\\n for (uint i = 0; i < items.arrayItems.length; i++) {\\n if (compareStrings(items.arrayItems[i].key, key)) {\\n return (true, items.arrayItems[i].value);\\n }\\n }\\n uint256[] memory empty;\\n return (false, empty);\\n }\\n\\n function initItems(IntItems memory items, uint256 size) internal pure {\\n items.items = new EventUtils.IntKeyValue[](size);\\n }\\n\\n function initArrayItems(IntItems memory items, uint256 size) internal pure {\\n items.arrayItems = new EventUtils.IntArrayKeyValue[](size);\\n }\\n\\n function setItem(IntItems memory items, uint256 index, string memory key, int256 value) internal pure {\\n items.items[index].key = key;\\n items.items[index].value = value;\\n }\\n\\n function setItem(IntItems memory items, uint256 index, string memory key, int256[] memory value) internal pure {\\n items.arrayItems[index].key = key;\\n items.arrayItems[index].value = value;\\n }\\n\\n function get(IntItems memory items, string memory key) external pure returns(int256) {\\n (bool found, int256 value) = getWithoutRevert(items, key);\\n if (!found) {\\n revert Errors.EventItemNotFound(key);\\n }\\n return value;\\n }\\n\\n function getWithoutRevert(IntItems memory items, string memory key) public pure returns(bool, int256) {\\n for (uint i = 0; i < items.items.length; i++) {\\n if (compareStrings(items.items[i].key, key)) {\\n return (true, items.items[i].value);\\n }\\n }\\n return (false, 0);\\n }\\n\\n function getArray(IntItems memory items, string memory key) external pure\\n returns(int256[] memory) {\\n (bool found, int256[] memory value) = getArrayWithoutRevert(items, key);\\n if (!found) {\\n revert Errors.EventItemNotFound(key);\\n }\\n return value;\\n }\\n\\n function getArrayWithoutRevert(IntItems memory items, string memory key) public pure\\n returns(bool, int256[] memory) {\\n for (uint i = 0; i < items.arrayItems.length; i++) {\\n if (compareStrings(items.arrayItems[i].key, key)) {\\n return (true, items.arrayItems[i].value);\\n }\\n }\\n int256[] memory empty;\\n return (false, empty);\\n }\\n\\n function initItems(BoolItems memory items, uint256 size) internal pure {\\n items.items = new EventUtils.BoolKeyValue[](size);\\n }\\n\\n function initArrayItems(BoolItems memory items, uint256 size) internal pure {\\n items.arrayItems = new EventUtils.BoolArrayKeyValue[](size);\\n }\\n\\n function setItem(BoolItems memory items, uint256 index, string memory key, bool value) internal pure {\\n items.items[index].key = key;\\n items.items[index].value = value;\\n }\\n\\n function setItem(BoolItems memory items, uint256 index, string memory key, bool[] memory value) internal pure {\\n items.arrayItems[index].key = key;\\n items.arrayItems[index].value = value;\\n }\\n\\n function get(BoolItems memory items, string memory key) external pure returns(bool) {\\n (bool found, bool value) = getWithoutRevert(items, key);\\n if (!found) {\\n revert Errors.EventItemNotFound(key);\\n }\\n return value;\\n }\\n\\n function getWithoutRevert(BoolItems memory items, string memory key) public pure returns(bool, bool) {\\n for (uint i = 0; i < items.items.length; i++) {\\n if (compareStrings(items.items[i].key, key)) {\\n return (true, items.items[i].value);\\n }\\n }\\n return (false, false);\\n }\\n\\n function getArray(BoolItems memory items, string memory key) external pure\\n returns(bool[] memory) {\\n (bool found, bool[] memory value) = getArrayWithoutRevert(items, key);\\n if (!found) {\\n revert Errors.EventItemNotFound(key);\\n }\\n return value;\\n }\\n\\n function getArrayWithoutRevert(BoolItems memory items, string memory key) public pure\\n returns(bool, bool[] memory) {\\n for (uint i = 0; i < items.arrayItems.length; i++) {\\n if (compareStrings(items.arrayItems[i].key, key)) {\\n return (true, items.arrayItems[i].value);\\n }\\n }\\n bool[] memory empty;\\n return (false, empty);\\n }\\n\\n function initItems(Bytes32Items memory items, uint256 size) internal pure {\\n items.items = new EventUtils.Bytes32KeyValue[](size);\\n }\\n\\n function initArrayItems(Bytes32Items memory items, uint256 size) internal pure {\\n items.arrayItems = new EventUtils.Bytes32ArrayKeyValue[](size);\\n }\\n\\n function setItem(Bytes32Items memory items, uint256 index, string memory key, bytes32 value) internal pure {\\n items.items[index].key = key;\\n items.items[index].value = value;\\n }\\n\\n function setItem(Bytes32Items memory items, uint256 index, string memory key, bytes32[] memory value) internal pure {\\n items.arrayItems[index].key = key;\\n items.arrayItems[index].value = value;\\n }\\n\\n function get(Bytes32Items memory items, string memory key) external pure returns(bytes32) {\\n (bool found, bytes32 value) = getWithoutRevert(items, key);\\n if (!found) {\\n revert Errors.EventItemNotFound(key);\\n }\\n return value;\\n }\\n\\n function getWithoutRevert(Bytes32Items memory items, string memory key) public pure returns(bool, bytes32) {\\n for (uint i = 0; i < items.items.length; i++) {\\n if (compareStrings(items.items[i].key, key)) {\\n return (true, items.items[i].value);\\n }\\n }\\n return (false, 0);\\n }\\n\\n function getArray(Bytes32Items memory items, string memory key) external pure\\n returns(bytes32[] memory) {\\n (bool found, bytes32[] memory value) = getArrayWithoutRevert(items, key);\\n if (!found) {\\n revert Errors.EventItemNotFound(key);\\n }\\n return value;\\n }\\n\\n function getArrayWithoutRevert(Bytes32Items memory items, string memory key) public pure\\n returns(bool, bytes32[] memory) {\\n for (uint i = 0; i < items.arrayItems.length; i++) {\\n if (compareStrings(items.arrayItems[i].key, key)) {\\n return (true, items.arrayItems[i].value);\\n }\\n }\\n bytes32[] memory empty;\\n return (false, empty);\\n }\\n\\n function initItems(BytesItems memory items, uint256 size) internal pure {\\n items.items = new EventUtils.BytesKeyValue[](size);\\n }\\n\\n function initArrayItems(BytesItems memory items, uint256 size) internal pure {\\n items.arrayItems = new EventUtils.BytesArrayKeyValue[](size);\\n }\\n\\n function setItem(BytesItems memory items, uint256 index, string memory key, bytes memory value) internal pure {\\n items.items[index].key = key;\\n items.items[index].value = value;\\n }\\n\\n function setItem(BytesItems memory items, uint256 index, string memory key, bytes[] memory value) internal pure {\\n items.arrayItems[index].key = key;\\n items.arrayItems[index].value = value;\\n }\\n\\n function get(BytesItems memory items, string memory key) external pure returns(bytes memory) {\\n (bool found, bytes memory value) = getWithoutRevert(items, key);\\n if (!found) {\\n revert Errors.EventItemNotFound(key);\\n }\\n return value;\\n }\\n\\n function getWithoutRevert(BytesItems memory items, string memory key) public pure returns(bool, bytes memory) {\\n for (uint i = 0; i < items.items.length; i++) {\\n if (compareStrings(items.items[i].key, key)) {\\n return (true, items.items[i].value);\\n }\\n }\\n return (false, \\\"\\\");\\n }\\n\\n function getArray(BytesItems memory items, string memory key) external pure\\n returns(bytes[] memory) {\\n (bool found, bytes[] memory value) = getArrayWithoutRevert(items, key);\\n if (!found) {\\n revert Errors.EventItemNotFound(key);\\n }\\n return value;\\n }\\n\\n function getArrayWithoutRevert(BytesItems memory items, string memory key) public pure\\n returns(bool, bytes[] memory) {\\n for (uint i = 0; i < items.arrayItems.length; i++) {\\n if (compareStrings(items.arrayItems[i].key, key)) {\\n return (true, items.arrayItems[i].value);\\n }\\n }\\n bytes[] memory empty;\\n return (false, empty);\\n }\\n\\n function initItems(StringItems memory items, uint256 size) internal pure {\\n items.items = new EventUtils.StringKeyValue[](size);\\n }\\n\\n function initArrayItems(StringItems memory items, uint256 size) internal pure {\\n items.arrayItems = new EventUtils.StringArrayKeyValue[](size);\\n }\\n\\n function setItem(StringItems memory items, uint256 index, string memory key, string memory value) internal pure {\\n items.items[index].key = key;\\n items.items[index].value = value;\\n }\\n\\n function setItem(StringItems memory items, uint256 index, string memory key, string[] memory value) internal pure {\\n items.arrayItems[index].key = key;\\n items.arrayItems[index].value = value;\\n }\\n\\n function get(StringItems memory items, string memory key) external pure returns(string memory) {\\n (bool found, string memory value) = getWithoutRevert(items, key);\\n if (!found) {\\n revert Errors.EventItemNotFound(key);\\n }\\n return value;\\n }\\n\\n function getWithoutRevert(StringItems memory items, string memory key) public pure returns(bool, string memory) {\\n for (uint i = 0; i < items.items.length; i++) {\\n if (compareStrings(items.items[i].key, key)) {\\n return (true, items.items[i].value);\\n }\\n }\\n return (false, \\\"\\\");\\n }\\n\\n function getArray(StringItems memory items, string memory key) external pure\\n returns(string[] memory) {\\n (bool found, string[] memory value) = getArrayWithoutRevert(items, key);\\n if (!found) {\\n revert Errors.EventItemNotFound(key);\\n }\\n return value;\\n }\\n\\n function getArrayWithoutRevert(StringItems memory items, string memory key) public pure\\n returns(bool, string[] memory) {\\n for (uint i = 0; i < items.arrayItems.length; i++) {\\n if (compareStrings(items.arrayItems[i].key, key)) {\\n return (true, items.arrayItems[i].value);\\n }\\n }\\n string[] memory empty;\\n return (false, empty);\\n }\\n\\n function compareStrings(string memory a, string memory b) public pure returns (bool) {\\n return StringUtils.compareStrings(a, b);\\n }\\n}\\n\",\"keccak256\":\"0x4fc9dd0bed17a086fc9f5c5e785be7e6ab2ba21ad19db5b1c4337bf9c322fd35\",\"license\":\"BUSL-1.1\"},\"contracts/exchange/IGlvDepositHandler.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../glv/glvDeposit/IGlvDepositUtils.sol\\\";\\nimport \\\"../oracle/OracleUtils.sol\\\";\\n\\ninterface IGlvDepositHandler {\\n function createGlvDeposit(\\n address account,\\n uint256 srcChainId,\\n IGlvDepositUtils.CreateGlvDepositParams calldata params\\n ) external returns (bytes32);\\n\\n function cancelGlvDeposit(bytes32 key) external;\\n\\n function simulateExecuteGlvDeposit(bytes32 key, OracleUtils.SimulatePricesParams memory params) external;\\n}\\n\",\"keccak256\":\"0x620dc74509573a7b1bd9e6a377d7aae852c41eaa038602eec630715f7524513b\",\"license\":\"BUSL-1.1\"},\"contracts/exchange/IGlvWithdrawalHandler.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../glv/glvWithdrawal/IGlvWithdrawalUtils.sol\\\";\\nimport \\\"../oracle/OracleUtils.sol\\\";\\n\\ninterface IGlvWithdrawalHandler {\\n function createGlvWithdrawal(\\n address account,\\n uint256 srcChainId,\\n IGlvWithdrawalUtils.CreateGlvWithdrawalParams calldata params\\n ) external returns (bytes32);\\n\\n function cancelGlvWithdrawal(bytes32 key) external;\\n\\n function simulateExecuteGlvWithdrawal(bytes32 key, OracleUtils.SimulatePricesParams memory params) external;\\n}\\n\",\"keccak256\":\"0x8a8871994dabb1056fde5b5c723331299a3f8a67232dcf6f93e65292656fbb78\",\"license\":\"BUSL-1.1\"},\"contracts/external/IExternalHandler.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\ninterface IExternalHandler {\\n function makeExternalCalls(\\n address[] memory targets,\\n bytes[] memory dataList,\\n address[] memory refundTokens,\\n address[] memory refundReceivers\\n ) external;\\n}\\n\",\"keccak256\":\"0x046350110d70e964949d13440d34123a52770c74ce1b530194cc7b8e010a83ca\",\"license\":\"BUSL-1.1\"},\"contracts/glv/glvDeposit/GlvDeposit.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\n// @title GlvDeposit\\n// @dev Struct for GLV deposits\\nlibrary GlvDeposit {\\n // @dev there is a limit on the number of fields a struct can have when being passed\\n // or returned as a memory variable which can cause \\\"Stack too deep\\\" errors\\n // use sub-structs to avoid this issue\\n // large number of fields my also cause incorrect display in Tenderly\\n // @param addresses address values\\n // @param numbers number values\\n // @param flags boolean values\\n // @param _dataList a list of bytes32 values that can be used for additional data\\n struct Props {\\n Addresses addresses;\\n Numbers numbers;\\n Flags flags;\\n bytes32[] _dataList;\\n }\\n\\n // @param account the account depositing liquidity\\n // @param receiver the address to send the liquidity tokens to\\n // @param callbackContract the callback contract\\n // @param uiFeeReceiver the ui fee receiver\\n // @param market the market to deposit to\\n struct Addresses {\\n address glv;\\n address account;\\n address receiver;\\n address callbackContract;\\n address uiFeeReceiver;\\n address market;\\n address initialLongToken;\\n address initialShortToken;\\n address[] longTokenSwapPath;\\n address[] shortTokenSwapPath;\\n }\\n\\n // @param marketTokenAmount the amount of market tokens to deposit\\n // @param initialLongTokenAmount the amount of long tokens to deposit\\n // @param initialShortTokenAmount the amount of short tokens to deposit\\n // @param minGlvTokens the minimum acceptable number of Glv tokens\\n // sending funds back to the user in case the deposit gets cancelled\\n // @param executionFee the execution fee for keepers\\n // @param callbackGasLimit the gas limit for the callbackContract\\n // @param srcChainId the source chain id\\n struct Numbers {\\n uint256 marketTokenAmount;\\n uint256 initialLongTokenAmount;\\n uint256 initialShortTokenAmount;\\n uint256 minGlvTokens;\\n uint256 updatedAtTime;\\n uint256 executionFee;\\n uint256 callbackGasLimit;\\n uint256 srcChainId;\\n }\\n\\n // @param shouldUnwrapNativeToken whether to unwrap the native token when\\n // @param isMarketTokenDeposit whether to deposit market tokens or long/short tokens\\n struct Flags {\\n bool shouldUnwrapNativeToken;\\n bool isMarketTokenDeposit;\\n }\\n\\n\\n function account(Props memory props) internal pure returns (address) {\\n return props.addresses.account;\\n }\\n\\n function setAccount(Props memory props, address value) internal pure {\\n props.addresses.account = value;\\n }\\n\\n function receiver(Props memory props) internal pure returns (address) {\\n return props.addresses.receiver;\\n }\\n\\n function setReceiver(Props memory props, address value) internal pure {\\n props.addresses.receiver = value;\\n }\\n\\n function callbackContract(Props memory props) internal pure returns (address) {\\n return props.addresses.callbackContract;\\n }\\n\\n function setCallbackContract(Props memory props, address value) internal pure {\\n props.addresses.callbackContract = value;\\n }\\n\\n function uiFeeReceiver(Props memory props) internal pure returns (address) {\\n return props.addresses.uiFeeReceiver;\\n }\\n\\n function setUiFeeReceiver(Props memory props, address value) internal pure {\\n props.addresses.uiFeeReceiver = value;\\n }\\n\\n function glv(Props memory props) internal pure returns (address) {\\n return props.addresses.glv;\\n }\\n\\n function setGlv(Props memory props, address value) internal pure {\\n props.addresses.glv = value;\\n }\\n\\n function market(Props memory props) internal pure returns (address) {\\n return props.addresses.market;\\n }\\n\\n function setMarket(Props memory props, address value) internal pure {\\n props.addresses.market = value;\\n }\\n\\n function initialLongToken(Props memory props) internal pure returns (address) {\\n return props.addresses.initialLongToken;\\n }\\n\\n function setInitialLongToken(Props memory props, address value) internal pure {\\n props.addresses.initialLongToken = value;\\n }\\n\\n function initialShortToken(Props memory props) internal pure returns (address) {\\n return props.addresses.initialShortToken;\\n }\\n\\n function setInitialShortToken(Props memory props, address value) internal pure {\\n props.addresses.initialShortToken = value;\\n }\\n\\n function longTokenSwapPath(Props memory props) internal pure returns (address[] memory) {\\n return props.addresses.longTokenSwapPath;\\n }\\n\\n function setLongTokenSwapPath(Props memory props, address[] memory value) internal pure {\\n props.addresses.longTokenSwapPath = value;\\n }\\n\\n function shortTokenSwapPath(Props memory props) internal pure returns (address[] memory) {\\n return props.addresses.shortTokenSwapPath;\\n }\\n\\n function setShortTokenSwapPath(Props memory props, address[] memory value) internal pure {\\n props.addresses.shortTokenSwapPath = value;\\n }\\n\\n function marketTokenAmount(Props memory props) internal pure returns (uint256) {\\n return props.numbers.marketTokenAmount;\\n }\\n\\n function setMarketTokenAmount(Props memory props, uint256 value) internal pure {\\n props.numbers.marketTokenAmount = value;\\n }\\n\\n function initialLongTokenAmount(Props memory props) internal pure returns (uint256) {\\n return props.numbers.initialLongTokenAmount;\\n }\\n\\n function setInitialLongTokenAmount(Props memory props, uint256 value) internal pure {\\n props.numbers.initialLongTokenAmount = value;\\n }\\n\\n function initialShortTokenAmount(Props memory props) internal pure returns (uint256) {\\n return props.numbers.initialShortTokenAmount;\\n }\\n\\n function setInitialShortTokenAmount(Props memory props, uint256 value) internal pure {\\n props.numbers.initialShortTokenAmount = value;\\n }\\n\\n function minGlvTokens(Props memory props) internal pure returns (uint256) {\\n return props.numbers.minGlvTokens;\\n }\\n\\n function setMinGlvTokens(Props memory props, uint256 value) internal pure {\\n props.numbers.minGlvTokens = value;\\n }\\n\\n function updatedAtTime(Props memory props) internal pure returns (uint256) {\\n return props.numbers.updatedAtTime;\\n }\\n\\n function setUpdatedAtTime(Props memory props, uint256 value) internal pure {\\n props.numbers.updatedAtTime = value;\\n }\\n\\n function executionFee(Props memory props) internal pure returns (uint256) {\\n return props.numbers.executionFee;\\n }\\n\\n function setExecutionFee(Props memory props, uint256 value) internal pure {\\n props.numbers.executionFee = value;\\n }\\n\\n function callbackGasLimit(Props memory props) internal pure returns (uint256) {\\n return props.numbers.callbackGasLimit;\\n }\\n\\n function setCallbackGasLimit(Props memory props, uint256 value) internal pure {\\n props.numbers.callbackGasLimit = value;\\n }\\n\\n function srcChainId(Props memory props) internal pure returns (uint256) {\\n return props.numbers.srcChainId;\\n }\\n\\n function setSrcChainId(Props memory props, uint256 value) internal pure {\\n props.numbers.srcChainId = value;\\n }\\n\\n function shouldUnwrapNativeToken(Props memory props) internal pure returns (bool) {\\n return props.flags.shouldUnwrapNativeToken;\\n }\\n\\n function setShouldUnwrapNativeToken(Props memory props, bool value) internal pure {\\n props.flags.shouldUnwrapNativeToken = value;\\n }\\n\\n function isMarketTokenDeposit(Props memory props) internal pure returns (bool) {\\n return props.flags.isMarketTokenDeposit;\\n }\\n\\n function setIsMarketTokenDeposit(Props memory props, bool value) internal pure {\\n props.flags.isMarketTokenDeposit = value;\\n }\\n\\n function dataList(Props memory props) internal pure returns (bytes32[] memory) {\\n return props._dataList;\\n }\\n\\n function setDataList(Props memory props, bytes32[] memory value) internal pure {\\n props._dataList = value;\\n }\\n}\\n\",\"keccak256\":\"0x1ccb6e26de76db774ecf7db3a6d2806021eb00b14948cd374e9f6f82a23946b1\",\"license\":\"BUSL-1.1\"},\"contracts/glv/glvDeposit/GlvDepositStoreUtils.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../data/Keys.sol\\\";\\nimport \\\"../../data/DataStore.sol\\\";\\n\\nimport \\\"./GlvDeposit.sol\\\";\\n\\n/**\\n * @title GlvDepositStoreUtils\\n * @dev Library for deposit storage functions\\n */\\nlibrary GlvDepositStoreUtils {\\n using GlvDeposit for GlvDeposit.Props;\\n\\n bytes32 public constant ACCOUNT = keccak256(abi.encode(\\\"ACCOUNT\\\"));\\n bytes32 public constant RECEIVER = keccak256(abi.encode(\\\"RECEIVER\\\"));\\n bytes32 public constant CALLBACK_CONTRACT = keccak256(abi.encode(\\\"CALLBACK_CONTRACT\\\"));\\n bytes32 public constant UI_FEE_RECEIVER = keccak256(abi.encode(\\\"UI_FEE_RECEIVER\\\"));\\n bytes32 public constant GLV = keccak256(abi.encode(\\\"GLV\\\"));\\n bytes32 public constant MARKET = keccak256(abi.encode(\\\"MARKET\\\"));\\n bytes32 public constant INITIAL_LONG_TOKEN = keccak256(abi.encode(\\\"INITIAL_LONG_TOKEN\\\"));\\n bytes32 public constant INITIAL_SHORT_TOKEN = keccak256(abi.encode(\\\"INITIAL_SHORT_TOKEN\\\"));\\n bytes32 public constant LONG_TOKEN_SWAP_PATH = keccak256(abi.encode(\\\"LONG_TOKEN_SWAP_PATH\\\"));\\n bytes32 public constant SHORT_TOKEN_SWAP_PATH = keccak256(abi.encode(\\\"SHORT_TOKEN_SWAP_PATH\\\"));\\n\\n bytes32 public constant MARKET_TOKEN_AMOUNT = keccak256(abi.encode(\\\"MARKET_TOKEN_AMOUNT\\\"));\\n bytes32 public constant INITIAL_LONG_TOKEN_AMOUNT = keccak256(abi.encode(\\\"INITIAL_LONG_TOKEN_AMOUNT\\\"));\\n bytes32 public constant INITIAL_SHORT_TOKEN_AMOUNT = keccak256(abi.encode(\\\"INITIAL_SHORT_TOKEN_AMOUNT\\\"));\\n bytes32 public constant MIN_GLV_TOKENS = keccak256(abi.encode(\\\"MIN_GLV_TOKENS\\\"));\\n bytes32 public constant UPDATED_AT_TIME = keccak256(abi.encode(\\\"UPDATED_AT_TIME\\\"));\\n bytes32 public constant EXECUTION_FEE = keccak256(abi.encode(\\\"EXECUTION_FEE\\\"));\\n bytes32 public constant CALLBACK_GAS_LIMIT = keccak256(abi.encode(\\\"CALLBACK_GAS_LIMIT\\\"));\\n\\n bytes32 public constant SHOULD_UNWRAP_NATIVE_TOKEN = keccak256(abi.encode(\\\"SHOULD_UNWRAP_NATIVE_TOKEN\\\"));\\n bytes32 public constant IS_MARKET_TOKEN_DEPOSIT = keccak256(abi.encode(\\\"IS_MARKET_TOKEN_DEPOSIT\\\"));\\n\\n bytes32 public constant DATA_LIST = keccak256(abi.encode(\\\"DATA_LIST\\\"));\\n\\n bytes32 public constant SRC_CHAIN_ID = keccak256(abi.encode(\\\"SRC_CHAIN_ID\\\"));\\n\\n function get(DataStore dataStore, bytes32 key) external view returns (GlvDeposit.Props memory) {\\n GlvDeposit.Props memory glvDeposit;\\n if (!dataStore.containsBytes32(Keys.GLV_DEPOSIT_LIST, key)) {\\n return glvDeposit;\\n }\\n\\n glvDeposit.setAccount(dataStore.getAddress(\\n keccak256(abi.encode(key, ACCOUNT))\\n ));\\n\\n glvDeposit.setReceiver(dataStore.getAddress(\\n keccak256(abi.encode(key, RECEIVER))\\n ));\\n\\n glvDeposit.setCallbackContract(dataStore.getAddress(\\n keccak256(abi.encode(key, CALLBACK_CONTRACT))\\n ));\\n\\n glvDeposit.setUiFeeReceiver(dataStore.getAddress(\\n keccak256(abi.encode(key, UI_FEE_RECEIVER))\\n ));\\n\\n glvDeposit.setGlv(dataStore.getAddress(\\n keccak256(abi.encode(key, GLV))\\n ));\\n\\n glvDeposit.setMarket(dataStore.getAddress(\\n keccak256(abi.encode(key, MARKET))\\n ));\\n\\n glvDeposit.setInitialLongToken(dataStore.getAddress(\\n keccak256(abi.encode(key, INITIAL_LONG_TOKEN))\\n ));\\n\\n glvDeposit.setInitialShortToken(dataStore.getAddress(\\n keccak256(abi.encode(key, INITIAL_SHORT_TOKEN))\\n ));\\n\\n glvDeposit.setLongTokenSwapPath(dataStore.getAddressArray(\\n keccak256(abi.encode(key, LONG_TOKEN_SWAP_PATH))\\n ));\\n\\n glvDeposit.setShortTokenSwapPath(dataStore.getAddressArray(\\n keccak256(abi.encode(key, SHORT_TOKEN_SWAP_PATH))\\n ));\\n\\n glvDeposit.setMarketTokenAmount(dataStore.getUint(\\n keccak256(abi.encode(key, MARKET_TOKEN_AMOUNT))\\n ));\\n\\n glvDeposit.setInitialLongTokenAmount(dataStore.getUint(\\n keccak256(abi.encode(key, INITIAL_LONG_TOKEN_AMOUNT))\\n ));\\n\\n glvDeposit.setInitialShortTokenAmount(dataStore.getUint(\\n keccak256(abi.encode(key, INITIAL_SHORT_TOKEN_AMOUNT))\\n ));\\n\\n glvDeposit.setMinGlvTokens(dataStore.getUint(\\n keccak256(abi.encode(key, MIN_GLV_TOKENS))\\n ));\\n\\n glvDeposit.setUpdatedAtTime(dataStore.getUint(\\n keccak256(abi.encode(key, UPDATED_AT_TIME))\\n ));\\n\\n glvDeposit.setExecutionFee(dataStore.getUint(\\n keccak256(abi.encode(key, EXECUTION_FEE))\\n ));\\n\\n glvDeposit.setCallbackGasLimit(dataStore.getUint(\\n keccak256(abi.encode(key, CALLBACK_GAS_LIMIT))\\n ));\\n\\n glvDeposit.setSrcChainId(dataStore.getUint(\\n keccak256(abi.encode(key, SRC_CHAIN_ID))\\n ));\\n\\n glvDeposit.setShouldUnwrapNativeToken(dataStore.getBool(\\n keccak256(abi.encode(key, SHOULD_UNWRAP_NATIVE_TOKEN))\\n ));\\n\\n glvDeposit.setIsMarketTokenDeposit(dataStore.getBool(\\n keccak256(abi.encode(key, IS_MARKET_TOKEN_DEPOSIT))\\n ));\\n\\n glvDeposit.setDataList(dataStore.getBytes32Array(\\n keccak256(abi.encode(key, DATA_LIST))\\n ));\\n\\n return glvDeposit;\\n }\\n\\n function set(DataStore dataStore, bytes32 key, GlvDeposit.Props memory glvDeposit) external {\\n dataStore.addBytes32(\\n Keys.GLV_DEPOSIT_LIST,\\n key\\n );\\n\\n dataStore.addBytes32(\\n Keys.accountGlvDepositListKey(glvDeposit.account()),\\n key\\n );\\n\\n dataStore.setAddress(\\n keccak256(abi.encode(key, ACCOUNT)),\\n glvDeposit.account()\\n );\\n\\n dataStore.setAddress(\\n keccak256(abi.encode(key, RECEIVER)),\\n glvDeposit.receiver()\\n );\\n\\n dataStore.setAddress(\\n keccak256(abi.encode(key, CALLBACK_CONTRACT)),\\n glvDeposit.callbackContract()\\n );\\n\\n dataStore.setAddress(\\n keccak256(abi.encode(key, UI_FEE_RECEIVER)),\\n glvDeposit.uiFeeReceiver()\\n );\\n\\n dataStore.setAddress(\\n keccak256(abi.encode(key, GLV)),\\n glvDeposit.glv()\\n );\\n\\n dataStore.setAddress(\\n keccak256(abi.encode(key, MARKET)),\\n glvDeposit.market()\\n );\\n\\n dataStore.setAddress(\\n keccak256(abi.encode(key, INITIAL_LONG_TOKEN)),\\n glvDeposit.initialLongToken()\\n );\\n\\n dataStore.setAddress(\\n keccak256(abi.encode(key, INITIAL_SHORT_TOKEN)),\\n glvDeposit.initialShortToken()\\n );\\n\\n dataStore.setAddressArray(\\n keccak256(abi.encode(key, LONG_TOKEN_SWAP_PATH)),\\n glvDeposit.longTokenSwapPath()\\n );\\n\\n dataStore.setAddressArray(\\n keccak256(abi.encode(key, SHORT_TOKEN_SWAP_PATH)),\\n glvDeposit.shortTokenSwapPath()\\n );\\n\\n dataStore.setUint(\\n keccak256(abi.encode(key, MARKET_TOKEN_AMOUNT)),\\n glvDeposit.marketTokenAmount()\\n );\\n\\n dataStore.setUint(\\n keccak256(abi.encode(key, INITIAL_LONG_TOKEN_AMOUNT)),\\n glvDeposit.initialLongTokenAmount()\\n );\\n\\n dataStore.setUint(\\n keccak256(abi.encode(key, INITIAL_SHORT_TOKEN_AMOUNT)),\\n glvDeposit.initialShortTokenAmount()\\n );\\n\\n dataStore.setUint(\\n keccak256(abi.encode(key, MIN_GLV_TOKENS)),\\n glvDeposit.minGlvTokens()\\n );\\n\\n dataStore.setUint(\\n keccak256(abi.encode(key, UPDATED_AT_TIME)),\\n glvDeposit.updatedAtTime()\\n );\\n\\n dataStore.setUint(\\n keccak256(abi.encode(key, EXECUTION_FEE)),\\n glvDeposit.executionFee()\\n );\\n\\n dataStore.setUint(\\n keccak256(abi.encode(key, CALLBACK_GAS_LIMIT)),\\n glvDeposit.callbackGasLimit()\\n );\\n\\n dataStore.setUint(\\n keccak256(abi.encode(key, SRC_CHAIN_ID)),\\n glvDeposit.srcChainId()\\n );\\n\\n dataStore.setBool(\\n keccak256(abi.encode(key, SHOULD_UNWRAP_NATIVE_TOKEN)),\\n glvDeposit.shouldUnwrapNativeToken()\\n );\\n\\n dataStore.setBool(\\n keccak256(abi.encode(key, IS_MARKET_TOKEN_DEPOSIT)),\\n glvDeposit.isMarketTokenDeposit()\\n );\\n\\n dataStore.setBytes32Array(\\n keccak256(abi.encode(key, DATA_LIST)),\\n glvDeposit.dataList()\\n );\\n }\\n\\n function remove(DataStore dataStore, bytes32 key, address account) external {\\n if (!dataStore.containsBytes32(Keys.GLV_DEPOSIT_LIST, key)) {\\n revert Errors.GlvDepositNotFound(key);\\n }\\n\\n dataStore.removeBytes32(\\n Keys.GLV_DEPOSIT_LIST,\\n key\\n );\\n\\n dataStore.removeBytes32(\\n Keys.accountGlvDepositListKey(account),\\n key\\n );\\n\\n dataStore.removeAddress(\\n keccak256(abi.encode(key, ACCOUNT))\\n );\\n\\n dataStore.removeAddress(\\n keccak256(abi.encode(key, RECEIVER))\\n );\\n\\n dataStore.removeAddress(\\n keccak256(abi.encode(key, CALLBACK_CONTRACT))\\n );\\n\\n dataStore.removeAddress(\\n keccak256(abi.encode(key, UI_FEE_RECEIVER))\\n );\\n\\n dataStore.removeAddress(\\n keccak256(abi.encode(key, GLV))\\n );\\n\\n dataStore.removeAddress(\\n keccak256(abi.encode(key, MARKET))\\n );\\n\\n dataStore.removeAddress(\\n keccak256(abi.encode(key, INITIAL_LONG_TOKEN))\\n );\\n\\n dataStore.removeAddress(\\n keccak256(abi.encode(key, INITIAL_SHORT_TOKEN))\\n );\\n\\n dataStore.removeAddressArray(\\n keccak256(abi.encode(key, LONG_TOKEN_SWAP_PATH))\\n );\\n\\n dataStore.removeAddressArray(\\n keccak256(abi.encode(key, SHORT_TOKEN_SWAP_PATH))\\n );\\n\\n dataStore.removeUint(\\n keccak256(abi.encode(key, MARKET_TOKEN_AMOUNT))\\n );\\n\\n dataStore.removeUint(\\n keccak256(abi.encode(key, INITIAL_LONG_TOKEN_AMOUNT))\\n );\\n\\n dataStore.removeUint(\\n keccak256(abi.encode(key, INITIAL_SHORT_TOKEN_AMOUNT))\\n );\\n\\n dataStore.removeUint(\\n keccak256(abi.encode(key, MIN_GLV_TOKENS))\\n );\\n\\n dataStore.removeUint(\\n keccak256(abi.encode(key, UPDATED_AT_TIME))\\n );\\n\\n dataStore.removeUint(\\n keccak256(abi.encode(key, EXECUTION_FEE))\\n );\\n\\n dataStore.removeUint(\\n keccak256(abi.encode(key, CALLBACK_GAS_LIMIT))\\n );\\n\\n dataStore.removeUint(\\n keccak256(abi.encode(key, SRC_CHAIN_ID))\\n );\\n\\n dataStore.removeBool(\\n keccak256(abi.encode(key, SHOULD_UNWRAP_NATIVE_TOKEN))\\n );\\n\\n dataStore.removeBool(\\n keccak256(abi.encode(key, IS_MARKET_TOKEN_DEPOSIT))\\n );\\n\\n dataStore.removeBytes32Array(\\n keccak256(abi.encode(key, DATA_LIST))\\n );\\n }\\n\\n function getGlvDepositCount(DataStore dataStore) internal view returns (uint256) {\\n return dataStore.getBytes32Count(Keys.GLV_DEPOSIT_LIST);\\n }\\n\\n function getGlvDepositKeys(DataStore dataStore, uint256 start, uint256 end) internal view returns (bytes32[] memory) {\\n return dataStore.getBytes32ValuesAt(Keys.GLV_DEPOSIT_LIST, start, end);\\n }\\n\\n function getAccountGlvDepositCount(DataStore dataStore, address account) internal view returns (uint256) {\\n return dataStore.getBytes32Count(Keys.accountGlvDepositListKey(account));\\n }\\n\\n function getAccountGlvDepositKeys(DataStore dataStore, address account, uint256 start, uint256 end) internal view returns (bytes32[] memory) {\\n return dataStore.getBytes32ValuesAt(Keys.accountGlvDepositListKey(account), start, end);\\n }\\n}\\n\",\"keccak256\":\"0xdd78fa6a98421edaf48c2de28320af8c99c5a9dd5d9a7853c55ab4f8de5babcc\",\"license\":\"BUSL-1.1\"},\"contracts/glv/glvDeposit/IGlvDepositUtils.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\ninterface IGlvDepositUtils {\\n struct CreateGlvDepositParams {\\n CreateGlvDepositParamsAddresses addresses;\\n uint256 minGlvTokens;\\n uint256 executionFee;\\n uint256 callbackGasLimit;\\n bool shouldUnwrapNativeToken;\\n bool isMarketTokenDeposit;\\n bytes32[] dataList;\\n }\\n\\n struct CreateGlvDepositParamsAddresses {\\n address glv;\\n address market;\\n address receiver;\\n address callbackContract;\\n address uiFeeReceiver;\\n address initialLongToken;\\n address initialShortToken;\\n address[] longTokenSwapPath;\\n address[] shortTokenSwapPath;\\n }\\n}\\n\",\"keccak256\":\"0x19bc025f68c4ca4fd0716db4b9c018dbc53b6b906b2be03a34d37af3469de7d5\",\"license\":\"BUSL-1.1\"},\"contracts/glv/glvWithdrawal/GlvWithdrawal.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Withdrawal\\n * @dev Struct for withdrawals\\n */\\nlibrary GlvWithdrawal {\\n // @dev there is a limit on the number of fields a struct can have when being passed\\n // or returned as a memory variable which can cause \\\"Stack too deep\\\" errors\\n // use sub-structs to avoid this issue\\n // @param addresses address values\\n // @param numbers number values\\n // @param flags boolean values\\n // @param _dataList a list of bytes32 values that can be used for additional data\\n struct Props {\\n Addresses addresses;\\n Numbers numbers;\\n Flags flags;\\n bytes32[] _dataList;\\n }\\n\\n // @param account The account to withdraw for.\\n // @param receiver The address that will receive the withdrawn tokens.\\n // @param callbackContract The contract that will be called back.\\n // @param uiFeeReceiver The ui fee receiver.\\n // @param market The market on which the withdrawal will be executed.\\n // @param glv\\n struct Addresses {\\n address glv;\\n address market;\\n address account;\\n address receiver;\\n address callbackContract;\\n address uiFeeReceiver;\\n address[] longTokenSwapPath;\\n address[] shortTokenSwapPath;\\n }\\n\\n // @param glvTokenAmount The amount of market tokens that will be withdrawn.\\n // @param minLongTokenAmount The minimum amount of long tokens that must be withdrawn.\\n // @param minShortTokenAmount The minimum amount of short tokens that must be withdrawn.\\n // @param executionFee The execution fee for the withdrawal.\\n // @param callbackGasLimit The gas limit for calling the callback contract.\\n // @param srcChainId The source chain id.\\n struct Numbers {\\n uint256 glvTokenAmount;\\n uint256 minLongTokenAmount;\\n uint256 minShortTokenAmount;\\n uint256 updatedAtTime;\\n uint256 executionFee;\\n uint256 callbackGasLimit;\\n uint256 srcChainId;\\n }\\n\\n // @param shouldUnwrapNativeToken whether to unwrap the native token when\\n struct Flags {\\n bool shouldUnwrapNativeToken;\\n }\\n\\n function account(Props memory props) internal pure returns (address) {\\n return props.addresses.account;\\n }\\n\\n function setAccount(Props memory props, address value) internal pure {\\n props.addresses.account = value;\\n }\\n\\n function receiver(Props memory props) internal pure returns (address) {\\n return props.addresses.receiver;\\n }\\n\\n function setReceiver(Props memory props, address value) internal pure {\\n props.addresses.receiver = value;\\n }\\n\\n function callbackContract(Props memory props) internal pure returns (address) {\\n return props.addresses.callbackContract;\\n }\\n\\n function setCallbackContract(Props memory props, address value) internal pure {\\n props.addresses.callbackContract = value;\\n }\\n\\n function uiFeeReceiver(Props memory props) internal pure returns (address) {\\n return props.addresses.uiFeeReceiver;\\n }\\n\\n function setUiFeeReceiver(Props memory props, address value) internal pure {\\n props.addresses.uiFeeReceiver = value;\\n }\\n\\n function market(Props memory props) internal pure returns (address) {\\n return props.addresses.market;\\n }\\n\\n function setMarket(Props memory props, address value) internal pure {\\n props.addresses.market = value;\\n }\\n\\n function glv(Props memory props) internal pure returns (address) {\\n return props.addresses.glv;\\n }\\n\\n function setGlv(Props memory props, address value) internal pure {\\n props.addresses.glv = value;\\n }\\n\\n function longTokenSwapPath(Props memory props) internal pure returns (address[] memory) {\\n return props.addresses.longTokenSwapPath;\\n }\\n\\n function setLongTokenSwapPath(Props memory props, address[] memory value) internal pure {\\n props.addresses.longTokenSwapPath = value;\\n }\\n\\n function shortTokenSwapPath(Props memory props) internal pure returns (address[] memory) {\\n return props.addresses.shortTokenSwapPath;\\n }\\n\\n function setShortTokenSwapPath(Props memory props, address[] memory value) internal pure {\\n props.addresses.shortTokenSwapPath = value;\\n }\\n\\n function glvTokenAmount(Props memory props) internal pure returns (uint256) {\\n return props.numbers.glvTokenAmount;\\n }\\n\\n function setGlvTokenAmount(Props memory props, uint256 value) internal pure {\\n props.numbers.glvTokenAmount = value;\\n }\\n\\n function minLongTokenAmount(Props memory props) internal pure returns (uint256) {\\n return props.numbers.minLongTokenAmount;\\n }\\n\\n function setMinLongTokenAmount(Props memory props, uint256 value) internal pure {\\n props.numbers.minLongTokenAmount = value;\\n }\\n\\n function minShortTokenAmount(Props memory props) internal pure returns (uint256) {\\n return props.numbers.minShortTokenAmount;\\n }\\n\\n function setMinShortTokenAmount(Props memory props, uint256 value) internal pure {\\n props.numbers.minShortTokenAmount = value;\\n }\\n\\n function updatedAtTime(Props memory props) internal pure returns (uint256) {\\n return props.numbers.updatedAtTime;\\n }\\n\\n function setUpdatedAtTime(Props memory props, uint256 value) internal pure {\\n props.numbers.updatedAtTime = value;\\n }\\n\\n function executionFee(Props memory props) internal pure returns (uint256) {\\n return props.numbers.executionFee;\\n }\\n\\n function setExecutionFee(Props memory props, uint256 value) internal pure {\\n props.numbers.executionFee = value;\\n }\\n\\n function callbackGasLimit(Props memory props) internal pure returns (uint256) {\\n return props.numbers.callbackGasLimit;\\n }\\n\\n function setCallbackGasLimit(Props memory props, uint256 value) internal pure {\\n props.numbers.callbackGasLimit = value;\\n }\\n\\n function srcChainId(Props memory props) internal pure returns (uint256) {\\n return props.numbers.srcChainId;\\n }\\n\\n function setSrcChainId(Props memory props, uint256 value) internal pure {\\n props.numbers.srcChainId = value;\\n }\\n\\n function shouldUnwrapNativeToken(Props memory props) internal pure returns (bool) {\\n return props.flags.shouldUnwrapNativeToken;\\n }\\n\\n function setShouldUnwrapNativeToken(Props memory props, bool value) internal pure {\\n props.flags.shouldUnwrapNativeToken = value;\\n }\\n\\n function dataList(Props memory props) internal pure returns (bytes32[] memory) {\\n return props._dataList;\\n }\\n\\n function setDataList(Props memory props, bytes32[] memory value) internal pure {\\n props._dataList = value;\\n }\\n}\\n\",\"keccak256\":\"0x020f469ffd039179ceaed3b46135872a1f51a5f561496e2b423ac3e5e4abcd42\",\"license\":\"BUSL-1.1\"},\"contracts/glv/glvWithdrawal/GlvWithdrawalStoreUtils.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../data/Keys.sol\\\";\\nimport \\\"../../data/DataStore.sol\\\";\\n\\nimport \\\"./GlvWithdrawal.sol\\\";\\n\\n/**\\n * @title GlvWithdrawalStoreUtils\\n * @dev Library for withdrawal storage functions\\n */\\nlibrary GlvWithdrawalStoreUtils {\\n using GlvWithdrawal for GlvWithdrawal.Props;\\n\\n bytes32 public constant ACCOUNT = keccak256(abi.encode(\\\"ACCOUNT\\\"));\\n bytes32 public constant RECEIVER = keccak256(abi.encode(\\\"RECEIVER\\\"));\\n bytes32 public constant CALLBACK_CONTRACT = keccak256(abi.encode(\\\"CALLBACK_CONTRACT\\\"));\\n bytes32 public constant UI_FEE_RECEIVER = keccak256(abi.encode(\\\"UI_FEE_RECEIVER\\\"));\\n bytes32 public constant MARKET = keccak256(abi.encode(\\\"MARKET\\\"));\\n bytes32 public constant GLV = keccak256(abi.encode(\\\"GLV\\\"));\\n bytes32 public constant LONG_TOKEN_SWAP_PATH = keccak256(abi.encode(\\\"LONG_TOKEN_SWAP_PATH\\\"));\\n bytes32 public constant SHORT_TOKEN_SWAP_PATH = keccak256(abi.encode(\\\"SHORT_TOKEN_SWAP_PATH\\\"));\\n\\n bytes32 public constant GLV_TOKEN_AMOUNT = keccak256(abi.encode(\\\"GLV_TOKEN_AMOUNT\\\"));\\n bytes32 public constant MIN_LONG_TOKEN_AMOUNT = keccak256(abi.encode(\\\"MIN_LONG_TOKEN_AMOUNT\\\"));\\n bytes32 public constant MIN_SHORT_TOKEN_AMOUNT = keccak256(abi.encode(\\\"MIN_SHORT_TOKEN_AMOUNT\\\"));\\n bytes32 public constant UPDATED_AT_TIME = keccak256(abi.encode(\\\"UPDATED_AT_TIME\\\"));\\n bytes32 public constant EXECUTION_FEE = keccak256(abi.encode(\\\"EXECUTION_FEE\\\"));\\n bytes32 public constant CALLBACK_GAS_LIMIT = keccak256(abi.encode(\\\"CALLBACK_GAS_LIMIT\\\"));\\n bytes32 public constant SRC_CHAIN_ID = keccak256(abi.encode(\\\"SRC_CHAIN_ID\\\"));\\n\\n bytes32 public constant SHOULD_UNWRAP_NATIVE_TOKEN = keccak256(abi.encode(\\\"SHOULD_UNWRAP_NATIVE_TOKEN\\\"));\\n\\n bytes32 public constant DATA_LIST = keccak256(abi.encode(\\\"DATA_LIST\\\"));\\n\\n function get(DataStore dataStore, bytes32 key) external view returns (GlvWithdrawal.Props memory) {\\n GlvWithdrawal.Props memory withdrawal;\\n if (!dataStore.containsBytes32(Keys.GLV_WITHDRAWAL_LIST, key)) {\\n return withdrawal;\\n }\\n\\n withdrawal.setAccount(dataStore.getAddress(\\n keccak256(abi.encode(key, ACCOUNT))\\n ));\\n\\n withdrawal.setReceiver(dataStore.getAddress(\\n keccak256(abi.encode(key, RECEIVER))\\n ));\\n\\n withdrawal.setCallbackContract(dataStore.getAddress(\\n keccak256(abi.encode(key, CALLBACK_CONTRACT))\\n ));\\n\\n withdrawal.setUiFeeReceiver(dataStore.getAddress(\\n keccak256(abi.encode(key, UI_FEE_RECEIVER))\\n ));\\n\\n withdrawal.setMarket(dataStore.getAddress(\\n keccak256(abi.encode(key, MARKET))\\n ));\\n\\n withdrawal.setGlv(dataStore.getAddress(\\n keccak256(abi.encode(key, GLV))\\n ));\\n\\n withdrawal.setLongTokenSwapPath(dataStore.getAddressArray(\\n keccak256(abi.encode(key, LONG_TOKEN_SWAP_PATH))\\n ));\\n\\n withdrawal.setShortTokenSwapPath(dataStore.getAddressArray(\\n keccak256(abi.encode(key, SHORT_TOKEN_SWAP_PATH))\\n ));\\n\\n withdrawal.setGlvTokenAmount(dataStore.getUint(\\n keccak256(abi.encode(key, GLV_TOKEN_AMOUNT))\\n ));\\n\\n withdrawal.setMinLongTokenAmount(dataStore.getUint(\\n keccak256(abi.encode(key, MIN_LONG_TOKEN_AMOUNT))\\n ));\\n\\n withdrawal.setMinShortTokenAmount(dataStore.getUint(\\n keccak256(abi.encode(key, MIN_SHORT_TOKEN_AMOUNT))\\n ));\\n\\n withdrawal.setUpdatedAtTime(dataStore.getUint(\\n keccak256(abi.encode(key, UPDATED_AT_TIME))\\n ));\\n\\n withdrawal.setExecutionFee(dataStore.getUint(\\n keccak256(abi.encode(key, EXECUTION_FEE))\\n ));\\n\\n withdrawal.setCallbackGasLimit(dataStore.getUint(\\n keccak256(abi.encode(key, CALLBACK_GAS_LIMIT))\\n ));\\n\\n withdrawal.setSrcChainId(dataStore.getUint(\\n keccak256(abi.encode(key, SRC_CHAIN_ID))\\n ));\\n\\n withdrawal.setShouldUnwrapNativeToken(dataStore.getBool(\\n keccak256(abi.encode(key, SHOULD_UNWRAP_NATIVE_TOKEN))\\n ));\\n\\n withdrawal.setDataList(dataStore.getBytes32Array(\\n keccak256(abi.encode(key, DATA_LIST))\\n ));\\n\\n return withdrawal;\\n }\\n\\n function set(DataStore dataStore, bytes32 key, GlvWithdrawal.Props memory withdrawal) external {\\n dataStore.addBytes32(\\n Keys.GLV_WITHDRAWAL_LIST,\\n key\\n );\\n\\n dataStore.addBytes32(\\n Keys.accountGlvWithdrawalListKey(withdrawal.account()),\\n key\\n );\\n\\n dataStore.setAddress(\\n keccak256(abi.encode(key, ACCOUNT)),\\n withdrawal.account()\\n );\\n\\n dataStore.setAddress(\\n keccak256(abi.encode(key, RECEIVER)),\\n withdrawal.receiver()\\n );\\n\\n dataStore.setAddress(\\n keccak256(abi.encode(key, CALLBACK_CONTRACT)),\\n withdrawal.callbackContract()\\n );\\n\\n dataStore.setAddress(\\n keccak256(abi.encode(key, UI_FEE_RECEIVER)),\\n withdrawal.uiFeeReceiver()\\n );\\n\\n dataStore.setAddress(\\n keccak256(abi.encode(key, MARKET)),\\n withdrawal.market()\\n );\\n\\n dataStore.setAddress(\\n keccak256(abi.encode(key, GLV)),\\n withdrawal.glv()\\n );\\n\\n dataStore.setAddressArray(\\n keccak256(abi.encode(key, LONG_TOKEN_SWAP_PATH)),\\n withdrawal.longTokenSwapPath()\\n );\\n\\n dataStore.setAddressArray(\\n keccak256(abi.encode(key, SHORT_TOKEN_SWAP_PATH)),\\n withdrawal.shortTokenSwapPath()\\n );\\n\\n dataStore.setUint(\\n keccak256(abi.encode(key, GLV_TOKEN_AMOUNT)),\\n withdrawal.glvTokenAmount()\\n );\\n\\n dataStore.setUint(\\n keccak256(abi.encode(key, MIN_LONG_TOKEN_AMOUNT)),\\n withdrawal.minLongTokenAmount()\\n );\\n\\n dataStore.setUint(\\n keccak256(abi.encode(key, MIN_SHORT_TOKEN_AMOUNT)),\\n withdrawal.minShortTokenAmount()\\n );\\n\\n dataStore.setUint(\\n keccak256(abi.encode(key, UPDATED_AT_TIME)),\\n withdrawal.updatedAtTime()\\n );\\n\\n dataStore.setUint(\\n keccak256(abi.encode(key, EXECUTION_FEE)),\\n withdrawal.executionFee()\\n );\\n\\n dataStore.setUint(\\n keccak256(abi.encode(key, CALLBACK_GAS_LIMIT)),\\n withdrawal.callbackGasLimit()\\n );\\n\\n dataStore.setUint(\\n keccak256(abi.encode(key, SRC_CHAIN_ID)),\\n withdrawal.srcChainId()\\n );\\n\\n dataStore.setBool(\\n keccak256(abi.encode(key, SHOULD_UNWRAP_NATIVE_TOKEN)),\\n withdrawal.shouldUnwrapNativeToken()\\n );\\n\\n dataStore.setBytes32Array(\\n keccak256(abi.encode(key, DATA_LIST)),\\n withdrawal.dataList()\\n );\\n }\\n\\n function remove(DataStore dataStore, bytes32 key, address account) external {\\n if (!dataStore.containsBytes32(Keys.GLV_WITHDRAWAL_LIST, key)) {\\n revert Errors.GlvWithdrawalNotFound(key);\\n }\\n\\n dataStore.removeBytes32(\\n Keys.GLV_WITHDRAWAL_LIST,\\n key\\n );\\n\\n dataStore.removeBytes32(\\n Keys.accountGlvWithdrawalListKey(account),\\n key\\n );\\n\\n dataStore.removeAddress(\\n keccak256(abi.encode(key, ACCOUNT))\\n );\\n\\n dataStore.removeAddress(\\n keccak256(abi.encode(key, RECEIVER))\\n );\\n\\n dataStore.removeAddress(\\n keccak256(abi.encode(key, CALLBACK_CONTRACT))\\n );\\n\\n dataStore.removeAddress(\\n keccak256(abi.encode(key, UI_FEE_RECEIVER))\\n );\\n\\n dataStore.removeAddress(\\n keccak256(abi.encode(key, MARKET))\\n );\\n\\n dataStore.removeAddress(\\n keccak256(abi.encode(key, GLV))\\n );\\n\\n dataStore.removeAddressArray(\\n keccak256(abi.encode(key, LONG_TOKEN_SWAP_PATH))\\n );\\n\\n dataStore.removeAddressArray(\\n keccak256(abi.encode(key, SHORT_TOKEN_SWAP_PATH))\\n );\\n\\n dataStore.removeUint(\\n keccak256(abi.encode(key, GLV_TOKEN_AMOUNT))\\n );\\n\\n dataStore.removeUint(\\n keccak256(abi.encode(key, MIN_LONG_TOKEN_AMOUNT))\\n );\\n\\n dataStore.removeUint(\\n keccak256(abi.encode(key, MIN_SHORT_TOKEN_AMOUNT))\\n );\\n\\n dataStore.removeUint(\\n keccak256(abi.encode(key, UPDATED_AT_TIME))\\n );\\n\\n dataStore.removeUint(\\n keccak256(abi.encode(key, EXECUTION_FEE))\\n );\\n\\n dataStore.removeUint(\\n keccak256(abi.encode(key, CALLBACK_GAS_LIMIT))\\n );\\n\\n dataStore.removeUint(\\n keccak256(abi.encode(key, SRC_CHAIN_ID))\\n );\\n\\n dataStore.removeBool(\\n keccak256(abi.encode(key, SHOULD_UNWRAP_NATIVE_TOKEN))\\n );\\n\\n dataStore.removeBytes32Array(\\n keccak256(abi.encode(key, DATA_LIST))\\n );\\n }\\n\\n function getGlvWithdrawalCount(DataStore dataStore) internal view returns (uint256) {\\n return dataStore.getBytes32Count(Keys.GLV_WITHDRAWAL_LIST);\\n }\\n\\n function getGlvWithdrawalKeys(DataStore dataStore, uint256 start, uint256 end) internal view returns (bytes32[] memory) {\\n return dataStore.getBytes32ValuesAt(Keys.GLV_WITHDRAWAL_LIST, start, end);\\n }\\n\\n function getAccountGlvWithdrawalCount(DataStore dataStore, address account) internal view returns (uint256) {\\n return dataStore.getBytes32Count(Keys.accountGlvWithdrawalListKey(account));\\n }\\n\\n function getAccountGlvWithdrawalKeys(DataStore dataStore, address account, uint256 start, uint256 end) internal view returns (bytes32[] memory) {\\n return dataStore.getBytes32ValuesAt(Keys.accountGlvWithdrawalListKey(account), start, end);\\n }\\n}\\n\",\"keccak256\":\"0xbd0e799a290ae2b98a1c57079e9bbbd2d721bb04e784f65d97ee9f3922925ca9\",\"license\":\"BUSL-1.1\"},\"contracts/glv/glvWithdrawal/IGlvWithdrawalUtils.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\ninterface IGlvWithdrawalUtils {\\n struct CreateGlvWithdrawalParams {\\n CreateGlvWithdrawalParamsAddresses addresses;\\n uint256 minLongTokenAmount;\\n uint256 minShortTokenAmount;\\n bool shouldUnwrapNativeToken;\\n uint256 executionFee;\\n uint256 callbackGasLimit;\\n bytes32[] dataList;\\n }\\n\\n struct CreateGlvWithdrawalParamsAddresses {\\n address receiver;\\n address callbackContract;\\n address uiFeeReceiver;\\n address market;\\n address glv;\\n address[] longTokenSwapPath;\\n address[] shortTokenSwapPath;\\n }\\n}\\n\",\"keccak256\":\"0xad98f8b84e553f2e82dca41d4b12f88ac2d2e979e7fb3ce2c471265dcea471fe\",\"license\":\"BUSL-1.1\"},\"contracts/nonce/NonceUtils.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../data/DataStore.sol\\\";\\nimport \\\"../data/Keys.sol\\\";\\n\\n// @title NonceUtils\\n// @dev Library to keep track of an incrementing nonce value\\nlibrary NonceUtils {\\n // @dev get the current nonce value\\n // @param dataStore DataStore\\n function getCurrentNonce(DataStore dataStore) internal view returns (uint256) {\\n return dataStore.getUint(Keys.NONCE);\\n }\\n\\n // @dev increment the current nonce value\\n // @param dataStore DataStore\\n // @return the new nonce value\\n function incrementNonce(DataStore dataStore) internal returns (uint256) {\\n return dataStore.incrementUint(Keys.NONCE, 1);\\n }\\n\\n // @dev convenience function to create a bytes32 hash using the next nonce\\n // it would be possible to use the nonce directly as an ID / key\\n // however, for positions the key is a bytes32 value based on a hash of\\n // the position values\\n // so bytes32 is used instead for a standard key type\\n // @param dataStore DataStore\\n // @return bytes32 hash using the next nonce value\\n function getNextKey(DataStore dataStore) internal returns (bytes32) {\\n uint256 nonce = incrementNonce(dataStore);\\n bytes32 key = getKey(dataStore, nonce);\\n\\n return key;\\n }\\n\\n function getCurrentKey(DataStore dataStore) internal view returns (bytes32) {\\n uint256 nonce = getCurrentNonce(dataStore);\\n bytes32 key = getKey(dataStore, nonce);\\n\\n return key;\\n }\\n\\n function getKey(DataStore dataStore, uint256 nonce) internal pure returns (bytes32) {\\n return keccak256(abi.encode(address(dataStore), nonce));\\n }\\n}\\n\",\"keccak256\":\"0x2c1899b96634e9c726bab2fcf47da70410475bf02ae619c6801cdea348a0f50e\",\"license\":\"BUSL-1.1\"},\"contracts/oracle/OracleUtils.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Array.sol\\\";\\nimport \\\"../price/Price.sol\\\";\\n\\n// @title OracleUtils\\n// @dev Library for oracle functions\\nlibrary OracleUtils {\\n using Array for uint256[];\\n\\n struct SetPricesParams {\\n address[] tokens;\\n address[] providers;\\n bytes[] data;\\n }\\n\\n struct ValidatedPrice {\\n address token;\\n uint256 min;\\n uint256 max;\\n uint256 timestamp;\\n address provider;\\n }\\n\\n struct SimulatePricesParams {\\n address[] primaryTokens;\\n Price.Props[] primaryPrices;\\n uint256 minTimestamp;\\n uint256 maxTimestamp;\\n }\\n\\n function isOracleError(bytes4 errorSelector) internal pure returns (bool) {\\n if (isOracleTimestampError(errorSelector)) {\\n return true;\\n }\\n\\n if (isEmptyPriceError(errorSelector)) {\\n return true;\\n }\\n\\n return false;\\n }\\n\\n function isEmptyPriceError(bytes4 errorSelector) internal pure returns (bool) {\\n if (errorSelector == Errors.EmptyPrimaryPrice.selector) {\\n return true;\\n }\\n\\n return false;\\n }\\n\\n function isOracleTimestampError(bytes4 errorSelector) internal pure returns (bool) {\\n if (errorSelector == Errors.OracleTimestampsAreLargerThanRequestExpirationTime.selector) {\\n return true;\\n }\\n\\n if (errorSelector == Errors.OracleTimestampsAreSmallerThanRequired.selector) {\\n return true;\\n }\\n\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x76cec78707c742efd9b6f8e50a3ab441fd588ac226d5ae7a707ea8fdff0da09c\",\"license\":\"BUSL-1.1\"},\"contracts/price/Price.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\n// @title Price\\n// @dev Struct for prices\\nlibrary Price {\\n // @param min the min price\\n // @param max the max price\\n struct Props {\\n uint256 min;\\n uint256 max;\\n }\\n\\n // @dev check if a price is empty\\n // @param props Props\\n // @return whether a price is empty\\n function isEmpty(Props memory props) internal pure returns (bool) {\\n return props.min == 0 || props.max == 0;\\n }\\n\\n // @dev get the average of the min and max values\\n // @param props Props\\n // @return the average of the min and max values\\n function midPrice(Props memory props) internal pure returns (uint256) {\\n return (props.max + props.min) / 2;\\n }\\n\\n // @dev pick either the min or max value\\n // @param props Props\\n // @param maximize whether to pick the min or max value\\n // @return either the min or max value\\n function pickPrice(Props memory props, bool maximize) internal pure returns (uint256) {\\n return maximize ? props.max : props.min;\\n }\\n\\n // @dev pick the min or max price depending on whether it is for a long or short position\\n // and whether the pending pnl should be maximized or not\\n // @param props Props\\n // @param isLong whether it is for a long or short position\\n // @param maximize whether the pnl should be maximized or not\\n // @return the min or max price\\n function pickPriceForPnl(Props memory props, bool isLong, bool maximize) internal pure returns (uint256) {\\n // for long positions, pick the larger price to maximize pnl\\n // for short positions, pick the smaller price to maximize pnl\\n if (isLong) {\\n return maximize ? props.max : props.min;\\n }\\n\\n return maximize ? props.min : props.max;\\n }\\n}\\n\",\"keccak256\":\"0x39783950d37d565ee3fbff5023206cfb6993bb49523e7fe37f367393cb54bedd\",\"license\":\"BUSL-1.1\"},\"contracts/role/Role.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Role\\n * @dev Library for role keys\\n */\\nlibrary Role {\\n /**\\n * @dev The ROLE_ADMIN role.\\n * Hash: 0x56908b85b56869d7c69cd020749874f238259af9646ca930287866cdd660b7d9\\n */\\n bytes32 public constant ROLE_ADMIN = keccak256(abi.encode(\\\"ROLE_ADMIN\\\"));\\n\\n /**\\n * @dev The TIMELOCK_ADMIN role.\\n * Hash: 0xf49b0c86b385620e25b0985905d1a112a5f1bc1d51a7a292a8cdf112b3a7c47c\\n */\\n bytes32 public constant TIMELOCK_ADMIN = keccak256(abi.encode(\\\"TIMELOCK_ADMIN\\\"));\\n\\n /**\\n * @dev The TIMELOCK_MULTISIG role.\\n * Hash: 0xe068a8d811c3c8290a8be34607cfa3184b26ffb8dea4dde7a451adfba9fa173a\\n */\\n bytes32 public constant TIMELOCK_MULTISIG = keccak256(abi.encode(\\\"TIMELOCK_MULTISIG\\\"));\\n\\n /**\\n * @dev The CONFIG_KEEPER role.\\n * Hash: 0x901fb3de937a1dcb6ecaf26886fda47a088e74f36232a0673eade97079dc225b\\n */\\n bytes32 public constant CONFIG_KEEPER = keccak256(abi.encode(\\\"CONFIG_KEEPER\\\"));\\n\\n /**\\n * @dev The LIMITED_CONFIG_KEEPER role.\\n * Hash: 0xb49beded4d572a2d32002662fc5c735817329f4337b3a488aab0b5e835c01ba7\\n */\\n bytes32 public constant LIMITED_CONFIG_KEEPER = keccak256(abi.encode(\\\"LIMITED_CONFIG_KEEPER\\\"));\\n\\n /**\\n * @dev The CONTROLLER role.\\n * Hash: 0x97adf037b2472f4a6a9825eff7d2dd45e37f2dc308df2a260d6a72af4189a65b\\n */\\n bytes32 public constant CONTROLLER = keccak256(abi.encode(\\\"CONTROLLER\\\"));\\n\\n /**\\n * @dev The GOV_TOKEN_CONTROLLER role.\\n * Hash: 0x16a157db08319d4eaf6b157a71f5d2e18c6500cab8a25bee0b4f9c753cb13690\\n */\\n bytes32 public constant GOV_TOKEN_CONTROLLER = keccak256(abi.encode(\\\"GOV_TOKEN_CONTROLLER\\\"));\\n\\n /**\\n * @dev The ROUTER_PLUGIN role.\\n * Hash: 0xc82e6cc76072f8edb32d42796e58e13ab6e145524eb6b36c073be82f20d410f3\\n */\\n bytes32 public constant ROUTER_PLUGIN = keccak256(abi.encode(\\\"ROUTER_PLUGIN\\\"));\\n\\n /**\\n * @dev The MARKET_KEEPER role.\\n * Hash: 0xd66692c70b60cf1337e643d6a6473f6865d8c03f3c26b460df3d19b504fb46ae\\n */\\n bytes32 public constant MARKET_KEEPER = keccak256(abi.encode(\\\"MARKET_KEEPER\\\"));\\n\\n /**\\n * @dev The FEE_KEEPER role.\\n * Hash: 0xe0ff4cc0c6ecffab6db3f63ea62dd53f8091919ac57669f1bb3d9828278081d8\\n */\\n bytes32 public constant FEE_KEEPER = keccak256(abi.encode(\\\"FEE_KEEPER\\\"));\\n\\n /**\\n * @dev The FEE_DISTRIBUTION_KEEPER role.\\n * Hash: 0xc23a98a1bf683201c11eeeb8344052ad3bc603c8ddcad06093edc1e8dafa96a2\\n */\\n bytes32 public constant FEE_DISTRIBUTION_KEEPER = keccak256(abi.encode(\\\"FEE_DISTRIBUTION_KEEPER\\\"));\\n\\n /**\\n * @dev The ORDER_KEEPER role.\\n * Hash: 0x40a07f8f0fc57fcf18b093d96362a8e661eaac7b7e6edbf66f242111f83a6794\\n */\\n bytes32 public constant ORDER_KEEPER = keccak256(abi.encode(\\\"ORDER_KEEPER\\\"));\\n\\n /**\\n * @dev The FROZEN_ORDER_KEEPER role.\\n * Hash: 0xcb6c7bc0d25d73c91008af44527b80c56dee4db8965845d926a25659a4a8bc07\\n */\\n bytes32 public constant FROZEN_ORDER_KEEPER = keccak256(abi.encode(\\\"FROZEN_ORDER_KEEPER\\\"));\\n\\n /**\\n * @dev The PRICING_KEEPER role.\\n * Hash: 0x2700e36dc4e6a0daa977bffd4368adbd48f8058da74152919f91f58eddb42103\\n */\\n bytes32 public constant PRICING_KEEPER = keccak256(abi.encode(\\\"PRICING_KEEPER\\\"));\\n /**\\n * @dev The LIQUIDATION_KEEPER role.\\n * Hash: 0x556c788ffc0574ec93966d808c170833d96489c9c58f5bcb3dadf711ba28720e\\n */\\n bytes32 public constant LIQUIDATION_KEEPER = keccak256(abi.encode(\\\"LIQUIDATION_KEEPER\\\"));\\n /**\\n * @dev The ADL_KEEPER role.\\n * Hash: 0xb37d64edaeaf5e634c13682dbd813f5a12fec9eb4f74433a089e7a3c3289af91\\n */\\n bytes32 public constant ADL_KEEPER = keccak256(abi.encode(\\\"ADL_KEEPER\\\"));\\n /**\\n * @dev The CONTRIBUTOR_KEEPER role.\\n * Hash: 0xfa89e7b5ea0a346d73c71d7d6a3512b9f2ea2c2e6c5fb8211ec351d35deef0f4\\n */\\n bytes32 public constant CONTRIBUTOR_KEEPER = keccak256(abi.encode(\\\"CONTRIBUTOR_KEEPER\\\"));\\n /**\\n * @dev The CONTRIBUTOR_DISTRIBUTOR role.\\n * Hash: 0xcdf6da7ad30d8b9afea66fb1cb11b1b7d0b50e9b30b69561a3ca52c39251360c\\n */\\n bytes32 public constant CONTRIBUTOR_DISTRIBUTOR = keccak256(abi.encode(\\\"CONTRIBUTOR_DISTRIBUTOR\\\"));\\n\\n /**\\n * @dev The CLAIM_ADMIN role.\\n * Hash: 0x3816efacf145d41a12de1ee8ae9dc340b887f4ca0f3bba62a645b2fefa4cab33\\n */\\n bytes32 public constant CLAIM_ADMIN = keccak256(abi.encode(\\\"CLAIM_ADMIN\\\"));\\n /**\\n * @dev The MULTICHAIN_READER role.\\n * Hash: 0xdb34a94d601aa170c498f99c1628bd6182669f4ea4522eb87795649193ee93f8\\n */\\n bytes32 public constant MULTICHAIN_READER = keccak256(abi.encode(\\\"MULTICHAIN_READER\\\"));\\n}\\n\",\"keccak256\":\"0x9cdae2fd9f0dd3579ef80b29eccfe0b1107efc4e280870f86b0d764aa4c3d5f5\",\"license\":\"BUSL-1.1\"},\"contracts/role/RoleModule.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./RoleStore.sol\\\";\\n\\n/**\\n * @title RoleModule\\n * @dev Contract for role validation functions\\n */\\ncontract RoleModule {\\n RoleStore public immutable roleStore;\\n\\n /**\\n * @dev Constructor that initializes the role store for this contract.\\n *\\n * @param _roleStore The contract instance to use as the role store.\\n */\\n constructor(RoleStore _roleStore) {\\n roleStore = _roleStore;\\n }\\n\\n modifier onlySelfOrController() {\\n if (msg.sender != address(this) && !roleStore.hasRole(msg.sender, Role.CONTROLLER)) {\\n revert Errors.Unauthorized(msg.sender, \\\"SELF_OR_CONTROLLER\\\");\\n }\\n _;\\n }\\n\\n /**\\n * @dev Only allows the contract's own address to call the function.\\n */\\n modifier onlySelf() {\\n if (msg.sender != address(this)) {\\n revert Errors.Unauthorized(msg.sender, \\\"SELF\\\");\\n }\\n _;\\n }\\n\\n /**\\n * @dev Only allows addresses with the TIMELOCK_MULTISIG role to call the function.\\n */\\n modifier onlyTimelockMultisig() {\\n _validateRole(Role.TIMELOCK_MULTISIG, \\\"TIMELOCK_MULTISIG\\\");\\n _;\\n }\\n\\n /**\\n * @dev Only allows addresses with the TIMELOCK_ADMIN role to call the function.\\n */\\n modifier onlyTimelockAdmin() {\\n _validateRole(Role.TIMELOCK_ADMIN, \\\"TIMELOCK_ADMIN\\\");\\n _;\\n }\\n\\n /**\\n * @dev Only allows addresses with the CONFIG_KEEPER role to call the function.\\n */\\n modifier onlyConfigKeeper() {\\n _validateRole(Role.CONFIG_KEEPER, \\\"CONFIG_KEEPER\\\");\\n _;\\n }\\n\\n /**\\n * @dev Only allows addresses with the LIMITED_CONFIG_KEEPER role to call the function.\\n */\\n modifier onlyLimitedConfigKeeper() {\\n _validateRole(Role.LIMITED_CONFIG_KEEPER, \\\"LIMITED_CONFIG_KEEPER\\\");\\n _;\\n }\\n\\n /**\\n * @dev Only allows addresses with the CONTROLLER role to call the function.\\n */\\n modifier onlyController() {\\n _validateRole(Role.CONTROLLER, \\\"CONTROLLER\\\");\\n _;\\n }\\n\\n /**\\n * @dev Only allows addresses with the GOV_TOKEN_CONTROLLER role to call the function.\\n */\\n modifier onlyGovTokenController() {\\n _validateRole(Role.GOV_TOKEN_CONTROLLER, \\\"GOV_TOKEN_CONTROLLER\\\");\\n _;\\n }\\n\\n /**\\n * @dev Only allows addresses with the ROUTER_PLUGIN role to call the function.\\n */\\n modifier onlyRouterPlugin() {\\n _validateRole(Role.ROUTER_PLUGIN, \\\"ROUTER_PLUGIN\\\");\\n _;\\n }\\n\\n /**\\n * @dev Only allows addresses with the MARKET_KEEPER role to call the function.\\n */\\n modifier onlyMarketKeeper() {\\n _validateRole(Role.MARKET_KEEPER, \\\"MARKET_KEEPER\\\");\\n _;\\n }\\n\\n /**\\n * @dev Only allows addresses with the FEE_KEEPER role to call the function.\\n */\\n modifier onlyFeeKeeper() {\\n _validateRole(Role.FEE_KEEPER, \\\"FEE_KEEPER\\\");\\n _;\\n }\\n\\n /**\\n * @dev Only allows addresses with the FEE_DISTRIBUTION_KEEPER role to call the function.\\n */\\n modifier onlyFeeDistributionKeeper() {\\n _validateRole(Role.FEE_DISTRIBUTION_KEEPER, \\\"FEE_DISTRIBUTION_KEEPER\\\");\\n _;\\n }\\n\\n /**\\n * @dev Only allows addresses with the ORDER_KEEPER role to call the function.\\n */\\n modifier onlyOrderKeeper() {\\n _validateRole(Role.ORDER_KEEPER, \\\"ORDER_KEEPER\\\");\\n _;\\n }\\n\\n /**\\n * @dev Only allows addresses with the PRICING_KEEPER role to call the function.\\n */\\n modifier onlyPricingKeeper() {\\n _validateRole(Role.PRICING_KEEPER, \\\"PRICING_KEEPER\\\");\\n _;\\n }\\n\\n /**\\n * @dev Only allows addresses with the LIQUIDATION_KEEPER role to call the function.\\n */\\n modifier onlyLiquidationKeeper() {\\n _validateRole(Role.LIQUIDATION_KEEPER, \\\"LIQUIDATION_KEEPER\\\");\\n _;\\n }\\n\\n /**\\n * @dev Only allows addresses with the ADL_KEEPER role to call the function.\\n */\\n modifier onlyAdlKeeper() {\\n _validateRole(Role.ADL_KEEPER, \\\"ADL_KEEPER\\\");\\n _;\\n }\\n\\n /**\\n * @dev Only allows addresses with the CONTRIBUTOR_KEEPER role to call the function.\\n */\\n modifier onlyContributorKeeper() {\\n _validateRole(Role.CONTRIBUTOR_KEEPER, \\\"CONTRIBUTOR_KEEPER\\\");\\n _;\\n }\\n\\n /**\\n * @dev Only allows addresses with the CONTRIBUTOR_DISTRIBUTOR role to call the function.\\n */\\n modifier onlyContributorDistributor() {\\n _validateRole(Role.CONTRIBUTOR_DISTRIBUTOR, \\\"CONTRIBUTOR_DISTRIBUTOR\\\");\\n _;\\n }\\n\\n /**\\n * @dev Only allows addresses with the CLAIM_ADMIN role to call the function.\\n */\\n modifier onlyClaimAdmin() {\\n _validateRole(Role.CLAIM_ADMIN, \\\"CLAIM_ADMIN\\\");\\n _;\\n }\\n\\n /**\\n * @dev Only allows addresses with the MULTICHAIN_READER role to call the function.\\n */\\n modifier onlyMultichainReader() {\\n _validateRole(Role.MULTICHAIN_READER, \\\"MULTICHAIN_READER\\\");\\n _;\\n }\\n\\n /**\\n * @dev Validates that the caller has the specified role.\\n *\\n * If the caller does not have the specified role, the transaction is reverted.\\n *\\n * @param role The key of the role to validate.\\n * @param roleName The name of the role to validate.\\n */\\n function _validateRole(bytes32 role, string memory roleName) internal view {\\n if (!roleStore.hasRole(msg.sender, role)) {\\n revert Errors.Unauthorized(msg.sender, roleName);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc765f8f14eaaa274c68348a037738e9eab3aa8b65aa3cac4f9bbce578184072a\",\"license\":\"BUSL-1.1\"},\"contracts/role/RoleStore.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport \\\"../utils/EnumerableValues.sol\\\";\\nimport \\\"./Role.sol\\\";\\nimport \\\"../error/Errors.sol\\\";\\n\\n/**\\n * @title RoleStore\\n * @dev Stores roles and their members.\\n */\\ncontract RoleStore {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n using EnumerableValues for EnumerableSet.AddressSet;\\n using EnumerableValues for EnumerableSet.Bytes32Set;\\n\\n EnumerableSet.Bytes32Set internal roles;\\n mapping(bytes32 => EnumerableSet.AddressSet) internal roleMembers;\\n // checking if an account has a role is a frequently used function\\n // roleCache helps to save gas by offering a more efficient lookup\\n // vs calling roleMembers[key].contains(account)\\n mapping(address => mapping (bytes32 => bool)) roleCache;\\n\\n modifier onlyRoleAdmin() {\\n if (!hasRole(msg.sender, Role.ROLE_ADMIN)) {\\n revert Errors.Unauthorized(msg.sender, \\\"ROLE_ADMIN\\\");\\n }\\n _;\\n }\\n\\n constructor() {\\n _grantRole(msg.sender, Role.ROLE_ADMIN);\\n }\\n\\n /**\\n * @dev Grants the specified role to the given account.\\n *\\n * @param account The address of the account.\\n * @param roleKey The key of the role to grant.\\n */\\n function grantRole(address account, bytes32 roleKey) external onlyRoleAdmin {\\n _grantRole(account, roleKey);\\n }\\n\\n /**\\n * @dev Revokes the specified role from the given account.\\n *\\n * @param account The address of the account.\\n * @param roleKey The key of the role to revoke.\\n */\\n function revokeRole(address account, bytes32 roleKey) external onlyRoleAdmin {\\n _revokeRole(account, roleKey);\\n }\\n\\n /**\\n * @dev Returns true if the given account has the specified role.\\n *\\n * @param account The address of the account.\\n * @param roleKey The key of the role.\\n * @return True if the account has the role, false otherwise.\\n */\\n function hasRole(address account, bytes32 roleKey) public view returns (bool) {\\n return roleCache[account][roleKey];\\n }\\n\\n /**\\n * @dev Returns the number of roles stored in the contract.\\n *\\n * @return The number of roles.\\n */\\n function getRoleCount() external view returns (uint256) {\\n return roles.length();\\n }\\n\\n /**\\n * @dev Returns the keys of the roles stored in the contract.\\n *\\n * @param start The starting index of the range of roles to return.\\n * @param end The ending index of the range of roles to return.\\n * @return The keys of the roles.\\n */\\n function getRoles(uint256 start, uint256 end) external view returns (bytes32[] memory) {\\n return roles.valuesAt(start, end);\\n }\\n\\n /**\\n * @dev Returns the number of members of the specified role.\\n *\\n * @param roleKey The key of the role.\\n * @return The number of members of the role.\\n */\\n function getRoleMemberCount(bytes32 roleKey) external view returns (uint256) {\\n return roleMembers[roleKey].length();\\n }\\n\\n /**\\n * @dev Returns the members of the specified role.\\n *\\n * @param roleKey The key of the role.\\n * @param start the start index, the value for this index will be included.\\n * @param end the end index, the value for this index will not be included.\\n * @return The members of the role.\\n */\\n function getRoleMembers(bytes32 roleKey, uint256 start, uint256 end) external view returns (address[] memory) {\\n return roleMembers[roleKey].valuesAt(start, end);\\n }\\n\\n function _grantRole(address account, bytes32 roleKey) internal {\\n roles.add(roleKey);\\n roleMembers[roleKey].add(account);\\n roleCache[account][roleKey] = true;\\n }\\n\\n function _revokeRole(address account, bytes32 roleKey) internal {\\n roleMembers[roleKey].remove(account);\\n roleCache[account][roleKey] = false;\\n\\n if (roleMembers[roleKey].length() == 0) {\\n if (roleKey == Role.ROLE_ADMIN) {\\n revert Errors.ThereMustBeAtLeastOneRoleAdmin();\\n }\\n if (roleKey == Role.TIMELOCK_MULTISIG) {\\n revert Errors.ThereMustBeAtLeastOneTimelockMultiSig();\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaa7be1876450ec19568c0e12e4238332c96eb921974a19c0e4a6fe1fb943bf6d\",\"license\":\"BUSL-1.1\"},\"contracts/router/BaseRouter.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\n\\nimport \\\"../utils/PayableMulticall.sol\\\";\\nimport \\\"../utils/AccountUtils.sol\\\";\\n\\nimport \\\"../data/DataStore.sol\\\";\\nimport \\\"../event/EventEmitter.sol\\\";\\nimport \\\"../token/TokenUtils.sol\\\";\\n\\nimport \\\"./Router.sol\\\";\\n\\ncontract BaseRouter is ReentrancyGuard, PayableMulticall, RoleModule {\\n using SafeERC20 for IERC20;\\n\\n Router public immutable router;\\n DataStore public immutable dataStore;\\n EventEmitter public immutable eventEmitter;\\n\\n constructor(\\n Router _router,\\n RoleStore _roleStore,\\n DataStore _dataStore,\\n EventEmitter _eventEmitter\\n ) RoleModule(_roleStore) {\\n router = _router;\\n dataStore = _dataStore;\\n eventEmitter = _eventEmitter;\\n }\\n\\n // @dev Wraps the specified amount of native tokens into WNT then sends the WNT to the specified address\\n function sendWnt(address receiver, uint256 amount) external payable nonReentrant {\\n AccountUtils.validateReceiver(receiver);\\n TokenUtils.depositAndSendWrappedNativeToken(dataStore, receiver, amount);\\n }\\n\\n // @dev Sends the given amount of tokens to the given address\\n function sendTokens(address token, address receiver, uint256 amount) external payable nonReentrant {\\n AccountUtils.validateReceiver(receiver);\\n address account = msg.sender;\\n router.pluginTransfer(token, account, receiver, amount);\\n }\\n\\n function sendNativeToken(address receiver, uint256 amount) external payable nonReentrant {\\n AccountUtils.validateReceiver(receiver);\\n TokenUtils.sendNativeToken(dataStore, receiver, amount);\\n }\\n}\\n\",\"keccak256\":\"0xad289997c678f1505bb66bab6f023ef7dcd72775965cdcbd9e762a3c9e7d77e8\",\"license\":\"BUSL-1.1\"},\"contracts/router/GlvRouter.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./BaseRouter.sol\\\";\\nimport \\\"../exchange/IGlvWithdrawalHandler.sol\\\";\\nimport \\\"../exchange/IGlvDepositHandler.sol\\\";\\nimport \\\"../external/IExternalHandler.sol\\\";\\nimport \\\"../glv/glvDeposit/GlvDepositStoreUtils.sol\\\";\\nimport \\\"../glv/glvWithdrawal/GlvWithdrawalStoreUtils.sol\\\";\\nimport \\\"../nonce/NonceUtils.sol\\\";\\n\\ncontract GlvRouter is BaseRouter {\\n using GlvDeposit for GlvDeposit.Props;\\n using GlvWithdrawal for GlvWithdrawal.Props;\\n\\n IGlvDepositHandler public immutable glvDepositHandler;\\n IGlvWithdrawalHandler public immutable glvWithdrawalHandler;\\n IExternalHandler public immutable externalHandler;\\n\\n constructor(\\n Router _router,\\n RoleStore _roleStore,\\n DataStore _dataStore,\\n EventEmitter _eventEmitter,\\n IGlvDepositHandler _glvDepositHandler,\\n IGlvWithdrawalHandler _glvWithdrawalHandler,\\n IExternalHandler _externalHandler\\n ) BaseRouter(_router, _roleStore, _dataStore, _eventEmitter) {\\n glvDepositHandler = _glvDepositHandler;\\n glvWithdrawalHandler = _glvWithdrawalHandler;\\n externalHandler = _externalHandler;\\n }\\n\\n receive() external payable {\\n address wnt = TokenUtils.wnt(dataStore);\\n if (msg.sender != wnt) {\\n revert Errors.InvalidNativeTokenSender(msg.sender);\\n }\\n }\\n\\n function createGlvDeposit(\\n IGlvDepositUtils.CreateGlvDepositParams calldata params\\n ) external payable nonReentrant returns (bytes32) {\\n address account = msg.sender;\\n\\n return glvDepositHandler.createGlvDeposit(account, 0, params); // srcChainId is the current block.chainId\\n }\\n\\n function cancelGlvDeposit(bytes32 key) external nonReentrant {\\n GlvDeposit.Props memory glvDeposit = GlvDepositStoreUtils.get(dataStore, key);\\n if (glvDeposit.account() == address(0)) {\\n revert Errors.EmptyGlvDeposit();\\n }\\n\\n if (glvDeposit.account() != msg.sender) {\\n revert Errors.Unauthorized(msg.sender, \\\"account for cancelGlvDeposit\\\");\\n }\\n\\n glvDepositHandler.cancelGlvDeposit(key);\\n }\\n\\n function simulateExecuteGlvDeposit(\\n bytes32 key,\\n OracleUtils.SimulatePricesParams memory simulatedOracleParams\\n ) external payable nonReentrant {\\n glvDepositHandler.simulateExecuteGlvDeposit(key, simulatedOracleParams);\\n }\\n\\n function simulateExecuteLatestGlvDeposit(\\n OracleUtils.SimulatePricesParams memory simulatedOracleParams\\n ) external payable nonReentrant {\\n bytes32 key = NonceUtils.getCurrentKey(dataStore);\\n glvDepositHandler.simulateExecuteGlvDeposit(key, simulatedOracleParams);\\n }\\n\\n function createGlvWithdrawal(\\n IGlvWithdrawalUtils.CreateGlvWithdrawalParams calldata params\\n ) external payable nonReentrant returns (bytes32) {\\n address account = msg.sender;\\n\\n return glvWithdrawalHandler.createGlvWithdrawal(account, 0, params); // srcChainId is the current block.chainId\\n }\\n\\n function cancelGlvWithdrawal(bytes32 key) external nonReentrant {\\n GlvWithdrawal.Props memory glvWithdrawal = GlvWithdrawalStoreUtils.get(dataStore, key);\\n if (glvWithdrawal.account() == address(0)) {\\n revert Errors.EmptyGlvWithdrawal();\\n }\\n\\n if (glvWithdrawal.account() != msg.sender) {\\n revert Errors.Unauthorized(msg.sender, \\\"account for cancelGlvWithdrawal\\\");\\n }\\n\\n glvWithdrawalHandler.cancelGlvWithdrawal(key);\\n }\\n\\n function simulateExecuteGlvWithdrawal(\\n bytes32 key,\\n OracleUtils.SimulatePricesParams memory simulatedOracleParams\\n ) external payable nonReentrant {\\n glvWithdrawalHandler.simulateExecuteGlvWithdrawal(key, simulatedOracleParams);\\n }\\n\\n function simulateExecuteLatestGlvWithdrawal(\\n OracleUtils.SimulatePricesParams memory simulatedOracleParams\\n ) external payable nonReentrant {\\n bytes32 key = NonceUtils.getCurrentKey(dataStore);\\n glvWithdrawalHandler.simulateExecuteGlvWithdrawal(key, simulatedOracleParams);\\n }\\n\\n // makeExternalCalls can be used to perform an external swap before\\n // an action\\n // example:\\n // - ExchangeRouter.sendTokens(token: WETH, receiver: externalHandler, amount: 1e18)\\n // - ExchangeRouter.makeExternalCalls(\\n // WETH.approve(spender: aggregator, amount: 1e18),\\n // aggregator.swap(amount: 1, from: WETH, to: USDC, receiver: orderHandler)\\n // )\\n // - ExchangeRouter.createOrder\\n // the msg.sender for makeExternalCalls would be externalHandler\\n // refundTokens can be used to retrieve any excess tokens that may\\n // be left in the externalHandler\\n function makeExternalCalls(\\n address[] memory externalCallTargets,\\n bytes[] memory externalCallDataList,\\n address[] memory refundTokens,\\n address[] memory refundReceivers\\n ) external payable nonReentrant {\\n externalHandler.makeExternalCalls(\\n externalCallTargets,\\n externalCallDataList,\\n refundTokens,\\n refundReceivers\\n );\\n }\\n}\\n\",\"keccak256\":\"0x09cde177c96fc80fb938abcc42cbe8c4201329ec70bd51a1c3cbbeb5ea173109\",\"license\":\"BUSL-1.1\"},\"contracts/router/Router.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport \\\"../role/RoleModule.sol\\\";\\n\\n/**\\n * @title Router\\n * @dev Users will approve this router for token spenditures\\n */\\ncontract Router is RoleModule {\\n using SafeERC20 for IERC20;\\n\\n constructor(RoleStore _roleStore) RoleModule(_roleStore) {}\\n\\n /**\\n * @dev transfer the specified amount of tokens from the account to the receiver\\n * @param token the token to transfer\\n * @param account the account to transfer from\\n * @param receiver the account to transfer to\\n * @param amount the amount of tokens to transfer\\n */\\n function pluginTransfer(address token, address account, address receiver, uint256 amount) external onlyRouterPlugin {\\n IERC20(token).safeTransferFrom(account, receiver, amount);\\n }\\n}\\n\",\"keccak256\":\"0x8f1115b829d11b6f77e9380c91e5eee2ecaf217796686ec14a9bd55aa076d916\",\"license\":\"BUSL-1.1\"},\"contracts/token/IWNT.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title IWNT\\n * @dev Interface for Wrapped Native Tokens, e.g. WETH\\n * The contract is named WNT instead of WETH for a more general reference name\\n * that can be used on any blockchain\\n */\\ninterface IWNT {\\n function deposit() external payable;\\n function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x366f887cceea33dba2247278d3827366cdcc3a3d7a2e3559fae430644ccbee02\",\"license\":\"BUSL-1.1\"},\"contracts/token/TokenUtils.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport \\\"../data/DataStore.sol\\\";\\nimport \\\"../data/Keys.sol\\\";\\nimport \\\"../error/ErrorUtils.sol\\\";\\nimport \\\"../utils/AccountUtils.sol\\\";\\n\\nimport \\\"./IWNT.sol\\\";\\n\\n/**\\n * @title TokenUtils\\n * @dev Library for token functions, helps with transferring of tokens and\\n * native token functions\\n */\\nlibrary TokenUtils {\\n using Address for address;\\n using SafeERC20 for IERC20;\\n\\n event TokenTransferReverted(string reason, bytes returndata);\\n event NativeTokenTransferReverted(string reason);\\n\\n /**\\n * @dev Returns the address of the WNT token.\\n * @param dataStore DataStore contract instance where the address of the WNT token is stored.\\n * @return The address of the WNT token.\\n */\\n function wnt(DataStore dataStore) internal view returns (address) {\\n return dataStore.getAddress(Keys.WNT);\\n }\\n\\n /**\\n * @dev Transfers the specified amount of `token` from the caller to `receiver`.\\n * limit the amount of gas forwarded so that a user cannot intentionally\\n * construct a token call that would consume all gas and prevent necessary\\n * actions like request cancellation from being executed\\n *\\n * @param dataStore The data store that contains the `tokenTransferGasLimit` for the specified `token`.\\n * @param token The address of the ERC20 token that is being transferred.\\n * @param receiver The address of the recipient of the `token` transfer.\\n * @param amount The amount of `token` to transfer.\\n */\\n function transfer(\\n DataStore dataStore,\\n address token,\\n address receiver,\\n uint256 amount\\n ) internal {\\n if (amount == 0) { return; }\\n AccountUtils.validateReceiver(receiver);\\n\\n uint256 gasLimit = dataStore.getUint(Keys.tokenTransferGasLimit(token));\\n if (gasLimit == 0) {\\n revert Errors.EmptyTokenTranferGasLimit(token);\\n }\\n\\n (bool success0, /* bytes memory returndata */) = nonRevertingTransferWithGasLimit(\\n IERC20(token),\\n receiver,\\n amount,\\n gasLimit\\n );\\n\\n if (success0) { return; }\\n\\n address holdingAddress = dataStore.getAddress(Keys.HOLDING_ADDRESS);\\n\\n if (holdingAddress == address(0)) {\\n revert Errors.EmptyHoldingAddress();\\n }\\n\\n // in case transfers to the receiver fail due to blacklisting or other reasons\\n // send the tokens to a holding address to avoid possible gaming through reverting\\n // transfers\\n (bool success1, bytes memory returndata) = nonRevertingTransferWithGasLimit(\\n IERC20(token),\\n holdingAddress,\\n amount,\\n gasLimit\\n );\\n\\n if (success1) { return; }\\n\\n (string memory reason, /* bool hasRevertMessage */) = ErrorUtils.getRevertMessage(returndata);\\n emit TokenTransferReverted(reason, returndata);\\n\\n // throw custom errors to prevent spoofing of errors\\n // this is necessary because contracts like DepositHandler, WithdrawalHandler, OrderHandler\\n // do not cancel requests for specific errors\\n revert Errors.TokenTransferError(token, receiver, amount);\\n }\\n\\n function sendNativeToken(\\n DataStore dataStore,\\n address receiver,\\n uint256 amount\\n ) internal {\\n if (amount == 0) { return; }\\n\\n AccountUtils.validateReceiver(receiver);\\n\\n uint256 gasLimit = dataStore.getUint(Keys.NATIVE_TOKEN_TRANSFER_GAS_LIMIT);\\n\\n bool success;\\n // use an assembly call to avoid loading large data into memory\\n // input mem[in\\u2026(in+insize)]\\n // output area mem[out\\u2026(out+outsize))]\\n assembly {\\n success := call(\\n gasLimit, // gas limit\\n receiver, // receiver\\n amount, // value\\n 0, // in\\n 0, // insize\\n 0, // out\\n 0 // outsize\\n )\\n }\\n\\n if (success) { return; }\\n\\n // if the transfer failed, re-wrap the token and send it to the receiver\\n depositAndSendWrappedNativeToken(\\n dataStore,\\n receiver,\\n amount\\n );\\n }\\n\\n /**\\n * Deposits the specified amount of native token and sends the specified\\n * amount of wrapped native token to the specified receiver address.\\n *\\n * @param dataStore the data store to use for storing and retrieving data\\n * @param receiver the address of the recipient of the wrapped native token transfer\\n * @param amount the amount of native token to deposit and the amount of wrapped native token to send\\n */\\n function depositAndSendWrappedNativeToken(\\n DataStore dataStore,\\n address receiver,\\n uint256 amount\\n ) internal {\\n if (amount == 0) { return; }\\n AccountUtils.validateReceiver(receiver);\\n\\n address _wnt = wnt(dataStore);\\n IWNT(_wnt).deposit{value: amount}();\\n\\n transfer(\\n dataStore,\\n _wnt,\\n receiver,\\n amount\\n );\\n }\\n\\n /**\\n * @dev Withdraws the specified amount of wrapped native token and sends the\\n * corresponding amount of native token to the specified receiver address.\\n *\\n * limit the amount of gas forwarded so that a user cannot intentionally\\n * construct a token call that would consume all gas and prevent necessary\\n * actions like request cancellation from being executed\\n *\\n * @param dataStore the data store to use for storing and retrieving data\\n * @param _wnt the address of the WNT contract to withdraw the wrapped native token from\\n * @param receiver the address of the recipient of the native token transfer\\n * @param amount the amount of wrapped native token to withdraw and the amount of native token to send\\n */\\n function withdrawAndSendNativeToken(\\n DataStore dataStore,\\n address _wnt,\\n address receiver,\\n uint256 amount\\n ) internal {\\n if (amount == 0) { return; }\\n AccountUtils.validateReceiver(receiver);\\n\\n IWNT(_wnt).withdraw(amount);\\n\\n uint256 gasLimit = dataStore.getUint(Keys.NATIVE_TOKEN_TRANSFER_GAS_LIMIT);\\n\\n bool success;\\n // use an assembly call to avoid loading large data into memory\\n // input mem[in\\u2026(in+insize)]\\n // output area mem[out\\u2026(out+outsize))]\\n assembly {\\n success := call(\\n gasLimit, // gas limit\\n receiver, // receiver\\n amount, // value\\n 0, // in\\n 0, // insize\\n 0, // out\\n 0 // outsize\\n )\\n }\\n\\n if (success) { return; }\\n\\n // if the transfer failed, re-wrap the token and send it to the receiver\\n depositAndSendWrappedNativeToken(\\n dataStore,\\n receiver,\\n amount\\n );\\n }\\n\\n /**\\n * @dev Transfers the specified amount of ERC20 token to the specified receiver\\n * address, with a gas limit to prevent the transfer from consuming all available gas.\\n * adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/utils/SafeERC20.sol\\n *\\n * @param token the ERC20 contract to transfer the tokens from\\n * @param to the address of the recipient of the token transfer\\n * @param amount the amount of tokens to transfer\\n * @param gasLimit the maximum amount of gas that the token transfer can consume\\n * @return a tuple containing a boolean indicating the success or failure of the\\n * token transfer, and a bytes value containing the return data from the token transfer\\n */\\n function nonRevertingTransferWithGasLimit(\\n IERC20 token,\\n address to,\\n uint256 amount,\\n uint256 gasLimit\\n ) internal returns (bool, bytes memory) {\\n bytes memory data = abi.encodeWithSelector(token.transfer.selector, to, amount);\\n (bool success, bytes memory returndata) = address(token).call{ gas: gasLimit }(data);\\n\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n if (!address(token).isContract()) {\\n return (false, \\\"Call to non-contract\\\");\\n }\\n }\\n\\n // some tokens do not revert on a failed transfer, they will return a boolean instead\\n // validate that the returned boolean is true, otherwise indicate that the token transfer failed\\n if (returndata.length > 0 && !abi.decode(returndata, (bool))) {\\n return (false, returndata);\\n }\\n\\n // transfers on some tokens do not return a boolean value, they will just revert if a transfer fails\\n // for these tokens, if success is true then the transfer should have completed\\n return (true, returndata);\\n }\\n\\n return (false, returndata);\\n }\\n}\\n\",\"keccak256\":\"0xc9583947413e24886ca4c77406471a606614dada46e0aacb9f7962f629171810\",\"license\":\"BUSL-1.1\"},\"contracts/utils/AccountUtils.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../error/Errors.sol\\\";\\n\\nlibrary AccountUtils {\\n function validateAccount(address account) internal pure {\\n if (account == address(0)) {\\n revert Errors.EmptyAccount();\\n }\\n }\\n\\n function validateReceiver(address receiver) internal pure {\\n if (receiver == address(0)) {\\n revert Errors.EmptyReceiver();\\n }\\n }\\n\\n function isContract(address account) internal view returns (bool) {\\n return account.code.length > 0;\\n }\\n\\n}\\n\",\"keccak256\":\"0x9e83c9324530fc8e158a2ffc9abcc6b5d4985dd9c10c56d574700637aa49cfb1\",\"license\":\"BUSL-1.1\"},\"contracts/utils/Array.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport \\\"../error/Errors.sol\\\";\\n\\n/**\\n * @title Array\\n * @dev Library for array functions\\n */\\nlibrary Array {\\n using SafeCast for int256;\\n\\n /**\\n * @dev Gets the value of the element at the specified index in the given array. If the index is out of bounds, returns 0.\\n *\\n * @param arr the array to get the value from\\n * @param index the index of the element in the array\\n * @return the value of the element at the specified index in the array\\n */\\n function get(bytes32[] memory arr, uint256 index) internal pure returns (bytes32) {\\n if (index < arr.length) {\\n return arr[index];\\n }\\n\\n return bytes32(0);\\n }\\n\\n /**\\n * @dev Determines whether all of the elements in the given array are equal to the specified value.\\n *\\n * @param arr the array to check the elements of\\n * @param value the value to compare the elements of the array to\\n * @return true if all of the elements in the array are equal to the specified value, false otherwise\\n */\\n function areEqualTo(uint256[] memory arr, uint256 value) internal pure returns (bool) {\\n for (uint256 i; i < arr.length; i++) {\\n if (arr[i] != value) {\\n return false;\\n }\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Determines whether all of the elements in the given array are greater than the specified value.\\n *\\n * @param arr the array to check the elements of\\n * @param value the value to compare the elements of the array to\\n * @return true if all of the elements in the array are greater than the specified value, false otherwise\\n */\\n function areGreaterThan(uint256[] memory arr, uint256 value) internal pure returns (bool) {\\n for (uint256 i; i < arr.length; i++) {\\n if (arr[i] <= value) {\\n return false;\\n }\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Determines whether all of the elements in the given array are greater than or equal to the specified value.\\n *\\n * @param arr the array to check the elements of\\n * @param value the value to compare the elements of the array to\\n * @return true if all of the elements in the array are greater than or equal to the specified value, false otherwise\\n */\\n function areGreaterThanOrEqualTo(uint256[] memory arr, uint256 value) internal pure returns (bool) {\\n for (uint256 i; i < arr.length; i++) {\\n if (arr[i] < value) {\\n return false;\\n }\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Determines whether all of the elements in the given array are less than the specified value.\\n *\\n * @param arr the array to check the elements of\\n * @param value the value to compare the elements of the array to\\n * @return true if all of the elements in the array are less than the specified value, false otherwise\\n */\\n function areLessThan(uint256[] memory arr, uint256 value) internal pure returns (bool) {\\n for (uint256 i; i < arr.length; i++) {\\n if (arr[i] >= value) {\\n return false;\\n }\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Determines whether all of the elements in the given array are less than or equal to the specified value.\\n *\\n * @param arr the array to check the elements of\\n * @param value the value to compare the elements of the array to\\n * @return true if all of the elements in the array are less than or equal to the specified value, false otherwise\\n */\\n function areLessThanOrEqualTo(uint256[] memory arr, uint256 value) internal pure returns (bool) {\\n for (uint256 i; i < arr.length; i++) {\\n if (arr[i] > value) {\\n return false;\\n }\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Gets the median value of the elements in the given array. For arrays with an odd number of elements, returns the element at the middle index. For arrays with an even number of elements, returns the average of the two middle elements.\\n *\\n * @param arr the array to get the median value from\\n * @return the median value of the elements in the given array\\n */\\n function getMedian(uint256[] memory arr) internal pure returns (uint256) {\\n if (arr.length % 2 == 1) {\\n return arr[arr.length / 2];\\n }\\n\\n return (arr[arr.length / 2] + arr[arr.length / 2 - 1]) / 2;\\n }\\n\\n /**\\n * @dev Gets the uncompacted value at the specified index in the given array of compacted values.\\n *\\n * @param compactedValues the array of compacted values to get the uncompacted value from\\n * @param index the index of the uncompacted value in the array\\n * @param compactedValueBitLength the length of each compacted value, in bits\\n * @param bitmask the bitmask to use to extract the uncompacted value from the compacted value\\n * @return the uncompacted value at the specified index in the array of compacted values\\n */\\n function getUncompactedValue(\\n uint256[] memory compactedValues,\\n uint256 index,\\n uint256 compactedValueBitLength,\\n uint256 bitmask,\\n string memory label\\n ) internal pure returns (uint256) {\\n uint256 compactedValuesPerSlot = 256 / compactedValueBitLength;\\n\\n uint256 slotIndex = index / compactedValuesPerSlot;\\n if (slotIndex >= compactedValues.length) {\\n revert Errors.CompactedArrayOutOfBounds(compactedValues, index, slotIndex, label);\\n }\\n\\n uint256 slotBits = compactedValues[slotIndex];\\n uint256 offset = (index - slotIndex * compactedValuesPerSlot) * compactedValueBitLength;\\n\\n uint256 value = (slotBits >> offset) & bitmask;\\n\\n return value;\\n }\\n\\n /**\\n * Converts an array of bytes32 values to bytes.\\n * \\n * @dev Used to decode the dataList and the first element is not included in the result (i.e. loop starts at index 1)\\n * because it is expected to be the GMX_DATA_ACTION hash.\\n *\\n * @param dataList the array of bytes32 values to convert\\n * @return data the bytes array representing the input dataList\\n */\\n function dataArrayToBytes(bytes32[] memory dataList) internal pure returns (bytes memory) {\\n bytes memory data;\\n\\n for (uint256 i = 1; i < dataList.length; i++) {\\n data = bytes.concat(data, bytes32(dataList[i]));\\n }\\n\\n return data;\\n }\\n}\\n\",\"keccak256\":\"0x95266ed524a93ab0bbc8cdea573a9a319da4e1e242d2806284062a5fd0ab9da3\",\"license\":\"BUSL-1.1\"},\"contracts/utils/Calc.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/math/SignedMath.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\n/**\\n * @title Calc\\n * @dev Library for math functions\\n */\\nlibrary Calc {\\n using SignedMath for int256;\\n using SafeCast for uint256;\\n\\n // this method assumes that min is less than max\\n function boundMagnitude(int256 value, uint256 min, uint256 max) internal pure returns (int256) {\\n uint256 magnitude = value.abs();\\n\\n if (magnitude < min) {\\n magnitude = min;\\n }\\n\\n if (magnitude > max) {\\n magnitude = max;\\n }\\n\\n int256 sign = value == 0 ? int256(1) : value / value.abs().toInt256();\\n\\n return magnitude.toInt256() * sign;\\n }\\n\\n /**\\n * @dev Calculates the result of dividing the first number by the second number,\\n * rounded up to the nearest integer.\\n *\\n * @param a the dividend\\n * @param b the divisor\\n * @return the result of dividing the first number by the second number, rounded up to the nearest integer\\n */\\n function roundUpDivision(uint256 a, uint256 b) internal pure returns (uint256) {\\n return (a + b - 1) / b;\\n }\\n\\n /**\\n * Calculates the result of dividing the first number by the second number,\\n * rounded up to the nearest integer.\\n * The rounding is purely on the magnitude of a, if a is negative the result\\n * is a larger magnitude negative\\n *\\n * @param a the dividend\\n * @param b the divisor\\n * @return the result of dividing the first number by the second number, rounded up to the nearest integer\\n */\\n function roundUpMagnitudeDivision(int256 a, uint256 b) internal pure returns (int256) {\\n if (a < 0) {\\n return (a - b.toInt256() + 1) / b.toInt256();\\n }\\n\\n return (a + b.toInt256() - 1) / b.toInt256();\\n }\\n\\n /**\\n * Adds two numbers together and return a uint256 value, treating the second number as a signed integer.\\n *\\n * @param a the first number\\n * @param b the second number\\n * @return the result of adding the two numbers together\\n */\\n function sumReturnUint256(uint256 a, int256 b) internal pure returns (uint256) {\\n if (b > 0) {\\n return a + b.abs();\\n }\\n\\n return a - b.abs();\\n }\\n\\n /**\\n * Adds two numbers together and return an int256 value, treating the second number as a signed integer.\\n *\\n * @param a the first number\\n * @param b the second number\\n * @return the result of adding the two numbers together\\n */\\n function sumReturnInt256(uint256 a, int256 b) internal pure returns (int256) {\\n return a.toInt256() + b;\\n }\\n\\n /**\\n * @dev Calculates the absolute difference between two numbers.\\n *\\n * @param a the first number\\n * @param b the second number\\n * @return the absolute difference between the two numbers\\n */\\n function diff(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a - b : b - a;\\n }\\n\\n /**\\n * Adds two numbers together, the result is bounded to prevent overflows.\\n *\\n * @param a the first number\\n * @param b the second number\\n * @return the result of adding the two numbers together\\n */\\n function boundedAdd(int256 a, int256 b) internal pure returns (int256) {\\n // if either a or b is zero or if the signs are different there should not be any overflows\\n if (a == 0 || b == 0 || (a < 0 && b > 0) || (a > 0 && b < 0)) {\\n return a + b;\\n }\\n\\n // if adding `b` to `a` would result in a value less than the min int256 value\\n // then return the min int256 value\\n if (a < 0 && b <= type(int256).min - a) {\\n return type(int256).min;\\n }\\n\\n // if adding `b` to `a` would result in a value more than the max int256 value\\n // then return the max int256 value\\n if (a > 0 && b >= type(int256).max - a) {\\n return type(int256).max;\\n }\\n\\n return a + b;\\n }\\n\\n /**\\n * Returns a - b, the result is bounded to prevent overflows.\\n * Note that this will revert if b is type(int256).min because of the usage of \\\"-b\\\".\\n *\\n * @param a the first number\\n * @param b the second number\\n * @return the bounded result of a - b\\n */\\n function boundedSub(int256 a, int256 b) internal pure returns (int256) {\\n // if either a or b is zero or the signs are the same there should not be any overflow\\n if (a == 0 || b == 0 || (a > 0 && b > 0) || (a < 0 && b < 0)) {\\n return a - b;\\n }\\n\\n // if adding `-b` to `a` would result in a value greater than the max int256 value\\n // then return the max int256 value\\n if (a > 0 && -b >= type(int256).max - a) {\\n return type(int256).max;\\n }\\n\\n // if subtracting `b` from `a` would result in a value less than the min int256 value\\n // then return the min int256 value\\n if (a < 0 && -b <= type(int256).min - a) {\\n return type(int256).min;\\n }\\n\\n return a - b;\\n }\\n\\n\\n /**\\n * Converts the given unsigned integer to a signed integer, using the given\\n * flag to determine whether the result should be positive or negative.\\n *\\n * @param a the unsigned integer to convert\\n * @param isPositive whether the result should be positive (if true) or negative (if false)\\n * @return the signed integer representation of the given unsigned integer\\n */\\n function toSigned(uint256 a, bool isPositive) internal pure returns (int256) {\\n if (isPositive) {\\n return a.toInt256();\\n } else {\\n return -a.toInt256();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3848e1c51a6c77a1d6ec30bb052e97f6c39437110c773ebc06956ce5e4a54370\",\"license\":\"BUSL-1.1\"},\"contracts/utils/EnumerableValues.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\n\\n/**\\n * @title EnumerableValues\\n * @dev Library to extend the EnumerableSet library with functions to get\\n * valuesAt for a range\\n */\\nlibrary EnumerableValues {\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n using EnumerableSet for EnumerableSet.AddressSet;\\n using EnumerableSet for EnumerableSet.UintSet;\\n\\n /**\\n * Returns an array of bytes32 values from the given set, starting at the given\\n * start index and ending before the given end index.\\n *\\n * @param set The set to get the values from.\\n * @param start The starting index.\\n * @param end The ending index.\\n * @return An array of bytes32 values.\\n */\\n function valuesAt(EnumerableSet.Bytes32Set storage set, uint256 start, uint256 end) internal view returns (bytes32[] memory) {\\n uint256 max = set.length();\\n if (end > max) { end = max; }\\n\\n bytes32[] memory items = new bytes32[](end - start);\\n for (uint256 i = start; i < end; i++) {\\n items[i - start] = set.at(i);\\n }\\n\\n return items;\\n }\\n\\n\\n /**\\n * Returns an array of address values from the given set, starting at the given\\n * start index and ending before the given end index.\\n *\\n * @param set The set to get the values from.\\n * @param start The starting index.\\n * @param end The ending index.\\n * @return An array of address values.\\n */\\n function valuesAt(EnumerableSet.AddressSet storage set, uint256 start, uint256 end) internal view returns (address[] memory) {\\n uint256 max = set.length();\\n if (end > max) { end = max; }\\n\\n address[] memory items = new address[](end - start);\\n for (uint256 i = start; i < end; i++) {\\n items[i - start] = set.at(i);\\n }\\n\\n return items;\\n }\\n\\n\\n /**\\n * Returns an array of uint256 values from the given set, starting at the given\\n * start index and ending before the given end index, the item at the end index will not be returned.\\n *\\n * @param set The set to get the values from.\\n * @param start The starting index (inclusive, item at the start index will be returned).\\n * @param end The ending index (exclusive, item at the end index will not be returned).\\n * @return An array of uint256 values.\\n */\\n function valuesAt(EnumerableSet.UintSet storage set, uint256 start, uint256 end) internal view returns (uint256[] memory) {\\n if (start >= set.length()) {\\n return new uint256[](0);\\n }\\n\\n uint256 max = set.length();\\n if (end > max) { end = max; }\\n\\n uint256[] memory items = new uint256[](end - start);\\n for (uint256 i = start; i < end; i++) {\\n items[i - start] = set.at(i);\\n }\\n\\n return items;\\n }\\n}\\n\",\"keccak256\":\"0x1e525ad5645bc649551fa3a7d000af1cec96221d7fe1cdc17cedaf942b018f0d\",\"license\":\"BUSL-1.1\"},\"contracts/utils/PayableMulticall.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../error/ErrorUtils.sol\\\";\\n\\n/**\\n * @title PayableMulticall\\n * @dev Contract to help call multiple functions in a single transaction\\n * all function calls will have the original sender as the msg.sender value\\n * IMPORTANT: in the multicall, msg.value will be the same for each delegatecall\\n * extra care should be taken if msg.value is used in any of the functions of the inheriting contract\\n */\\nabstract contract PayableMulticall {\\n /**\\n * @dev Receives and executes a batch of function calls on this contract.\\n */\\n function multicall(bytes[] calldata data) external payable virtual returns (bytes[] memory results) {\\n results = new bytes[](data.length);\\n\\n for (uint256 i; i < data.length; i++) {\\n (bool success, bytes memory result) = address(this).delegatecall(data[i]);\\n\\n if (!success) {\\n ErrorUtils.revertWithParsedMessage(result);\\n }\\n\\n results[i] = result;\\n }\\n\\n return results;\\n }\\n}\\n\",\"keccak256\":\"0xb0857ac2d827a7108f3eead3bb5ca124859e1713719db91ca39cdb54413e1b99\",\"license\":\"BUSL-1.1\"},\"contracts/utils/StringUtils.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nlibrary StringUtils {\\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\\n }\\n}\\n\",\"keccak256\":\"0xd9f72f3739ba7274dbad085fd196e408c1bbcdf62997813dc34a890ccfacc16a\",\"license\":\"BUSL-1.1\"}},\"version\":1}", "bytecode": "0x61016060405234801561001157600080fd5b50604051612b73380380612b7383398101604081905261003091610083565b60016000556001600160a01b0395861660805295851660a05292841660c05290831660e052821661010052811661012052166101405261011f565b6001600160a01b038116811461008057600080fd5b50565b600080600080600080600060e0888a03121561009e57600080fd5b87516100a98161006b565b60208901519097506100ba8161006b565b60408901519096506100cb8161006b565b60608901519095506100dc8161006b565b60808901519094506100ed8161006b565b60a08901519093506100fe8161006b565b60c089015190925061010f8161006b565b8091505092959891949750929550565b60805160a05160c05160e0516101005161012051610140516129846101ef600039600081816102020152610aee0152600081816101b8015281816106b90152818161077801528181610813015261086d01526000818161027d015281816104e001528181610a9801528181610ccc0152610d260152600061032c01526000818160ff015281816102c4015281816105910152818161073b015281816107c50152818161091201528181610a5a0152610ba50152600081816103ec0152610da80152600061023601526129846000f3fe6080604052600436106100f35760003560e01c80630db48e41146101605780630e229c35146101735780632a4a6add146101935780632d0a7f6f146101a65780632e944bd6146101f05780634a4a7b041461022457806353ead2d3146102585780636045a3601461026b5780636049a1001461029f578063660d0d67146102b25780637c6fa43b146102e65780637d39aaf1146103075780639ff78c301461031a578063ac9650d81461034e578063cf8a48571461036e578063d59922b014610381578063d95c9e2914610394578063dfa05241146103b4578063e6d66ac8146103c7578063f887ea40146103da57600080fd5b3661015b5760006101237f000000000000000000000000000000000000000000000000000000000000000061040e565b9050336001600160a01b03821614610159573360405163738d28df60e11b81526004016101509190611642565b60405180910390fd5b005b600080fd5b61015961016e3660046118ec565b6104c1565b34801561017f57600080fd5b5061015961018e366004611932565b610557565b6101596101a136600461194b565b61072c565b3480156101b257600080fd5b506101da7f000000000000000000000000000000000000000000000000000000000000000081565b6040516101e79190611642565b60405180910390f35b3480156101fc57600080fd5b506101da7f000000000000000000000000000000000000000000000000000000000000000081565b34801561023057600080fd5b506101da7f000000000000000000000000000000000000000000000000000000000000000081565b61015961026636600461197f565b6107af565b34801561027757600080fd5b506101da7f000000000000000000000000000000000000000000000000000000000000000081565b6101596102ad3660046118ec565b6107f5565b3480156102be57600080fd5b506101da7f000000000000000000000000000000000000000000000000000000000000000081565b6102f96102f43660046119c3565b61084a565b6040519081526020016101e7565b61015961031536600461197f565b6108fc565b34801561032657600080fd5b506101da7f000000000000000000000000000000000000000000000000000000000000000081565b61036161035c3660046119f7565b610938565b6040516101e79190611b18565b61015961037c36600461194b565b610a4b565b61015961038f366004611b59565b610acf565b3480156103a057600080fd5b506101596103af366004611932565b610b6b565b6102f96103c23660046119c3565b610d03565b6101596103d5366004611cd1565b610d60565b3480156103e657600080fd5b506101da7f000000000000000000000000000000000000000000000000000000000000000081565b6000816001600160a01b03166321f8a7216040516020016104469060208082526003908201526215d39560ea1b604082015260600190565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161047a91815260200190565b602060405180830381865afa158015610497573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104bb9190611d1d565b92915050565b6104c9610e16565b604051630db48e4160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690630db48e41906105179085908590600401611d7f565b600060405180830381600087803b15801561053157600080fd5b505af1158015610545573d6000803e3d6000fd5b505050506105536001600055565b5050565b61055f610e16565b60405163fdfc26f360e01b81526000907373F4e3F649342E06DE96B53Cb4363f8d786E28229063fdfc26f3906105bb907f0000000000000000000000000000000000000000000000000000000000000000908690600401611e17565b600060405180830381865af41580156105d8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106009190810190611fd2565b9050600061061082516040015190565b6001600160a01b03160361063757604051630e5be78f60e01b815260040160405180910390fd5b3361064482516040015190565b6001600160a01b0316146106a3576040805163a35b150b60e01b81523360048201526024810191909152601f60448201527f6163636f756e7420666f722063616e63656c476c765769746864726177616c006064820152608401610150565b604051630e229c3560e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630e229c35906024015b600060405180830381600087803b15801561070657600080fd5b505af115801561071a573d6000803e3d6000fd5b50505050506107296001600055565b50565b610734610e16565b600061075f7f0000000000000000000000000000000000000000000000000000000000000000610e6f565b604051626049a160e81b81529091506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636049a100906106ec9084908690600401611d7f565b6107b7610e16565b6107c082610e91565b6107eb7f00000000000000000000000000000000000000000000000000000000000000008383610eb8565b6105536001600055565b6107fd610e16565b604051626049a160e81b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636049a100906105179085908590600401611d7f565b6000610854610e16565b604051634c6bc17760e11b815233906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906398d782ee906108a790849060009088906004016122f5565b6020604051808303816000875af11580156108c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ea91906123ae565b9150506108f76001600055565b919050565b610904610e16565b61090d82610e91565b6107eb7f00000000000000000000000000000000000000000000000000000000000000008383610fc4565b6060816001600160401b0381111561095257610952611656565b60405190808252806020026020018201604052801561098557816020015b60608152602001906001900390816109705790505b50905060005b82811015610a4457600080308686858181106109a9576109a96123c7565b90506020028101906109bb91906123dd565b6040516109c9929190612423565b600060405180830381855af49150503d8060008114610a04576040519150601f19603f3d011682016040523d82523d6000602084013e610a09565b606091505b509150915081610a1c57610a1c81611047565b80848481518110610a2f57610a2f6123c7565b6020908102919091010152505060010161098b565b5092915050565b610a53610e16565b6000610a7e7f0000000000000000000000000000000000000000000000000000000000000000610e6f565b604051630db48e4160e01b81529091506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690630db48e41906106ec9084908690600401611d7f565b610ad7610e16565b604051630d59922b60e41b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d59922b090610b29908790879087908790600401612433565b600060405180830381600087803b158015610b4357600080fd5b505af1158015610b57573d6000803e3d6000fd5b50505050610b656001600055565b50505050565b610b73610e16565b60405163fdfc26f360e01b815260009073D26854B36623B752491c098190865511deC8BFA09063fdfc26f390610bcf907f0000000000000000000000000000000000000000000000000000000000000000908690600401611e17565b600060405180830381865af4158015610bec573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c14919081019061253b565b90506000610c2482516020015190565b6001600160a01b031603610c4b5760405163bd19297160e01b815260040160405180910390fd5b33610c5882516020015190565b6001600160a01b031614610cb6576040805163a35b150b60e01b81523360048201526024810191909152601c60448201527b1858d8dbdd5b9d08199bdc8818d85b98d95b11db1d91195c1bdcda5d60221b6064820152608401610150565b60405163d95c9e2960e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063d95c9e29906024016106ec565b6000610d0d610e16565b604051633898804960e21b815233906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e2620124906108a790849060009088906004016127c6565b610d68610e16565b610d7182610e91565b6040516303704f0f60e31b81526001600160a01b0384811660048301523360248301819052848216604484015260648301849052917f000000000000000000000000000000000000000000000000000000000000000090911690631b82787890608401600060405180830381600087803b158015610dee57600080fd5b505af1158015610e02573d6000803e3d6000fd5b5050505050610e116001600055565b505050565b600260005403610e685760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610150565b6002600055565b600080610e7b83611080565b90506000610e89848361112f565b949350505050565b6001600160a01b0381166107295760405163d551823d60e01b815260040160405180910390fd5b80600003610ec557505050565b610ece82610e91565b6000836001600160a01b031663bd02d0f5604051602001610f20906020808252601f908201527f4e41544956455f544f4b454e5f5452414e534645525f4741535f4c494d495400604082015260600190565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401610f5491815260200190565b602060405180830381865afa158015610f71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9591906123ae565b90506000806000806000868887f190508015610fb2575050505050565b610fbd858585610fc4565b5050505050565b80600003610fd157505050565b610fda82610e91565b6000610fe58461040e565b9050806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561102257600080fd5b505af1158015611036573d6000803e3d6000fd5b5050505050610b6584828585611162565b600080611053836113ac565b915091508015611077578160405162461bcd60e51b81526004016101509190612867565b610e118361143c565b6000816001600160a01b031663bd02d0f56040516020016110ba906020808252600590820152644e4f4e434560d81b604082015260600190565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016110ee91815260200190565b602060405180830381865afa15801561110b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104bb91906123ae565b60008282604051602001611144929190611e17565b60405160208183030381529060405280519060200120905092915050565b8015610b655761117182610e91565b6000846001600160a01b031663bd02d0f561118b86611445565b6040518263ffffffff1660e01b81526004016111a991815260200190565b602060405180830381865afa1580156111c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ea91906123ae565b90508060000361120f5783604051634fe14bfd60e11b81526004016101509190611642565b600061121d858585856114cd565b509050801561122d575050610b65565b6000866001600160a01b03166321f8a721604051602001611271906020808252600f908201526e484f4c44494e475f4144445245535360881b604082015260600190565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016112a591815260200190565b602060405180830381865afa1580156112c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e69190611d1d565b90506001600160a01b03811661130f57604051633a6de2f560e21b815260040160405180910390fd5b60008061131e888488886114cd565b915091508115611332575050505050610b65565b600061133d826113ac565b5090507fc9f14d9a0a9b46470c7c0b6c508f8283abaab7f795f153953c58cd4250824dae818360405161137192919061287a565b60405180910390a160405163012f3b8f60e71b81526001600160a01b03808b1660048301528916602482015260448101889052606401610150565b606060006044835110156113d3575050604080516020810190915260008082529092909150565b60006113e0846020015190565b90506307b9e43360e51b6001600160e01b031982160161141f576004840193508380602001905181019061141491906128a8565b946001945092505050565b600060405180602001604052806000815250909250925050915091565b80518060208301fd5b6000604051602001611483906020808252601890820152771513d2d15397d514905394d1915497d1d054d7d31253525560421b604082015260600190565b60408051601f198184030181528282528051602091820120908301526001600160a01b03841690820152606001604051602081830303815290604052805190602001209050919050565b60006060600063a9059cbb60e01b86866040516024016114ee929190611e17565b604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b0383818316178352505050509050600080886001600160a01b0316868460405161153f9190612915565b60006040518083038160008787f1925050503d806000811461157d576040519150601f19603f3d011682016040523d82523d6000602084013e611582565b606091505b509150915081156116235780516000036115e0576001600160a01b0389163b6115e05760006040518060400160405280601481526020017310d85b1b081d1bc81b9bdb8b58dbdb9d1c9858dd60621b8152509450945050505061162c565b600081511180156116025750808060200190518101906116009190612931565b155b156116155760009450925061162c915050565b60019450925061162c915050565b60009450925050505b94509492505050565b6001600160a01b03169052565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b038111828210171561168e5761168e611656565b60405290565b604080519081016001600160401b038111828210171561168e5761168e611656565b60405161010081016001600160401b038111828210171561168e5761168e611656565b60405161014081016001600160401b038111828210171561168e5761168e611656565b604051601f8201601f191681016001600160401b038111828210171561172457611724611656565b604052919050565b60006001600160401b0382111561174557611745611656565b5060051b60200190565b6001600160a01b038116811461072957600080fd5b80356108f78161174f565b600082601f83011261178057600080fd5b813561179361178e8261172c565b6116fc565b8082825260208201915060208360051b8601019250858311156117b557600080fd5b602085015b838110156117db5780356117cd8161174f565b8352602092830192016117ba565b5095945050505050565b6000608082840312156117f757600080fd5b6117ff61166c565b905081356001600160401b0381111561181757600080fd5b6118238482850161176f565b82525060208201356001600160401b0381111561183f57600080fd5b8201601f8101841361185057600080fd5b803561185e61178e8261172c565b8082825260208201915060208360061b85010192508683111561188057600080fd5b6020840193505b828410156118c8576040848803121561189f57600080fd5b6118a7611694565b84358152602080860135818301529083526040909401939190910190611887565b60208501525050506040828101359082015260609182013591810191909152919050565b600080604083850312156118ff57600080fd5b8235915060208301356001600160401b0381111561191c57600080fd5b611928858286016117e5565b9150509250929050565b60006020828403121561194457600080fd5b5035919050565b60006020828403121561195d57600080fd5b81356001600160401b0381111561197357600080fd5b610e89848285016117e5565b6000806040838503121561199257600080fd5b823561199d8161174f565b946020939093013593505050565b600060e082840312156119bd57600080fd5b50919050565b6000602082840312156119d557600080fd5b81356001600160401b038111156119eb57600080fd5b610e89848285016119ab565b60008060208385031215611a0a57600080fd5b82356001600160401b03811115611a2057600080fd5b8301601f81018513611a3157600080fd5b80356001600160401b03811115611a4757600080fd5b8560208260051b8401011115611a5c57600080fd5b6020919091019590945092505050565b60005b83811015611a87578181015183820152602001611a6f565b50506000910152565b60008151808452611aa8816020860160208601611a6c565b601f01601f19169290920160200192915050565b600082825180855260208501945060208160051b8301016020850160005b83811015611b0c57601f19858403018852611af6838351611a90565b6020988901989093509190910190600101611ada565b50909695505050505050565b602081526000611b2b6020830184611abc565b9392505050565b60006001600160401b03821115611b4b57611b4b611656565b50601f01601f191660200190565b60008060008060808587031215611b6f57600080fd5b84356001600160401b03811115611b8557600080fd5b611b918782880161176f565b94505060208501356001600160401b03811115611bad57600080fd5b8501601f81018713611bbe57600080fd5b8035611bcc61178e8261172c565b8082825260208201915060208360051b850101925089831115611bee57600080fd5b602084015b83811015611c725780356001600160401b03811115611c1157600080fd5b8501603f81018c13611c2257600080fd5b6020810135611c3361178e82611b32565b8181526040838301018e1015611c4857600080fd5b81604084016020830137600060208383010152808652505050602083019250602081019050611bf3565b50955050505060408501356001600160401b03811115611c9157600080fd5b611c9d8782880161176f565b92505060608501356001600160401b03811115611cb957600080fd5b611cc58782880161176f565b91505092959194509250565b600080600060608486031215611ce657600080fd5b8335611cf18161174f565b92506020840135611d018161174f565b929592945050506040919091013590565b80516108f78161174f565b600060208284031215611d2f57600080fd5b8151611b2b8161174f565b600081518084526020840193506020830160005b82811015611d755781516001600160a01b0316865260209586019590910190600101611d4e565b5093949350505050565b828152604060208201526000825160806040840152611da160c0840182611d3a565b602085810151603f1986840301606087015280518084529082019350600092909101905b80831015611df5578351805183526020810151602084015250604082019150602084019350600183019250611dc5565b5060408601516080860152606086015160a08601528093505050509392505050565b6001600160a01b03929092168252602082015260400190565b600082601f830112611e4157600080fd5b8151611e4f61178e8261172c565b8082825260208201915060208360051b860101925085831115611e7157600080fd5b602085015b838110156117db578051611e898161174f565b835260209283019201611e76565b600060e08284031215611ea957600080fd5b60405160e081016001600160401b0381118282101715611ecb57611ecb611656565b604090815283518252602080850151908301528381015190820152606080840151908201526080808401519082015260a0808401519082015260c0928301519281019290925250919050565b801515811461072957600080fd5b600060208284031215611f3757600080fd5b604051602081016001600160401b0381118282101715611f5957611f59611656565b80604052508091508251611f6c81611f17565b905292915050565b600082601f830112611f8557600080fd5b8151611f9361178e8261172c565b8082825260208201915060208360051b860101925085831115611fb557600080fd5b602085015b838110156117db578051835260209283019201611fba565b600060208284031215611fe457600080fd5b81516001600160401b03811115611ffa57600080fd5b8201610140818503121561200d57600080fd5b61201561166c565b81516001600160401b0381111561202b57600080fd5b8201610100818703121561203e57600080fd5b6120466116b6565b61204f82611d12565b815261205d60208301611d12565b602082015261206e60408301611d12565b604082015261207f60608301611d12565b606082015261209060808301611d12565b60808201526120a160a08301611d12565b60a082015260c08201516001600160401b038111156120bf57600080fd5b6120cb88828501611e30565b60c08301525060e08201516001600160401b038111156120ea57600080fd5b6120f688828501611e30565b60e08301525082525061210c8560208401611e97565b602082015261211f856101008401611f25565b60408201526101208201516001600160401b0381111561213e57600080fd5b61214a86828501611f74565b606083015250949350505050565b6000808335601e1984360301811261216f57600080fd5b83016020810192503590506001600160401b0381111561218e57600080fd5b8060051b36038213156121a057600080fd5b9250929050565b81835260208301925060008160005b84811015611d755781356121c98161174f565b6001600160a01b0316865260209586019591909101906001016121b6565b600081356121f48161174f565b6001600160a01b03168352602082013561220d8161174f565b61221a6020850182611635565b5061222760408301611764565b6122346040850182611635565b5061224160608301611764565b61224e6060850182611635565b5061225b60808301611764565b6122686080850182611635565b5061227660a0830183612158565b60e060a086015261228b60e0860182846121a7565b91505061229b60c0840184612158565b85830360c08701526122ae8382846121a7565b9695505050505050565b80356108f781611f17565b81835260006001600160fb1b038311156122dc57600080fd5b8260051b80836020870137939093016020019392505050565b6001600160a01b03841681526020810183905260606040820152600082353684900360de1901811261232657600080fd5b60e0606084015261233d61014084018583016121e7565b60208501356080850152604085013560a0850152905061235f606085016122b8565b80151560c085015250608084013560e084015260a084013561010084015261238a60c0850185612158565b848303605f19016101208601526123a28382846122c3565b98975050505050505050565b6000602082840312156123c057600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126123f457600080fd5b8301803591506001600160401b0382111561240e57600080fd5b6020019150368190038213156121a057600080fd5b8183823760009101908152919050565b6080815260006124466080830187611d3a565b82810360208401526124588187611abc565b9050828103604084015261246c8186611d3a565b905082810360608401526124808185611d3a565b979650505050505050565b6000610100828403121561249e57600080fd5b6124a66116b6565b825181526020808401519082015260408084015190820152606080840151908201526080808401519082015260a0808401519082015260c0808401519082015260e0928301519281019290925250919050565b60006040828403121561250b57600080fd5b612513611694565b9050815161252081611f17565b8152602082015161253081611f17565b602082015292915050565b60006020828403121561254d57600080fd5b81516001600160401b0381111561256357600080fd5b8201610180818503121561257657600080fd5b61257e61166c565b81516001600160401b0381111561259457600080fd5b820161014081870312156125a757600080fd5b6125af6116d9565b6125b882611d12565b81526125c660208301611d12565b60208201526125d760408301611d12565b60408201526125e860608301611d12565b60608201526125f960808301611d12565b608082015261260a60a08301611d12565b60a082015261261b60c08301611d12565b60c082015261262c60e08301611d12565b60e08201526101008201516001600160401b0381111561264b57600080fd5b61265788828501611e30565b610100830152506101208201516001600160401b0381111561267857600080fd5b61268488828501611e30565b6101208301525082525061269b856020840161248b565b60208201526126ae8561012084016124f9565b60408201526101608201516001600160401b0381111561213e57600080fd5b6126df826126da83611764565b611635565b60006126ed60208301611764565b6126fa6020850182611635565b5061270760408301611764565b6127146040850182611635565b5061272160608301611764565b61272e6060850182611635565b5061273b60808301611764565b6127486080850182611635565b5061275560a08301611764565b61276260a0850182611635565b5061276f60c08301611764565b61277c60c0850182611635565b5061278a60e0830183612158565b61012060e08601526127a1610120860182846121a7565b9150506127b2610100840184612158565b8583036101008701526122ae8382846121a7565b6001600160a01b03841681526020810183905260606040820152600082353684900361011e190181126127f857600080fd5b60e0606084015261280f61014084018583016126cd565b6020850135608085810191909152604086013560a0860152606086013560c086015290915061283f9085016122b8565b151560e084015261285260a085016122b8565b151561010084015261238a60c0850185612158565b602081526000611b2b6020830184611a90565b60408152600061288d6040830185611a90565b828103602084015261289f8185611a90565b95945050505050565b6000602082840312156128ba57600080fd5b81516001600160401b038111156128d057600080fd5b8201601f810184136128e157600080fd5b80516128ef61178e82611b32565b81815285602083850101111561290457600080fd5b61289f826020830160208601611a6c565b60008251612927818460208701611a6c565b9190910192915050565b60006020828403121561294357600080fd5b8151611b2b81611f1756fea26469706673582212209f57bd782af1280c47a12e3f3df5d9d36a736fc48e8919307c5172d5a3de3c7b64736f6c634300081d0033", "deployedBytecode": "0x6080604052600436106100f35760003560e01c80630db48e41146101605780630e229c35146101735780632a4a6add146101935780632d0a7f6f146101a65780632e944bd6146101f05780634a4a7b041461022457806353ead2d3146102585780636045a3601461026b5780636049a1001461029f578063660d0d67146102b25780637c6fa43b146102e65780637d39aaf1146103075780639ff78c301461031a578063ac9650d81461034e578063cf8a48571461036e578063d59922b014610381578063d95c9e2914610394578063dfa05241146103b4578063e6d66ac8146103c7578063f887ea40146103da57600080fd5b3661015b5760006101237f000000000000000000000000000000000000000000000000000000000000000061040e565b9050336001600160a01b03821614610159573360405163738d28df60e11b81526004016101509190611642565b60405180910390fd5b005b600080fd5b61015961016e3660046118ec565b6104c1565b34801561017f57600080fd5b5061015961018e366004611932565b610557565b6101596101a136600461194b565b61072c565b3480156101b257600080fd5b506101da7f000000000000000000000000000000000000000000000000000000000000000081565b6040516101e79190611642565b60405180910390f35b3480156101fc57600080fd5b506101da7f000000000000000000000000000000000000000000000000000000000000000081565b34801561023057600080fd5b506101da7f000000000000000000000000000000000000000000000000000000000000000081565b61015961026636600461197f565b6107af565b34801561027757600080fd5b506101da7f000000000000000000000000000000000000000000000000000000000000000081565b6101596102ad3660046118ec565b6107f5565b3480156102be57600080fd5b506101da7f000000000000000000000000000000000000000000000000000000000000000081565b6102f96102f43660046119c3565b61084a565b6040519081526020016101e7565b61015961031536600461197f565b6108fc565b34801561032657600080fd5b506101da7f000000000000000000000000000000000000000000000000000000000000000081565b61036161035c3660046119f7565b610938565b6040516101e79190611b18565b61015961037c36600461194b565b610a4b565b61015961038f366004611b59565b610acf565b3480156103a057600080fd5b506101596103af366004611932565b610b6b565b6102f96103c23660046119c3565b610d03565b6101596103d5366004611cd1565b610d60565b3480156103e657600080fd5b506101da7f000000000000000000000000000000000000000000000000000000000000000081565b6000816001600160a01b03166321f8a7216040516020016104469060208082526003908201526215d39560ea1b604082015260600190565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161047a91815260200190565b602060405180830381865afa158015610497573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104bb9190611d1d565b92915050565b6104c9610e16565b604051630db48e4160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690630db48e41906105179085908590600401611d7f565b600060405180830381600087803b15801561053157600080fd5b505af1158015610545573d6000803e3d6000fd5b505050506105536001600055565b5050565b61055f610e16565b60405163fdfc26f360e01b815260009073__$275108e79aa89bc0be7b6a95f0c90e4c42$__9063fdfc26f3906105bb907f0000000000000000000000000000000000000000000000000000000000000000908690600401611e17565b600060405180830381865af41580156105d8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106009190810190611fd2565b9050600061061082516040015190565b6001600160a01b03160361063757604051630e5be78f60e01b815260040160405180910390fd5b3361064482516040015190565b6001600160a01b0316146106a3576040805163a35b150b60e01b81523360048201526024810191909152601f60448201527f6163636f756e7420666f722063616e63656c476c765769746864726177616c006064820152608401610150565b604051630e229c3560e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630e229c35906024015b600060405180830381600087803b15801561070657600080fd5b505af115801561071a573d6000803e3d6000fd5b50505050506107296001600055565b50565b610734610e16565b600061075f7f0000000000000000000000000000000000000000000000000000000000000000610e6f565b604051626049a160e81b81529091506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636049a100906106ec9084908690600401611d7f565b6107b7610e16565b6107c082610e91565b6107eb7f00000000000000000000000000000000000000000000000000000000000000008383610eb8565b6105536001600055565b6107fd610e16565b604051626049a160e81b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636049a100906105179085908590600401611d7f565b6000610854610e16565b604051634c6bc17760e11b815233906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906398d782ee906108a790849060009088906004016122f5565b6020604051808303816000875af11580156108c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ea91906123ae565b9150506108f76001600055565b919050565b610904610e16565b61090d82610e91565b6107eb7f00000000000000000000000000000000000000000000000000000000000000008383610fc4565b6060816001600160401b0381111561095257610952611656565b60405190808252806020026020018201604052801561098557816020015b60608152602001906001900390816109705790505b50905060005b82811015610a4457600080308686858181106109a9576109a96123c7565b90506020028101906109bb91906123dd565b6040516109c9929190612423565b600060405180830381855af49150503d8060008114610a04576040519150601f19603f3d011682016040523d82523d6000602084013e610a09565b606091505b509150915081610a1c57610a1c81611047565b80848481518110610a2f57610a2f6123c7565b6020908102919091010152505060010161098b565b5092915050565b610a53610e16565b6000610a7e7f0000000000000000000000000000000000000000000000000000000000000000610e6f565b604051630db48e4160e01b81529091506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690630db48e41906106ec9084908690600401611d7f565b610ad7610e16565b604051630d59922b60e41b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d59922b090610b29908790879087908790600401612433565b600060405180830381600087803b158015610b4357600080fd5b505af1158015610b57573d6000803e3d6000fd5b50505050610b656001600055565b50505050565b610b73610e16565b60405163fdfc26f360e01b815260009073__$0b06d8034ddfec34cf23b0ef7b59522d69$__9063fdfc26f390610bcf907f0000000000000000000000000000000000000000000000000000000000000000908690600401611e17565b600060405180830381865af4158015610bec573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c14919081019061253b565b90506000610c2482516020015190565b6001600160a01b031603610c4b5760405163bd19297160e01b815260040160405180910390fd5b33610c5882516020015190565b6001600160a01b031614610cb6576040805163a35b150b60e01b81523360048201526024810191909152601c60448201527b1858d8dbdd5b9d08199bdc8818d85b98d95b11db1d91195c1bdcda5d60221b6064820152608401610150565b60405163d95c9e2960e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063d95c9e29906024016106ec565b6000610d0d610e16565b604051633898804960e21b815233906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e2620124906108a790849060009088906004016127c6565b610d68610e16565b610d7182610e91565b6040516303704f0f60e31b81526001600160a01b0384811660048301523360248301819052848216604484015260648301849052917f000000000000000000000000000000000000000000000000000000000000000090911690631b82787890608401600060405180830381600087803b158015610dee57600080fd5b505af1158015610e02573d6000803e3d6000fd5b5050505050610e116001600055565b505050565b600260005403610e685760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610150565b6002600055565b600080610e7b83611080565b90506000610e89848361112f565b949350505050565b6001600160a01b0381166107295760405163d551823d60e01b815260040160405180910390fd5b80600003610ec557505050565b610ece82610e91565b6000836001600160a01b031663bd02d0f5604051602001610f20906020808252601f908201527f4e41544956455f544f4b454e5f5452414e534645525f4741535f4c494d495400604082015260600190565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401610f5491815260200190565b602060405180830381865afa158015610f71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9591906123ae565b90506000806000806000868887f190508015610fb2575050505050565b610fbd858585610fc4565b5050505050565b80600003610fd157505050565b610fda82610e91565b6000610fe58461040e565b9050806001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561102257600080fd5b505af1158015611036573d6000803e3d6000fd5b5050505050610b6584828585611162565b600080611053836113ac565b915091508015611077578160405162461bcd60e51b81526004016101509190612867565b610e118361143c565b6000816001600160a01b031663bd02d0f56040516020016110ba906020808252600590820152644e4f4e434560d81b604082015260600190565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016110ee91815260200190565b602060405180830381865afa15801561110b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104bb91906123ae565b60008282604051602001611144929190611e17565b60405160208183030381529060405280519060200120905092915050565b8015610b655761117182610e91565b6000846001600160a01b031663bd02d0f561118b86611445565b6040518263ffffffff1660e01b81526004016111a991815260200190565b602060405180830381865afa1580156111c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ea91906123ae565b90508060000361120f5783604051634fe14bfd60e11b81526004016101509190611642565b600061121d858585856114cd565b509050801561122d575050610b65565b6000866001600160a01b03166321f8a721604051602001611271906020808252600f908201526e484f4c44494e475f4144445245535360881b604082015260600190565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016112a591815260200190565b602060405180830381865afa1580156112c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e69190611d1d565b90506001600160a01b03811661130f57604051633a6de2f560e21b815260040160405180910390fd5b60008061131e888488886114cd565b915091508115611332575050505050610b65565b600061133d826113ac565b5090507fc9f14d9a0a9b46470c7c0b6c508f8283abaab7f795f153953c58cd4250824dae818360405161137192919061287a565b60405180910390a160405163012f3b8f60e71b81526001600160a01b03808b1660048301528916602482015260448101889052606401610150565b606060006044835110156113d3575050604080516020810190915260008082529092909150565b60006113e0846020015190565b90506307b9e43360e51b6001600160e01b031982160161141f576004840193508380602001905181019061141491906128a8565b946001945092505050565b600060405180602001604052806000815250909250925050915091565b80518060208301fd5b6000604051602001611483906020808252601890820152771513d2d15397d514905394d1915497d1d054d7d31253525560421b604082015260600190565b60408051601f198184030181528282528051602091820120908301526001600160a01b03841690820152606001604051602081830303815290604052805190602001209050919050565b60006060600063a9059cbb60e01b86866040516024016114ee929190611e17565b604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b0383818316178352505050509050600080886001600160a01b0316868460405161153f9190612915565b60006040518083038160008787f1925050503d806000811461157d576040519150601f19603f3d011682016040523d82523d6000602084013e611582565b606091505b509150915081156116235780516000036115e0576001600160a01b0389163b6115e05760006040518060400160405280601481526020017310d85b1b081d1bc81b9bdb8b58dbdb9d1c9858dd60621b8152509450945050505061162c565b600081511180156116025750808060200190518101906116009190612931565b155b156116155760009450925061162c915050565b60019450925061162c915050565b60009450925050505b94509492505050565b6001600160a01b03169052565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b038111828210171561168e5761168e611656565b60405290565b604080519081016001600160401b038111828210171561168e5761168e611656565b60405161010081016001600160401b038111828210171561168e5761168e611656565b60405161014081016001600160401b038111828210171561168e5761168e611656565b604051601f8201601f191681016001600160401b038111828210171561172457611724611656565b604052919050565b60006001600160401b0382111561174557611745611656565b5060051b60200190565b6001600160a01b038116811461072957600080fd5b80356108f78161174f565b600082601f83011261178057600080fd5b813561179361178e8261172c565b6116fc565b8082825260208201915060208360051b8601019250858311156117b557600080fd5b602085015b838110156117db5780356117cd8161174f565b8352602092830192016117ba565b5095945050505050565b6000608082840312156117f757600080fd5b6117ff61166c565b905081356001600160401b0381111561181757600080fd5b6118238482850161176f565b82525060208201356001600160401b0381111561183f57600080fd5b8201601f8101841361185057600080fd5b803561185e61178e8261172c565b8082825260208201915060208360061b85010192508683111561188057600080fd5b6020840193505b828410156118c8576040848803121561189f57600080fd5b6118a7611694565b84358152602080860135818301529083526040909401939190910190611887565b60208501525050506040828101359082015260609182013591810191909152919050565b600080604083850312156118ff57600080fd5b8235915060208301356001600160401b0381111561191c57600080fd5b611928858286016117e5565b9150509250929050565b60006020828403121561194457600080fd5b5035919050565b60006020828403121561195d57600080fd5b81356001600160401b0381111561197357600080fd5b610e89848285016117e5565b6000806040838503121561199257600080fd5b823561199d8161174f565b946020939093013593505050565b600060e082840312156119bd57600080fd5b50919050565b6000602082840312156119d557600080fd5b81356001600160401b038111156119eb57600080fd5b610e89848285016119ab565b60008060208385031215611a0a57600080fd5b82356001600160401b03811115611a2057600080fd5b8301601f81018513611a3157600080fd5b80356001600160401b03811115611a4757600080fd5b8560208260051b8401011115611a5c57600080fd5b6020919091019590945092505050565b60005b83811015611a87578181015183820152602001611a6f565b50506000910152565b60008151808452611aa8816020860160208601611a6c565b601f01601f19169290920160200192915050565b600082825180855260208501945060208160051b8301016020850160005b83811015611b0c57601f19858403018852611af6838351611a90565b6020988901989093509190910190600101611ada565b50909695505050505050565b602081526000611b2b6020830184611abc565b9392505050565b60006001600160401b03821115611b4b57611b4b611656565b50601f01601f191660200190565b60008060008060808587031215611b6f57600080fd5b84356001600160401b03811115611b8557600080fd5b611b918782880161176f565b94505060208501356001600160401b03811115611bad57600080fd5b8501601f81018713611bbe57600080fd5b8035611bcc61178e8261172c565b8082825260208201915060208360051b850101925089831115611bee57600080fd5b602084015b83811015611c725780356001600160401b03811115611c1157600080fd5b8501603f81018c13611c2257600080fd5b6020810135611c3361178e82611b32565b8181526040838301018e1015611c4857600080fd5b81604084016020830137600060208383010152808652505050602083019250602081019050611bf3565b50955050505060408501356001600160401b03811115611c9157600080fd5b611c9d8782880161176f565b92505060608501356001600160401b03811115611cb957600080fd5b611cc58782880161176f565b91505092959194509250565b600080600060608486031215611ce657600080fd5b8335611cf18161174f565b92506020840135611d018161174f565b929592945050506040919091013590565b80516108f78161174f565b600060208284031215611d2f57600080fd5b8151611b2b8161174f565b600081518084526020840193506020830160005b82811015611d755781516001600160a01b0316865260209586019590910190600101611d4e565b5093949350505050565b828152604060208201526000825160806040840152611da160c0840182611d3a565b602085810151603f1986840301606087015280518084529082019350600092909101905b80831015611df5578351805183526020810151602084015250604082019150602084019350600183019250611dc5565b5060408601516080860152606086015160a08601528093505050509392505050565b6001600160a01b03929092168252602082015260400190565b600082601f830112611e4157600080fd5b8151611e4f61178e8261172c565b8082825260208201915060208360051b860101925085831115611e7157600080fd5b602085015b838110156117db578051611e898161174f565b835260209283019201611e76565b600060e08284031215611ea957600080fd5b60405160e081016001600160401b0381118282101715611ecb57611ecb611656565b604090815283518252602080850151908301528381015190820152606080840151908201526080808401519082015260a0808401519082015260c0928301519281019290925250919050565b801515811461072957600080fd5b600060208284031215611f3757600080fd5b604051602081016001600160401b0381118282101715611f5957611f59611656565b80604052508091508251611f6c81611f17565b905292915050565b600082601f830112611f8557600080fd5b8151611f9361178e8261172c565b8082825260208201915060208360051b860101925085831115611fb557600080fd5b602085015b838110156117db578051835260209283019201611fba565b600060208284031215611fe457600080fd5b81516001600160401b03811115611ffa57600080fd5b8201610140818503121561200d57600080fd5b61201561166c565b81516001600160401b0381111561202b57600080fd5b8201610100818703121561203e57600080fd5b6120466116b6565b61204f82611d12565b815261205d60208301611d12565b602082015261206e60408301611d12565b604082015261207f60608301611d12565b606082015261209060808301611d12565b60808201526120a160a08301611d12565b60a082015260c08201516001600160401b038111156120bf57600080fd5b6120cb88828501611e30565b60c08301525060e08201516001600160401b038111156120ea57600080fd5b6120f688828501611e30565b60e08301525082525061210c8560208401611e97565b602082015261211f856101008401611f25565b60408201526101208201516001600160401b0381111561213e57600080fd5b61214a86828501611f74565b606083015250949350505050565b6000808335601e1984360301811261216f57600080fd5b83016020810192503590506001600160401b0381111561218e57600080fd5b8060051b36038213156121a057600080fd5b9250929050565b81835260208301925060008160005b84811015611d755781356121c98161174f565b6001600160a01b0316865260209586019591909101906001016121b6565b600081356121f48161174f565b6001600160a01b03168352602082013561220d8161174f565b61221a6020850182611635565b5061222760408301611764565b6122346040850182611635565b5061224160608301611764565b61224e6060850182611635565b5061225b60808301611764565b6122686080850182611635565b5061227660a0830183612158565b60e060a086015261228b60e0860182846121a7565b91505061229b60c0840184612158565b85830360c08701526122ae8382846121a7565b9695505050505050565b80356108f781611f17565b81835260006001600160fb1b038311156122dc57600080fd5b8260051b80836020870137939093016020019392505050565b6001600160a01b03841681526020810183905260606040820152600082353684900360de1901811261232657600080fd5b60e0606084015261233d61014084018583016121e7565b60208501356080850152604085013560a0850152905061235f606085016122b8565b80151560c085015250608084013560e084015260a084013561010084015261238a60c0850185612158565b848303605f19016101208601526123a28382846122c3565b98975050505050505050565b6000602082840312156123c057600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126123f457600080fd5b8301803591506001600160401b0382111561240e57600080fd5b6020019150368190038213156121a057600080fd5b8183823760009101908152919050565b6080815260006124466080830187611d3a565b82810360208401526124588187611abc565b9050828103604084015261246c8186611d3a565b905082810360608401526124808185611d3a565b979650505050505050565b6000610100828403121561249e57600080fd5b6124a66116b6565b825181526020808401519082015260408084015190820152606080840151908201526080808401519082015260a0808401519082015260c0808401519082015260e0928301519281019290925250919050565b60006040828403121561250b57600080fd5b612513611694565b9050815161252081611f17565b8152602082015161253081611f17565b602082015292915050565b60006020828403121561254d57600080fd5b81516001600160401b0381111561256357600080fd5b8201610180818503121561257657600080fd5b61257e61166c565b81516001600160401b0381111561259457600080fd5b820161014081870312156125a757600080fd5b6125af6116d9565b6125b882611d12565b81526125c660208301611d12565b60208201526125d760408301611d12565b60408201526125e860608301611d12565b60608201526125f960808301611d12565b608082015261260a60a08301611d12565b60a082015261261b60c08301611d12565b60c082015261262c60e08301611d12565b60e08201526101008201516001600160401b0381111561264b57600080fd5b61265788828501611e30565b610100830152506101208201516001600160401b0381111561267857600080fd5b61268488828501611e30565b6101208301525082525061269b856020840161248b565b60208201526126ae8561012084016124f9565b60408201526101608201516001600160401b0381111561213e57600080fd5b6126df826126da83611764565b611635565b60006126ed60208301611764565b6126fa6020850182611635565b5061270760408301611764565b6127146040850182611635565b5061272160608301611764565b61272e6060850182611635565b5061273b60808301611764565b6127486080850182611635565b5061275560a08301611764565b61276260a0850182611635565b5061276f60c08301611764565b61277c60c0850182611635565b5061278a60e0830183612158565b61012060e08601526127a1610120860182846121a7565b9150506127b2610100840184612158565b8583036101008701526122ae8382846121a7565b6001600160a01b03841681526020810183905260606040820152600082353684900361011e190181126127f857600080fd5b60e0606084015261280f61014084018583016126cd565b6020850135608085810191909152604086013560a0860152606086013560c086015290915061283f9085016122b8565b151560e084015261285260a085016122b8565b151561010084015261238a60c0850185612158565b602081526000611b2b6020830184611a90565b60408152600061288d6040830185611a90565b828103602084015261289f8185611a90565b95945050505050565b6000602082840312156128ba57600080fd5b81516001600160401b038111156128d057600080fd5b8201601f810184136128e157600080fd5b80516128ef61178e82611b32565b81815285602083850101111561290457600080fd5b61289f826020830160208601611a6c565b60008251612927818460208701611a6c565b9190910192915050565b60006020828403121561294357600080fd5b8151611b2b81611f1756fea26469706673582212209f57bd782af1280c47a12e3f3df5d9d36a736fc48e8919307c5172d5a3de3c7b64736f6c634300081d0033", "libraries": { "GlvDepositStoreUtils": "0xD26854B36623B752491c098190865511deC8BFA0", "GlvWithdrawalStoreUtils": "0x73F4e3F649342E06DE96B53Cb4363f8d786E2822" }, "devdoc": { "kind": "dev", "methods": { "multicall(bytes[])": { "details": "Receives and executes a batch of function calls on this contract." } }, "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 }, "storageLayout": { "storage": [ { "astId": 11968, "contract": "contracts/router/GlvRouter.sol:GlvRouter", "label": "_status", "offset": 0, "slot": "0", "type": "t_uint256" } ], "types": { "t_uint256": { "encoding": "inplace", "label": "uint256", "numberOfBytes": "32" } } } }