From 4b997048d52c4b47dd0db90e333ce8ee08e6aed1 Mon Sep 17 00:00:00 2001 From: lgalende Date: Thu, 30 Apr 2026 15:23:09 -0300 Subject: [PATCH 1/2] evm: upgrade settler v1 --- ...cCallEncoderV1#DynamicCallEncoder.dbg.json | 4 + ...namicCallEncoderV1#DynamicCallEncoder.json | 117 ++ ...ate3DynamicCallEncoderV1#ICreateX.dbg.json | 4 + .../Create3DynamicCallEncoderV1#ICreateX.json | 51 + .../Create3SettlerV1#ICreateX.dbg.json | 4 + .../artifacts/Create3SettlerV1#ICreateX.json | 51 + .../chain-1/deployed_addresses.json | 5 +- .../deployments/chain-1/journal.jsonl | 14 +- ...cCallEncoderV1#DynamicCallEncoder.dbg.json | 4 + ...namicCallEncoderV1#DynamicCallEncoder.json | 117 ++ ...ate3DynamicCallEncoderV1#ICreateX.dbg.json | 4 + .../Create3DynamicCallEncoderV1#ICreateX.json | 51 + .../Create3SettlerV1#ICreateX.dbg.json | 4 + .../artifacts/Create3SettlerV1#ICreateX.json | 51 + .../Create3SettlerV1#Settler.dbg.json | 4 + .../artifacts/Create3SettlerV1#Settler.json | 1481 +++++++++++++++++ ...571dafa48e7ff636310c6c9f0fc8e202e44bc.json | 373 +++++ .../chain-10/deployed_addresses.json | 6 +- .../deployments/chain-10/journal.jsonl | 20 +- ...cCallEncoderV1#DynamicCallEncoder.dbg.json | 4 + ...namicCallEncoderV1#DynamicCallEncoder.json | 117 ++ ...ate3DynamicCallEncoderV1#ICreateX.dbg.json | 4 + .../Create3DynamicCallEncoderV1#ICreateX.json | 51 + .../Create3SettlerV1#ICreateX.dbg.json | 4 + .../artifacts/Create3SettlerV1#ICreateX.json | 51 + .../Create3SettlerV1#Settler.dbg.json | 4 + .../artifacts/Create3SettlerV1#Settler.json | 1481 +++++++++++++++++ ...571dafa48e7ff636310c6c9f0fc8e202e44bc.json | 373 +++++ .../chain-100/deployed_addresses.json | 6 +- .../deployments/chain-100/journal.jsonl | 20 +- ...cCallEncoderV1#DynamicCallEncoder.dbg.json | 4 + ...namicCallEncoderV1#DynamicCallEncoder.json | 117 ++ ...ate3DynamicCallEncoderV1#ICreateX.dbg.json | 4 + .../Create3DynamicCallEncoderV1#ICreateX.json | 51 + .../Create3SettlerV1#ICreateX.dbg.json | 4 + .../artifacts/Create3SettlerV1#ICreateX.json | 51 + .../Create3SettlerV1#Settler.dbg.json | 4 + .../artifacts/Create3SettlerV1#Settler.json | 1481 +++++++++++++++++ ...571dafa48e7ff636310c6c9f0fc8e202e44bc.json | 373 +++++ .../chain-137/deployed_addresses.json | 6 +- .../deployments/chain-137/journal.jsonl | 20 +- ...cCallEncoderV1#DynamicCallEncoder.dbg.json | 4 + ...namicCallEncoderV1#DynamicCallEncoder.json | 117 ++ ...ate3DynamicCallEncoderV1#ICreateX.dbg.json | 4 + .../Create3DynamicCallEncoderV1#ICreateX.json | 51 + .../Create3SettlerV1#ICreateX.dbg.json | 4 + .../artifacts/Create3SettlerV1#ICreateX.json | 51 + .../Create3SettlerV1#Settler.dbg.json | 4 + .../artifacts/Create3SettlerV1#Settler.json | 1481 +++++++++++++++++ ...571dafa48e7ff636310c6c9f0fc8e202e44bc.json | 373 +++++ .../chain-146/deployed_addresses.json | 6 +- .../deployments/chain-146/journal.jsonl | 20 +- ...cCallEncoderV1#DynamicCallEncoder.dbg.json | 4 + ...namicCallEncoderV1#DynamicCallEncoder.json | 117 ++ ...ate3DynamicCallEncoderV1#ICreateX.dbg.json | 4 + .../Create3DynamicCallEncoderV1#ICreateX.json | 51 + .../Create3SettlerV1#ICreateX.dbg.json | 4 + .../artifacts/Create3SettlerV1#ICreateX.json | 51 + .../Create3SettlerV1#Settler.dbg.json | 4 + .../artifacts/Create3SettlerV1#Settler.json | 1481 +++++++++++++++++ ...571dafa48e7ff636310c6c9f0fc8e202e44bc.json | 373 +++++ .../chain-42161/deployed_addresses.json | 6 +- .../deployments/chain-42161/journal.jsonl | 20 +- ...cCallEncoderV1#DynamicCallEncoder.dbg.json | 4 + ...namicCallEncoderV1#DynamicCallEncoder.json | 117 ++ ...ate3DynamicCallEncoderV1#ICreateX.dbg.json | 4 + .../Create3DynamicCallEncoderV1#ICreateX.json | 51 + .../Create3SettlerV1#ICreateX.dbg.json | 4 + .../artifacts/Create3SettlerV1#ICreateX.json | 51 + .../Create3SettlerV1#Settler.dbg.json | 4 + .../artifacts/Create3SettlerV1#Settler.json | 1481 +++++++++++++++++ ...571dafa48e7ff636310c6c9f0fc8e202e44bc.json | 373 +++++ .../chain-43114/deployed_addresses.json | 6 +- .../deployments/chain-43114/journal.jsonl | 20 +- ...cCallEncoderV1#DynamicCallEncoder.dbg.json | 4 + ...namicCallEncoderV1#DynamicCallEncoder.json | 117 ++ ...ate3DynamicCallEncoderV1#ICreateX.dbg.json | 4 + .../Create3DynamicCallEncoderV1#ICreateX.json | 51 + .../Create3SettlerV1#ICreateX.dbg.json | 4 + .../artifacts/Create3SettlerV1#ICreateX.json | 51 + .../Create3SettlerV1#Settler.dbg.json | 4 + .../artifacts/Create3SettlerV1#Settler.json | 1481 +++++++++++++++++ ...571dafa48e7ff636310c6c9f0fc8e202e44bc.json | 373 +++++ .../chain-56/deployed_addresses.json | 6 +- .../deployments/chain-56/journal.jsonl | 20 +- ...cCallEncoderV1#DynamicCallEncoder.dbg.json | 4 + ...namicCallEncoderV1#DynamicCallEncoder.json | 117 ++ ...ate3DynamicCallEncoderV1#ICreateX.dbg.json | 4 + .../Create3DynamicCallEncoderV1#ICreateX.json | 51 + .../Create3SettlerV1#ICreateX.dbg.json | 4 + .../artifacts/Create3SettlerV1#ICreateX.json | 51 + .../Create3SettlerV1#Settler.dbg.json | 4 + .../artifacts/Create3SettlerV1#Settler.json | 1481 +++++++++++++++++ ...571dafa48e7ff636310c6c9f0fc8e202e44bc.json | 373 +++++ .../chain-8453/deployed_addresses.json | 6 +- .../deployments/chain-8453/journal.jsonl | 20 +- packages/evm/ignition/modules/Create3.ts | 4 +- packages/evm/scripts/deploy-contracts.ts | 2 +- packages/evm/scripts/deploy-create3.ts | 12 +- packages/evm/scripts/upgrade-settler.ts | 2 +- 100 files changed, 17165 insertions(+), 25 deletions(-) create mode 100644 packages/evm/ignition/deployments/chain-1/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-1/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json create mode 100644 packages/evm/ignition/deployments/chain-1/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-1/artifacts/Create3DynamicCallEncoderV1#ICreateX.json create mode 100644 packages/evm/ignition/deployments/chain-1/artifacts/Create3SettlerV1#ICreateX.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-1/artifacts/Create3SettlerV1#ICreateX.json create mode 100644 packages/evm/ignition/deployments/chain-10/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-10/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json create mode 100644 packages/evm/ignition/deployments/chain-10/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-10/artifacts/Create3DynamicCallEncoderV1#ICreateX.json create mode 100644 packages/evm/ignition/deployments/chain-10/artifacts/Create3SettlerV1#ICreateX.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-10/artifacts/Create3SettlerV1#ICreateX.json create mode 100644 packages/evm/ignition/deployments/chain-10/artifacts/Create3SettlerV1#Settler.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-10/artifacts/Create3SettlerV1#Settler.json create mode 100644 packages/evm/ignition/deployments/chain-10/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json create mode 100644 packages/evm/ignition/deployments/chain-100/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-100/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json create mode 100644 packages/evm/ignition/deployments/chain-100/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-100/artifacts/Create3DynamicCallEncoderV1#ICreateX.json create mode 100644 packages/evm/ignition/deployments/chain-100/artifacts/Create3SettlerV1#ICreateX.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-100/artifacts/Create3SettlerV1#ICreateX.json create mode 100644 packages/evm/ignition/deployments/chain-100/artifacts/Create3SettlerV1#Settler.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-100/artifacts/Create3SettlerV1#Settler.json create mode 100644 packages/evm/ignition/deployments/chain-100/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json create mode 100644 packages/evm/ignition/deployments/chain-137/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-137/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json create mode 100644 packages/evm/ignition/deployments/chain-137/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-137/artifacts/Create3DynamicCallEncoderV1#ICreateX.json create mode 100644 packages/evm/ignition/deployments/chain-137/artifacts/Create3SettlerV1#ICreateX.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-137/artifacts/Create3SettlerV1#ICreateX.json create mode 100644 packages/evm/ignition/deployments/chain-137/artifacts/Create3SettlerV1#Settler.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-137/artifacts/Create3SettlerV1#Settler.json create mode 100644 packages/evm/ignition/deployments/chain-137/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json create mode 100644 packages/evm/ignition/deployments/chain-146/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-146/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json create mode 100644 packages/evm/ignition/deployments/chain-146/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-146/artifacts/Create3DynamicCallEncoderV1#ICreateX.json create mode 100644 packages/evm/ignition/deployments/chain-146/artifacts/Create3SettlerV1#ICreateX.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-146/artifacts/Create3SettlerV1#ICreateX.json create mode 100644 packages/evm/ignition/deployments/chain-146/artifacts/Create3SettlerV1#Settler.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-146/artifacts/Create3SettlerV1#Settler.json create mode 100644 packages/evm/ignition/deployments/chain-146/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json create mode 100644 packages/evm/ignition/deployments/chain-42161/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-42161/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json create mode 100644 packages/evm/ignition/deployments/chain-42161/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-42161/artifacts/Create3DynamicCallEncoderV1#ICreateX.json create mode 100644 packages/evm/ignition/deployments/chain-42161/artifacts/Create3SettlerV1#ICreateX.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-42161/artifacts/Create3SettlerV1#ICreateX.json create mode 100644 packages/evm/ignition/deployments/chain-42161/artifacts/Create3SettlerV1#Settler.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-42161/artifacts/Create3SettlerV1#Settler.json create mode 100644 packages/evm/ignition/deployments/chain-42161/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json create mode 100644 packages/evm/ignition/deployments/chain-43114/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-43114/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json create mode 100644 packages/evm/ignition/deployments/chain-43114/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-43114/artifacts/Create3DynamicCallEncoderV1#ICreateX.json create mode 100644 packages/evm/ignition/deployments/chain-43114/artifacts/Create3SettlerV1#ICreateX.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-43114/artifacts/Create3SettlerV1#ICreateX.json create mode 100644 packages/evm/ignition/deployments/chain-43114/artifacts/Create3SettlerV1#Settler.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-43114/artifacts/Create3SettlerV1#Settler.json create mode 100644 packages/evm/ignition/deployments/chain-43114/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json create mode 100644 packages/evm/ignition/deployments/chain-56/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-56/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json create mode 100644 packages/evm/ignition/deployments/chain-56/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-56/artifacts/Create3DynamicCallEncoderV1#ICreateX.json create mode 100644 packages/evm/ignition/deployments/chain-56/artifacts/Create3SettlerV1#ICreateX.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-56/artifacts/Create3SettlerV1#ICreateX.json create mode 100644 packages/evm/ignition/deployments/chain-56/artifacts/Create3SettlerV1#Settler.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-56/artifacts/Create3SettlerV1#Settler.json create mode 100644 packages/evm/ignition/deployments/chain-56/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json create mode 100644 packages/evm/ignition/deployments/chain-8453/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-8453/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json create mode 100644 packages/evm/ignition/deployments/chain-8453/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-8453/artifacts/Create3DynamicCallEncoderV1#ICreateX.json create mode 100644 packages/evm/ignition/deployments/chain-8453/artifacts/Create3SettlerV1#ICreateX.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-8453/artifacts/Create3SettlerV1#ICreateX.json create mode 100644 packages/evm/ignition/deployments/chain-8453/artifacts/Create3SettlerV1#Settler.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-8453/artifacts/Create3SettlerV1#Settler.json create mode 100644 packages/evm/ignition/deployments/chain-8453/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json diff --git a/packages/evm/ignition/deployments/chain-1/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json b/packages/evm/ignition/deployments/chain-1/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-1/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-1/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json b/packages/evm/ignition/deployments/chain-1/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json new file mode 100644 index 0000000..aa424ed --- /dev/null +++ b/packages/evm/ignition/deployments/chain-1/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json @@ -0,0 +1,117 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "DynamicCallEncoder", + "sourceName": "contracts/dynamic-calls/DynamicCallEncoder.sol", + "abi": [ + { + "inputs": [], + "name": "BytesLibSliceOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderBadLength", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderEmptyDynamic", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderInvalidArgKind", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariableOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariableRefBadLength", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariablesLengthOutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum DynamicArgKind", + "name": "kind", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "isDynamic", + "type": "bool" + } + ], + "internalType": "struct DynamicArg[]", + "name": "arguments", + "type": "tuple[]" + } + ], + "internalType": "struct DynamicCall", + "name": "dynamicCall", + "type": "tuple" + }, + { + "internalType": "bytes[][]", + "name": "variables", + "type": "bytes[][]" + }, + { + "internalType": "uint256", + "name": "variablesLength", + "type": "uint256" + } + ], + "name": "encode", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/dynamic-calls/DynamicCallEncoder.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-1/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json b/packages/evm/ignition/deployments/chain-1/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-1/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-1/artifacts/Create3DynamicCallEncoderV1#ICreateX.json b/packages/evm/ignition/deployments/chain-1/artifacts/Create3DynamicCallEncoderV1#ICreateX.json new file mode 100644 index 0000000..837192d --- /dev/null +++ b/packages/evm/ignition/deployments/chain-1/artifacts/Create3DynamicCallEncoderV1#ICreateX.json @@ -0,0 +1,51 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "ICreateX", + "sourceName": "contracts/interfaces/ICreateX.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "name": "ContractCreation", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + } + ], + "name": "deployCreate3", + "outputs": [ + { + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/interfaces/ICreateX.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-1/artifacts/Create3SettlerV1#ICreateX.dbg.json b/packages/evm/ignition/deployments/chain-1/artifacts/Create3SettlerV1#ICreateX.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-1/artifacts/Create3SettlerV1#ICreateX.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-1/artifacts/Create3SettlerV1#ICreateX.json b/packages/evm/ignition/deployments/chain-1/artifacts/Create3SettlerV1#ICreateX.json new file mode 100644 index 0000000..837192d --- /dev/null +++ b/packages/evm/ignition/deployments/chain-1/artifacts/Create3SettlerV1#ICreateX.json @@ -0,0 +1,51 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "ICreateX", + "sourceName": "contracts/interfaces/ICreateX.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "name": "ContractCreation", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + } + ], + "name": "deployCreate3", + "outputs": [ + { + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/interfaces/ICreateX.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-1/deployed_addresses.json b/packages/evm/ignition/deployments/chain-1/deployed_addresses.json index 79cb856..6cf8c1d 100644 --- a/packages/evm/ignition/deployments/chain-1/deployed_addresses.json +++ b/packages/evm/ignition/deployments/chain-1/deployed_addresses.json @@ -12,5 +12,8 @@ "Create3Proxy#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", "Create3Proxy#Proxy": "0x8be430d29a2c5692f9345a28506b849C6a99eDaA", "Create3SmartAccount7702#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", - "Create3SmartAccount7702#SmartAccount7702": "0x14AE3C251881d2214E376bfa38dD98A4Bd33550c" + "Create3SmartAccount7702#SmartAccount7702": "0x14AE3C251881d2214E376bfa38dD98A4Bd33550c", + "Create3DynamicCallEncoderV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", + "Create3DynamicCallEncoderV1#DynamicCallEncoder": "0x183E61BDE23a80f4D1e003653288d4B4551681ed", + "Create3SettlerV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed" } \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-1/journal.jsonl b/packages/evm/ignition/deployments/chain-1/journal.jsonl index fbda24e..2b72ecb 100644 --- a/packages/evm/ignition/deployments/chain-1/journal.jsonl +++ b/packages/evm/ignition/deployments/chain-1/journal.jsonl @@ -95,4 +95,16 @@ {"futureId":"Create3SmartAccount7702#ICreateX.deployCreate3","hash":"0xa4b1cebb3953ef410237be02560e73d66c1b19aa60d9ccc8e1c369af639f7b09","networkInteractionId":1,"receipt":{"blockHash":"0x7aaeb02d6e506fdd75ebb1a4dff95fa0ebf5937dd9f60144c2cc964b72362c3f","blockNumber":24993834,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":933,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x000000000000000000000000b800ea953426e361efda80da69765895ab3b04da","0x4d548e60a06ca5826dcab93682802743ae2369c7da6162da7a3f4201826a6d33"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":934,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x00000000000000000000000014ae3c251881d2214e376bfa38dd98a4bd33550c"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} {"futureId":"Create3SmartAccount7702#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} {"artifactId":"Create3SmartAccount7702#ICreateX","dependencies":["Create3SmartAccount7702#ICreateX.deployCreate3","Create3SmartAccount7702#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","strategy":"basic","strategyConfig":{},"txToReadFrom":"0xa4b1cebb3953ef410237be02560e73d66c1b19aa60d9ccc8e1c369af639f7b09","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} -{"artifactId":"Create3SmartAccount7702#SmartAccount7702","contractAddress":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","contractName":"SmartAccount7702","dependencies":["Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SmartAccount7702#SmartAccount7702","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} \ No newline at end of file +{"artifactId":"Create3SmartAccount7702#SmartAccount7702","contractAddress":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","contractName":"SmartAccount7702","dependencies":["Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SmartAccount7702#SmartAccount7702","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3DynamicCallEncoderV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","contractName":"ICreateX","dependencies":[],"futureId":"Create3DynamicCallEncoderV1#ICreateX","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"args":["0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b000000000000000004302606","0x6080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033"],"artifactId":"Create3DynamicCallEncoderV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","dependencies":["Create3DynamicCallEncoderV1#ICreateX"],"from":"0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b","functionName":"deployCreate3","futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","strategy":"basic","strategyConfig":{},"type":"CALL_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000c586080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c00330000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":25,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":25,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"9930214776"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"41242"}},"hash":"0x98a3efb4375a6a4a63f06386a787582880f2122c3ecbbb635e617bb40210acb8"},"type":"TRANSACTION_SEND"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","hash":"0x98a3efb4375a6a4a63f06386a787582880f2122c3ecbbb635e617bb40210acb8","networkInteractionId":1,"receipt":{"blockHash":"0xf27bf5950ba236817f4fc87810cca9c2b9829a024a4460d448780b1f5d73e55a","blockNumber":24994584,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":516,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x0000000000000000000000001d9bd3390aaef5bbcf3beb4f60e0ee28805f6779","0xa13cc826172bbf7683ce89033f741800ae55529a93ee495908820a8471d913b0"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":517,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x000000000000000000000000183e61bde23a80f4d1e003653288d4b4551681ed"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} +{"artifactId":"Create3DynamicCallEncoderV1#ICreateX","dependencies":["Create3DynamicCallEncoderV1#ICreateX.deployCreate3","Create3DynamicCallEncoderV1#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3DynamicCallEncoderV1#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x183E61BDE23a80f4D1e003653288d4B4551681ed","strategy":"basic","strategyConfig":{},"txToReadFrom":"0x98a3efb4375a6a4a63f06386a787582880f2122c3ecbbb635e617bb40210acb8","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","contractAddress":"0x183E61BDE23a80f4D1e003653288d4B4551681ed","contractName":"DynamicCallEncoder","dependencies":["Create3DynamicCallEncoderV1#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","contractName":"ICreateX","dependencies":[],"futureId":"Create3SettlerV1#ICreateX","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"args":["0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b000000000000000004302605","0x6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033"],"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","dependencies":["Create3SettlerV1#ICreateX"],"from":"0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b","functionName":"deployCreate3","futureId":"Create3SettlerV1#ICreateX.deployCreate3","strategy":"basic","strategyConfig":{},"type":"CALL_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000005d166080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c003300000000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-10/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json b/packages/evm/ignition/deployments/chain-10/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-10/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-10/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json b/packages/evm/ignition/deployments/chain-10/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json new file mode 100644 index 0000000..aa424ed --- /dev/null +++ b/packages/evm/ignition/deployments/chain-10/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json @@ -0,0 +1,117 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "DynamicCallEncoder", + "sourceName": "contracts/dynamic-calls/DynamicCallEncoder.sol", + "abi": [ + { + "inputs": [], + "name": "BytesLibSliceOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderBadLength", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderEmptyDynamic", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderInvalidArgKind", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariableOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariableRefBadLength", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariablesLengthOutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum DynamicArgKind", + "name": "kind", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "isDynamic", + "type": "bool" + } + ], + "internalType": "struct DynamicArg[]", + "name": "arguments", + "type": "tuple[]" + } + ], + "internalType": "struct DynamicCall", + "name": "dynamicCall", + "type": "tuple" + }, + { + "internalType": "bytes[][]", + "name": "variables", + "type": "bytes[][]" + }, + { + "internalType": "uint256", + "name": "variablesLength", + "type": "uint256" + } + ], + "name": "encode", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/dynamic-calls/DynamicCallEncoder.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-10/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json b/packages/evm/ignition/deployments/chain-10/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-10/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-10/artifacts/Create3DynamicCallEncoderV1#ICreateX.json b/packages/evm/ignition/deployments/chain-10/artifacts/Create3DynamicCallEncoderV1#ICreateX.json new file mode 100644 index 0000000..837192d --- /dev/null +++ b/packages/evm/ignition/deployments/chain-10/artifacts/Create3DynamicCallEncoderV1#ICreateX.json @@ -0,0 +1,51 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "ICreateX", + "sourceName": "contracts/interfaces/ICreateX.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "name": "ContractCreation", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + } + ], + "name": "deployCreate3", + "outputs": [ + { + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/interfaces/ICreateX.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-10/artifacts/Create3SettlerV1#ICreateX.dbg.json b/packages/evm/ignition/deployments/chain-10/artifacts/Create3SettlerV1#ICreateX.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-10/artifacts/Create3SettlerV1#ICreateX.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-10/artifacts/Create3SettlerV1#ICreateX.json b/packages/evm/ignition/deployments/chain-10/artifacts/Create3SettlerV1#ICreateX.json new file mode 100644 index 0000000..837192d --- /dev/null +++ b/packages/evm/ignition/deployments/chain-10/artifacts/Create3SettlerV1#ICreateX.json @@ -0,0 +1,51 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "ICreateX", + "sourceName": "contracts/interfaces/ICreateX.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "name": "ContractCreation", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + } + ], + "name": "deployCreate3", + "outputs": [ + { + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/interfaces/ICreateX.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-10/artifacts/Create3SettlerV1#Settler.dbg.json b/packages/evm/ignition/deployments/chain-10/artifacts/Create3SettlerV1#Settler.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-10/artifacts/Create3SettlerV1#Settler.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-10/artifacts/Create3SettlerV1#Settler.json b/packages/evm/ignition/deployments/chain-10/artifacts/Create3SettlerV1#Settler.json new file mode 100644 index 0000000..cd9fdca --- /dev/null +++ b/packages/evm/ignition/deployments/chain-10/artifacts/Create3SettlerV1#Settler.json @@ -0,0 +1,1481 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "Settler", + "sourceName": "contracts/Settler.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposed", + "type": "uint256" + } + ], + "name": "SettlerAmountOutLtProposed", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerCrossChainSwapMustBeOnlyOperation", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerDynamicCallEncoderZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "executor", + "type": "address" + } + ], + "name": "SettlerExecutorNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "SettlerIntentAlreadyExecuted", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerIntentOperationsEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SettlerIntentPastDeadline", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "current", + "type": "uint256" + } + ], + "name": "SettlerIntentValidationsNotEnough", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "name": "SettlerInvalidChain", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerInvalidProposedAmounts", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "SettlerInvalidRecipient", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "settler", + "type": "address" + } + ], + "name": "SettlerInvalidSettler", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerNonceZero", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerOperationChainsMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "post", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pre", + "type": "uint256" + } + ], + "name": "SettlerPostBalanceOutLtPre", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerProposalDataInvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerProposalDataNotEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SettlerProposalPastDeadline", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + } + ], + "name": "SettlerProposalSignerNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minAmount", + "type": "uint256" + } + ], + "name": "SettlerProposedAmountLtMinAmount", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerRescueFundsRecipientZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gasUsed", + "type": "uint256" + } + ], + "name": "SettlerSimulationSuccess", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerSolverFeeInvalidLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "SettlerSolverFeeTooHigh", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "solver", + "type": "address" + } + ], + "name": "SettlerSolverNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "lengthRequested", + "type": "uint256" + } + ], + "name": "SettlerTooManySafeguards", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + } + ], + "name": "SettlerUnknownOperationType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "SettlerUserNotSmartAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "previous", + "type": "address" + }, + { + "internalType": "address", + "name": "current", + "type": "address" + } + ], + "name": "SettlerValidatorDuplicatedOrUnsorted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "validator", + "type": "address" + } + ], + "name": "SettlerValidatorNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "SmartAccountsHandlerZero", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dynamicCallEncoder", + "type": "address" + } + ], + "name": "DynamicCallEncoderSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "FundsRescued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "indexed": false, + "internalType": "struct Operation", + "name": "operation", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "indexed": false, + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "intentHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "output", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "OperationExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operationsValidator", + "type": "address" + } + ], + "name": "OperationsValidatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "proposal", + "type": "bytes32" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "SafeguardSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "smartAccountsHandler", + "type": "address" + } + ], + "name": "SmartAccountsHandlerSet", + "type": "event" + }, + { + "inputs": [], + "name": "controller", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dynamicCallEncoder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "getIntentBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + } + ], + "name": "getIntentHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "internalType": "address", + "name": "solver", + "type": "address" + } + ], + "name": "getProposalHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getUserSafeguard", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controller", + "type": "address" + }, + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_dynamicCallEncoder", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "operationsValidator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "rescueFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newDynamicCallEncoder", + "type": "address" + } + ], + "name": "setDynamicCallEncoder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOperationsValidator", + "type": "address" + } + ], + "name": "setOperationsValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "safeguard", + "type": "bytes" + } + ], + "name": "setSafeguard", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newSmartAccountsHandler", + "type": "address" + } + ], + "name": "setSmartAccountsHandler", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "simulate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "smartAccountsHandler", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033", + "deployedBytecode": "0x60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/Settler.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-10/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json b/packages/evm/ignition/deployments/chain-10/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json new file mode 100644 index 0000000..dc33803 --- /dev/null +++ b/packages/evm/ignition/deployments/chain-10/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json @@ -0,0 +1,373 @@ +{ + "_format": "hh3-sol-build-info-1", + "id": "167571dafa48e7ff636310c6c9f0fc8e202e44bc", + "solcVersion": "0.8.28", + "solcLongVersion": "0.8.28+commit.7893614a", + "userSourceNameMap": { + "contracts/Controller.sol": "project/contracts/Controller.sol", + "contracts/Intents.sol": "project/contracts/Intents.sol", + "contracts/Settler.sol": "project/contracts/Settler.sol", + "contracts/dynamic-calls/DynamicCallEncoder.sol": "project/contracts/dynamic-calls/DynamicCallEncoder.sol", + "contracts/dynamic-calls/DynamicCallTypes.sol": "project/contracts/dynamic-calls/DynamicCallTypes.sol", + "contracts/interfaces/IController.sol": "project/contracts/interfaces/IController.sol", + "contracts/interfaces/ICreateX.sol": "project/contracts/interfaces/ICreateX.sol", + "contracts/interfaces/IDynamicCallEncoder.sol": "project/contracts/interfaces/IDynamicCallEncoder.sol", + "contracts/interfaces/IExecutor.sol": "project/contracts/interfaces/IExecutor.sol", + "contracts/interfaces/IOperationsValidator.sol": "project/contracts/interfaces/IOperationsValidator.sol", + "contracts/interfaces/IPaymentsReceiver.sol": "project/contracts/interfaces/IPaymentsReceiver.sol", + "contracts/interfaces/ISafe.sol": "project/contracts/interfaces/ISafe.sol", + "contracts/interfaces/ISettler.sol": "project/contracts/interfaces/ISettler.sol", + "contracts/interfaces/ISmartAccount.sol": "project/contracts/interfaces/ISmartAccount.sol", + "contracts/interfaces/ISmartAccountContract.sol": "project/contracts/interfaces/ISmartAccountContract.sol", + "contracts/interfaces/ISmartAccountsHandler.sol": "project/contracts/interfaces/ISmartAccountsHandler.sol", + "contracts/payments/PaymentsReceiver.sol": "project/contracts/payments/PaymentsReceiver.sol", + "contracts/proxy/Proxy.sol": "project/contracts/proxy/Proxy.sol", + "contracts/safeguards/BaseOperationsValidator.sol": "project/contracts/safeguards/BaseOperationsValidator.sol", + "contracts/safeguards/CallOperationsValidator.sol": "project/contracts/safeguards/CallOperationsValidator.sol", + "contracts/safeguards/DynamicCallOperationsValidator.sol": "project/contracts/safeguards/DynamicCallOperationsValidator.sol", + "contracts/safeguards/OperationsValidator.sol": "project/contracts/safeguards/OperationsValidator.sol", + "contracts/safeguards/Safeguards.sol": "project/contracts/safeguards/Safeguards.sol", + "contracts/safeguards/SwapOperationsValidator.sol": "project/contracts/safeguards/SwapOperationsValidator.sol", + "contracts/safeguards/TransferOperationsValidator.sol": "project/contracts/safeguards/TransferOperationsValidator.sol", + "contracts/smart-accounts/SmartAccount7702.sol": "project/contracts/smart-accounts/SmartAccount7702.sol", + "contracts/smart-accounts/SmartAccountBase.sol": "project/contracts/smart-accounts/SmartAccountBase.sol", + "contracts/smart-accounts/SmartAccountContract.sol": "project/contracts/smart-accounts/SmartAccountContract.sol", + "contracts/smart-accounts/SmartAccountsHandler.sol": "project/contracts/smart-accounts/SmartAccountsHandler.sol", + "contracts/smart-accounts/SmartAccountsHandlerHelpers.sol": "project/contracts/smart-accounts/SmartAccountsHandlerHelpers.sol", + "contracts/test/CallMock.sol": "project/contracts/test/CallMock.sol", + "contracts/test/SettlerV2Mock.sol": "project/contracts/test/SettlerV2Mock.sol", + "contracts/test/TokenMock.sol": "project/contracts/test/TokenMock.sol", + "contracts/test/dynamic-calls/StaticCallMock.sol": "project/contracts/test/dynamic-calls/StaticCallMock.sol", + "contracts/test/executors/EmptyExecutorMock.sol": "project/contracts/test/executors/EmptyExecutorMock.sol", + "contracts/test/executors/MintExecutorMock.sol": "project/contracts/test/executors/MintExecutorMock.sol", + "contracts/test/executors/ReentrantExecutorMock.sol": "project/contracts/test/executors/ReentrantExecutorMock.sol", + "contracts/test/executors/TransferExecutorMock.sol": "project/contracts/test/executors/TransferExecutorMock.sol", + "contracts/test/smart-accounts/SafeMock.sol": "project/contracts/test/smart-accounts/SafeMock.sol", + "contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol": "project/contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol", + "contracts/test/utils/BytesHelpersMock.sol": "project/contracts/test/utils/BytesHelpersMock.sol", + "contracts/test/utils/DenominationsMock.sol": "project/contracts/test/utils/DenominationsMock.sol", + "contracts/test/utils/ERC20HelpersMock.sol": "project/contracts/test/utils/ERC20HelpersMock.sol", + "contracts/utils/BytesHelpers.sol": "project/contracts/utils/BytesHelpers.sol", + "contracts/utils/Denominations.sol": "project/contracts/utils/Denominations.sol", + "contracts/utils/ERC20Helpers.sol": "project/contracts/utils/ERC20Helpers.sol", + "contracts/utils/MimicHelper.sol": "project/contracts/utils/MimicHelper.sol", + "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol": "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/ProxyAdmin.sol" + }, + "input": { + "language": "Solidity", + "settings": { + "optimizer": { + "enabled": true, + "runs": 1000 + }, + "evmVersion": "cancun", + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "remappings": [ + "npm/@openzeppelin/contracts-upgradeable@5.3.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "npm/@openzeppelin/contracts-upgradeable@5.3.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/" + ] + }, + "sources": { + "npm/@openzeppelin/contracts-upgradeable@5.3.0/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\n struct OwnableStorage {\n address _owner;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Ownable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\n\n function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\n assembly {\n $.slot := OwnableStorageLocation\n }\n }\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n function __Ownable_init(address initialOwner) internal onlyInitializing {\n __Ownable_init_unchained(initialOwner);\n }\n\n function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n OwnableStorage storage $ = _getOwnableStorage();\n return $._owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n OwnableStorage storage $ = _getOwnableStorage();\n address oldOwner = $._owner;\n $._owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Storage of the initializable contract.\n *\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\n * when using with upgradeable contracts.\n *\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\n */\n struct InitializableStorage {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n uint64 _initialized;\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool _initializing;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Initializable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\n\n /**\n * @dev The contract is already initialized.\n */\n error InvalidInitialization();\n\n /**\n * @dev The contract is not initializing.\n */\n error NotInitializing();\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint64 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\n * production.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n // Cache values to avoid duplicated sloads\n bool isTopLevelCall = !$._initializing;\n uint64 initialized = $._initialized;\n\n // Allowed calls:\n // - initialSetup: the contract is not in the initializing state and no previous version was\n // initialized\n // - construction: the contract is initialized at version 1 (no reinitialization) and the\n // current contract is just being deployed\n bool initialSetup = initialized == 0 && isTopLevelCall;\n bool construction = initialized == 1 && address(this).code.length == 0;\n\n if (!initialSetup && !construction) {\n revert InvalidInitialization();\n }\n $._initialized = 1;\n if (isTopLevelCall) {\n $._initializing = true;\n }\n _;\n if (isTopLevelCall) {\n $._initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint64 version) {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing || $._initialized >= version) {\n revert InvalidInitialization();\n }\n $._initialized = version;\n $._initializing = true;\n _;\n $._initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n _checkInitializing();\n _;\n }\n\n /**\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\n */\n function _checkInitializing() internal view virtual {\n if (!_isInitializing()) {\n revert NotInitializing();\n }\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing) {\n revert InvalidInitialization();\n }\n if ($._initialized != type(uint64).max) {\n $._initialized = type(uint64).max;\n emit Initialized(type(uint64).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint64) {\n return _getInitializableStorage()._initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _getInitializableStorage()._initializing;\n }\n\n /**\n * @dev Pointer to storage slot. Allows integrators to override it with a custom storage location.\n *\n * NOTE: Consider following the ERC-7201 formula to derive storage locations.\n */\n function _initializableStorageSlot() internal pure virtual returns (bytes32) {\n return INITIALIZABLE_STORAGE;\n }\n\n /**\n * @dev Returns a pointer to the storage namespace.\n */\n // solhint-disable-next-line var-name-mixedcase\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\n bytes32 slot = _initializableStorageSlot();\n assembly {\n $.slot := slot\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/cryptography/EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.20;\n\nimport {MessageHashUtils} from \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\nimport {IERC5267} from \"@openzeppelin/contracts/interfaces/IERC5267.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose\n * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract\n * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to\n * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\n * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\n */\nabstract contract EIP712Upgradeable is Initializable, IERC5267 {\n bytes32 private constant TYPE_HASH =\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /// @custom:storage-location erc7201:openzeppelin.storage.EIP712\n struct EIP712Storage {\n /// @custom:oz-renamed-from _HASHED_NAME\n bytes32 _hashedName;\n /// @custom:oz-renamed-from _HASHED_VERSION\n bytes32 _hashedVersion;\n\n string _name;\n string _version;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.EIP712\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant EIP712StorageLocation = 0xa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100;\n\n function _getEIP712Storage() private pure returns (EIP712Storage storage $) {\n assembly {\n $.slot := EIP712StorageLocation\n }\n }\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n __EIP712_init_unchained(name, version);\n }\n\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n EIP712Storage storage $ = _getEIP712Storage();\n $._name = name;\n $._version = version;\n\n // Reset prior values in storage if upgrading\n $._hashedName = 0;\n $._hashedVersion = 0;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n return _buildDomainSeparator();\n }\n\n function _buildDomainSeparator() private view returns (bytes32) {\n return keccak256(abi.encode(TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n\n /**\n * @inheritdoc IERC5267\n */\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n EIP712Storage storage $ = _getEIP712Storage();\n // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized\n // and the EIP712 domain is not reliable, as it will be missing name and version.\n require($._hashedName == 0 && $._hashedVersion == 0, \"EIP712: Uninitialized\");\n\n return (\n hex\"0f\", // 01111\n _EIP712Name(),\n _EIP712Version(),\n block.chainid,\n address(this),\n bytes32(0),\n new uint256[](0)\n );\n }\n\n /**\n * @dev The name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712Name() internal view virtual returns (string memory) {\n EIP712Storage storage $ = _getEIP712Storage();\n return $._name;\n }\n\n /**\n * @dev The version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712Version() internal view virtual returns (string memory) {\n EIP712Storage storage $ = _getEIP712Storage();\n return $._version;\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead.\n */\n function _EIP712NameHash() internal view returns (bytes32) {\n EIP712Storage storage $ = _getEIP712Storage();\n string memory name = _EIP712Name();\n if (bytes(name).length > 0) {\n return keccak256(bytes(name));\n } else {\n // If the name is empty, the contract may have been upgraded without initializing the new storage.\n // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design.\n bytes32 hashedName = $._hashedName;\n if (hashedName != 0) {\n return hashedName;\n } else {\n return keccak256(\"\");\n }\n }\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead.\n */\n function _EIP712VersionHash() internal view returns (bytes32) {\n EIP712Storage storage $ = _getEIP712Storage();\n string memory version = _EIP712Version();\n if (bytes(version).length > 0) {\n return keccak256(bytes(version));\n } else {\n // If the version is empty, the contract may have been upgraded without initializing the new storage.\n // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design.\n bytes32 hashedVersion = $._hashedVersion;\n if (hashedVersion != 0) {\n return hashedVersion;\n } else {\n return keccak256(\"\");\n }\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/ReentrancyGuardUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\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 EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\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 ReentrancyGuardUpgradeable is Initializable {\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 /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard\n struct ReentrancyGuardStorage {\n uint256 _status;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.ReentrancyGuard\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;\n\n function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) {\n assembly {\n $.slot := ReentrancyGuardStorageLocation\n }\n }\n\n /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\n\n function __ReentrancyGuard_init() internal onlyInitializing {\n __ReentrancyGuard_init_unchained();\n }\n\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\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 ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n // On the first call to nonReentrant, _status will be NOT_ENTERED\n if ($._status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n $._status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\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 ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n return $._status == ENTERED;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC-20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC-721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC-1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n */\ninterface IERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with `hash`\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1363.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n /*\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n * 0xb0202a11 ===\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n */\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @param data Additional data with no specified format, sent in call to `spender`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1967.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1967.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n */\ninterface IERC1967 {\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Emitted when the beacon is changed.\n */\n event BeaconUpgraded(address indexed beacon);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC5267.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)\n\npragma solidity ^0.8.20;\n\ninterface IERC5267 {\n /**\n * @dev MAY be emitted to signal that the domain could have changed.\n */\n event EIP712DomainChanged();\n\n /**\n * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\n * signature.\n */\n function eip712Domain()\n external\n view\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n );\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {UpgradeableBeacon} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.22;\n\nimport {Proxy} from \"../Proxy.sol\";\nimport {ERC1967Utils} from \"./ERC1967Utils.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `implementation`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `implementation`. This will typically be an\n * encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\n *\n * Requirements:\n *\n * - If `data` is empty, `msg.value` must be zero.\n */\n constructor(address implementation, bytes memory _data) payable {\n ERC1967Utils.upgradeToAndCall(implementation, _data);\n }\n\n /**\n * @dev Returns the current implementation address.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using\n * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function _implementation() internal view virtual override returns (address) {\n return ERC1967Utils.getImplementation();\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/ERC1967/ERC1967Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Utils.sol)\n\npragma solidity ^0.8.22;\n\nimport {IBeacon} from \"../beacon/IBeacon.sol\";\nimport {IERC1967} from \"../../interfaces/IERC1967.sol\";\nimport {Address} from \"../../utils/Address.sol\";\nimport {StorageSlot} from \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This library provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] slots.\n */\nlibrary ERC1967Utils {\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev The `implementation` of the proxy is invalid.\n */\n error ERC1967InvalidImplementation(address implementation);\n\n /**\n * @dev The `admin` of the proxy is invalid.\n */\n error ERC1967InvalidAdmin(address admin);\n\n /**\n * @dev The `beacon` of the proxy is invalid.\n */\n error ERC1967InvalidBeacon(address beacon);\n\n /**\n * @dev An upgrade function sees `msg.value > 0` that may be lost.\n */\n error ERC1967NonPayable();\n\n /**\n * @dev Returns the current implementation address.\n */\n function getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the ERC-1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n if (newImplementation.code.length == 0) {\n revert ERC1967InvalidImplementation(newImplementation);\n }\n StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Performs implementation upgrade with additional setup call if data is nonempty.\n * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n * to avoid stuck value in the contract.\n *\n * Emits an {IERC1967-Upgraded} event.\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) internal {\n _setImplementation(newImplementation);\n emit IERC1967.Upgraded(newImplementation);\n\n if (data.length > 0) {\n Address.functionDelegateCall(newImplementation, data);\n } else {\n _checkNonPayable();\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Returns the current admin.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using\n * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the ERC-1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n if (newAdmin == address(0)) {\n revert ERC1967InvalidAdmin(address(0));\n }\n StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {IERC1967-AdminChanged} event.\n */\n function changeAdmin(address newAdmin) internal {\n emit IERC1967.AdminChanged(getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is the keccak-256 hash of \"eip1967.proxy.beacon\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Returns the current beacon.\n */\n function getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the ERC-1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n if (newBeacon.code.length == 0) {\n revert ERC1967InvalidBeacon(newBeacon);\n }\n\n StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;\n\n address beaconImplementation = IBeacon(newBeacon).implementation();\n if (beaconImplementation.code.length == 0) {\n revert ERC1967InvalidImplementation(beaconImplementation);\n }\n }\n\n /**\n * @dev Change the beacon and trigger a setup call if data is nonempty.\n * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n * to avoid stuck value in the contract.\n *\n * Emits an {IERC1967-BeaconUpgraded} event.\n *\n * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since\n * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for\n * efficiency.\n */\n function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {\n _setBeacon(newBeacon);\n emit IERC1967.BeaconUpgraded(newBeacon);\n\n if (data.length > 0) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n } else {\n _checkNonPayable();\n }\n }\n\n /**\n * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract\n * if an upgrade doesn't perform an initialization call.\n */\n function _checkNonPayable() private {\n if (msg.value > 0) {\n revert ERC1967NonPayable();\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback\n * function and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/ProxyAdmin.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/transparent/ProxyAdmin.sol)\n\npragma solidity ^0.8.22;\n\nimport {ITransparentUpgradeableProxy} from \"./TransparentUpgradeableProxy.sol\";\nimport {Ownable} from \"../../access/Ownable.sol\";\n\n/**\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\n */\ncontract ProxyAdmin is Ownable {\n /**\n * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgrade(address,address)`\n * and `upgradeAndCall(address,address,bytes)` are present, and `upgrade` must be used if no function should be called,\n * while `upgradeAndCall` will invoke the `receive` function if the third argument is the empty byte string.\n * If the getter returns `\"5.0.0\"`, only `upgradeAndCall(address,address,bytes)` is present, and the third argument must\n * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function\n * during an upgrade.\n */\n string public constant UPGRADE_INTERFACE_VERSION = \"5.0.0\";\n\n /**\n * @dev Sets the initial owner who can perform upgrades.\n */\n constructor(address initialOwner) Ownable(initialOwner) {}\n\n /**\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation.\n * See {TransparentUpgradeableProxy-_dispatchUpgradeToAndCall}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n * - If `data` is empty, `msg.value` must be zero.\n */\n function upgradeAndCall(\n ITransparentUpgradeableProxy proxy,\n address implementation,\n bytes memory data\n ) public payable virtual onlyOwner {\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/TransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.22;\n\nimport {ERC1967Utils} from \"../ERC1967/ERC1967Utils.sol\";\nimport {ERC1967Proxy} from \"../ERC1967/ERC1967Proxy.sol\";\nimport {IERC1967} from \"../../interfaces/IERC1967.sol\";\nimport {ProxyAdmin} from \"./ProxyAdmin.sol\";\n\n/**\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\n * does not implement this interface directly, and its upgradeability mechanism is implemented by an internal dispatch\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\n * include them in the ABI so this interface must be used to interact with it.\n */\ninterface ITransparentUpgradeableProxy is IERC1967 {\n /// @dev See {UUPSUpgradeable-upgradeToAndCall}\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable;\n}\n\n/**\n * @dev This contract implements a proxy that is upgradeable through an associated {ProxyAdmin} instance.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches the {ITransparentUpgradeableProxy-upgradeToAndCall} function exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can call the `upgradeToAndCall` function but any other call won't be forwarded to\n * the implementation. If the admin tries to call a function on the implementation it will fail with an error indicating\n * the proxy admin cannot fallback to the target implementation.\n *\n * These properties mean that the admin account can only be used for upgrading the proxy, so it's best if it's a\n * dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to\n * call a function from the proxy implementation. For this reason, the proxy deploys an instance of {ProxyAdmin} and\n * allows upgrades only if they come through it. You should think of the `ProxyAdmin` instance as the administrative\n * interface of the proxy, including the ability to change who can trigger upgrades by transferring ownership.\n *\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\n * inherit from that interface, and instead `upgradeToAndCall` is implicitly implemented using a custom dispatch\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\n * implementation.\n *\n * NOTE: This proxy does not inherit from {Context} deliberately. The {ProxyAdmin} of this contract won't send a\n * meta-transaction in any way, and any other meta-transaction setup should be made in the implementation contract.\n *\n * IMPORTANT: This contract avoids unnecessary storage reads by setting the admin only during construction as an\n * immutable variable, preventing any changes thereafter. However, the admin slot defined in ERC-1967 can still be\n * overwritten by the implementation logic pointed to by this proxy. In such cases, the contract may end up in an\n * undesirable state where the admin slot is different from the actual admin. Relying on the value of the admin slot\n * is generally fine if the implementation is trusted.\n *\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the\n * compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new\n * function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This\n * could render the `upgradeToAndCall` function inaccessible, preventing upgradeability and compromising transparency.\n */\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\n // An immutable address for the admin to avoid unnecessary SLOADs before each call\n // at the expense of removing the ability to change the admin once it's set.\n // This is acceptable if the admin is always a ProxyAdmin instance or similar contract\n // with its own ability to transfer the permissions to another account.\n address private immutable _admin;\n\n /**\n * @dev The proxy caller is the current admin, and can't fallback to the proxy target.\n */\n error ProxyDeniedAdminAccess();\n\n /**\n * @dev Initializes an upgradeable proxy managed by an instance of a {ProxyAdmin} with an `initialOwner`,\n * backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in\n * {ERC1967Proxy-constructor}.\n */\n constructor(address _logic, address initialOwner, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\n _admin = address(new ProxyAdmin(initialOwner));\n // Set the storage value and emit an event for ERC-1967 compatibility\n ERC1967Utils.changeAdmin(_proxyAdmin());\n }\n\n /**\n * @dev Returns the admin of this proxy.\n */\n function _proxyAdmin() internal view virtual returns (address) {\n return _admin;\n }\n\n /**\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior.\n */\n function _fallback() internal virtual override {\n if (msg.sender == _proxyAdmin()) {\n if (msg.sig != ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\n revert ProxyDeniedAdminAccess();\n } else {\n _dispatchUpgradeToAndCall();\n }\n } else {\n super._fallback();\n }\n }\n\n /**\n * @dev Upgrade the implementation of the proxy. See {ERC1967Utils-upgradeToAndCall}.\n *\n * Requirements:\n *\n * - If `data` is empty, `msg.value` must be zero.\n */\n function _dispatchUpgradeToAndCall() private {\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\n ERC1967Utils.upgradeToAndCall(newImplementation, data);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC-20\n * applications.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * Both values are immutable: they can only be set once during construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Skips emitting an {Approval} event indicating an allowance update. This is not\n * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n *\n * ```solidity\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner`'s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance < type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC-20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\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 value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens as the allowance of `spender` over the\n * 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 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` 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 value) external returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 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 /**\n * @dev An operation with an ERC-20 token failed.\n */\n error SafeERC20FailedOperation(address token);\n\n /**\n * @dev Indicates a failed `decreaseAllowance` request.\n */\n error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\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.encodeCall(token.transfer, (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.encodeCall(token.transferFrom, (from, to, value)));\n }\n\n /**\n * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\n }\n\n /**\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\n return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, 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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n forceApprove(token, spender, oldAllowance + value);\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n * value, non-reverting calls are assumed to be successful.\n *\n * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n unchecked {\n uint256 currentAllowance = token.allowance(address(this), spender);\n if (currentAllowance < requestedDecrease) {\n revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n }\n forceApprove(token, spender, currentAllowance - requestedDecrease);\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n * set here.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n safeTransfer(token, to, value);\n } else if (!token.transferAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferFromAndCallRelaxed(\n IERC1363 token,\n address from,\n address to,\n uint256 value,\n bytes memory data\n ) internal {\n if (to.code.length == 0) {\n safeTransferFrom(token, from, to, value);\n } else if (!token.transferFromAndCall(from, to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n * once without retrying, and relies on the returned value to be true.\n *\n * Reverts if the returned value is other than `true`.\n */\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n forceApprove(token, to, value);\n } else if (!token.approveAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n uint256 returnSize;\n uint256 returnValue;\n assembly (\"memory-safe\") {\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n // bubble errors\n if iszero(success) {\n let ptr := mload(0x40)\n returndatacopy(ptr, 0, returndatasize())\n revert(ptr, returndatasize())\n }\n returnSize := returndatasize()\n returnValue := mload(0)\n }\n\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\n revert SafeERC20FailedOperation(address(token));\n }\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 silently catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n bool success;\n uint256 returnSize;\n uint256 returnValue;\n assembly (\"memory-safe\") {\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n returnSize := returndatasize()\n returnValue := mload(0)\n }\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (utils/Address.sol)\n\npragma solidity ^0.8.20;\n\nimport {Errors} from \"./Errors.sol\";\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev There's no code at `target` (it is not a contract).\n */\n error AddressEmptyCode(address target);\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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n if (address(this).balance < amount) {\n revert Errors.InsufficientBalance(address(this).balance, amount);\n }\n\n (bool success, bytes memory returndata) = recipient.call{value: amount}(\"\");\n if (!success) {\n _revert(returndata);\n }\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 or custom error, it is bubbled\n * up by this function (like regular Solidity function calls). However, if\n * the call reverted with no returned reason, this function reverts with a\n * {Errors.FailedCall} error.\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 function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0);\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 function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n if (address(this).balance < value) {\n revert Errors.InsufficientBalance(address(this).balance, value);\n }\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\n * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case\n * of an unsuccessful call.\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata\n ) internal view returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n // only check if target is a contract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n if (returndata.length == 0 && target.code.length == 0) {\n revert AddressEmptyCode(target);\n }\n return returndata;\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\n * revert reason or with a default {Errors.FailedCall} error.\n */\n function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n return returndata;\n }\n }\n\n /**\n * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.\n */\n function _revert(bytes memory returndata) 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 assembly (\"memory-safe\") {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert Errors.FailedCall();\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS\n }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n */\n function tryRecover(\n bytes32 hash,\n bytes memory signature\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly (\"memory-safe\") {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32.\n */\n function toDataWithIntendedValidatorHash(\n address validator,\n bytes32 messageHash\n ) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, hex\"19_00\")\n mstore(0x02, shl(96, validator))\n mstore(0x16, messageHash)\n digest := keccak256(0x00, 0x36)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Errors.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Collection of common custom errors used in multiple contracts\n *\n * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.\n * It is recommended to avoid relying on the error API for critical functionality.\n *\n * _Available since v5.1._\n */\nlibrary Errors {\n /**\n * @dev The ETH balance of the account is not enough to perform the operation.\n */\n error InsufficientBalance(uint256 balance, uint256 needed);\n\n /**\n * @dev A call to an address target failed. The target may have reverted.\n */\n error FailedCall();\n\n /**\n * @dev The deployment failed.\n */\n error FailedDeployment();\n\n /**\n * @dev A necessary precompile is missing.\n */\n error MissingPrecompile(address);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Return the 512-bit addition of two uint256.\n *\n * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.\n */\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n assembly (\"memory-safe\") {\n low := add(a, b)\n high := lt(low, a)\n }\n }\n\n /**\n * @dev Return the 512-bit multiplication of two uint256.\n *\n * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.\n */\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = high * 2²⁵⁶ + low.\n assembly (\"memory-safe\") {\n let mm := mulmod(a, b, not(0))\n low := mul(a, b)\n high := sub(sub(mm, low), lt(mm, low))\n }\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a + b;\n success = c >= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a - b;\n success = c <= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a * b;\n assembly (\"memory-safe\") {\n // Only true when the multiplication doesn't overflow\n // (c / a == b) || (a == 0)\n success := or(eq(div(c, a), b), iszero(a))\n }\n // equivalent to: success ? c : 0\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `DIV` opcode returns zero when the denominator is 0.\n result := div(a, b)\n }\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `MOD` opcode returns zero when the denominator is 0.\n result := mod(a, b)\n }\n }\n }\n\n /**\n * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryAdd(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\n */\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\n (, uint256 result) = trySub(a, b);\n return result;\n }\n\n /**\n * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryMul(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\n }\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a > b, a, b);\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a < b, a, b);\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n\n // The following calculation ensures accurate ceiling division without overflow.\n // Since a is non-zero, (a - 1) / b will not overflow.\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n // but the largest value we can obtain is type(uint256).max - 1, which happens\n // when a = type(uint256).max and b = 1.\n unchecked {\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n }\n }\n\n /**\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n * denominator == 0.\n *\n * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n\n // Handle non-overflow cases, 256 by 256 division.\n if (high == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return low / denominator;\n }\n\n // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n if (denominator <= high) {\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n }\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [high low].\n uint256 remainder;\n assembly (\"memory-safe\") {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n high := sub(high, gt(remainder, low))\n low := sub(low, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\n assembly (\"memory-safe\") {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [high low] by twos.\n low := div(low, twos)\n\n // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from high into low.\n low |= high * twos;\n\n // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n // works in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n inverse *= 2 - denominator * inverse; // inverse mod 2³²\n inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high\n // is no longer required.\n result = low * inverse;\n return result;\n }\n }\n\n /**\n * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n }\n\n /**\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\n */\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n if (high >= 1 << n) {\n Panic.panic(Panic.UNDER_OVERFLOW);\n }\n return (high << (256 - n)) | (low >> n);\n }\n }\n\n /**\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\n */\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\n }\n\n /**\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n *\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n *\n * If the input value is not inversible, 0 is returned.\n *\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n */\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n unchecked {\n if (n == 0) return 0;\n\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n // ax + ny = 1\n // ax = 1 + (-y)n\n // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n // If the remainder is 0 the gcd is n right away.\n uint256 remainder = a % n;\n uint256 gcd = n;\n\n // Therefore the initial coefficients are:\n // ax + ny = gcd(a, n) = n\n // 0a + 1n = n\n int256 x = 0;\n int256 y = 1;\n\n while (remainder != 0) {\n uint256 quotient = gcd / remainder;\n\n (gcd, remainder) = (\n // The old remainder is the next gcd to try.\n remainder,\n // Compute the next remainder.\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n // where gcd is at most n (capped to type(uint256).max)\n gcd - remainder * quotient\n );\n\n (x, y) = (\n // Increment the coefficient of a.\n y,\n // Decrement the coefficient of n.\n // Can overflow, but the result is casted to uint256 so that the\n // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n x - y * int256(quotient)\n );\n }\n\n if (gcd != 1) return 0; // No inverse exists.\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n }\n }\n\n /**\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n *\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n *\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n */\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n unchecked {\n return Math.modExp(a, p - 2, p);\n }\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n *\n * Requirements:\n * - modulus can't be zero\n * - underlying staticcall to precompile must succeed\n *\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n * interpreted as 0.\n */\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n (bool success, uint256 result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n * to operate modulo 0 or if the underlying precompile reverted.\n *\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n * of a revert, but the result may be incorrectly interpreted as 0.\n */\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n if (m == 0) return (false, 0);\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n // | Offset | Content | Content (Hex) |\n // |-----------|------------|--------------------------------------------------------------------|\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n mstore(ptr, 0x20)\n mstore(add(ptr, 0x20), 0x20)\n mstore(add(ptr, 0x40), 0x20)\n mstore(add(ptr, 0x60), b)\n mstore(add(ptr, 0x80), e)\n mstore(add(ptr, 0xa0), m)\n\n // Given the result < m, it's guaranteed to fit in 32 bytes,\n // so we can use the memory scratch space located at offset 0.\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n result := mload(0x00)\n }\n }\n\n /**\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\n */\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n (bool success, bytes memory result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n */\n function tryModExp(\n bytes memory b,\n bytes memory e,\n bytes memory m\n ) internal view returns (bool success, bytes memory result) {\n if (_zeroBytes(m)) return (false, new bytes(0));\n\n uint256 mLen = m.length;\n\n // Encode call args in result and move the free memory pointer\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n assembly (\"memory-safe\") {\n let dataPtr := add(result, 0x20)\n // Write result on top of args to avoid allocating extra memory.\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n // Overwrite the length.\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n mstore(result, mLen)\n // Set the memory pointer after the returned data.\n mstore(0x40, add(dataPtr, mLen))\n }\n }\n\n /**\n * @dev Returns whether the provided byte array is zero.\n */\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\n for (uint256 i = 0; i < byteArray.length; ++i) {\n if (byteArray[i] != 0) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n * towards zero.\n *\n * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n * using integer operations.\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n unchecked {\n // Take care of easy edge cases when a == 0 or a == 1\n if (a <= 1) {\n return a;\n }\n\n // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n // the current value as `ε_n = | x_n - sqrt(a) |`.\n //\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n // bigger than any uint256.\n //\n // By noticing that\n // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n // to the msb function.\n uint256 aa = a;\n uint256 xn = 1;\n\n if (aa >= (1 << 128)) {\n aa >>= 128;\n xn <<= 64;\n }\n if (aa >= (1 << 64)) {\n aa >>= 64;\n xn <<= 32;\n }\n if (aa >= (1 << 32)) {\n aa >>= 32;\n xn <<= 16;\n }\n if (aa >= (1 << 16)) {\n aa >>= 16;\n xn <<= 8;\n }\n if (aa >= (1 << 8)) {\n aa >>= 8;\n xn <<= 4;\n }\n if (aa >= (1 << 4)) {\n aa >>= 4;\n xn <<= 2;\n }\n if (aa >= (1 << 2)) {\n xn <<= 1;\n }\n\n // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n //\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n // This is going to be our x_0 (and ε_0)\n xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n // From here, Newton's method give us:\n // x_{n+1} = (x_n + a / x_n) / 2\n //\n // One should note that:\n // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n // = ((x_n² + a) / (2 * x_n))² - a\n // = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n // = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n // = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n // = (x_n² - a)² / (2 * x_n)²\n // = ((x_n² - a) / (2 * x_n))²\n // ≥ 0\n // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n //\n // This gives us the proof of quadratic convergence of the sequence:\n // ε_{n+1} = | x_{n+1} - sqrt(a) |\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\n // = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n // = | (x_n - sqrt(a))² / (2 * x_n) |\n // = | ε_n² / (2 * x_n) |\n // = ε_n² / | (2 * x_n) |\n //\n // For the first iteration, we have a special case where x_0 is known:\n // ε_1 = ε_0² / | (2 * x_0) |\n // ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n // ≤ 2**(2*e-4) / (3 * 2**(e-1))\n // ≤ 2**(e-3) / 3\n // ≤ 2**(e-3-log2(3))\n // ≤ 2**(e-4.5)\n //\n // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n // ε_{n+1} = ε_n² / | (2 * x_n) |\n // ≤ (2**(e-k))² / (2 * 2**(e-1))\n // ≤ 2**(2*e-2*k) / 2**e\n // ≤ 2**(e-2*k)\n xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5) -- special case, see above\n xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9) -- general case with k = 4.5\n xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18) -- general case with k = 9\n xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36) -- general case with k = 18\n xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72) -- general case with k = 36\n xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144) -- general case with k = 72\n\n // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n // sqrt(a) or sqrt(a) + 1.\n return xn - SafeCast.toUint(xn > a / xn);\n }\n }\n\n /**\n * @dev Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log2(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // If upper 8 bits of 16-bit half set, add 8 to result\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\n // If upper 4 bits of 8-bit half set, add 4 to result\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\n\n // Shifts value right by the current result and use it as an index into this lookup table:\n //\n // | x (4 bits) | index | table[index] = MSB position |\n // |------------|---------|-----------------------------|\n // | 0000 | 0 | table[0] = 0 |\n // | 0001 | 1 | table[1] = 0 |\n // | 0010 | 2 | table[2] = 1 |\n // | 0011 | 3 | table[3] = 1 |\n // | 0100 | 4 | table[4] = 2 |\n // | 0101 | 5 | table[5] = 2 |\n // | 0110 | 6 | table[6] = 2 |\n // | 0111 | 7 | table[7] = 2 |\n // | 1000 | 8 | table[8] = 3 |\n // | 1001 | 9 | table[9] = 3 |\n // | 1010 | 10 | table[10] = 3 |\n // | 1011 | 11 | table[11] = 3 |\n // | 1100 | 12 | table[12] = 3 |\n // | 1101 | 13 | table[13] = 3 |\n // | 1110 | 14 | table[14] = 3 |\n // | 1111 | 15 | table[15] = 3 |\n //\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\n assembly (\"memory-safe\") {\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\n }\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/SafeCast.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool 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 */\nlibrary SafeCast {\n /**\n * @dev Value doesn't fit in an uint of `bits` size.\n */\n error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n /**\n * @dev An int value doesn't fit in an uint of `bits` size.\n */\n error SafeCastOverflowedIntToUint(int256 value);\n\n /**\n * @dev Value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n /**\n * @dev An uint value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedUintToInt(uint256 value);\n\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 function toUint248(uint256 value) internal pure returns (uint248) {\n if (value > type(uint248).max) {\n revert SafeCastOverflowedUintDowncast(248, value);\n }\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 function toUint240(uint256 value) internal pure returns (uint240) {\n if (value > type(uint240).max) {\n revert SafeCastOverflowedUintDowncast(240, value);\n }\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 function toUint232(uint256 value) internal pure returns (uint232) {\n if (value > type(uint232).max) {\n revert SafeCastOverflowedUintDowncast(232, value);\n }\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 function toUint224(uint256 value) internal pure returns (uint224) {\n if (value > type(uint224).max) {\n revert SafeCastOverflowedUintDowncast(224, value);\n }\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 function toUint216(uint256 value) internal pure returns (uint216) {\n if (value > type(uint216).max) {\n revert SafeCastOverflowedUintDowncast(216, value);\n }\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 function toUint208(uint256 value) internal pure returns (uint208) {\n if (value > type(uint208).max) {\n revert SafeCastOverflowedUintDowncast(208, value);\n }\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 function toUint200(uint256 value) internal pure returns (uint200) {\n if (value > type(uint200).max) {\n revert SafeCastOverflowedUintDowncast(200, value);\n }\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 function toUint192(uint256 value) internal pure returns (uint192) {\n if (value > type(uint192).max) {\n revert SafeCastOverflowedUintDowncast(192, value);\n }\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 function toUint184(uint256 value) internal pure returns (uint184) {\n if (value > type(uint184).max) {\n revert SafeCastOverflowedUintDowncast(184, value);\n }\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 function toUint176(uint256 value) internal pure returns (uint176) {\n if (value > type(uint176).max) {\n revert SafeCastOverflowedUintDowncast(176, value);\n }\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 function toUint168(uint256 value) internal pure returns (uint168) {\n if (value > type(uint168).max) {\n revert SafeCastOverflowedUintDowncast(168, value);\n }\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 function toUint160(uint256 value) internal pure returns (uint160) {\n if (value > type(uint160).max) {\n revert SafeCastOverflowedUintDowncast(160, value);\n }\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 function toUint152(uint256 value) internal pure returns (uint152) {\n if (value > type(uint152).max) {\n revert SafeCastOverflowedUintDowncast(152, value);\n }\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 function toUint144(uint256 value) internal pure returns (uint144) {\n if (value > type(uint144).max) {\n revert SafeCastOverflowedUintDowncast(144, value);\n }\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 function toUint136(uint256 value) internal pure returns (uint136) {\n if (value > type(uint136).max) {\n revert SafeCastOverflowedUintDowncast(136, value);\n }\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 function toUint128(uint256 value) internal pure returns (uint128) {\n if (value > type(uint128).max) {\n revert SafeCastOverflowedUintDowncast(128, value);\n }\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 function toUint120(uint256 value) internal pure returns (uint120) {\n if (value > type(uint120).max) {\n revert SafeCastOverflowedUintDowncast(120, value);\n }\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 function toUint112(uint256 value) internal pure returns (uint112) {\n if (value > type(uint112).max) {\n revert SafeCastOverflowedUintDowncast(112, value);\n }\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 function toUint104(uint256 value) internal pure returns (uint104) {\n if (value > type(uint104).max) {\n revert SafeCastOverflowedUintDowncast(104, value);\n }\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 function toUint96(uint256 value) internal pure returns (uint96) {\n if (value > type(uint96).max) {\n revert SafeCastOverflowedUintDowncast(96, value);\n }\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 function toUint88(uint256 value) internal pure returns (uint88) {\n if (value > type(uint88).max) {\n revert SafeCastOverflowedUintDowncast(88, value);\n }\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 function toUint80(uint256 value) internal pure returns (uint80) {\n if (value > type(uint80).max) {\n revert SafeCastOverflowedUintDowncast(80, value);\n }\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 function toUint72(uint256 value) internal pure returns (uint72) {\n if (value > type(uint72).max) {\n revert SafeCastOverflowedUintDowncast(72, value);\n }\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 function toUint64(uint256 value) internal pure returns (uint64) {\n if (value > type(uint64).max) {\n revert SafeCastOverflowedUintDowncast(64, value);\n }\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 function toUint56(uint256 value) internal pure returns (uint56) {\n if (value > type(uint56).max) {\n revert SafeCastOverflowedUintDowncast(56, value);\n }\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 function toUint48(uint256 value) internal pure returns (uint48) {\n if (value > type(uint48).max) {\n revert SafeCastOverflowedUintDowncast(48, value);\n }\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 function toUint40(uint256 value) internal pure returns (uint40) {\n if (value > type(uint40).max) {\n revert SafeCastOverflowedUintDowncast(40, value);\n }\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 function toUint32(uint256 value) internal pure returns (uint32) {\n if (value > type(uint32).max) {\n revert SafeCastOverflowedUintDowncast(32, value);\n }\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 function toUint24(uint256 value) internal pure returns (uint24) {\n if (value > type(uint24).max) {\n revert SafeCastOverflowedUintDowncast(24, value);\n }\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 function toUint16(uint256 value) internal pure returns (uint16) {\n if (value > type(uint16).max) {\n revert SafeCastOverflowedUintDowncast(16, value);\n }\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 function toUint8(uint256 value) internal pure returns (uint8) {\n if (value > type(uint8).max) {\n revert SafeCastOverflowedUintDowncast(8, value);\n }\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 function toUint256(int256 value) internal pure returns (uint256) {\n if (value < 0) {\n revert SafeCastOverflowedIntToUint(value);\n }\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 function toInt248(int256 value) internal pure returns (int248 downcasted) {\n downcasted = int248(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(248, value);\n }\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 function toInt240(int256 value) internal pure returns (int240 downcasted) {\n downcasted = int240(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(240, value);\n }\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 function toInt232(int256 value) internal pure returns (int232 downcasted) {\n downcasted = int232(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(232, value);\n }\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 function toInt224(int256 value) internal pure returns (int224 downcasted) {\n downcasted = int224(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(224, value);\n }\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 function toInt216(int256 value) internal pure returns (int216 downcasted) {\n downcasted = int216(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(216, value);\n }\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 function toInt208(int256 value) internal pure returns (int208 downcasted) {\n downcasted = int208(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(208, value);\n }\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 function toInt200(int256 value) internal pure returns (int200 downcasted) {\n downcasted = int200(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(200, value);\n }\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 function toInt192(int256 value) internal pure returns (int192 downcasted) {\n downcasted = int192(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(192, value);\n }\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 function toInt184(int256 value) internal pure returns (int184 downcasted) {\n downcasted = int184(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(184, value);\n }\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 function toInt176(int256 value) internal pure returns (int176 downcasted) {\n downcasted = int176(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(176, value);\n }\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 function toInt168(int256 value) internal pure returns (int168 downcasted) {\n downcasted = int168(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(168, value);\n }\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 function toInt160(int256 value) internal pure returns (int160 downcasted) {\n downcasted = int160(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(160, value);\n }\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 function toInt152(int256 value) internal pure returns (int152 downcasted) {\n downcasted = int152(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(152, value);\n }\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 function toInt144(int256 value) internal pure returns (int144 downcasted) {\n downcasted = int144(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(144, value);\n }\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 function toInt136(int256 value) internal pure returns (int136 downcasted) {\n downcasted = int136(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(136, value);\n }\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 function toInt128(int256 value) internal pure returns (int128 downcasted) {\n downcasted = int128(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(128, value);\n }\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 function toInt120(int256 value) internal pure returns (int120 downcasted) {\n downcasted = int120(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(120, value);\n }\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 function toInt112(int256 value) internal pure returns (int112 downcasted) {\n downcasted = int112(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(112, value);\n }\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 function toInt104(int256 value) internal pure returns (int104 downcasted) {\n downcasted = int104(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(104, value);\n }\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 function toInt96(int256 value) internal pure returns (int96 downcasted) {\n downcasted = int96(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(96, value);\n }\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 function toInt88(int256 value) internal pure returns (int88 downcasted) {\n downcasted = int88(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(88, value);\n }\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 function toInt80(int256 value) internal pure returns (int80 downcasted) {\n downcasted = int80(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(80, value);\n }\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 function toInt72(int256 value) internal pure returns (int72 downcasted) {\n downcasted = int72(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(72, value);\n }\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 function toInt64(int256 value) internal pure returns (int64 downcasted) {\n downcasted = int64(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(64, value);\n }\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 function toInt56(int256 value) internal pure returns (int56 downcasted) {\n downcasted = int56(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(56, value);\n }\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 function toInt48(int256 value) internal pure returns (int48 downcasted) {\n downcasted = int48(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(48, value);\n }\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 function toInt40(int256 value) internal pure returns (int40 downcasted) {\n downcasted = int40(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(40, value);\n }\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 function toInt32(int256 value) internal pure returns (int32 downcasted) {\n downcasted = int32(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(32, value);\n }\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 function toInt24(int256 value) internal pure returns (int24 downcasted) {\n downcasted = int24(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(24, value);\n }\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 function toInt16(int256 value) internal pure returns (int16 downcasted) {\n downcasted = int16(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(16, value);\n }\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 function toInt8(int256 value) internal pure returns (int8 downcasted) {\n downcasted = int8(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(8, value);\n }\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 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 if (value > uint256(type(int256).max)) {\n revert SafeCastOverflowedUintToInt(value);\n }\n return int256(value);\n }\n\n /**\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n */\n function toUint(bool b) internal pure returns (uint256 u) {\n assembly (\"memory-safe\") {\n u := iszero(iszero(b))\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));\n }\n }\n\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return ternary(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 ternary(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 // Formula from the \"Bit Twiddling Hacks\" by Sean Eron Anderson.\n // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift,\n // taking advantage of the most significant (or \"sign\" bit) in two's complement representation.\n // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result,\n // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative).\n int256 mask = n >> 255;\n\n // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.\n return uint256((n + mask) ^ mask);\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Panic.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n * using Panic for uint256;\n *\n * // Use any of the declared internal constants\n * function foo() { Panic.GENERIC.panic(); }\n *\n * // Alternatively\n * function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n /// @dev generic / unspecified error\n uint256 internal constant GENERIC = 0x00;\n /// @dev used by the assert() builtin\n uint256 internal constant ASSERT = 0x01;\n /// @dev arithmetic underflow or overflow\n uint256 internal constant UNDER_OVERFLOW = 0x11;\n /// @dev division or modulo by zero\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\n /// @dev enum conversion error\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n /// @dev invalid encoding in storage\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n /// @dev empty array pop\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n /// @dev array out of bounds access\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n /// @dev resource error (too large allocation or too large array)\n uint256 internal constant RESOURCE_ERROR = 0x41;\n /// @dev calling invalid internal function\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n /// @dev Reverts with a panic code. Recommended to use with\n /// the internal constants with predefined codes.\n function panic(uint256 code) internal pure {\n assembly (\"memory-safe\") {\n mstore(0x00, 0x4e487b71)\n mstore(0x20, code)\n revert(0x1c, 0x24)\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\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" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC-1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n * // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(newImplementation.code.length > 0);\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * TIP: Consider using this library along with {SlotDerivation}.\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n struct Int256Slot {\n int256 value;\n }\n\n struct StringSlot {\n string value;\n }\n\n struct BytesSlot {\n bytes value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Int256Slot` with member `value` located at `slot`.\n */\n function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `StringSlot` with member `value` located at `slot`.\n */\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n */\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n\n /**\n * @dev Returns a `BytesSlot` with member `value` located at `slot`.\n */\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n */\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SafeCast} from \"./math/SafeCast.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n using SafeCast for *;\n\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n uint256 private constant SPECIAL_CHARS_LOOKUP =\n (1 << 0x08) | // backspace\n (1 << 0x09) | // tab\n (1 << 0x0a) | // newline\n (1 << 0x0c) | // form feed\n (1 << 0x0d) | // carriage return\n (1 << 0x22) | // double quote\n (1 << 0x5c); // backslash\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n /**\n * @dev The string being parsed contains characters that are not in scope of the given base.\n */\n error StringsInvalidChar();\n\n /**\n * @dev The string being parsed is not a properly formatted address.\n */\n error StringsInvalidAddressFormat();\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n assembly (\"memory-safe\") {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n assembly (\"memory-safe\") {\n mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n uint256 localValue = value;\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n * representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal\n * representation, according to EIP-55.\n */\n function toChecksumHexString(address addr) internal pure returns (string memory) {\n bytes memory buffer = bytes(toHexString(addr));\n\n // hash the hex part of buffer (skip length + 2 bytes, length 40)\n uint256 hashValue;\n assembly (\"memory-safe\") {\n hashValue := shr(96, keccak256(add(buffer, 0x22), 40))\n }\n\n for (uint256 i = 41; i > 1; --i) {\n // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f)\n if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) {\n // case shift by xoring with 0x20\n buffer[i] ^= 0x20;\n }\n hashValue >>= 4;\n }\n return string(buffer);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input) internal pure returns (uint256) {\n return parseUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n uint256 result = 0;\n for (uint256 i = begin; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 9) return (false, 0);\n result *= 10;\n result += chr;\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `int256`.\n *\n * Requirements:\n * - The string must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input) internal pure returns (int256) {\n return parseInt(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) {\n (bool success, int256 value) = tryParseInt(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if\n * the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(string memory input) internal pure returns (bool success, int256 value) {\n return _tryParseIntUncheckedBounds(input, 0, bytes(input).length);\n }\n\n uint256 private constant ABS_MIN_INT256 = 2 ** 255;\n\n /**\n * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character or if the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, int256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseIntUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseIntUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, int256 value) {\n bytes memory buffer = bytes(input);\n\n // Check presence of a negative sign.\n bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n bool positiveSign = sign == bytes1(\"+\");\n bool negativeSign = sign == bytes1(\"-\");\n uint256 offset = (positiveSign || negativeSign).toUint();\n\n (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end);\n\n if (absSuccess && absValue < ABS_MIN_INT256) {\n return (true, negativeSign ? -int256(absValue) : int256(absValue));\n } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) {\n return (true, type(int256).min);\n } else return (false, 0);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input) internal pure returns (uint256) {\n return parseHexUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseHexUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an\n * invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseHexUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseHexUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n // skip 0x prefix if present\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 offset = hasPrefix.toUint() * 2;\n\n uint256 result = 0;\n for (uint256 i = begin + offset; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 15) return (false, 0);\n result *= 16;\n unchecked {\n // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check).\n // This guarantees that adding a value < 16 will not cause an overflow, hence the unchecked.\n result += chr;\n }\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as an `address`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input) internal pure returns (address) {\n return parseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) {\n (bool success, address value) = tryParseAddress(input, begin, end);\n if (!success) revert StringsInvalidAddressFormat();\n return value;\n }\n\n /**\n * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly\n * formatted address. See {parseAddress-string} requirements.\n */\n function tryParseAddress(string memory input) internal pure returns (bool success, address value) {\n return tryParseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly\n * formatted address. See {parseAddress-string-uint256-uint256} requirements.\n */\n function tryParseAddress(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, address value) {\n if (end > bytes(input).length || begin > end) return (false, address(0));\n\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 expectedLength = 40 + hasPrefix.toUint() * 2;\n\n // check that input is the correct length\n if (end - begin == expectedLength) {\n // length guarantees that this does not overflow, and value is at most type(uint160).max\n (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end);\n return (s, address(uint160(v)));\n } else {\n return (false, address(0));\n }\n }\n\n function _tryParseChr(bytes1 chr) private pure returns (uint8) {\n uint8 value = uint8(chr);\n\n // Try to parse `chr`:\n // - Case 1: [0-9]\n // - Case 2: [a-f]\n // - Case 3: [A-F]\n // - otherwise not supported\n unchecked {\n if (value > 47 && value < 58) value -= 48;\n else if (value > 96 && value < 103) value -= 87;\n else if (value > 64 && value < 71) value -= 55;\n else return type(uint8).max;\n }\n\n return value;\n }\n\n /**\n * @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.\n *\n * WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.\n *\n * NOTE: This function escapes all unicode characters, and not just the ones in ranges defined in section 2.5 of\n * RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). ECMAScript's `JSON.parse` does recover escaped unicode\n * characters that are not in this range, but other tooling may provide different results.\n */\n function escapeJSON(string memory input) internal pure returns (string memory) {\n bytes memory buffer = bytes(input);\n bytes memory output = new bytes(2 * buffer.length); // worst case scenario\n uint256 outputLength = 0;\n\n for (uint256 i; i < buffer.length; ++i) {\n bytes1 char = bytes1(_unsafeReadBytesOffset(buffer, i));\n if (((SPECIAL_CHARS_LOOKUP & (1 << uint8(char))) != 0)) {\n output[outputLength++] = \"\\\\\";\n if (char == 0x08) output[outputLength++] = \"b\";\n else if (char == 0x09) output[outputLength++] = \"t\";\n else if (char == 0x0a) output[outputLength++] = \"n\";\n else if (char == 0x0c) output[outputLength++] = \"f\";\n else if (char == 0x0d) output[outputLength++] = \"r\";\n else if (char == 0x5c) output[outputLength++] = \"\\\\\";\n else if (char == 0x22) {\n // solhint-disable-next-line quotes\n output[outputLength++] = '\"';\n }\n } else {\n output[outputLength++] = char;\n }\n }\n // write the actual length and deallocate unused memory\n assembly (\"memory-safe\") {\n mstore(output, outputLength)\n mstore(0x40, add(output, shl(5, shr(5, add(outputLength, 63)))))\n }\n\n return string(output);\n }\n\n /**\n * @dev Reads a bytes32 from a bytes array without bounds checking.\n *\n * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n * assembly block as such would prevent some optimizations.\n */\n function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n // This is not memory safe in the general case, but all calls to this private function are within bounds.\n assembly (\"memory-safe\") {\n value := mload(add(buffer, add(0x20, offset)))\n }\n }\n}\n" + }, + "project/contracts/Controller.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\n\nimport './interfaces/IController.sol';\n\n/**\n * @title Controller\n * @dev Manages allow lists for solvers, executors, proposal signers and validators\n */\ncontract Controller is IController, Ownable {\n // List of allowed solvers\n mapping (address => bool) public override isSolverAllowed;\n\n // List of allowed executors\n mapping (address => bool) public override isExecutorAllowed;\n\n // List of allowed proposal signers\n mapping (address => bool) public override isProposalSignerAllowed;\n\n // List of allowed validators\n mapping (address => bool) public override isValidatorAllowed;\n\n // Minimum number of validations allowed\n uint8 public override minValidations;\n\n /**\n * @dev Creates a new Controller contract\n * @param owner Address that will own the contract\n * @param solvers List of allowed solvers\n * @param executors List of allowed executors\n * @param proposalSigners List of allowed proposal signers\n * @param validators List of allowed validators\n * @param _minValidations Minimum number of validations allowed\n */\n constructor(\n address owner,\n address[] memory solvers,\n address[] memory executors,\n address[] memory proposalSigners,\n address[] memory validators,\n uint8 _minValidations\n ) Ownable(owner) {\n for (uint256 i = 0; i < solvers.length; i++) _setAllowedSolver(solvers[i], true);\n for (uint256 i = 0; i < executors.length; i++) _setAllowedExecutor(executors[i], true);\n for (uint256 i = 0; i < proposalSigners.length; i++) _setAllowedProposalSigner(proposalSigners[i], true);\n for (uint256 i = 0; i < validators.length; i++) _setAllowedValidator(validators[i], true);\n _setMinValidations(_minValidations);\n }\n\n /**\n * @dev Sets permissions for multiple solvers\n * @param solvers List of solver addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedSolvers(address[] memory solvers, bool[] memory alloweds) external override onlyOwner {\n if (solvers.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < solvers.length; i++) _setAllowedSolver(solvers[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple executors\n * @param executors List of executor addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedExecutors(address[] memory executors, bool[] memory alloweds) external override onlyOwner {\n if (executors.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < executors.length; i++) _setAllowedExecutor(executors[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple proposal signers\n * @param signers List of proposal signer addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedProposalSigners(address[] memory signers, bool[] memory alloweds) external override onlyOwner {\n if (signers.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < signers.length; i++) _setAllowedProposalSigner(signers[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple validators\n * @param validators List of validator addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedValidators(address[] memory validators, bool[] memory alloweds) external override onlyOwner {\n if (validators.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < validators.length; i++) _setAllowedValidator(validators[i], alloweds[i]);\n }\n\n /**\n * @dev Sets the minimum number of validations allowed\n * @param newMinValidations minimum number of validations allowed\n */\n function setMinValidations(uint8 newMinValidations) external override onlyOwner {\n _setMinValidations(newMinValidations);\n }\n\n /**\n * @dev Sets a solver permission\n */\n function _setAllowedSolver(address solver, bool allowed) internal {\n isSolverAllowed[solver] = allowed;\n emit SolverAllowedSet(solver, allowed);\n }\n\n /**\n * @dev Sets an executor permission\n */\n function _setAllowedExecutor(address executor, bool allowed) internal {\n isExecutorAllowed[executor] = allowed;\n emit ExecutorAllowedSet(executor, allowed);\n }\n\n /**\n * @dev Sets a proposal signer permission\n */\n function _setAllowedProposalSigner(address signer, bool allowed) internal {\n isProposalSignerAllowed[signer] = allowed;\n emit ProposalSignerAllowedSet(signer, allowed);\n }\n\n /**\n * @dev Sets a validator permission\n */\n function _setAllowedValidator(address validator, bool allowed) internal {\n isValidatorAllowed[validator] = allowed;\n emit ValidatorAllowedSet(validator, allowed);\n }\n\n /**\n * @dev Sets the minimum number of validations allowed\n */\n function _setMinValidations(uint8 newMinValidations) internal {\n minValidations = newMinValidations;\n emit MinValidationSet(newMinValidations);\n }\n}\n" + }, + "project/contracts/dynamic-calls/DynamicCallEncoder.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport './DynamicCallTypes.sol';\nimport '../interfaces/IDynamicCallEncoder.sol';\nimport '../utils/BytesHelpers.sol';\n\n/**\n * @title DynamicCallEncoder\n * @dev Builds calldata for arbitrary contract calls from structured arguments.\n *\n * This encoder supports:\n * - Literal ABI-encoded arguments\n * - Variable references resolved from previous execution results\n *\n * The encoder follows standard ABI encoding rules, reconstructing\n * the calldata heads and tails dynamically based on argument types.\n */\ncontract DynamicCallEncoder is IDynamicCallEncoder {\n using BytesHelpers for bytes;\n\n /**\n * @dev Internal representation of a fully-encoded argument\n * @param data ABI-encoded argument payload\n * @param isDynamic Whether this argument requires a head offset\n */\n struct EncodedArg {\n bytes data;\n bool isDynamic;\n }\n\n /**\n * @dev Encodes a dynamic call into calldata\n * @param dynamicCall Dynamic call specification\n * @param variables List of resolved variable values\n * @param variablesLength Number of resolved variables\n * @return data Fully ABI-encoded calldata\n */\n function encode(DynamicCall memory dynamicCall, bytes[][] memory variables, uint256 variablesLength)\n external\n pure\n override\n returns (bytes memory data)\n {\n if (variablesLength > variables.length) revert DynamicCallEncoderVariablesLengthOutOfBounds();\n data = _buildCalldata(dynamicCall.selector, dynamicCall.arguments, variables, variablesLength);\n }\n\n /**\n * @dev Builds calldata from a selector and a list of dynamic arguments\n * This function performs standard ABI aggregation:\n * - static arguments are inlined in the head\n * - dynamic arguments place offsets in the head and append data to the tail\n */\n function _buildCalldata(\n bytes4 selector,\n DynamicArg[] memory args,\n bytes[][] memory variables,\n uint256 variablesLength\n ) internal pure returns (bytes memory data) {\n uint256 n = args.length;\n bytes[] memory encodedArgs = new bytes[](n);\n bool[] memory isDynamic = new bool[](n);\n uint256 headLength = 0;\n\n for (uint256 i = 0; i < n; i++) {\n EncodedArg memory enc = _encodeArg(args[i], variables, variablesLength);\n encodedArgs[i] = enc.data;\n isDynamic[i] = enc.isDynamic;\n headLength += enc.isDynamic ? 32 : enc.data.length;\n }\n\n bytes memory heads;\n bytes memory tails;\n uint256 nextDynamicHead = headLength;\n\n for (uint256 i = 0; i < n; i++) {\n if (isDynamic[i]) {\n heads = bytes.concat(heads, bytes32(nextDynamicHead));\n tails = bytes.concat(tails, encodedArgs[i]);\n nextDynamicHead += encodedArgs[i].length;\n } else {\n heads = bytes.concat(heads, encodedArgs[i]);\n }\n }\n\n data = bytes.concat(selector, heads, tails);\n }\n\n /**\n * @dev Encodes a single dynamic argument based on its kind\n */\n function _encodeArg(DynamicArg memory arg, bytes[][] memory variables, uint256 variablesLength)\n internal\n pure\n returns (EncodedArg memory out)\n {\n if (arg.kind == DynamicArgKind.Literal) return _encodeLiteral(arg);\n if (arg.kind == DynamicArgKind.Variable) return _encodeVariable(arg, variables, variablesLength);\n revert DynamicCallEncoderInvalidArgKind();\n }\n\n /**\n * @dev Encodes a literal argument\n */\n function _encodeLiteral(DynamicArg memory arg) internal pure returns (EncodedArg memory) {\n return _encodeAbiValue(arg.data, arg.isDynamic);\n }\n\n /**\n * @dev Encodes a variable argument by resolving it from the variables list\n */\n function _encodeVariable(DynamicArg memory arg, bytes[][] memory variables, uint256 variablesLength)\n internal\n pure\n returns (EncodedArg memory)\n {\n if (arg.data.length != 64) revert DynamicCallEncoderVariableRefBadLength();\n uint256 opIndex = arg.data.readWord0();\n uint256 subIndex = arg.data.readWord1();\n if (opIndex >= variablesLength) revert DynamicCallEncoderVariableOutOfBounds();\n if (subIndex >= variables[opIndex].length) revert DynamicCallEncoderVariableOutOfBounds();\n\n return _encodeAbiValue(variables[opIndex][subIndex], arg.isDynamic);\n }\n\n /**\n * @dev Interprets ABI-like bytes as either a static or dynamic value. Used for variable resolution.\n */\n function _encodeAbiValue(bytes memory data, bool isDynamic) internal pure returns (EncodedArg memory out) {\n if (data.length == 0 || data.length % 32 != 0) revert DynamicCallEncoderBadLength();\n\n if (isDynamic) {\n if (data.length < 64) revert DynamicCallEncoderEmptyDynamic();\n if (data.readWord0() != 0x20) revert DynamicCallEncoderBadLength();\n\n out.data = data.sliceFrom(32);\n out.isDynamic = true;\n } else {\n out.data = data;\n out.isDynamic = false;\n }\n }\n}\n" + }, + "project/contracts/dynamic-calls/DynamicCallTypes.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Kind of dynamic argument to be encoded\n * @param Literal ABI-encoded literal value provided by the resolver\n * @param Variable Reference to a previously resolved variable value\n */\nenum DynamicArgKind {\n Literal,\n Variable\n}\n\n/**\n * @dev Represents a single dynamic argument\n * @param kind Type of argument resolution strategy\n * @param data Encoded argument data, interpreted based on `kind`\n * @param isDynamic Whether the resolved argument is ABI-dynamic\n */\nstruct DynamicArg {\n DynamicArgKind kind;\n bytes data;\n bool isDynamic;\n}\n\n/**\n * @dev Represents a dynamic contract call intent\n * @param target Contract address to be called\n * @param value ETH value to be sent with the call\n * @param selector Function selector to invoke\n * @param arguments List of dynamically resolved arguments\n */\nstruct DynamicCall {\n address target;\n uint256 value;\n bytes4 selector;\n DynamicArg[] arguments;\n}\n" + }, + "project/contracts/Intents.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Enum representing the operation type.\n * - Swap: Swap tokens in the same chain.\n * - Transfer: Transfer tokens to one or more recipients.\n * - Call: Execute arbitrary contract calls.\n * - CrossChainSwap: Swap tokens between chains.\n * - DynamicCall: Execute arbitrary dynamic contract calls.\n */\nenum OpType {\n Swap,\n Transfer,\n Call,\n CrossChainSwap,\n DynamicCall\n}\n\n/**\n * @dev EIP-712 typed data struct representing a validator's approval of an intent.\n * @param intent The hash of the intent being validated.\n */\nstruct Validation {\n bytes32 intent;\n}\n\n/**\n * @dev General intent structure with different operations.\n * @param feePayer The payer of the intent.\n * @param settler The address responsible for executing the intent on-chain.\n * @param nonce A unique value used to prevent replay attacks and distinguish intents.\n * @param deadline The timestamp by which the intent must be executed.\n * @param maxFees List of max fees the feePayer is willing to pay for the intent.\n * @param triggerSig The signature of the trigger that this intent belongs to\n * @param minValidations The minimum number of validator approvals required for this intent to be considered valid.\n * @param validations The list validator signatures attesting to this intent.\n * @param operations List of operations of the intent.\n */\nstruct Intent {\n address feePayer;\n address settler;\n bytes32 nonce;\n uint256 deadline;\n MaxFee[] maxFees;\n bytes triggerSig;\n uint256 minValidations;\n bytes[] validations;\n Operation[] operations;\n}\n\n/**\n * @dev Operation structure used to abstract over different operation types.\n * @param opType The type of operation this operation represents.\n * @param user The user of the operation.\n * @param data ABI-encoded data representing a specific operation type (e.g. SwapOperation, TransferOperation, CallOperation).\n * @param events List of custom operation events to be emitted.\n */\nstruct Operation {\n uint8 opType;\n address user;\n bytes data;\n OperationEvent[] events;\n}\n\n/**\n * @dev Max fee representation\n * @param token Token used to pay for the execution fee.\n * @param amount Max amount of fee token to be paid for settling this intent.\n */\nstruct MaxFee {\n address token;\n uint256 amount;\n}\n\n/**\n * @dev Operation event representation.\n * @param topic Event topic to be emitted.\n * @param data Event data to be emitted.\n */\nstruct OperationEvent {\n bytes32 topic;\n bytes data;\n}\n\n/**\n * @dev Represents a swap operation between two chains.\n * @param sourceChain Chain ID where tokens will be sent from.\n * @param destinationChain Chain ID where tokens will be received.\n * @param tokensIn List of input tokens and amounts to swap.\n * @param tokensOut List of expected output tokens, minimum amounts, and recipients.\n */\nstruct SwapOperation {\n uint256 sourceChain;\n uint256 destinationChain;\n TokenIn[] tokensIn;\n TokenOut[] tokensOut;\n}\n\n/**\n * @dev Token in representation.\n * @param token Address of a token to be sent.\n * @param amount Amount of tokens to be sent.\n */\nstruct TokenIn {\n address token;\n uint256 amount;\n}\n\n/**\n * @dev Token out representation.\n * @param token Address of a token to be received.\n * @param minAmount Minimum amount of tokens to be received.\n * @param recipient Recipient address that will receive the token out.\n */\nstruct TokenOut {\n address token;\n uint256 minAmount;\n address recipient;\n}\n\n/**\n * @dev Represents a transfer operation containing multiple token transfers.\n * @param chainId Chain ID where the transfers should be executed.\n * @param transfers List of token transfers to be performed.\n */\nstruct TransferOperation {\n uint256 chainId;\n TransferData[] transfers;\n}\n\n/**\n * @dev Transfer data for a single token transfer.\n * @param token Address of the token to transfer.\n * @param amount Amount of the token to transfer.\n * @param recipient Recipient of the token transfer.\n */\nstruct TransferData {\n address token;\n uint256 amount;\n address recipient;\n}\n\n/**\n * @dev Represents a generic call operation consisting of one or more contract calls.\n * @param chainId Chain ID where the calls should be executed.\n * @param calls List of low-level contract calls to be executed.\n */\nstruct CallOperation {\n uint256 chainId;\n CallData[] calls;\n}\n\n/**\n * @dev Low-level call data for a target contract interaction.\n * @param target Target contract address.\n * @param data Calldata to be sent to the target.\n * @param value ETH value to send along with the call.\n */\nstruct CallData {\n address target;\n bytes data;\n uint256 value;\n}\n\n/**\n * @dev Represents a generic dynamic call operation consisting of one or more dynamic contract calls.\n * @param chainId Chain ID where the calls should be executed.\n * @param calls List of ABI-encoded low-level dynamic contract calls to be executed.\n */\nstruct DynamicCallOperation {\n uint256 chainId;\n bytes[] calls;\n}\n\n/**\n * @dev Generic proposal structure representing a solver’s response to an intent.\n * @param deadline Timestamp until when the proposal is valid.\n * @param datas List of ABI-encoded proposal-specific data (e.g. SwapProposal).\n * @param fees List of fee amounts the solver requires for execution.\n */\nstruct Proposal {\n uint256 deadline;\n bytes[] datas;\n uint256[] fees;\n}\n\n/**\n * @dev Swap proposal representation for a swap operation.\n * @param executor Address of the executor contract that should be called during operation execution.\n * @param data Arbitrary data used to call the executor contract.\n * @param amountsOut List of amounts of tokens out proposed by the solver.\n */\nstruct SwapProposal {\n address executor;\n bytes data;\n uint256[] amountsOut;\n}\n\nlibrary IntentsHelpers {\n bytes32 internal constant INTENT_TYPE_HASH =\n keccak256(\n 'Intent(address feePayer,address settler,bytes32 nonce,uint256 deadline,MaxFee[] maxFees,bytes triggerSig,uint256 minValidations,Operation[] operations)MaxFee(address token,uint256 amount)Operation(uint8 opType,address user,bytes data,OperationEvent[] events)OperationEvent(bytes32 topic,bytes data)'\n );\n\n bytes32 internal constant PROPOSAL_TYPE_HASH =\n keccak256('Proposal(bytes32 intent,address solver,uint256 deadline,bytes[] datas,uint256[] fees)');\n\n bytes32 internal constant VALIDATION_TYPE_HASH = keccak256('Validation(bytes32 intent)');\n\n bytes32 internal constant MAX_FEE_TYPE_HASH = keccak256('MaxFee(address token,uint256 amount)');\n\n bytes32 internal constant OPERATION_TYPE_HASH =\n keccak256('Operation(uint8 opType,address user,bytes data,OperationEvent[] events)');\n\n bytes32 internal constant OPERATION_EVENT_TYPE_HASH = keccak256('OperationEvent(bytes32 topic,bytes data)');\n\n function hash(Intent memory intent) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n INTENT_TYPE_HASH,\n intent.feePayer,\n intent.settler,\n intent.nonce,\n intent.deadline,\n hash(intent.maxFees),\n intent.triggerSig,\n intent.minValidations,\n hash(intent.operations)\n )\n );\n }\n\n function hash(Proposal memory proposal, Intent memory intent, address solver) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n PROPOSAL_TYPE_HASH,\n hash(intent),\n solver,\n proposal.deadline,\n hash(proposal.datas),\n hash(proposal.fees)\n )\n );\n }\n\n function hash(MaxFee[] memory fees) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](fees.length);\n for (uint256 i = 0; i < fees.length; i++) {\n hashes[i] = keccak256(abi.encode(MAX_FEE_TYPE_HASH, fees[i].token, fees[i].amount));\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Operation[] memory operations) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](operations.length);\n for (uint256 i = 0; i < operations.length; i++) hashes[i] = hash(operations[i]);\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Operation memory operation) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n OPERATION_TYPE_HASH,\n operation.opType,\n operation.user,\n keccak256(operation.data),\n hash(operation.events)\n )\n );\n }\n\n function hash(OperationEvent[] memory events) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](events.length);\n for (uint256 i = 0; i < events.length; i++) {\n hashes[i] = keccak256(abi.encode(OPERATION_EVENT_TYPE_HASH, events[i].topic, keccak256(events[i].data)));\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(uint256[] memory fees) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(fees));\n }\n\n function hash(bytes[] memory datas) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](datas.length);\n for (uint256 i = 0; i < datas.length; i++) {\n hashes[i] = keccak256(datas[i]);\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Validation memory validation) internal pure returns (bytes32) {\n return keccak256(abi.encode(VALIDATION_TYPE_HASH, validation.intent));\n }\n}\n" + }, + "project/contracts/interfaces/IController.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @title Controller interface\n */\ninterface IController {\n /**\n * @dev The input arrays are not of equal length\n */\n error ControllerInputInvalidLength();\n\n /**\n * @dev Emitted every time a solver permission is set\n */\n event SolverAllowedSet(address indexed solver, bool allowed);\n\n /**\n * @dev Emitted every time an executor permission is set\n */\n event ExecutorAllowedSet(address indexed executor, bool allowed);\n\n /**\n * @dev Emitted every time a proposal signer permission is set\n */\n event ProposalSignerAllowedSet(address indexed proposalSigner, bool allowed);\n\n /**\n * @dev Emitted every time a validator permission is set\n */\n event ValidatorAllowedSet(address indexed validator, bool allowed);\n\n /**\n * @dev Emitted when the minimum validations changes\n */\n event MinValidationSet(uint8 indexed newMinValidation);\n\n /**\n * @dev Tells whether a solver is allowed\n * @param solver Address of the solver being queried\n */\n function isSolverAllowed(address solver) external view returns (bool);\n\n /**\n * @dev Tells whether an executor is allowed\n * @param executor Address of the executor being queried\n */\n function isExecutorAllowed(address executor) external view returns (bool);\n\n /**\n * @dev Tells whether a proposal signer is allowed\n * @param signer Address of the proposal signer being queried\n */\n function isProposalSignerAllowed(address signer) external view returns (bool);\n\n /**\n * @dev Tells whether a validator is allowed\n * @param validator Address of the validator being queried\n */\n function isValidatorAllowed(address validator) external view returns (bool);\n\n /**\n * @dev Tells the minimum number of validations allowed\n */\n function minValidations() external view returns (uint8);\n\n /**\n * @dev Sets permissions for multiple solvers\n * @param solvers List of solver addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedSolvers(address[] memory solvers, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple executors\n * @param executors List of executor addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedExecutors(address[] memory executors, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple proposal signers\n * @param signers List of proposal signer addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedProposalSigners(address[] memory signers, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple validators\n * @param validators List of validator addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedValidators(address[] memory validators, bool[] memory alloweds) external;\n\n /**\n * @dev Sets the minimum number of validations allowed\n * @param newMinValidations minimum number of validations allowed\n */\n function setMinValidations(uint8 newMinValidations) external;\n}\n" + }, + "project/contracts/interfaces/ICreateX.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity ^0.8.4;\n\n/**\n * @title CreateX Factory Interface Definition\n * @author pcaversaccio (https://web.archive.org/web/20230921103111/https://pcaversaccio.com/)\n * @custom:coauthor Matt Solomon (https://web.archive.org/web/20230921103335/https://mattsolomon.dev/)\n */\ninterface ICreateX {\n event ContractCreation(address indexed newContract);\n\n function deployCreate3(bytes32 salt, bytes memory initCode) external payable returns (address newContract);\n}\n" + }, + "project/contracts/interfaces/IDynamicCallEncoder.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../dynamic-calls/DynamicCallTypes.sol';\n\ninterface IDynamicCallEncoder {\n /**\n * @dev The argument is not word-aligned\n */\n error DynamicCallEncoderBadLength();\n\n /**\n * @dev The dynamic value resolves to empty data\n */\n error DynamicCallEncoderEmptyDynamic();\n\n /**\n * @dev The variable reference is not exactly one word\n */\n error DynamicCallEncoderVariableRefBadLength();\n\n /**\n * @dev The variable index is outside the variables array\n */\n error DynamicCallEncoderVariableOutOfBounds();\n\n /**\n * @dev The declared variables length exceeds the variables array length\n */\n error DynamicCallEncoderVariablesLengthOutOfBounds();\n\n /**\n * @dev The argument kind is not valid\n */\n error DynamicCallEncoderInvalidArgKind();\n\n /**\n * @dev Encodes a dynamic call into calldata.\n * @param dynamicCall Dynamic call specification.\n * @param variables List of resolved variable values.\n * @param variablesLength Number of resolved variables.\n */\n function encode(DynamicCall memory dynamicCall, bytes[][] memory variables, uint256 variablesLength)\n external\n pure\n returns (bytes memory);\n}\n" + }, + "project/contracts/interfaces/IExecutor.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\n\n/**\n * @title Executor interface\n */\ninterface IExecutor {\n /**\n * @dev Executes an operation proposal\n * @param operation Operation to be executed\n * @param operationHash unique hash of the operation\n * @param proposalData data of the proposal to be executed to fulfill the operation\n */\n function execute(Operation memory operation, bytes32 operationHash, bytes memory proposalData) external;\n}\n" + }, + "project/contracts/interfaces/IOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\nimport '../safeguards/Safeguards.sol';\n\n/**\n * @title OperationsValidator\n * @dev Performs operations validations based on safeguards\n */\ninterface IOperationsValidator {\n /**\n * @dev Validates an operation for a safeguard\n * @param operation Operation to be validated\n * @param config Safeguard config to validate the operation with\n */\n function validate(Operation memory operation, bytes memory config) external pure;\n}\n" + }, + "project/contracts/interfaces/IPaymentsReceiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @title PaymentsReceiver interface\n */\ninterface IPaymentsReceiver {\n /**\n * @dev The token address is zero\n */\n error PaymentsReceiverTokenZero();\n\n /**\n * @dev The recipient address is zero\n */\n error PaymentsReceiverRecipientZero();\n\n /**\n * @dev The amount is zero\n */\n error PaymentsReceiverAmountZero();\n\n /**\n * @dev The user address is zero\n */\n error PaymentsReceiverUserZero();\n\n /**\n * @dev The input arrays are not of equal length\n */\n error PaymentsReceiverInputInvalidLength();\n\n /**\n * @dev The token is not allowed\n */\n error PaymentsReceiverTokenNotAllowed(address token);\n\n /**\n * @dev Emitted every time a deposit is made\n */\n event Deposited(\n address indexed token,\n address indexed depositor,\n address indexed user,\n uint256 amount,\n uint8 decimals\n );\n\n /**\n * @dev Emitted every time a withdrawal is made\n */\n event Withdrawn(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time a token permission is set\n */\n event TokenAllowedSet(address indexed token, bool allowed);\n\n /**\n * @dev Tells whether a token is allowed\n * @param token Address of the token being queried\n */\n function isTokenAllowed(address token) external view returns (bool);\n\n /**\n * @dev Sets permissions for multiple tokens\n * @param tokens List of token addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedTokens(address[] memory tokens, bool[] memory alloweds) external;\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param amount Amount to deposit\n */\n function deposit(address token, uint256 amount) external;\n\n /**\n * @dev Deposits ERC20 tokens on behalf of a user\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function depositOnBehalf(address token, address user, uint256 amount) external;\n\n /**\n * @dev Withdraws ERC20 tokens to a recipient\n * @param token Address of the token to withdraw\n * @param recipient Address of the recipient\n * @param amount Amount to withdraw\n */\n function withdraw(address token, address recipient, uint256 amount) external;\n}\n" + }, + "project/contracts/interfaces/ISafe.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nenum SafeOperation {\n Call,\n DelegateCall\n}\n\ninterface ISafe {\n function getThreshold() external view returns (uint256);\n\n function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, SafeOperation operation)\n external\n returns (bool success, bytes memory returnData);\n}\n" + }, + "project/contracts/interfaces/ISettler.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\nimport '../safeguards/Safeguards.sol';\n\n/**\n * @title Settler interface\n */\ninterface ISettler {\n /**\n * @dev The requested operation type is unknown\n */\n error SettlerUnknownOperationType(uint8 opType);\n\n /**\n * @dev The simulation has been successful\n */\n error SettlerSimulationSuccess(uint256 gasUsed);\n\n /**\n * @dev The solver is not allowed\n */\n error SettlerSolverNotAllowed(address solver);\n\n /**\n * @dev The executor is not allowed\n */\n error SettlerExecutorNotAllowed(address executor);\n\n /**\n * @dev The proposal signer is not allowed\n */\n error SettlerProposalSignerNotAllowed(address signer);\n\n /**\n * @dev The validator is not allowed\n */\n error SettlerValidatorNotAllowed(address validator);\n\n /**\n * @dev The validator is duplicated\n */\n error SettlerValidatorDuplicatedOrUnsorted(address previous, address current);\n\n /**\n * @dev The settler is not the current contract\n */\n error SettlerInvalidSettler(address settler);\n\n /**\n * @dev The nonce is zero\n */\n error SettlerNonceZero();\n\n /**\n * @dev The intent has already been executed\n */\n error SettlerIntentAlreadyExecuted(bytes32 hash);\n\n /**\n * @dev The intent deadline is in the past\n */\n error SettlerIntentPastDeadline(uint256 deadline, uint256 timestamp);\n\n /**\n * @dev The current chain is not valid\n */\n error SettlerInvalidChain(uint256 chainId);\n\n /**\n * @dev The recipient is the settler contract\n */\n error SettlerInvalidRecipient(address to);\n\n /**\n * @dev The user is not a smart account\n */\n error SettlerUserNotSmartAccount(address user);\n\n /**\n * @dev The amount out is lower than the proposed amount\n */\n error SettlerAmountOutLtProposed(uint256 index, uint256 amountOut, uint256 proposed);\n\n /**\n * @dev The proposed amount is lower than the minimum amount\n */\n error SettlerProposedAmountLtMinAmount(uint256 index, uint256 proposed, uint256 minAmount);\n\n /**\n * @dev The proposed amounts array and the tokens out array are not of equal length\n */\n error SettlerInvalidProposedAmounts();\n\n /**\n * @dev The balance after the proposal execution is lower than the balance before\n */\n error SettlerPostBalanceOutLtPre(uint256 index, uint256 post, uint256 pre);\n\n /**\n * @dev The solver fees length does not match the requested by the user\n */\n error SettlerSolverFeeInvalidLength();\n\n /**\n * @dev The intent operations array is empty\n */\n error SettlerIntentOperationsEmpty();\n\n /**\n * @dev The proposal datas length does not match the intent operations length\n */\n error SettlerProposalDataInvalidLength();\n\n /**\n * @dev The solver fee is too high\n */\n error SettlerSolverFeeTooHigh(uint256 fee, uint256 max);\n\n /**\n * @dev The intent validations are not enough\n */\n error SettlerIntentValidationsNotEnough(uint256 min, uint256 current);\n\n /**\n * @dev The proposal deadline is in the past\n */\n error SettlerProposalPastDeadline(uint256 deadline, uint256 timestamp);\n\n /**\n * @dev The proposal data is not empty\n */\n error SettlerProposalDataNotEmpty();\n\n /**\n * @dev The rescue funds recipient is zero\n */\n error SettlerRescueFundsRecipientZero();\n\n /**\n * @dev The list of safeguards exceed the maximum allowed\n */\n error SettlerTooManySafeguards(uint256 lengthRequested);\n\n /**\n * @dev The chains of a swap operation do not match the swap type (single or cross chain)\n */\n error SettlerOperationChainsMismatch();\n\n /**\n * @dev A CrossChainSwap operation must be the only operation in the intent\n */\n error SettlerCrossChainSwapMustBeOnlyOperation();\n\n /**\n * @dev The new smart accounts handler is zero\n */\n error SmartAccountsHandlerZero();\n\n /**\n * @dev The new dynamic call encoder is zero\n */\n error SettlerDynamicCallEncoderZero();\n\n /**\n * @dev Custom events emitted for each operation\n */\n event OperationExecuted(\n address indexed user,\n bytes32 indexed topic,\n uint8 indexed opType,\n Operation operation,\n Proposal proposal,\n bytes32 intentHash,\n uint256 index,\n bytes output,\n bytes data\n );\n\n /**\n * @dev Emitted every time an intent is fulfilled\n */\n event ProposalExecuted(bytes32 indexed proposal);\n\n /**\n * @dev Emitted every time tokens are withdrawn from the contract balance\n */\n event FundsRescued(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time the smart accounts handler is set\n */\n event SmartAccountsHandlerSet(address indexed smartAccountsHandler);\n\n /**\n * @dev Emitted every time the operations validator is set\n */\n event OperationsValidatorSet(address indexed operationsValidator);\n\n /**\n * @dev Emitted every time the dynamic call encoder is set\n */\n event DynamicCallEncoderSet(address indexed dynamicCallEncoder);\n\n /**\n * @dev Emitted every time a safeguard is set\n */\n event SafeguardSet(address indexed user);\n\n /**\n * @dev Tells the reference to the Mimic controller\n */\n function controller() external view returns (address);\n\n /**\n * @dev Tells the reference to the smart accounts handler\n */\n function smartAccountsHandler() external view returns (address);\n\n /**\n * @dev Tells the reference to the operations validator\n */\n function operationsValidator() external view returns (address);\n\n /**\n * @dev Tells the reference to the dynamic call encoder\n */\n function dynamicCallEncoder() external view returns (address);\n\n /**\n * @dev Tells the block at which an intent was executed. Returns 0 if unexecuted.\n * @param hash Hash of the intent being queried\n */\n function getIntentBlock(bytes32 hash) external view returns (uint256);\n\n /**\n * @dev Tells the safeguard set for a user\n * @param user Address of the user being queried\n */\n function getUserSafeguard(address user) external view returns (bytes memory);\n\n /**\n * @dev Tells the hash of an intent\n * @param intent Intent to get the hash of\n */\n function getIntentHash(Intent memory intent) external pure returns (bytes32);\n\n /**\n * @dev Tells the hash of a proposal\n * @param proposal Proposal to be hashed\n * @param intent Intent being fulfilled by the requested proposal\n * @param solver Address of the solver that made the proposal\n */\n function getProposalHash(Proposal memory proposal, Intent memory intent, address solver)\n external\n pure\n returns (bytes32);\n\n /**\n * @dev Withdraws ERC20 or native tokens from the contract\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function rescueFunds(address token, address recipient, uint256 amount) external;\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function setSmartAccountsHandler(address newSmartAccountsHandler) external;\n\n /**\n * @dev Sets a new operations validator address\n * @param newOperationsValidator New operations validator to be set\n */\n function setOperationsValidator(address newOperationsValidator) external;\n\n /**\n * @dev Sets a new dynamic call encoder address\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function setDynamicCallEncoder(address newDynamicCallEncoder) external;\n\n /**\n * @dev Sets a safeguard for a user\n * @param safeguard Safeguard to be set\n */\n function setSafeguard(bytes memory safeguard) external;\n\n /**\n * @dev Executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function execute(Intent memory intent, Proposal memory proposal, bytes memory signature) external;\n\n /**\n * @dev Simulates an execution. It will always revert. Successful executions are returned as\n * `SettlerSimulationSuccess` errors. Any other error should be treated as failure.\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function simulate(Intent memory intent, Proposal memory proposal, bytes memory signature) external;\n}\n" + }, + "project/contracts/interfaces/ISmartAccount.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/introspection/IERC165.sol';\n\n/**\n * @title SmartAccount interface\n */\ninterface ISmartAccount is IERC165 {\n /**\n * @dev Emitted every time tokens are transferred\n */\n event Transferred(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time `call` is called\n */\n event Called(address indexed target, bytes data, uint256 value, bytes result);\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the owner or the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) external;\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the owner or the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n */\n function call(address target, bytes memory data, uint256 value) external returns (bytes memory result);\n}\n" + }, + "project/contracts/interfaces/ISmartAccountContract.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/interfaces/IERC1271.sol';\n\nimport './ISmartAccount.sol';\n\n/**\n * @title SmartAccountContract interface\n */\ninterface ISmartAccountContract is ISmartAccount, IERC1271 {\n // solhint-disable-previous-line no-empty-blocks\n}\n" + }, + "project/contracts/interfaces/ISmartAccountsHandler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\ninterface ISmartAccountsHandler {\n /**\n * @dev The smart account given is not supported\n */\n error SmartAccountsHandlerUnsupportedAccount(address account);\n\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address account) external view returns (bool);\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address account, address token, address to, uint256 amount) external;\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address account, address target, bytes memory data, uint256 value) external returns (bytes memory);\n}\n" + }, + "project/contracts/payments/PaymentsReceiver.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\n\nimport '../interfaces/IPaymentsReceiver.sol';\n\n/**\n * @title PaymentsReceiver\n * @dev Receives ERC20 deposits and lets the owner withdraw them\n */\ncontract PaymentsReceiver is IPaymentsReceiver, Ownable {\n using SafeERC20 for IERC20;\n\n // List of allowed tokens\n mapping (address => bool) public override isTokenAllowed;\n\n /**\n * @dev Creates a new PaymentsReceiver contract\n * @param owner Address that will own the contract\n * @param tokens List of allowed tokens\n */\n constructor(address owner, address[] memory tokens) Ownable(owner) {\n for (uint256 i = 0; i < tokens.length; i++) _setAllowedToken(tokens[i], true);\n }\n\n /**\n * @dev Sets permissions for multiple tokens\n * @param tokens List of token addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedTokens(address[] memory tokens, bool[] memory alloweds) external override onlyOwner {\n if (tokens.length != alloweds.length) revert PaymentsReceiverInputInvalidLength();\n for (uint256 i = 0; i < tokens.length; i++) _setAllowedToken(tokens[i], alloweds[i]);\n }\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param amount Amount to deposit\n */\n function deposit(address token, uint256 amount) external override {\n _deposit(token, _msgSender(), amount);\n }\n\n /**\n * @dev Deposits ERC20 tokens on behalf of a user\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function depositOnBehalf(address token, address user, uint256 amount) external override {\n if (user == address(0)) revert PaymentsReceiverUserZero();\n _deposit(token, user, amount);\n }\n\n /**\n * @dev Withdraws ERC20 tokens to a recipient\n * @param token Address of the token to withdraw\n * @param recipient Address of the recipient\n * @param amount Amount to withdraw\n */\n function withdraw(address token, address recipient, uint256 amount) external override onlyOwner {\n if (token == address(0)) revert PaymentsReceiverTokenZero();\n if (recipient == address(0)) revert PaymentsReceiverRecipientZero();\n if (amount == 0) revert PaymentsReceiverAmountZero();\n\n IERC20(token).safeTransfer(recipient, amount);\n\n emit Withdrawn(token, recipient, amount);\n }\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function _deposit(address token, address user, uint256 amount) internal {\n if (token == address(0)) revert PaymentsReceiverTokenZero();\n if (amount == 0) revert PaymentsReceiverAmountZero();\n if (!isTokenAllowed[token]) revert PaymentsReceiverTokenNotAllowed(token);\n\n address depositor = _msgSender();\n IERC20(token).safeTransferFrom(depositor, address(this), amount);\n\n uint8 decimals = IERC20Metadata(token).decimals();\n emit Deposited(token, depositor, user, amount, decimals);\n }\n\n /**\n * @dev Sets a token permission\n */\n function _setAllowedToken(address token, bool allowed) internal {\n isTokenAllowed[token] = allowed;\n emit TokenAllowedSet(token, allowed);\n }\n}\n" + }, + "project/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol';\n\ncontract Proxy is TransparentUpgradeableProxy {\n constructor(address implementation, address initialOwner, bytes memory data)\n TransparentUpgradeableProxy(implementation, initialOwner, data)\n {}\n}\n" + }, + "project/contracts/safeguards/BaseOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @title BaseOperationsValidator\n */\ncontract BaseOperationsValidator {\n /**\n * @dev No operations allowed\n */\n error OperationsValidatorNoneAllowed();\n\n /**\n * @dev Operation type unknown\n */\n error OperationsValidatorUnknownOperationType(uint8 opType);\n\n /**\n * @dev Invalid safeguard mode\n */\n error OperationsValidatorInvalidSafeguardMode(uint8 mode);\n\n /**\n * @dev Tells whether a chain is allowed\n */\n function _isChainAllowed(uint256 chainId, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, uint256[] memory values) = abi.decode(config, (bool, uint256[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (chainId == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (chainId == values[i]) return true;\n }\n return false;\n }\n }\n\n /**\n * @dev Tells whether an account is allowed\n */\n function _isAccountAllowed(address account, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, address[] memory values) = abi.decode(config, (bool, address[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (account == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (account == values[i]) return true;\n }\n return false;\n }\n }\n\n /**\n * @dev Tells whether a selector is allowed\n */\n function _isSelectorAllowed(bytes4 selector, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, bytes4[] memory values) = abi.decode(config, (bool, bytes4[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (selector == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (selector == values[i]) return true;\n }\n return false;\n }\n }\n}\n" + }, + "project/contracts/safeguards/CallOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './Safeguards.sol';\nimport './BaseOperationsValidator.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Call safeguard modes to validate call operations\n * @param None To ensure no calls are allowed\n * @param Chain To validate that the chain where calls execute is allowed\n * @param Target To validate that the call targets (contract addresses) are allowed\n * @param Selector To validate that the function selectors being called are allowed\n */\nenum CallSafeguardMode {\n None,\n Chain,\n Target,\n Selector\n}\n\n/**\n * @title CallOperationsValidator\n * @dev Performs call operations validations based on safeguards\n */\ncontract CallOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a call operation is valid for a safeguard\n * @param operation Call operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isCallOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n CallOperation memory callOperation = abi.decode(operation.data, (CallOperation));\n if (safeguard.mode == uint8(CallSafeguardMode.Chain))\n return _isChainAllowed(callOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Target))\n return _areCallTargetsValid(callOperation.calls, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Selector))\n return _areCallSelectorsValid(callOperation.calls, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the call targets are allowed\n */\n function _areCallTargetsValid(CallData[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n if (!_isAccountAllowed(calls[i].target, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the call selectors are allowed\n */\n function _areCallSelectorsValid(CallData[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n if (!_isSelectorAllowed(bytes4(calls[i].data), config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/DynamicCallOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './CallOperationsValidator.sol';\nimport './Safeguards.sol';\nimport './BaseOperationsValidator.sol';\nimport '../Intents.sol';\nimport '../dynamic-calls/DynamicCallTypes.sol';\n\n/**\n * @title DynamicCallOperationsValidator\n * @dev Performs dynamic call operations validations based on call safeguards\n */\ncontract DynamicCallOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a dynamic call operation is valid for a safeguard\n * @param operation Dynamic call operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isDynamicCallOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n DynamicCallOperation memory dynamicCallOperation = abi.decode(operation.data, (DynamicCallOperation));\n if (safeguard.mode == uint8(CallSafeguardMode.Chain))\n return _isChainAllowed(dynamicCallOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Target))\n return _areDynamicCallTargetsValid(dynamicCallOperation.calls, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Selector))\n return _areDynamicCallSelectorsValid(dynamicCallOperation.calls, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the dynamic call targets are allowed\n */\n function _areDynamicCallTargetsValid(bytes[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n DynamicCall memory call = abi.decode(calls[i], (DynamicCall));\n if (!_isAccountAllowed(call.target, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the dynamic call selectors are allowed\n */\n function _areDynamicCallSelectorsValid(bytes[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n DynamicCall memory call = abi.decode(calls[i], (DynamicCall));\n if (!_isSelectorAllowed(call.selector, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/OperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './CallOperationsValidator.sol';\nimport './DynamicCallOperationsValidator.sol';\nimport './TransferOperationsValidator.sol';\nimport './Safeguards.sol';\nimport './SwapOperationsValidator.sol';\nimport '../Intents.sol';\nimport '../interfaces/IOperationsValidator.sol';\n\n/**\n * @title OperationsValidator\n * @dev Performs operations validations based on safeguards\n */\ncontract OperationsValidator is\n IOperationsValidator,\n SwapOperationsValidator,\n TransferOperationsValidator,\n CallOperationsValidator,\n DynamicCallOperationsValidator\n{\n /**\n * @dev Safeguard validation failed\n */\n error OperationsValidatorSafeguardFailed();\n\n /**\n * @dev Invalid safeguard config mode\n */\n error OperationsValidatorInvalidSafeguardConfigMode(uint8 mode);\n\n /**\n * @dev Invalid safeguard group logic mode\n */\n error OperationsValidatorInvalidSafeguardGroupLogicMode(uint8 mode);\n\n /**\n * @dev Tells whether an operation is valid for a safeguard\n * @param operation Operation to be validated\n * @param config Safeguard config to validate the operation with\n */\n function validate(Operation memory operation, bytes memory config) external pure override {\n (uint8 mode, bytes memory safeguard) = abi.decode(config, (uint8, bytes));\n if (mode == uint8(SafeguardConfigMode.List)) _validate(operation, abi.decode(safeguard, (Safeguard[])));\n else if (mode == uint8(SafeguardConfigMode.Tree)) _validate(operation, _decodeSafeguardTree(safeguard));\n else revert OperationsValidatorInvalidSafeguardConfigMode(mode);\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguards list\n * @param operation Operation to be validated\n * @param safeguards Safeguard list to validate the operation with\n */\n function _validate(Operation memory operation, Safeguard[] memory safeguards) internal pure {\n if (safeguards.length == 0) revert OperationsValidatorSafeguardFailed();\n for (uint256 i = 0; i < safeguards.length; i++) {\n if (!_isSafeguardValid(operation, safeguards[i])) revert OperationsValidatorSafeguardFailed();\n }\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard tree\n * @param operation Operation to be validated\n * @param tree Safeguard tree to validate the operation with\n */\n function _validate(Operation memory operation, SafeguardTree memory tree) internal pure {\n if (tree.nodes.length == 0) revert OperationsValidatorSafeguardFailed();\n if (!_isSafeguardGroupValid(operation, tree, 0)) revert OperationsValidatorSafeguardFailed();\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard tree at a certain level\n * @param operation Operation to be validated\n * @param tree Safeguard tree to validate the operation with\n * @param index Index of the group node to evaluate\n */\n function _isSafeguardGroupValid(Operation memory operation, SafeguardTree memory tree, uint16 index)\n internal\n pure\n returns (bool)\n {\n SafeguardGroup memory group = tree.nodes[index];\n\n if (group.logic == uint8(SafeguardGroupLogic.NOT)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i])) return false;\n }\n return true;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.AND)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (!_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (!_isSafeguardGroupValid(operation, tree, group.children[i])) return false;\n }\n return true;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.OR)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return true;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i])) return true;\n }\n return false;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.XOR)) {\n uint256 hits = 0;\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]]))\n if (++hits > 1) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i]))\n if (++hits > 1) return false;\n }\n return hits == 1;\n }\n\n revert OperationsValidatorInvalidSafeguardGroupLogicMode(group.logic);\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard\n * @param operation Operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isSafeguardValid(Operation memory operation, Safeguard memory safeguard) internal pure returns (bool) {\n if (safeguard.mode == uint8(0)) revert OperationsValidatorNoneAllowed();\n if (operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap)) {\n return _isSwapOperationValid(operation, safeguard);\n }\n if (operation.opType == uint8(OpType.Transfer)) return _isTransferOperationValid(operation, safeguard);\n if (operation.opType == uint8(OpType.Call)) return _isCallOperationValid(operation, safeguard);\n if (operation.opType == uint8(OpType.DynamicCall)) return _isDynamicCallOperationValid(operation, safeguard);\n revert OperationsValidatorUnknownOperationType(uint8(operation.opType));\n }\n\n /**\n * @dev Safely decodes a safeguard tree avoiding compiler issues with dynamic arrays\n * @param data Safeguard tree data to be decoded\n */\n function _decodeSafeguardTree(bytes memory data) private pure returns (SafeguardTree memory) {\n (SafeguardGroup[] memory nodes, Safeguard[] memory leaves) = abi.decode(data, (SafeguardGroup[], Safeguard[]));\n return SafeguardTree(nodes, leaves);\n }\n}\n" + }, + "project/contracts/safeguards/Safeguards.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Safeguard config modes\n * - List: Safeguard lists\n * - Tree: Safeguard groups\n */\nenum SafeguardConfigMode {\n List,\n Tree\n}\n\n/**\n * @dev Logical operators for safeguard groups\n * - AND: every child must pass\n * - OR: at least one child must pass\n * - XOR: exactly one child must pass\n * - NOT: every child must fail\n */\nenum SafeguardGroupLogic {\n AND,\n OR,\n XOR,\n NOT\n}\n\n/**\n * @dev Flat node in the safeguard tree\n * @param logic Group operator (AND/OR/XOR/NOT)\n * @param leaves Indices into `SafeguardTree.leaves`\n * @param children Indices into `SafeguardTree.nodes`\n */\nstruct SafeguardGroup {\n uint8 logic;\n uint16[] leaves;\n uint16[] children;\n}\n\n/**\n * @dev Safeguard tree representation\n * @param nodes List of all the nodes in the tree\n * @param leaves List of all the leaves in the tree\n */\nstruct SafeguardTree {\n SafeguardGroup[] nodes;\n Safeguard[] leaves;\n}\n\n/**\n * @dev Safeguard representation\n * @param mode Safeguard mode\n * @param config Safeguard configuration settings or parameters\n */\nstruct Safeguard {\n uint8 mode;\n bytes config;\n}\n" + }, + "project/contracts/safeguards/SwapOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './BaseOperationsValidator.sol';\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Swap safeguard modes to validate swap operations\n * @param None To ensure no swaps are allowed\n * @param SourceChain To validate that the source chain is allowed\n * @param DestinationChain To validate that the destination chain is allowed\n * @param TokenIn To validate that the tokens to be sent are allowed\n * @param TokenOut To validate that the tokens to be received are allowed\n * @param Recipient To validate that the recipients that will receive the tokens are allowed\n */\nenum SwapSafeguardMode {\n None,\n SourceChain,\n DestinationChain,\n TokenIn,\n TokenOut,\n Recipient\n}\n\n/**\n * @title SwapOperationsValidator\n * @dev Performs swap operations validations based on safeguards\n */\ncontract SwapOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a swap operation is valid for a safeguard\n * @param operation Swap operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isSwapOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n SwapOperation memory swapOperation = abi.decode(operation.data, (SwapOperation));\n if (safeguard.mode == uint8(SwapSafeguardMode.SourceChain))\n return _isChainAllowed(swapOperation.sourceChain, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.DestinationChain))\n return _isChainAllowed(swapOperation.destinationChain, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.TokenIn))\n return _areSwapTokensInValid(swapOperation.tokensIn, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.TokenOut))\n return _areSwapTokensOutValid(swapOperation.tokensOut, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.Recipient))\n return _areSwapRecipientsValid(swapOperation.tokensOut, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the tokens to be sent are allowed\n */\n function _areSwapTokensInValid(TokenIn[] memory tokensIn, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensIn.length; i++) {\n if (!_isAccountAllowed(tokensIn[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the tokens to be received are allowed\n */\n function _areSwapTokensOutValid(TokenOut[] memory tokensOut, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensOut.length; i++) {\n if (!_isAccountAllowed(tokensOut[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the recipients to be received are allowed\n */\n function _areSwapRecipientsValid(TokenOut[] memory tokensOut, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensOut.length; i++) {\n if (!_isAccountAllowed(tokensOut[i].recipient, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/TransferOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './BaseOperationsValidator.sol';\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Transfer safeguard modes to validate transfer operations\n * @param None To ensure no transfers are allowed\n * @param Chain To validate that the chain where transfers execute is allowed\n * @param Token To validate that the tokens being transferred are allowed\n * @param Recipient To validate that the recipients of the transfers are allowed\n */\nenum TransferSafeguardMode {\n None,\n Chain,\n Token,\n Recipient\n}\n\n/**\n * @title TransferOperationsValidator\n * @dev Performs transfer operations validations based on safeguards\n */\ncontract TransferOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a transfer operation is valid for a safeguard\n * @param operation Transfer operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isTransferOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n TransferOperation memory transferOperation = abi.decode(operation.data, (TransferOperation));\n if (safeguard.mode == uint8(TransferSafeguardMode.Chain))\n return _isChainAllowed(transferOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(TransferSafeguardMode.Token))\n return _areTransferTokensValid(transferOperation.transfers, safeguard.config);\n if (safeguard.mode == uint8(TransferSafeguardMode.Recipient))\n return _areTransferRecipientsValid(transferOperation.transfers, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the tokens being transferred are allowed\n */\n function _areTransferTokensValid(TransferData[] memory transfers, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < transfers.length; i++) {\n if (!_isAccountAllowed(transfers[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the recipients of the transfers are allowed\n */\n function _areTransferRecipientsValid(TransferData[] memory transfers, bytes memory config)\n private\n pure\n returns (bool)\n {\n for (uint256 i = 0; i < transfers.length; i++) {\n if (!_isAccountAllowed(transfers[i].recipient, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/Settler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';\nimport '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\nimport '@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol';\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\nimport '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';\n\nimport './Intents.sol';\nimport './interfaces/IController.sol';\nimport './interfaces/IDynamicCallEncoder.sol';\nimport './interfaces/IOperationsValidator.sol';\nimport './interfaces/IExecutor.sol';\nimport './interfaces/ISettler.sol';\nimport './utils/Denominations.sol';\nimport './utils/ERC20Helpers.sol';\nimport './smart-accounts/SmartAccountsHandler.sol';\nimport './smart-accounts/SmartAccountsHandlerHelpers.sol';\n\n/**\n * @title Settler\n * @dev Contract that provides the appropriate context for solvers to execute proposals that fulfill user intents\n */\ncontract Settler is ISettler, Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, EIP712Upgradeable {\n using SafeERC20 for IERC20;\n using IntentsHelpers for Intent;\n using IntentsHelpers for Proposal;\n using IntentsHelpers for Validation;\n using SmartAccountsHandlerHelpers for address;\n\n // Mimic controller reference\n address public override controller;\n\n // Smart accounts handler reference\n address public override smartAccountsHandler;\n\n // Operations validator reference\n address public override operationsValidator;\n\n // Dynamic call encoder reference\n address public dynamicCallEncoder;\n\n // List of block numbers at which an intent was executed\n mapping (bytes32 => uint256) public override getIntentBlock;\n\n // Safeguard config per user\n mapping (address => bytes) internal _userSafeguard;\n\n /**\n * @dev Modifier to tag settler functions in order to check if the sender is an allowed solver\n */\n modifier onlySolver() {\n address sender = _msgSender();\n if (!IController(controller).isSolverAllowed(sender)) revert SettlerSolverNotAllowed(sender);\n _;\n }\n\n /**\n * @dev Disables initializers to prevent implementation contract from being initialized directly\n */\n constructor() {\n _disableInitializers();\n }\n\n /**\n * @dev Initializes a new Settler contract\n * @param _controller Address of the Settler controller\n * @param _owner Address that will own the contract\n * @param _dynamicCallEncoder Address of the dynamic call encoder\n */\n function initialize(address _controller, address _owner, address _dynamicCallEncoder) external initializer {\n __Ownable_init(_owner);\n __ReentrancyGuard_init();\n __EIP712_init('Mimic Protocol Settler', '1');\n\n controller = _controller;\n smartAccountsHandler = address(new SmartAccountsHandler());\n _setDynamicCallEncoder(_dynamicCallEncoder);\n }\n\n /**\n * @dev Tells the hash of an intent\n * @param intent Intent to get the hash of\n */\n function getIntentHash(Intent memory intent) external pure override returns (bytes32) {\n return intent.hash();\n }\n\n /**\n * @dev Tells the hash of a proposal\n * @param proposal Proposal to be hashed\n * @param intent Intent being fulfilled by the requested proposal\n * @param solver Address of the solver that made the proposal\n */\n function getProposalHash(Proposal memory proposal, Intent memory intent, address solver)\n external\n pure\n override\n returns (bytes32)\n {\n return proposal.hash(intent, solver);\n }\n\n /**\n * @dev Tells the safeguard set for a user\n * @param user Address of the user being queried\n */\n function getUserSafeguard(address user) external view override returns (bytes memory) {\n return _userSafeguard[user];\n }\n\n /**\n * @dev It allows receiving native token transfers\n * Note: This method mainly allows supporting native tokens for swaps\n */\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n /**\n * @dev Withdraws ERC20 or native tokens from the contract\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function rescueFunds(address token, address recipient, uint256 amount) external override onlyOwner nonReentrant {\n if (recipient == address(0)) revert SettlerRescueFundsRecipientZero();\n ERC20Helpers.transfer(token, recipient, amount);\n emit FundsRescued(token, recipient, amount);\n }\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function setSmartAccountsHandler(address newSmartAccountsHandler) external override onlyOwner {\n _setSmartAccountsHandler(newSmartAccountsHandler);\n }\n\n /**\n * @dev Sets a new operations validator address\n * @param newOperationsValidator New operations validator to be set\n */\n function setOperationsValidator(address newOperationsValidator) external override onlyOwner {\n _setOperationsValidator(newOperationsValidator);\n }\n\n /**\n * @dev Sets a new dynamic call encoder address\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function setDynamicCallEncoder(address newDynamicCallEncoder) external override onlyOwner {\n _setDynamicCallEncoder(newDynamicCallEncoder);\n }\n\n /**\n * @dev Sets a safeguard for a user\n * @param safeguard Safeguard to be set\n */\n function setSafeguard(bytes memory safeguard) external override {\n _setSafeguard(msg.sender, safeguard);\n }\n\n /**\n * @dev Executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function execute(Intent memory intent, Proposal memory proposal, bytes memory signature)\n external\n override\n onlySolver\n {\n _execute(intent, proposal, signature, false);\n }\n\n /**\n * @dev Simulates an execution. It will always revert. Successful executions are returned as\n * `SettlerSimulationSuccess` errors. Any other error should be treated as failure.\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function simulate(Intent memory intent, Proposal memory proposal, bytes memory signature)\n external\n override\n onlySolver\n {\n uint256 initialGas = gasleft();\n _execute(intent, proposal, signature, true);\n uint256 gasUsed = initialGas - gasleft();\n revert SettlerSimulationSuccess(gasUsed);\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n * @param simulated Whether the execution is a simulation\n */\n function _execute(Intent memory intent, Proposal memory proposal, bytes memory signature, bool simulated)\n internal\n nonReentrant\n {\n _validateIntent(intent, proposal, signature, simulated);\n getIntentBlock[intent.hash()] = block.number;\n\n bytes[][] memory outputs = new bytes[][](intent.operations.length);\n for (uint256 i = 0; i < intent.operations.length; i++) {\n outputs[i] = _executeOperation(intent, proposal, i, outputs);\n }\n\n _payFees(intent, proposal);\n emit ProposalExecuted(proposal.hash(intent, _msgSender()));\n }\n\n /**\n * @dev Executes proposal to fulfill an operation\n * @param intent Intent being fulfilled\n * @param proposal Proposal being executed\n * @param index Position where the operation and its corresponding proposal data are located\n * @param outputs List of operations outputs\n */\n function _executeOperation(Intent memory intent, Proposal memory proposal, uint256 index, bytes[][] memory outputs)\n internal\n returns (bytes[] memory)\n {\n uint8 opType = intent.operations[index].opType;\n if (opType == uint8(OpType.Swap) || opType == uint8(OpType.CrossChainSwap)) {\n return _executeSwap(intent, proposal, index);\n }\n if (opType == uint8(OpType.Transfer)) return _executeTransfer(intent, proposal, index);\n if (opType == uint8(OpType.Call)) return _executeCall(intent, proposal, index);\n if (opType == uint8(OpType.DynamicCall)) return _executeDynamicCall(intent, proposal, index, outputs);\n revert SettlerUnknownOperationType(opType);\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a swap operation\n * @param intent Intent that contains swap operation to be fulfilled\n * @param proposal Proposal with swap data to be executed\n * @param index Position where the swap proposal data and operation are located\n */\n function _executeSwap(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n SwapOperation memory swapOperation = abi.decode(operation.data, (SwapOperation));\n SwapProposal memory swapProposal = abi.decode(proposal.datas[index], (SwapProposal));\n if (operation.opType == uint8(OpType.CrossChainSwap)) {\n if (intent.operations.length > 1) revert SettlerCrossChainSwapMustBeOnlyOperation();\n _validateCrossChainSwapOperation(swapOperation, swapProposal);\n } else _validateSingleChainSwapOperation(swapOperation, swapProposal);\n\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(operation.user);\n if (swapOperation.sourceChain == block.chainid) {\n for (uint256 i = 0; i < swapOperation.tokensIn.length; i++) {\n TokenIn memory tokenIn = swapOperation.tokensIn[i];\n _transferFrom(tokenIn.token, operation.user, swapProposal.executor, tokenIn.amount, isSmartAccount);\n }\n }\n\n uint256[] memory preBalancesOut = _getTokensOutBalance(swapOperation);\n // Using the intent hash as the unique operation hash because cross-chain swap has only one operation per intent and the single swap executor does not use it\n bytes32 operationHash = intent.hash();\n IExecutor(swapProposal.executor).execute(operation, operationHash, proposal.datas[index]);\n\n outputs = new bytes[](swapOperation.tokensOut.length);\n if (swapOperation.destinationChain == block.chainid) {\n uint256[] memory amounts = new uint256[](swapOperation.tokensOut.length);\n for (uint256 i = 0; i < swapOperation.tokensOut.length; i++) {\n TokenOut memory tokenOut = swapOperation.tokensOut[i];\n uint256 postBalanceOut = ERC20Helpers.balanceOf(tokenOut.token, address(this));\n uint256 preBalanceOut = preBalancesOut[i];\n if (postBalanceOut < preBalanceOut) revert SettlerPostBalanceOutLtPre(i, postBalanceOut, preBalanceOut);\n\n amounts[i] = postBalanceOut - preBalanceOut;\n uint256 proposedAmount = swapProposal.amountsOut[i];\n if (amounts[i] < proposedAmount) revert SettlerAmountOutLtProposed(i, amounts[i], proposedAmount);\n\n ERC20Helpers.transfer(tokenOut.token, tokenOut.recipient, amounts[i]);\n outputs[i] = abi.encode(amounts[i]);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(amounts));\n }\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a transfer operation\n * @param intent Intent that contains transfer operation to be fulfilled\n * @param proposal Transfer proposal to be executed\n * @param index Position where the transfer proposal data and operation are located\n */\n function _executeTransfer(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n TransferOperation memory transferOperation = abi.decode(operation.data, (TransferOperation));\n _validateTransferOperation(transferOperation, proposal.datas[index]);\n\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(operation.user);\n for (uint256 i = 0; i < transferOperation.transfers.length; i++) {\n TransferData memory transfer = transferOperation.transfers[i];\n _transferFrom(transfer.token, operation.user, transfer.recipient, transfer.amount, isSmartAccount);\n }\n\n outputs = new bytes[](0);\n _emitOperationEvents(operation, proposal, intent.hash(), index, new bytes(0));\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a call operation\n * @param intent Intent that contains call operation to be fulfilled\n * @param proposal Call proposal to be executed\n * @param index Position where the call proposal data and operation are located\n */\n function _executeCall(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n CallOperation memory callOperation = abi.decode(operation.data, (CallOperation));\n _validateCallOperation(callOperation, proposal.datas[index], operation.user);\n\n outputs = new bytes[](callOperation.calls.length);\n for (uint256 i = 0; i < callOperation.calls.length; i++) {\n CallData memory call = callOperation.calls[i];\n // solhint-disable-next-line avoid-low-level-calls\n outputs[i] = smartAccountsHandler.call(operation.user, call.target, call.data, call.value);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(outputs));\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a dynamic call operation\n * @param intent Intent that contains dynamic call operation to be fulfilled\n * @param proposal Dynamic call proposal to be executed\n * @param index Position where the dynamic call proposal data and operation are located\n * @param variables List of operations outputs\n */\n function _executeDynamicCall(\n Intent memory intent,\n Proposal memory proposal,\n uint256 index,\n bytes[][] memory variables\n ) internal returns (bytes[] memory outputs) {\n Operation memory operation = intent.operations[index];\n DynamicCallOperation memory dynamicCallOperation = abi.decode(operation.data, (DynamicCallOperation));\n _validateDynamicCallOperation(dynamicCallOperation, proposal.datas[index], operation.user);\n\n outputs = new bytes[](dynamicCallOperation.calls.length);\n for (uint256 i = 0; i < dynamicCallOperation.calls.length; i++) {\n DynamicCall memory dynamicCall = abi.decode(dynamicCallOperation.calls[i], (DynamicCall));\n bytes memory data = IDynamicCallEncoder(dynamicCallEncoder).encode(dynamicCall, variables, index);\n // solhint-disable-next-line avoid-low-level-calls\n outputs[i] = smartAccountsHandler.call(operation.user, dynamicCall.target, data, dynamicCall.value);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(outputs));\n }\n\n /**\n * @dev Validates an intent and its corresponding proposal\n The off-chain validators are assuring that:\n - The trigger signer has authorization over the intent.feePayer and each operations[i].user\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n * @param simulated Whether the execution is a simulation\n */\n function _validateIntent(Intent memory intent, Proposal memory proposal, bytes memory signature, bool simulated)\n internal\n view\n {\n if (intent.settler != address(this)) revert SettlerInvalidSettler(intent.settler);\n if (intent.nonce == bytes32(0)) revert SettlerNonceZero();\n bytes32 intentHash = intent.hash();\n if (getIntentBlock[intentHash] != 0) revert SettlerIntentAlreadyExecuted(intentHash);\n\n if (intent.operations.length == 0) revert SettlerIntentOperationsEmpty();\n if (intent.operations.length != proposal.datas.length) revert SettlerProposalDataInvalidLength();\n\n if (operationsValidator != address(0)) {\n for (uint256 i = 0; i < intent.operations.length; i++) {\n Operation memory operation = intent.operations[i];\n bytes memory safeguard = _userSafeguard[operation.user];\n if (safeguard.length > 0) IOperationsValidator(operationsValidator).validate(operation, safeguard);\n }\n }\n\n bool shouldValidateDeadlines = _shouldValidateDeadlines(intent);\n if (shouldValidateDeadlines) {\n if (intent.deadline <= block.timestamp) revert SettlerIntentPastDeadline(intent.deadline, block.timestamp);\n bool isProposalPastDeadline = proposal.deadline <= block.timestamp;\n if (isProposalPastDeadline) revert SettlerProposalPastDeadline(proposal.deadline, block.timestamp);\n }\n\n if (intent.maxFees.length != proposal.fees.length) revert SettlerSolverFeeInvalidLength();\n for (uint256 i = 0; i < intent.maxFees.length; i++) {\n uint256 maxFee = intent.maxFees[i].amount;\n uint256 proposalFee = proposal.fees[i];\n if (proposalFee > maxFee) revert SettlerSolverFeeTooHigh(proposalFee, maxFee);\n }\n\n uint8 minValidations = IController(controller).minValidations();\n uint256 requiredValidations = intent.minValidations > minValidations ? intent.minValidations : minValidations;\n\n if (intent.validations.length < requiredValidations) {\n revert SettlerIntentValidationsNotEnough(requiredValidations, intent.validations.length);\n }\n\n address lastValidator = address(0);\n Validation memory validation = Validation(intentHash);\n bytes32 typedDataHash = _hashTypedDataV4(validation.hash());\n for (uint256 i = 0; i < intent.validations.length; i++) {\n address validator = ECDSA.recover(typedDataHash, intent.validations[i]);\n if (validator <= lastValidator) {\n revert SettlerValidatorDuplicatedOrUnsorted(lastValidator, validator);\n }\n lastValidator = validator;\n bool isValidatorNotAllowed = !IController(controller).isValidatorAllowed(validator);\n if (isValidatorNotAllowed) revert SettlerValidatorNotAllowed(validator);\n }\n\n address signer = ECDSA.recover(_hashTypedDataV4(proposal.hash(intent, _msgSender())), signature);\n bool isProposalSignerNotAllowed = !IController(controller).isProposalSignerAllowed(signer) && !simulated;\n if (isProposalSignerNotAllowed) revert SettlerProposalSignerNotAllowed(signer);\n }\n\n /**\n * @dev Validates a swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateSwapOperation(SwapOperation memory operation, SwapProposal memory proposal) internal view {\n if (proposal.amountsOut.length != operation.tokensOut.length) revert SettlerInvalidProposedAmounts();\n\n for (uint256 i = 0; i < operation.tokensOut.length; i++) {\n TokenOut memory tokenOut = operation.tokensOut[i];\n address recipient = tokenOut.recipient;\n if (recipient == address(this)) revert SettlerInvalidRecipient(recipient);\n\n uint256 minAmount = tokenOut.minAmount;\n uint256 proposedAmount = proposal.amountsOut[i];\n if (proposedAmount < minAmount) revert SettlerProposedAmountLtMinAmount(i, proposedAmount, minAmount);\n }\n }\n\n /**\n * @dev Validates a single-chain swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateSingleChainSwapOperation(SwapOperation memory operation, SwapProposal memory proposal)\n internal\n view\n {\n if (operation.sourceChain != operation.destinationChain) revert SettlerOperationChainsMismatch();\n if (operation.sourceChain != block.chainid) revert SettlerInvalidChain(block.chainid);\n _validateSwapOperation(operation, proposal);\n }\n\n /**\n * @dev Validates a transfer operation and its corresponding proposal\n * @param operation Transfer operation to be fulfilled\n * @param proposalData data of the proposal\n */\n function _validateTransferOperation(TransferOperation memory operation, bytes memory proposalData) internal view {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n for (uint256 i = 0; i < operation.transfers.length; i++) {\n address recipient = operation.transfers[i].recipient;\n if (recipient == address(this)) revert SettlerInvalidRecipient(recipient);\n }\n }\n\n /**\n * @dev Validates a call operation and its corresponding proposal\n * @param operation Call operation to be fulfilled\n * @param proposalData data of the proposal\n * @param user The originator of the operation\n */\n function _validateCallOperation(CallOperation memory operation, bytes memory proposalData, address user)\n internal\n view\n {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n if (!smartAccountsHandler.isSmartAccount(user)) revert SettlerUserNotSmartAccount(user);\n }\n\n /**\n * @dev Validates a dynamic call operation and its corresponding proposal\n * @param operation Dynamic call operation to be fulfilled\n * @param proposalData data of the proposal\n * @param user The originator of the operation\n */\n function _validateDynamicCallOperation(\n DynamicCallOperation memory operation,\n bytes memory proposalData,\n address user\n ) internal view {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n if (!smartAccountsHandler.isSmartAccount(user)) revert SettlerUserNotSmartAccount(user);\n }\n\n /**\n * @dev Validates a cross-chain swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateCrossChainSwapOperation(SwapOperation memory operation, SwapProposal memory proposal)\n internal\n view\n {\n if (operation.sourceChain == operation.destinationChain) revert SettlerOperationChainsMismatch();\n bool isChainInvalid = operation.sourceChain != block.chainid && operation.destinationChain != block.chainid;\n if (isChainInvalid) revert SettlerInvalidChain(block.chainid);\n _validateSwapOperation(operation, proposal);\n bool isExecutorInvalid = !IController(controller).isExecutorAllowed(proposal.executor);\n if (isExecutorInvalid) revert SettlerExecutorNotAllowed(proposal.executor);\n }\n\n /**\n * @dev Tells the contract balance for each token out of a swap operation\n * @param operation Swap operation containing the list of tokens out\n */\n function _getTokensOutBalance(SwapOperation memory operation) internal view returns (uint256[] memory balances) {\n balances = new uint256[](operation.tokensOut.length);\n if (operation.destinationChain == block.chainid) {\n for (uint256 i = 0; i < operation.tokensOut.length; i++) {\n balances[i] = ERC20Helpers.balanceOf(operation.tokensOut[i].token, address(this));\n }\n }\n }\n\n /**\n * @dev Tells if the intent and proposal deadlines should be validated\n In the case the intent is being executed on the destination chain of a cross-chain swap, the deadlines are ignored\n * @param intent Intent to be fulfilled\n */\n function _shouldValidateDeadlines(Intent memory intent) internal view returns (bool) {\n // Cross-chain operation can only be the first (and only) operation\n Operation memory operation = intent.operations[0];\n if (operation.opType != uint8(OpType.CrossChainSwap)) return true;\n SwapOperation memory swapIntent = abi.decode(operation.data, (SwapOperation));\n return swapIntent.sourceChain == block.chainid;\n }\n\n /**\n * @dev Emits operation custom events\n * @param operation Operation to emit the custom events for\n * @param proposal Proposal that fulfills the operation\n * @param intentHash Hash of the intent the operation belongs to\n * @param index Position of the operation on operations\n * @param output Encoded array of outputs\n */\n function _emitOperationEvents(\n Operation memory operation,\n Proposal memory proposal,\n bytes32 intentHash,\n uint256 index,\n bytes memory output\n ) internal {\n for (uint256 i = 0; i < operation.events.length; i++) {\n OperationEvent memory operationEvent = operation.events[i];\n emit OperationExecuted(\n operation.user,\n operationEvent.topic,\n uint8(operation.opType),\n operation,\n proposal,\n intentHash,\n index,\n output,\n operationEvent.data\n );\n }\n }\n\n /**\n * @dev Pays fees from the intent feePayer\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _payFees(Intent memory intent, Proposal memory proposal) internal {\n // A CrossChainSwap only pays fees on destination chain and must be the only operation\n if (intent.operations[0].opType == uint8(OpType.CrossChainSwap)) {\n SwapOperation memory swapOperation = abi.decode(intent.operations[0].data, (SwapOperation));\n if (swapOperation.sourceChain == block.chainid) return;\n }\n address from = intent.feePayer;\n address to = _msgSender();\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(from);\n for (uint256 i = 0; i < intent.maxFees.length; i++) {\n address token = intent.maxFees[i].token;\n if (!Denominations.isUSD(token)) _transferFrom(token, from, to, proposal.fees[i], isSmartAccount);\n }\n }\n\n /**\n * @dev Transfers tokens from one account to another\n * @param token Address of the token to transfer\n * @param from Address of the account sending the tokens\n * @param to Address of the account receiving the tokens\n * @param amount Amount of tokens to transfer\n * @param isSmartAccount Whether the sender is a smart account\n */\n function _transferFrom(address token, address from, address to, uint256 amount, bool isSmartAccount) internal {\n if (isSmartAccount) {\n smartAccountsHandler.transfer(from, token, to, amount);\n } else {\n IERC20(token).safeTransferFrom(from, to, amount);\n }\n }\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function _setSmartAccountsHandler(address newSmartAccountsHandler) internal {\n if (newSmartAccountsHandler == address(0)) revert SmartAccountsHandlerZero();\n smartAccountsHandler = newSmartAccountsHandler;\n emit SmartAccountsHandlerSet(newSmartAccountsHandler);\n }\n\n /**\n * @dev Sets the operations validator\n * @param newOperationsValidator New operations validator to be set\n */\n function _setOperationsValidator(address newOperationsValidator) internal {\n operationsValidator = newOperationsValidator;\n emit OperationsValidatorSet(newOperationsValidator);\n }\n\n /**\n * @dev Sets the dynamic call encoder\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function _setDynamicCallEncoder(address newDynamicCallEncoder) internal {\n if (newDynamicCallEncoder == address(0)) revert SettlerDynamicCallEncoderZero();\n dynamicCallEncoder = newDynamicCallEncoder;\n emit DynamicCallEncoderSet(newDynamicCallEncoder);\n }\n\n /**\n * @dev Sets a safeguard for a user\n * @param user Address of the user to set the safeguard for\n * @param safeguard Safeguard to be set\n */\n function _setSafeguard(address user, bytes memory safeguard) internal {\n delete _userSafeguard[user];\n _userSafeguard[user] = safeguard;\n emit SafeguardSet(user);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccount7702.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/Context.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccount.sol';\nimport '../utils/ERC20Helpers.sol';\nimport './SmartAccountBase.sol';\n\n/**\n * @title SmartAccount7702\n * @dev Provides the smart account logic to use with EIP7702\n */\ncontract SmartAccount7702 is SmartAccountBase {\n // Mimic settler reference\n // solhint-disable-next-line immutable-vars-naming\n address public immutable settler;\n\n /**\n * @dev The sender is not the settler\n */\n error SmartAccount7702SenderNotSettler();\n\n /**\n * @dev Reverts unless the sender is the settler\n */\n modifier onlySettler() {\n if (_msgSender() != settler) revert SmartAccount7702SenderNotSettler();\n _;\n }\n\n /**\n * @dev Creates a new SmartAccount7702 contract\n * @param _settler Address of the Mimic settler\n */\n constructor(address _settler) {\n settler = _settler;\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) public override onlySettler {\n super.transfer(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value) public override onlySettler returns (bytes memory) {\n // solhint-disable-next-line avoid-low-level-calls\n return super.call(target, data, value);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountBase.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/Context.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccount.sol';\nimport '../utils/ERC20Helpers.sol';\n\n/**\n * @title SmartAccountBase\n * @dev Provides the base logic for managing assets and executing arbitrary calls\n */\ncontract SmartAccountBase is ISmartAccount, Context, ERC165, ReentrancyGuard {\n /**\n * @dev Tells whether the contract supports the given interface ID. Overrides ERC165 to declare support for ISmartAccount interface.\n * @param interfaceId Interface ID is defined as the XOR of all function selectors in the interface\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {\n return interfaceId == type(ISmartAccount).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) public virtual override nonReentrant {\n ERC20Helpers.transfer(token, recipient, amount);\n emit Transferred(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value)\n public\n virtual\n override\n nonReentrant\n returns (bytes memory result)\n {\n result = Address.functionCallWithValue(target, data, value);\n emit Called(target, data, value, result);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountContract.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccountContract.sol';\nimport './SmartAccountBase.sol';\n\n/**\n * @title SmartAccountContract\n * @dev Provides the smart account logic to use as a standalone contract\n */\ncontract SmartAccountContract is ISmartAccountContract, Ownable, SmartAccountBase {\n // EIP1271 magic return value\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x1626ba7e;\n\n // EIP1271 invalid signature return value\n bytes4 internal constant EIP1271_INVALID_SIGNATURE = 0xffffffff;\n\n // List of account permissions\n mapping (address => bool) public isSignerAllowed;\n\n // Mimic settler reference\n address public settler;\n\n /**\n * @dev The settler is zero\n */\n error SmartAccountSettlerZero();\n\n /**\n * @dev The input arrays are not of equal length\n */\n error SmartAccountInputInvalidLength();\n\n /**\n * @dev The sender is not the owner or the settler\n */\n error SmartAccountUnauthorizedSender(address sender);\n\n /**\n * @dev Emitted every time the settler is set\n */\n event SettlerSet(address indexed settler);\n\n /**\n * @dev Emitted every time a signer allowance is set\n */\n event SignerAllowedSet(address indexed account, bool allowed);\n\n /**\n * @dev Reverts unless the sender is the owner or the settler\n */\n modifier onlyOwnerOrSettler() {\n address sender = _msgSender();\n bool isAuthorized = sender == owner() || sender == settler;\n if (!isAuthorized) revert SmartAccountUnauthorizedSender(sender);\n _;\n }\n\n /**\n * @dev Creates a new SmartAccount contract\n * @param _settler Address of the Mimic settler\n * @param _owner Address that will own the contract\n */\n constructor(address _settler, address _owner) Ownable(_owner) {\n _setSettler(_settler);\n }\n\n /**\n * @dev Tells whether the signature provided belongs to an allowed account.\n * @param hash Message signed by the account\n * @param signature Signature provided to be verified\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view override returns (bytes4) {\n (address signer, , ) = ECDSA.tryRecover(hash, signature);\n if (signer != address(0) && (signer == owner() || isSignerAllowed[signer])) return EIP1271_MAGIC_VALUE;\n return EIP1271_INVALID_SIGNATURE;\n }\n\n /**\n * @dev It allows receiving native token transfers\n */\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n /**\n * @dev Sets the settler. Sender must be the owner.\n * @param newSettler Address of the new settler to be set\n */\n function setSettler(address newSettler) external onlyOwner {\n _setSettler(newSettler);\n }\n\n /**\n * @dev Sets a list of allowed signers. Sender must be the owner.\n * @param accounts List of account addresses\n * @param allowances List of allowed condition per account\n */\n function setAllowedSigners(address[] memory accounts, bool[] memory allowances) external onlyOwner {\n if (accounts.length != allowances.length) revert SmartAccountInputInvalidLength();\n for (uint256 i = 0; i < accounts.length; i++) {\n address account = accounts[i];\n bool allowed = allowances[i];\n isSignerAllowed[account] = allowed;\n emit SignerAllowedSet(account, allowed);\n }\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the owner or the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount)\n public\n override(ISmartAccount, SmartAccountBase)\n onlyOwnerOrSettler\n {\n super.transfer(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the owner or the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value)\n public\n override(ISmartAccount, SmartAccountBase)\n onlyOwnerOrSettler\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n return super.call(target, data, value);\n }\n\n /**\n * @dev Sets the settler\n * @param newSettler Address of the new settler to be set\n */\n function _setSettler(address newSettler) internal {\n if (newSettler == address(0)) revert SmartAccountSettlerZero();\n settler = newSettler;\n emit SettlerSet(newSettler);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountsHandler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport '../interfaces/ISafe.sol';\nimport '../interfaces/ISmartAccount.sol';\nimport '../interfaces/ISmartAccountsHandler.sol';\nimport '../utils/Denominations.sol';\n\ncontract SmartAccountsHandler is ISmartAccountsHandler {\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address account) external view override returns (bool) {\n if (account.code.length == 0) return false;\n if (_isMimicSmartAccount(account)) return true;\n if (_isSafe(account)) return true;\n return false;\n }\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address account, address token, address to, uint256 amount) external override {\n if (_isMimicSmartAccount(account)) return ISmartAccount(account).transfer(token, to, amount);\n if (_isSafe(account)) return _transferSafe(account, token, to, amount);\n revert SmartAccountsHandlerUnsupportedAccount(account);\n }\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address account, address target, bytes memory data, uint256 value)\n external\n override\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n if (_isMimicSmartAccount(account)) return ISmartAccount(account).call(target, data, value);\n if (_isSafe(account)) return _callSafe(account, target, data, value);\n revert SmartAccountsHandlerUnsupportedAccount(account);\n }\n\n /**\n * @dev Performs a transfer from a safe\n */\n function _transferSafe(address account, address token, address to, uint256 amount) internal {\n Denominations.isNativeToken(token)\n ? _callSafe(account, to, new bytes(0), amount)\n : _callSafe(account, token, abi.encodeWithSelector(IERC20.transfer.selector, to, amount), 0);\n }\n\n /**\n * @dev Performs a call from a safe\n */\n function _callSafe(address account, address target, bytes memory data, uint256 value)\n internal\n returns (bytes memory)\n {\n (bool success, bytes memory result) = ISafe(account).execTransactionFromModuleReturnData(\n target,\n value,\n data,\n SafeOperation.Call\n );\n return\n data.length == 0\n ? Address.verifyCallResult(success, result)\n : Address.verifyCallResultFromTarget(target, success, result);\n }\n\n /**\n * @dev Tells whether an account is a Mimic smart account\n * @param account Address of the account being queried\n */\n function _isMimicSmartAccount(address account) internal view returns (bool) {\n try ISmartAccount(account).supportsInterface(type(ISmartAccount).interfaceId) returns (bool ok) {\n return ok;\n } catch {\n return false;\n }\n }\n\n /**\n * @dev Tells whether an account is a Gnosis Safe\n * @param account Address of the account being queried\n */\n function _isSafe(address account) internal view returns (bool) {\n try ISafe(account).getThreshold() returns (uint256) {\n return true;\n } catch {\n return false;\n }\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountsHandlerHelpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport '../interfaces/ISmartAccountsHandler.sol';\n\nlibrary SmartAccountsHandlerHelpers {\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address handler, address account) internal view returns (bool) {\n return ISmartAccountsHandler(handler).isSmartAccount(account);\n }\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address handler, address account, address token, address to, uint256 amount) internal {\n Address.functionDelegateCall(\n handler,\n abi.encodeWithSelector(ISmartAccountsHandler.transfer.selector, account, token, to, amount)\n );\n }\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address handler, address account, address target, bytes memory data, uint256 value)\n internal\n returns (bytes memory result)\n {\n result = Address.functionDelegateCall(\n handler,\n abi.encodeWithSelector(ISmartAccountsHandler.call.selector, account, target, data, value)\n );\n // Skip the ABI-encoded offset and length of the outer `bytes` to point at the inner payload\n assembly {\n result := add(result, 64)\n }\n }\n}\n" + }, + "project/contracts/test/CallMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\ncontract CallMock {\n event CallReceived(address indexed sender, uint256 value);\n error CallError();\n\n function call() external payable {\n emit CallReceived(msg.sender, msg.value);\n }\n\n function callError() external payable {\n revert CallError();\n }\n}\n" + }, + "project/contracts/test/dynamic-calls/StaticCallMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\ncontract StaticCallMock {\n struct StructMock {\n uint256 a;\n address b;\n }\n\n function returnUint(uint256 value) external pure returns (uint256) {\n return value;\n }\n\n function returnAddress(address value) external payable returns (address) {\n return value;\n }\n\n function returnArray(uint256[] calldata value) external pure returns (uint256[] memory) {\n return value;\n }\n\n function returnFixedArray(uint256[3] calldata value) external pure returns (uint256[3] memory) {\n return value;\n }\n\n function returnStruct(StructMock calldata value) external pure returns (StructMock memory) {\n return value;\n }\n}\n" + }, + "project/contracts/test/executors/EmptyExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\n\ncontract EmptyExecutorMock is IExecutor {\n event Executed();\n\n function execute(Operation memory, bytes32, bytes memory) external override {\n emit Executed();\n }\n}\n" + }, + "project/contracts/test/executors/MintExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../TokenMock.sol';\nimport '../../interfaces/IExecutor.sol';\n\n/* solhint-disable custom-errors */\n\ncontract MintExecutorMock is IExecutor {\n event Minted();\n\n function execute(Operation memory operation, bytes32, bytes memory proposalData) external override {\n require(\n operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap),\n 'Invalid operation type'\n );\n\n SwapProposal memory swapProposal = abi.decode(proposalData, (SwapProposal));\n (address[] memory tokens, uint256[] memory amounts) = abi.decode(swapProposal.data, (address[], uint256[]));\n\n require(tokens.length == amounts.length, 'Invalid inputs');\n\n for (uint256 i = 0; i < tokens.length; i++) {\n TokenMock(tokens[i]).mint(msg.sender, amounts[i]);\n emit Minted();\n }\n }\n}\n" + }, + "project/contracts/test/executors/ReentrantExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\nimport '../../interfaces/ISettler.sol';\n\ncontract ReentrantExecutorMock is IExecutor {\n // solhint-disable-next-line immutable-vars-naming\n address payable public immutable settler;\n\n constructor(address payable _settler) {\n settler = _settler;\n }\n\n function execute(Operation memory, bytes32, bytes memory) external override {\n Intent memory intent;\n Proposal memory proposal;\n ISettler(settler).execute(intent, proposal, new bytes(0));\n }\n}\n" + }, + "project/contracts/test/executors/TransferExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\nimport '../../utils/ERC20Helpers.sol';\n\n/* solhint-disable custom-errors */\n\ncontract TransferExecutorMock is IExecutor {\n event Transferred();\n\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n function execute(Operation memory operation, bytes32, bytes memory proposalData) external override {\n require(\n operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap),\n 'Invalid operation type'\n );\n\n SwapProposal memory swapProposal = abi.decode(proposalData, (SwapProposal));\n (address[] memory tokens, uint256[] memory amounts) = abi.decode(swapProposal.data, (address[], uint256[]));\n\n require(tokens.length == amounts.length, 'Invalid inputs');\n\n for (uint256 i = 0; i < tokens.length; i++) {\n ERC20Helpers.transfer(tokens[i], msg.sender, amounts[i]);\n emit Transferred();\n }\n }\n}\n" + }, + "project/contracts/test/SettlerV2Mock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../Settler.sol';\n\ncontract SettlerV2Mock is Settler {\n function someNewFunction() external pure returns (string memory) {\n return 'Some new function';\n }\n}\n" + }, + "project/contracts/test/smart-accounts/SafeMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/ISafe.sol';\n\ncontract SafeMock is ISafe {\n event ModuleTxExecuted(\n address indexed target,\n bytes data,\n uint256 value,\n SafeOperation operation,\n bool success,\n bytes result\n );\n\n receive() external payable {}\n\n function getThreshold() external pure returns (uint256) {\n return 1;\n }\n\n function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, SafeOperation operation)\n external\n returns (bool success, bytes memory result)\n {\n // solhint-disable-next-line avoid-low-level-calls\n (success, result) = to.call{ value: value }(data);\n emit ModuleTxExecuted(to, data, value, operation, success, result);\n }\n}\n" + }, + "project/contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../smart-accounts/SmartAccountsHandlerHelpers.sol';\n\ncontract SmartAccountsHandlerHelpersMock {\n using SmartAccountsHandlerHelpers for address;\n\n function call(address handler, address account, address target, bytes memory data, uint256 value)\n external\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n return handler.call(account, target, data, value);\n }\n}\n" + }, + "project/contracts/test/TokenMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\n\ncontract TokenMock is ERC20 {\n uint8 internal _decimals;\n\n constructor(string memory symbol, uint8 dec) ERC20(symbol, symbol) {\n _decimals = dec;\n }\n\n function mint(address account, uint256 amount) external {\n _mint(account, amount);\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n}\n" + }, + "project/contracts/test/utils/BytesHelpersMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.24;\n\nimport '../../utils/BytesHelpers.sol';\n\ncontract BytesHelpersMock {\n using BytesHelpers for bytes;\n\n function readWord0(bytes memory data) external pure returns (uint256) {\n return data.readWord0();\n }\n\n function readWord1(bytes memory data) external pure returns (uint256) {\n return data.readWord1();\n }\n\n function slice(bytes memory data, uint256 start, uint256 end) external pure returns (bytes memory) {\n return data.slice(start, end);\n }\n\n function sliceFrom(bytes memory data, uint256 start) external pure returns (bytes memory) {\n return data.sliceFrom(start);\n }\n}\n" + }, + "project/contracts/test/utils/DenominationsMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../../utils/Denominations.sol';\n\n// solhint-disable func-name-mixedcase\n\ncontract DenominationsMock {\n function NATIVE_TOKEN() external pure returns (address) {\n return Denominations.NATIVE_TOKEN;\n }\n\n function USD() external pure returns (address) {\n return Denominations.USD;\n }\n}\n" + }, + "project/contracts/test/utils/ERC20HelpersMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../../utils/ERC20Helpers.sol';\n\ncontract ERC20HelpersMock {\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n function approve(address token, address to, uint256 amount) external {\n ERC20Helpers.approve(token, to, amount);\n }\n\n function transfer(address token, address to, uint256 amount) external {\n ERC20Helpers.transfer(token, to, amount);\n }\n\n function balanceOf(address token, address account) external view returns (uint256) {\n return ERC20Helpers.balanceOf(token, account);\n }\n}\n" + }, + "project/contracts/utils/BytesHelpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.24;\n\n/**\n * @title BytesHelpers\n * @dev Collection of low-level helpers to operate on `bytes` values in memory.\n */\nlibrary BytesHelpers {\n /**\n * @dev Thrown when a slice operation exceeds the bounds of the input bytes\n */\n error BytesLibSliceOutOfBounds();\n\n /**\n * @dev Reads the first 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @return result First ABI word of `data`\n */\n function readWord0(bytes memory data) internal pure returns (uint256) {\n return readWord(data, 0);\n }\n\n /**\n * @dev Reads the second 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @return result Second ABI word of `data`\n */\n function readWord1(bytes memory data) internal pure returns (uint256) {\n return readWord(data, 1);\n }\n\n /**\n * @dev Reads the N-th 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @param index Word index to read (0-based)\n * @return result N-th ABI word of `data`\n */\n function readWord(bytes memory data, uint256 index) private pure returns (uint256 result) {\n assembly {\n result := mload(add(data, add(32, mul(index, 32))))\n }\n }\n\n /**\n * @dev Returns a slice of a bytes array from `start` (inclusive) to `end` (exclusive)\n * @param data Bytes array to slice\n * @param start Starting byte index (inclusive)\n * @param end Ending byte index (exclusive)\n */\n function slice(bytes memory data, uint256 start, uint256 end) internal pure returns (bytes memory out) {\n if (end < start) revert BytesLibSliceOutOfBounds();\n if (end > data.length) revert BytesLibSliceOutOfBounds();\n\n uint256 len = end - start;\n out = new bytes(len);\n\n assembly {\n let src := add(add(data, 32), start)\n let dst := add(out, 32)\n mcopy(dst, src, len)\n }\n }\n\n /**\n * @dev Returns a slice of a bytes array starting at `start` until the end\n * @param data Bytes array to slice\n * @param start Starting byte index (inclusive)\n */\n function sliceFrom(bytes memory data, uint256 start) internal pure returns (bytes memory out) {\n return slice(data, start, data.length);\n }\n}\n" + }, + "project/contracts/utils/Denominations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @title Denominations\n * @dev Provides a list of ground denominations for those tokens that cannot be represented by an ERC20.\n * For now, the only needed is the native token that could be ETH, MATIC, or other depending on the layer being operated.\n */\nlibrary Denominations {\n address internal constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n // Fiat currencies follow https://en.wikipedia.org/wiki/ISO_4217\n address internal constant USD = address(840);\n\n function isUSD(address token) internal pure returns (bool) {\n return token == USD;\n }\n\n function isNativeToken(address token) internal pure returns (bool) {\n return token == NATIVE_TOKEN;\n }\n}\n" + }, + "project/contracts/utils/ERC20Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport './Denominations.sol';\n\n/**\n * @title ERC20Helpers\n * @dev Provides a list of ERC20 helper methods\n */\nlibrary ERC20Helpers {\n function approve(address token, address to, uint256 amount) internal {\n SafeERC20.forceApprove(IERC20(token), to, amount);\n }\n\n function transfer(address token, address to, uint256 amount) internal {\n if (Denominations.isNativeToken(token)) Address.sendValue(payable(to), amount);\n else SafeERC20.safeTransfer(IERC20(token), to, amount);\n }\n\n function balanceOf(address token, address account) internal view returns (uint256) {\n if (Denominations.isNativeToken(token)) return address(account).balance;\n else return IERC20(token).balanceOf(address(account));\n }\n}\n" + }, + "project/contracts/utils/MimicHelper.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @title Mimic Helper\n * @dev Collection of helper functions for the Mimic Protocol\n */\ncontract MimicHelper {\n // Custom byte storage per user and key\n mapping (address => mapping (string => bytes)) internal _customStorage;\n\n /**\n * @dev Emitted every time the storage is set\n */\n event StorageSet(address indexed user, string indexed key, bytes indexed data);\n\n /**\n * @dev Tells the native token balance of an address\n * @param target Address to get native token balance\n */\n function getNativeTokenBalance(address target) external view returns (uint256) {\n return target.balance;\n }\n\n /**\n * @dev Tells the code of an address\n * @param target Address to get code\n */\n function getCode(address target) external view returns (bytes memory) {\n return target.code;\n }\n\n /**\n * @dev Tells the data set for the user and the key\n * @param user Address of the user being queried\n * @param key String of the key being queried\n */\n function getStorage(address user, string calldata key) external view returns (bytes memory) {\n return _customStorage[user][key];\n }\n\n /**\n * @dev Sets a data for the user and a key\n * @param key String of the key to set the data for\n * @param data Bytes to be set\n */\n function setStorage(string calldata key, bytes memory data) external {\n _customStorage[msg.sender][key] = data;\n emit StorageSet(msg.sender, key, data);\n }\n}\n" + } + } + } +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-10/deployed_addresses.json b/packages/evm/ignition/deployments/chain-10/deployed_addresses.json index 5bb6950..70484e3 100644 --- a/packages/evm/ignition/deployments/chain-10/deployed_addresses.json +++ b/packages/evm/ignition/deployments/chain-10/deployed_addresses.json @@ -12,5 +12,9 @@ "Create3DynamicCallEncoder#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", "Create3DynamicCallEncoder#DynamicCallEncoder": "0xb3F0F65FA3f94890B7a5Bd17843a6fdfB9407dbD", "Create3Proxy#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", - "Create3Proxy#Proxy": "0x8be430d29a2c5692f9345a28506b849C6a99eDaA" + "Create3Proxy#Proxy": "0x8be430d29a2c5692f9345a28506b849C6a99eDaA", + "Create3SettlerV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", + "Create3SettlerV1#Settler": "0x3734D7284f46037688252b13ef6d88E3FFDF5e1B", + "Create3DynamicCallEncoderV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", + "Create3DynamicCallEncoderV1#DynamicCallEncoder": "0x183E61BDE23a80f4D1e003653288d4B4551681ed" } \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-10/journal.jsonl b/packages/evm/ignition/deployments/chain-10/journal.jsonl index 2771199..4331557 100644 --- a/packages/evm/ignition/deployments/chain-10/journal.jsonl +++ b/packages/evm/ignition/deployments/chain-10/journal.jsonl @@ -108,4 +108,22 @@ {"futureId":"Create3SmartAccount7702#ICreateX.deployCreate3","hash":"0xe4b54841e777f82b6d3898b8b73d3b087418da28f177c8b9bea9bd4fab51c932","networkInteractionId":1,"receipt":{"blockHash":"0x7725d690cb8b399396968573813cf9d49c97a60232daf8b265940e773187a9e8","blockNumber":150979852,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":91,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x000000000000000000000000b800ea953426e361efda80da69765895ab3b04da","0x4d548e60a06ca5826dcab93682802743ae2369c7da6162da7a3f4201826a6d33"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":92,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x00000000000000000000000014ae3c251881d2214e376bfa38dd98a4bd33550c"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} {"futureId":"Create3SmartAccount7702#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} {"artifactId":"Create3SmartAccount7702#ICreateX","dependencies":["Create3SmartAccount7702#ICreateX.deployCreate3","Create3SmartAccount7702#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","strategy":"basic","strategyConfig":{},"txToReadFrom":"0xe4b54841e777f82b6d3898b8b73d3b087418da28f177c8b9bea9bd4fab51c932","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} -{"artifactId":"Create3SmartAccount7702#SmartAccount7702","contractAddress":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","contractName":"SmartAccount7702","dependencies":["Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SmartAccount7702#SmartAccount7702","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} \ No newline at end of file +{"artifactId":"Create3SmartAccount7702#SmartAccount7702","contractAddress":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","contractName":"SmartAccount7702","dependencies":["Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SmartAccount7702#SmartAccount7702","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","contractName":"ICreateX","dependencies":[],"futureId":"Create3SettlerV1#ICreateX","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"args":["0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b000000000000000004302605","0x6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033"],"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","dependencies":["Create3SettlerV1#ICreateX"],"from":"0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b","functionName":"deployCreate3","futureId":"Create3SettlerV1#ICreateX.deployCreate3","strategy":"basic","strategyConfig":{},"type":"CALL_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000005d166080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c003300000000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":93,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":93,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"1000710"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"1000000"}},"hash":"0x53c9e212c4ef4031bd537232404bbd8afebf0f74ac1a5b39e01d388baba8af31"},"type":"TRANSACTION_SEND"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","hash":"0x53c9e212c4ef4031bd537232404bbd8afebf0f74ac1a5b39e01d388baba8af31","networkInteractionId":1,"receipt":{"blockHash":"0x4008a96720612d14ae68b0aed31eb698dfd24e7daa9bfc44c43c21deba0f1d78","blockNumber":150985979,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":92,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x000000000000000000000000b5439ac30ce4daeb02b265d758436e65087047ab","0x660e7900ab9b67f261d92573714530e140aa4f3b2855e1dd677cfa672309b2ee"]},{"address":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","data":"0x000000000000000000000000000000000000000000000000ffffffffffffffff","logIndex":93,"topics":["0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":94,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x0000000000000000000000003734d7284f46037688252b13ef6d88e3ffdf5e1b"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} +{"artifactId":"Create3SettlerV1#ICreateX","dependencies":["Create3SettlerV1#ICreateX.deployCreate3","Create3SettlerV1#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3SettlerV1#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","strategy":"basic","strategyConfig":{},"txToReadFrom":"0x53c9e212c4ef4031bd537232404bbd8afebf0f74ac1a5b39e01d388baba8af31","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3SettlerV1#Settler","contractAddress":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","contractName":"Settler","dependencies":["Create3SettlerV1#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SettlerV1#Settler","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3DynamicCallEncoderV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","contractName":"ICreateX","dependencies":[],"futureId":"Create3DynamicCallEncoderV1#ICreateX","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"args":["0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b000000000000000004302606","0x6080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033"],"artifactId":"Create3DynamicCallEncoderV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","dependencies":["Create3DynamicCallEncoderV1#ICreateX"],"from":"0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b","functionName":"deployCreate3","futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","strategy":"basic","strategyConfig":{},"type":"CALL_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000c586080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c00330000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":95,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":95,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"1000698"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"1000000"}},"hash":"0xd2f09e56663a734e0061b8633ac51682ed6f620ab324d70f4e6c2928222a23ba"},"type":"TRANSACTION_SEND"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","hash":"0xd2f09e56663a734e0061b8633ac51682ed6f620ab324d70f4e6c2928222a23ba","networkInteractionId":1,"receipt":{"blockHash":"0xea177619a83d56254741c5ea7bd2892a3029500fbf5c4bd96665d9cb65b26314","blockNumber":150986670,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":104,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x0000000000000000000000001d9bd3390aaef5bbcf3beb4f60e0ee28805f6779","0xa13cc826172bbf7683ce89033f741800ae55529a93ee495908820a8471d913b0"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":105,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x000000000000000000000000183e61bde23a80f4d1e003653288d4b4551681ed"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} +{"artifactId":"Create3DynamicCallEncoderV1#ICreateX","dependencies":["Create3DynamicCallEncoderV1#ICreateX.deployCreate3","Create3DynamicCallEncoderV1#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3DynamicCallEncoderV1#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x183E61BDE23a80f4D1e003653288d4B4551681ed","strategy":"basic","strategyConfig":{},"txToReadFrom":"0xd2f09e56663a734e0061b8633ac51682ed6f620ab324d70f4e6c2928222a23ba","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","contractAddress":"0x183E61BDE23a80f4D1e003653288d4B4551681ed","contractName":"DynamicCallEncoder","dependencies":["Create3DynamicCallEncoderV1#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-100/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json b/packages/evm/ignition/deployments/chain-100/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-100/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-100/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json b/packages/evm/ignition/deployments/chain-100/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json new file mode 100644 index 0000000..aa424ed --- /dev/null +++ b/packages/evm/ignition/deployments/chain-100/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json @@ -0,0 +1,117 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "DynamicCallEncoder", + "sourceName": "contracts/dynamic-calls/DynamicCallEncoder.sol", + "abi": [ + { + "inputs": [], + "name": "BytesLibSliceOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderBadLength", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderEmptyDynamic", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderInvalidArgKind", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariableOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariableRefBadLength", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariablesLengthOutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum DynamicArgKind", + "name": "kind", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "isDynamic", + "type": "bool" + } + ], + "internalType": "struct DynamicArg[]", + "name": "arguments", + "type": "tuple[]" + } + ], + "internalType": "struct DynamicCall", + "name": "dynamicCall", + "type": "tuple" + }, + { + "internalType": "bytes[][]", + "name": "variables", + "type": "bytes[][]" + }, + { + "internalType": "uint256", + "name": "variablesLength", + "type": "uint256" + } + ], + "name": "encode", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/dynamic-calls/DynamicCallEncoder.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-100/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json b/packages/evm/ignition/deployments/chain-100/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-100/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-100/artifacts/Create3DynamicCallEncoderV1#ICreateX.json b/packages/evm/ignition/deployments/chain-100/artifacts/Create3DynamicCallEncoderV1#ICreateX.json new file mode 100644 index 0000000..837192d --- /dev/null +++ b/packages/evm/ignition/deployments/chain-100/artifacts/Create3DynamicCallEncoderV1#ICreateX.json @@ -0,0 +1,51 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "ICreateX", + "sourceName": "contracts/interfaces/ICreateX.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "name": "ContractCreation", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + } + ], + "name": "deployCreate3", + "outputs": [ + { + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/interfaces/ICreateX.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-100/artifacts/Create3SettlerV1#ICreateX.dbg.json b/packages/evm/ignition/deployments/chain-100/artifacts/Create3SettlerV1#ICreateX.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-100/artifacts/Create3SettlerV1#ICreateX.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-100/artifacts/Create3SettlerV1#ICreateX.json b/packages/evm/ignition/deployments/chain-100/artifacts/Create3SettlerV1#ICreateX.json new file mode 100644 index 0000000..837192d --- /dev/null +++ b/packages/evm/ignition/deployments/chain-100/artifacts/Create3SettlerV1#ICreateX.json @@ -0,0 +1,51 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "ICreateX", + "sourceName": "contracts/interfaces/ICreateX.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "name": "ContractCreation", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + } + ], + "name": "deployCreate3", + "outputs": [ + { + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/interfaces/ICreateX.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-100/artifacts/Create3SettlerV1#Settler.dbg.json b/packages/evm/ignition/deployments/chain-100/artifacts/Create3SettlerV1#Settler.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-100/artifacts/Create3SettlerV1#Settler.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-100/artifacts/Create3SettlerV1#Settler.json b/packages/evm/ignition/deployments/chain-100/artifacts/Create3SettlerV1#Settler.json new file mode 100644 index 0000000..cd9fdca --- /dev/null +++ b/packages/evm/ignition/deployments/chain-100/artifacts/Create3SettlerV1#Settler.json @@ -0,0 +1,1481 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "Settler", + "sourceName": "contracts/Settler.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposed", + "type": "uint256" + } + ], + "name": "SettlerAmountOutLtProposed", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerCrossChainSwapMustBeOnlyOperation", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerDynamicCallEncoderZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "executor", + "type": "address" + } + ], + "name": "SettlerExecutorNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "SettlerIntentAlreadyExecuted", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerIntentOperationsEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SettlerIntentPastDeadline", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "current", + "type": "uint256" + } + ], + "name": "SettlerIntentValidationsNotEnough", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "name": "SettlerInvalidChain", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerInvalidProposedAmounts", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "SettlerInvalidRecipient", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "settler", + "type": "address" + } + ], + "name": "SettlerInvalidSettler", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerNonceZero", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerOperationChainsMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "post", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pre", + "type": "uint256" + } + ], + "name": "SettlerPostBalanceOutLtPre", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerProposalDataInvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerProposalDataNotEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SettlerProposalPastDeadline", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + } + ], + "name": "SettlerProposalSignerNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minAmount", + "type": "uint256" + } + ], + "name": "SettlerProposedAmountLtMinAmount", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerRescueFundsRecipientZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gasUsed", + "type": "uint256" + } + ], + "name": "SettlerSimulationSuccess", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerSolverFeeInvalidLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "SettlerSolverFeeTooHigh", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "solver", + "type": "address" + } + ], + "name": "SettlerSolverNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "lengthRequested", + "type": "uint256" + } + ], + "name": "SettlerTooManySafeguards", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + } + ], + "name": "SettlerUnknownOperationType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "SettlerUserNotSmartAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "previous", + "type": "address" + }, + { + "internalType": "address", + "name": "current", + "type": "address" + } + ], + "name": "SettlerValidatorDuplicatedOrUnsorted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "validator", + "type": "address" + } + ], + "name": "SettlerValidatorNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "SmartAccountsHandlerZero", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dynamicCallEncoder", + "type": "address" + } + ], + "name": "DynamicCallEncoderSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "FundsRescued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "indexed": false, + "internalType": "struct Operation", + "name": "operation", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "indexed": false, + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "intentHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "output", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "OperationExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operationsValidator", + "type": "address" + } + ], + "name": "OperationsValidatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "proposal", + "type": "bytes32" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "SafeguardSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "smartAccountsHandler", + "type": "address" + } + ], + "name": "SmartAccountsHandlerSet", + "type": "event" + }, + { + "inputs": [], + "name": "controller", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dynamicCallEncoder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "getIntentBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + } + ], + "name": "getIntentHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "internalType": "address", + "name": "solver", + "type": "address" + } + ], + "name": "getProposalHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getUserSafeguard", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controller", + "type": "address" + }, + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_dynamicCallEncoder", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "operationsValidator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "rescueFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newDynamicCallEncoder", + "type": "address" + } + ], + "name": "setDynamicCallEncoder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOperationsValidator", + "type": "address" + } + ], + "name": "setOperationsValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "safeguard", + "type": "bytes" + } + ], + "name": "setSafeguard", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newSmartAccountsHandler", + "type": "address" + } + ], + "name": "setSmartAccountsHandler", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "simulate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "smartAccountsHandler", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033", + "deployedBytecode": "0x60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/Settler.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-100/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json b/packages/evm/ignition/deployments/chain-100/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json new file mode 100644 index 0000000..dc33803 --- /dev/null +++ b/packages/evm/ignition/deployments/chain-100/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json @@ -0,0 +1,373 @@ +{ + "_format": "hh3-sol-build-info-1", + "id": "167571dafa48e7ff636310c6c9f0fc8e202e44bc", + "solcVersion": "0.8.28", + "solcLongVersion": "0.8.28+commit.7893614a", + "userSourceNameMap": { + "contracts/Controller.sol": "project/contracts/Controller.sol", + "contracts/Intents.sol": "project/contracts/Intents.sol", + "contracts/Settler.sol": "project/contracts/Settler.sol", + "contracts/dynamic-calls/DynamicCallEncoder.sol": "project/contracts/dynamic-calls/DynamicCallEncoder.sol", + "contracts/dynamic-calls/DynamicCallTypes.sol": "project/contracts/dynamic-calls/DynamicCallTypes.sol", + "contracts/interfaces/IController.sol": "project/contracts/interfaces/IController.sol", + "contracts/interfaces/ICreateX.sol": "project/contracts/interfaces/ICreateX.sol", + "contracts/interfaces/IDynamicCallEncoder.sol": "project/contracts/interfaces/IDynamicCallEncoder.sol", + "contracts/interfaces/IExecutor.sol": "project/contracts/interfaces/IExecutor.sol", + "contracts/interfaces/IOperationsValidator.sol": "project/contracts/interfaces/IOperationsValidator.sol", + "contracts/interfaces/IPaymentsReceiver.sol": "project/contracts/interfaces/IPaymentsReceiver.sol", + "contracts/interfaces/ISafe.sol": "project/contracts/interfaces/ISafe.sol", + "contracts/interfaces/ISettler.sol": "project/contracts/interfaces/ISettler.sol", + "contracts/interfaces/ISmartAccount.sol": "project/contracts/interfaces/ISmartAccount.sol", + "contracts/interfaces/ISmartAccountContract.sol": "project/contracts/interfaces/ISmartAccountContract.sol", + "contracts/interfaces/ISmartAccountsHandler.sol": "project/contracts/interfaces/ISmartAccountsHandler.sol", + "contracts/payments/PaymentsReceiver.sol": "project/contracts/payments/PaymentsReceiver.sol", + "contracts/proxy/Proxy.sol": "project/contracts/proxy/Proxy.sol", + "contracts/safeguards/BaseOperationsValidator.sol": "project/contracts/safeguards/BaseOperationsValidator.sol", + "contracts/safeguards/CallOperationsValidator.sol": "project/contracts/safeguards/CallOperationsValidator.sol", + "contracts/safeguards/DynamicCallOperationsValidator.sol": "project/contracts/safeguards/DynamicCallOperationsValidator.sol", + "contracts/safeguards/OperationsValidator.sol": "project/contracts/safeguards/OperationsValidator.sol", + "contracts/safeguards/Safeguards.sol": "project/contracts/safeguards/Safeguards.sol", + "contracts/safeguards/SwapOperationsValidator.sol": "project/contracts/safeguards/SwapOperationsValidator.sol", + "contracts/safeguards/TransferOperationsValidator.sol": "project/contracts/safeguards/TransferOperationsValidator.sol", + "contracts/smart-accounts/SmartAccount7702.sol": "project/contracts/smart-accounts/SmartAccount7702.sol", + "contracts/smart-accounts/SmartAccountBase.sol": "project/contracts/smart-accounts/SmartAccountBase.sol", + "contracts/smart-accounts/SmartAccountContract.sol": "project/contracts/smart-accounts/SmartAccountContract.sol", + "contracts/smart-accounts/SmartAccountsHandler.sol": "project/contracts/smart-accounts/SmartAccountsHandler.sol", + "contracts/smart-accounts/SmartAccountsHandlerHelpers.sol": "project/contracts/smart-accounts/SmartAccountsHandlerHelpers.sol", + "contracts/test/CallMock.sol": "project/contracts/test/CallMock.sol", + "contracts/test/SettlerV2Mock.sol": "project/contracts/test/SettlerV2Mock.sol", + "contracts/test/TokenMock.sol": "project/contracts/test/TokenMock.sol", + "contracts/test/dynamic-calls/StaticCallMock.sol": "project/contracts/test/dynamic-calls/StaticCallMock.sol", + "contracts/test/executors/EmptyExecutorMock.sol": "project/contracts/test/executors/EmptyExecutorMock.sol", + "contracts/test/executors/MintExecutorMock.sol": "project/contracts/test/executors/MintExecutorMock.sol", + "contracts/test/executors/ReentrantExecutorMock.sol": "project/contracts/test/executors/ReentrantExecutorMock.sol", + "contracts/test/executors/TransferExecutorMock.sol": "project/contracts/test/executors/TransferExecutorMock.sol", + "contracts/test/smart-accounts/SafeMock.sol": "project/contracts/test/smart-accounts/SafeMock.sol", + "contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol": "project/contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol", + "contracts/test/utils/BytesHelpersMock.sol": "project/contracts/test/utils/BytesHelpersMock.sol", + "contracts/test/utils/DenominationsMock.sol": "project/contracts/test/utils/DenominationsMock.sol", + "contracts/test/utils/ERC20HelpersMock.sol": "project/contracts/test/utils/ERC20HelpersMock.sol", + "contracts/utils/BytesHelpers.sol": "project/contracts/utils/BytesHelpers.sol", + "contracts/utils/Denominations.sol": "project/contracts/utils/Denominations.sol", + "contracts/utils/ERC20Helpers.sol": "project/contracts/utils/ERC20Helpers.sol", + "contracts/utils/MimicHelper.sol": "project/contracts/utils/MimicHelper.sol", + "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol": "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/ProxyAdmin.sol" + }, + "input": { + "language": "Solidity", + "settings": { + "optimizer": { + "enabled": true, + "runs": 1000 + }, + "evmVersion": "cancun", + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "remappings": [ + "npm/@openzeppelin/contracts-upgradeable@5.3.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "npm/@openzeppelin/contracts-upgradeable@5.3.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/" + ] + }, + "sources": { + "npm/@openzeppelin/contracts-upgradeable@5.3.0/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\n struct OwnableStorage {\n address _owner;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Ownable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\n\n function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\n assembly {\n $.slot := OwnableStorageLocation\n }\n }\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n function __Ownable_init(address initialOwner) internal onlyInitializing {\n __Ownable_init_unchained(initialOwner);\n }\n\n function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n OwnableStorage storage $ = _getOwnableStorage();\n return $._owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n OwnableStorage storage $ = _getOwnableStorage();\n address oldOwner = $._owner;\n $._owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Storage of the initializable contract.\n *\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\n * when using with upgradeable contracts.\n *\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\n */\n struct InitializableStorage {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n uint64 _initialized;\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool _initializing;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Initializable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\n\n /**\n * @dev The contract is already initialized.\n */\n error InvalidInitialization();\n\n /**\n * @dev The contract is not initializing.\n */\n error NotInitializing();\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint64 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\n * production.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n // Cache values to avoid duplicated sloads\n bool isTopLevelCall = !$._initializing;\n uint64 initialized = $._initialized;\n\n // Allowed calls:\n // - initialSetup: the contract is not in the initializing state and no previous version was\n // initialized\n // - construction: the contract is initialized at version 1 (no reinitialization) and the\n // current contract is just being deployed\n bool initialSetup = initialized == 0 && isTopLevelCall;\n bool construction = initialized == 1 && address(this).code.length == 0;\n\n if (!initialSetup && !construction) {\n revert InvalidInitialization();\n }\n $._initialized = 1;\n if (isTopLevelCall) {\n $._initializing = true;\n }\n _;\n if (isTopLevelCall) {\n $._initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint64 version) {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing || $._initialized >= version) {\n revert InvalidInitialization();\n }\n $._initialized = version;\n $._initializing = true;\n _;\n $._initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n _checkInitializing();\n _;\n }\n\n /**\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\n */\n function _checkInitializing() internal view virtual {\n if (!_isInitializing()) {\n revert NotInitializing();\n }\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing) {\n revert InvalidInitialization();\n }\n if ($._initialized != type(uint64).max) {\n $._initialized = type(uint64).max;\n emit Initialized(type(uint64).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint64) {\n return _getInitializableStorage()._initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _getInitializableStorage()._initializing;\n }\n\n /**\n * @dev Pointer to storage slot. Allows integrators to override it with a custom storage location.\n *\n * NOTE: Consider following the ERC-7201 formula to derive storage locations.\n */\n function _initializableStorageSlot() internal pure virtual returns (bytes32) {\n return INITIALIZABLE_STORAGE;\n }\n\n /**\n * @dev Returns a pointer to the storage namespace.\n */\n // solhint-disable-next-line var-name-mixedcase\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\n bytes32 slot = _initializableStorageSlot();\n assembly {\n $.slot := slot\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/cryptography/EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.20;\n\nimport {MessageHashUtils} from \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\nimport {IERC5267} from \"@openzeppelin/contracts/interfaces/IERC5267.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose\n * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract\n * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to\n * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\n * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\n */\nabstract contract EIP712Upgradeable is Initializable, IERC5267 {\n bytes32 private constant TYPE_HASH =\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /// @custom:storage-location erc7201:openzeppelin.storage.EIP712\n struct EIP712Storage {\n /// @custom:oz-renamed-from _HASHED_NAME\n bytes32 _hashedName;\n /// @custom:oz-renamed-from _HASHED_VERSION\n bytes32 _hashedVersion;\n\n string _name;\n string _version;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.EIP712\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant EIP712StorageLocation = 0xa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100;\n\n function _getEIP712Storage() private pure returns (EIP712Storage storage $) {\n assembly {\n $.slot := EIP712StorageLocation\n }\n }\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n __EIP712_init_unchained(name, version);\n }\n\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n EIP712Storage storage $ = _getEIP712Storage();\n $._name = name;\n $._version = version;\n\n // Reset prior values in storage if upgrading\n $._hashedName = 0;\n $._hashedVersion = 0;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n return _buildDomainSeparator();\n }\n\n function _buildDomainSeparator() private view returns (bytes32) {\n return keccak256(abi.encode(TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n\n /**\n * @inheritdoc IERC5267\n */\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n EIP712Storage storage $ = _getEIP712Storage();\n // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized\n // and the EIP712 domain is not reliable, as it will be missing name and version.\n require($._hashedName == 0 && $._hashedVersion == 0, \"EIP712: Uninitialized\");\n\n return (\n hex\"0f\", // 01111\n _EIP712Name(),\n _EIP712Version(),\n block.chainid,\n address(this),\n bytes32(0),\n new uint256[](0)\n );\n }\n\n /**\n * @dev The name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712Name() internal view virtual returns (string memory) {\n EIP712Storage storage $ = _getEIP712Storage();\n return $._name;\n }\n\n /**\n * @dev The version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712Version() internal view virtual returns (string memory) {\n EIP712Storage storage $ = _getEIP712Storage();\n return $._version;\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead.\n */\n function _EIP712NameHash() internal view returns (bytes32) {\n EIP712Storage storage $ = _getEIP712Storage();\n string memory name = _EIP712Name();\n if (bytes(name).length > 0) {\n return keccak256(bytes(name));\n } else {\n // If the name is empty, the contract may have been upgraded without initializing the new storage.\n // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design.\n bytes32 hashedName = $._hashedName;\n if (hashedName != 0) {\n return hashedName;\n } else {\n return keccak256(\"\");\n }\n }\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead.\n */\n function _EIP712VersionHash() internal view returns (bytes32) {\n EIP712Storage storage $ = _getEIP712Storage();\n string memory version = _EIP712Version();\n if (bytes(version).length > 0) {\n return keccak256(bytes(version));\n } else {\n // If the version is empty, the contract may have been upgraded without initializing the new storage.\n // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design.\n bytes32 hashedVersion = $._hashedVersion;\n if (hashedVersion != 0) {\n return hashedVersion;\n } else {\n return keccak256(\"\");\n }\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/ReentrancyGuardUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\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 EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\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 ReentrancyGuardUpgradeable is Initializable {\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 /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard\n struct ReentrancyGuardStorage {\n uint256 _status;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.ReentrancyGuard\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;\n\n function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) {\n assembly {\n $.slot := ReentrancyGuardStorageLocation\n }\n }\n\n /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\n\n function __ReentrancyGuard_init() internal onlyInitializing {\n __ReentrancyGuard_init_unchained();\n }\n\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\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 ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n // On the first call to nonReentrant, _status will be NOT_ENTERED\n if ($._status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n $._status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\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 ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n return $._status == ENTERED;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC-20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC-721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC-1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n */\ninterface IERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with `hash`\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1363.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n /*\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n * 0xb0202a11 ===\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n */\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @param data Additional data with no specified format, sent in call to `spender`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1967.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1967.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n */\ninterface IERC1967 {\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Emitted when the beacon is changed.\n */\n event BeaconUpgraded(address indexed beacon);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC5267.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)\n\npragma solidity ^0.8.20;\n\ninterface IERC5267 {\n /**\n * @dev MAY be emitted to signal that the domain could have changed.\n */\n event EIP712DomainChanged();\n\n /**\n * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\n * signature.\n */\n function eip712Domain()\n external\n view\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n );\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {UpgradeableBeacon} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.22;\n\nimport {Proxy} from \"../Proxy.sol\";\nimport {ERC1967Utils} from \"./ERC1967Utils.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `implementation`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `implementation`. This will typically be an\n * encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\n *\n * Requirements:\n *\n * - If `data` is empty, `msg.value` must be zero.\n */\n constructor(address implementation, bytes memory _data) payable {\n ERC1967Utils.upgradeToAndCall(implementation, _data);\n }\n\n /**\n * @dev Returns the current implementation address.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using\n * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function _implementation() internal view virtual override returns (address) {\n return ERC1967Utils.getImplementation();\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/ERC1967/ERC1967Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Utils.sol)\n\npragma solidity ^0.8.22;\n\nimport {IBeacon} from \"../beacon/IBeacon.sol\";\nimport {IERC1967} from \"../../interfaces/IERC1967.sol\";\nimport {Address} from \"../../utils/Address.sol\";\nimport {StorageSlot} from \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This library provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] slots.\n */\nlibrary ERC1967Utils {\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev The `implementation` of the proxy is invalid.\n */\n error ERC1967InvalidImplementation(address implementation);\n\n /**\n * @dev The `admin` of the proxy is invalid.\n */\n error ERC1967InvalidAdmin(address admin);\n\n /**\n * @dev The `beacon` of the proxy is invalid.\n */\n error ERC1967InvalidBeacon(address beacon);\n\n /**\n * @dev An upgrade function sees `msg.value > 0` that may be lost.\n */\n error ERC1967NonPayable();\n\n /**\n * @dev Returns the current implementation address.\n */\n function getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the ERC-1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n if (newImplementation.code.length == 0) {\n revert ERC1967InvalidImplementation(newImplementation);\n }\n StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Performs implementation upgrade with additional setup call if data is nonempty.\n * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n * to avoid stuck value in the contract.\n *\n * Emits an {IERC1967-Upgraded} event.\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) internal {\n _setImplementation(newImplementation);\n emit IERC1967.Upgraded(newImplementation);\n\n if (data.length > 0) {\n Address.functionDelegateCall(newImplementation, data);\n } else {\n _checkNonPayable();\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Returns the current admin.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using\n * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the ERC-1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n if (newAdmin == address(0)) {\n revert ERC1967InvalidAdmin(address(0));\n }\n StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {IERC1967-AdminChanged} event.\n */\n function changeAdmin(address newAdmin) internal {\n emit IERC1967.AdminChanged(getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is the keccak-256 hash of \"eip1967.proxy.beacon\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Returns the current beacon.\n */\n function getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the ERC-1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n if (newBeacon.code.length == 0) {\n revert ERC1967InvalidBeacon(newBeacon);\n }\n\n StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;\n\n address beaconImplementation = IBeacon(newBeacon).implementation();\n if (beaconImplementation.code.length == 0) {\n revert ERC1967InvalidImplementation(beaconImplementation);\n }\n }\n\n /**\n * @dev Change the beacon and trigger a setup call if data is nonempty.\n * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n * to avoid stuck value in the contract.\n *\n * Emits an {IERC1967-BeaconUpgraded} event.\n *\n * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since\n * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for\n * efficiency.\n */\n function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {\n _setBeacon(newBeacon);\n emit IERC1967.BeaconUpgraded(newBeacon);\n\n if (data.length > 0) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n } else {\n _checkNonPayable();\n }\n }\n\n /**\n * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract\n * if an upgrade doesn't perform an initialization call.\n */\n function _checkNonPayable() private {\n if (msg.value > 0) {\n revert ERC1967NonPayable();\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback\n * function and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/ProxyAdmin.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/transparent/ProxyAdmin.sol)\n\npragma solidity ^0.8.22;\n\nimport {ITransparentUpgradeableProxy} from \"./TransparentUpgradeableProxy.sol\";\nimport {Ownable} from \"../../access/Ownable.sol\";\n\n/**\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\n */\ncontract ProxyAdmin is Ownable {\n /**\n * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgrade(address,address)`\n * and `upgradeAndCall(address,address,bytes)` are present, and `upgrade` must be used if no function should be called,\n * while `upgradeAndCall` will invoke the `receive` function if the third argument is the empty byte string.\n * If the getter returns `\"5.0.0\"`, only `upgradeAndCall(address,address,bytes)` is present, and the third argument must\n * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function\n * during an upgrade.\n */\n string public constant UPGRADE_INTERFACE_VERSION = \"5.0.0\";\n\n /**\n * @dev Sets the initial owner who can perform upgrades.\n */\n constructor(address initialOwner) Ownable(initialOwner) {}\n\n /**\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation.\n * See {TransparentUpgradeableProxy-_dispatchUpgradeToAndCall}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n * - If `data` is empty, `msg.value` must be zero.\n */\n function upgradeAndCall(\n ITransparentUpgradeableProxy proxy,\n address implementation,\n bytes memory data\n ) public payable virtual onlyOwner {\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/TransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.22;\n\nimport {ERC1967Utils} from \"../ERC1967/ERC1967Utils.sol\";\nimport {ERC1967Proxy} from \"../ERC1967/ERC1967Proxy.sol\";\nimport {IERC1967} from \"../../interfaces/IERC1967.sol\";\nimport {ProxyAdmin} from \"./ProxyAdmin.sol\";\n\n/**\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\n * does not implement this interface directly, and its upgradeability mechanism is implemented by an internal dispatch\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\n * include them in the ABI so this interface must be used to interact with it.\n */\ninterface ITransparentUpgradeableProxy is IERC1967 {\n /// @dev See {UUPSUpgradeable-upgradeToAndCall}\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable;\n}\n\n/**\n * @dev This contract implements a proxy that is upgradeable through an associated {ProxyAdmin} instance.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches the {ITransparentUpgradeableProxy-upgradeToAndCall} function exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can call the `upgradeToAndCall` function but any other call won't be forwarded to\n * the implementation. If the admin tries to call a function on the implementation it will fail with an error indicating\n * the proxy admin cannot fallback to the target implementation.\n *\n * These properties mean that the admin account can only be used for upgrading the proxy, so it's best if it's a\n * dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to\n * call a function from the proxy implementation. For this reason, the proxy deploys an instance of {ProxyAdmin} and\n * allows upgrades only if they come through it. You should think of the `ProxyAdmin` instance as the administrative\n * interface of the proxy, including the ability to change who can trigger upgrades by transferring ownership.\n *\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\n * inherit from that interface, and instead `upgradeToAndCall` is implicitly implemented using a custom dispatch\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\n * implementation.\n *\n * NOTE: This proxy does not inherit from {Context} deliberately. The {ProxyAdmin} of this contract won't send a\n * meta-transaction in any way, and any other meta-transaction setup should be made in the implementation contract.\n *\n * IMPORTANT: This contract avoids unnecessary storage reads by setting the admin only during construction as an\n * immutable variable, preventing any changes thereafter. However, the admin slot defined in ERC-1967 can still be\n * overwritten by the implementation logic pointed to by this proxy. In such cases, the contract may end up in an\n * undesirable state where the admin slot is different from the actual admin. Relying on the value of the admin slot\n * is generally fine if the implementation is trusted.\n *\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the\n * compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new\n * function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This\n * could render the `upgradeToAndCall` function inaccessible, preventing upgradeability and compromising transparency.\n */\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\n // An immutable address for the admin to avoid unnecessary SLOADs before each call\n // at the expense of removing the ability to change the admin once it's set.\n // This is acceptable if the admin is always a ProxyAdmin instance or similar contract\n // with its own ability to transfer the permissions to another account.\n address private immutable _admin;\n\n /**\n * @dev The proxy caller is the current admin, and can't fallback to the proxy target.\n */\n error ProxyDeniedAdminAccess();\n\n /**\n * @dev Initializes an upgradeable proxy managed by an instance of a {ProxyAdmin} with an `initialOwner`,\n * backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in\n * {ERC1967Proxy-constructor}.\n */\n constructor(address _logic, address initialOwner, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\n _admin = address(new ProxyAdmin(initialOwner));\n // Set the storage value and emit an event for ERC-1967 compatibility\n ERC1967Utils.changeAdmin(_proxyAdmin());\n }\n\n /**\n * @dev Returns the admin of this proxy.\n */\n function _proxyAdmin() internal view virtual returns (address) {\n return _admin;\n }\n\n /**\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior.\n */\n function _fallback() internal virtual override {\n if (msg.sender == _proxyAdmin()) {\n if (msg.sig != ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\n revert ProxyDeniedAdminAccess();\n } else {\n _dispatchUpgradeToAndCall();\n }\n } else {\n super._fallback();\n }\n }\n\n /**\n * @dev Upgrade the implementation of the proxy. See {ERC1967Utils-upgradeToAndCall}.\n *\n * Requirements:\n *\n * - If `data` is empty, `msg.value` must be zero.\n */\n function _dispatchUpgradeToAndCall() private {\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\n ERC1967Utils.upgradeToAndCall(newImplementation, data);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC-20\n * applications.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * Both values are immutable: they can only be set once during construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Skips emitting an {Approval} event indicating an allowance update. This is not\n * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n *\n * ```solidity\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner`'s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance < type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC-20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\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 value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens as the allowance of `spender` over the\n * 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 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` 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 value) external returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 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 /**\n * @dev An operation with an ERC-20 token failed.\n */\n error SafeERC20FailedOperation(address token);\n\n /**\n * @dev Indicates a failed `decreaseAllowance` request.\n */\n error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\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.encodeCall(token.transfer, (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.encodeCall(token.transferFrom, (from, to, value)));\n }\n\n /**\n * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\n }\n\n /**\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\n return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, 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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n forceApprove(token, spender, oldAllowance + value);\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n * value, non-reverting calls are assumed to be successful.\n *\n * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n unchecked {\n uint256 currentAllowance = token.allowance(address(this), spender);\n if (currentAllowance < requestedDecrease) {\n revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n }\n forceApprove(token, spender, currentAllowance - requestedDecrease);\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n * set here.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n safeTransfer(token, to, value);\n } else if (!token.transferAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferFromAndCallRelaxed(\n IERC1363 token,\n address from,\n address to,\n uint256 value,\n bytes memory data\n ) internal {\n if (to.code.length == 0) {\n safeTransferFrom(token, from, to, value);\n } else if (!token.transferFromAndCall(from, to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n * once without retrying, and relies on the returned value to be true.\n *\n * Reverts if the returned value is other than `true`.\n */\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n forceApprove(token, to, value);\n } else if (!token.approveAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n uint256 returnSize;\n uint256 returnValue;\n assembly (\"memory-safe\") {\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n // bubble errors\n if iszero(success) {\n let ptr := mload(0x40)\n returndatacopy(ptr, 0, returndatasize())\n revert(ptr, returndatasize())\n }\n returnSize := returndatasize()\n returnValue := mload(0)\n }\n\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\n revert SafeERC20FailedOperation(address(token));\n }\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 silently catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n bool success;\n uint256 returnSize;\n uint256 returnValue;\n assembly (\"memory-safe\") {\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n returnSize := returndatasize()\n returnValue := mload(0)\n }\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (utils/Address.sol)\n\npragma solidity ^0.8.20;\n\nimport {Errors} from \"./Errors.sol\";\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev There's no code at `target` (it is not a contract).\n */\n error AddressEmptyCode(address target);\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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n if (address(this).balance < amount) {\n revert Errors.InsufficientBalance(address(this).balance, amount);\n }\n\n (bool success, bytes memory returndata) = recipient.call{value: amount}(\"\");\n if (!success) {\n _revert(returndata);\n }\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 or custom error, it is bubbled\n * up by this function (like regular Solidity function calls). However, if\n * the call reverted with no returned reason, this function reverts with a\n * {Errors.FailedCall} error.\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 function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0);\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 function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n if (address(this).balance < value) {\n revert Errors.InsufficientBalance(address(this).balance, value);\n }\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\n * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case\n * of an unsuccessful call.\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata\n ) internal view returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n // only check if target is a contract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n if (returndata.length == 0 && target.code.length == 0) {\n revert AddressEmptyCode(target);\n }\n return returndata;\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\n * revert reason or with a default {Errors.FailedCall} error.\n */\n function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n return returndata;\n }\n }\n\n /**\n * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.\n */\n function _revert(bytes memory returndata) 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 assembly (\"memory-safe\") {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert Errors.FailedCall();\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS\n }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n */\n function tryRecover(\n bytes32 hash,\n bytes memory signature\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly (\"memory-safe\") {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32.\n */\n function toDataWithIntendedValidatorHash(\n address validator,\n bytes32 messageHash\n ) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, hex\"19_00\")\n mstore(0x02, shl(96, validator))\n mstore(0x16, messageHash)\n digest := keccak256(0x00, 0x36)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Errors.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Collection of common custom errors used in multiple contracts\n *\n * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.\n * It is recommended to avoid relying on the error API for critical functionality.\n *\n * _Available since v5.1._\n */\nlibrary Errors {\n /**\n * @dev The ETH balance of the account is not enough to perform the operation.\n */\n error InsufficientBalance(uint256 balance, uint256 needed);\n\n /**\n * @dev A call to an address target failed. The target may have reverted.\n */\n error FailedCall();\n\n /**\n * @dev The deployment failed.\n */\n error FailedDeployment();\n\n /**\n * @dev A necessary precompile is missing.\n */\n error MissingPrecompile(address);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Return the 512-bit addition of two uint256.\n *\n * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.\n */\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n assembly (\"memory-safe\") {\n low := add(a, b)\n high := lt(low, a)\n }\n }\n\n /**\n * @dev Return the 512-bit multiplication of two uint256.\n *\n * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.\n */\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = high * 2²⁵⁶ + low.\n assembly (\"memory-safe\") {\n let mm := mulmod(a, b, not(0))\n low := mul(a, b)\n high := sub(sub(mm, low), lt(mm, low))\n }\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a + b;\n success = c >= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a - b;\n success = c <= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a * b;\n assembly (\"memory-safe\") {\n // Only true when the multiplication doesn't overflow\n // (c / a == b) || (a == 0)\n success := or(eq(div(c, a), b), iszero(a))\n }\n // equivalent to: success ? c : 0\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `DIV` opcode returns zero when the denominator is 0.\n result := div(a, b)\n }\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `MOD` opcode returns zero when the denominator is 0.\n result := mod(a, b)\n }\n }\n }\n\n /**\n * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryAdd(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\n */\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\n (, uint256 result) = trySub(a, b);\n return result;\n }\n\n /**\n * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryMul(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\n }\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a > b, a, b);\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a < b, a, b);\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n\n // The following calculation ensures accurate ceiling division without overflow.\n // Since a is non-zero, (a - 1) / b will not overflow.\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n // but the largest value we can obtain is type(uint256).max - 1, which happens\n // when a = type(uint256).max and b = 1.\n unchecked {\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n }\n }\n\n /**\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n * denominator == 0.\n *\n * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n\n // Handle non-overflow cases, 256 by 256 division.\n if (high == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return low / denominator;\n }\n\n // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n if (denominator <= high) {\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n }\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [high low].\n uint256 remainder;\n assembly (\"memory-safe\") {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n high := sub(high, gt(remainder, low))\n low := sub(low, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\n assembly (\"memory-safe\") {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [high low] by twos.\n low := div(low, twos)\n\n // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from high into low.\n low |= high * twos;\n\n // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n // works in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n inverse *= 2 - denominator * inverse; // inverse mod 2³²\n inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high\n // is no longer required.\n result = low * inverse;\n return result;\n }\n }\n\n /**\n * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n }\n\n /**\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\n */\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n if (high >= 1 << n) {\n Panic.panic(Panic.UNDER_OVERFLOW);\n }\n return (high << (256 - n)) | (low >> n);\n }\n }\n\n /**\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\n */\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\n }\n\n /**\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n *\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n *\n * If the input value is not inversible, 0 is returned.\n *\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n */\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n unchecked {\n if (n == 0) return 0;\n\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n // ax + ny = 1\n // ax = 1 + (-y)n\n // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n // If the remainder is 0 the gcd is n right away.\n uint256 remainder = a % n;\n uint256 gcd = n;\n\n // Therefore the initial coefficients are:\n // ax + ny = gcd(a, n) = n\n // 0a + 1n = n\n int256 x = 0;\n int256 y = 1;\n\n while (remainder != 0) {\n uint256 quotient = gcd / remainder;\n\n (gcd, remainder) = (\n // The old remainder is the next gcd to try.\n remainder,\n // Compute the next remainder.\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n // where gcd is at most n (capped to type(uint256).max)\n gcd - remainder * quotient\n );\n\n (x, y) = (\n // Increment the coefficient of a.\n y,\n // Decrement the coefficient of n.\n // Can overflow, but the result is casted to uint256 so that the\n // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n x - y * int256(quotient)\n );\n }\n\n if (gcd != 1) return 0; // No inverse exists.\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n }\n }\n\n /**\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n *\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n *\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n */\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n unchecked {\n return Math.modExp(a, p - 2, p);\n }\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n *\n * Requirements:\n * - modulus can't be zero\n * - underlying staticcall to precompile must succeed\n *\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n * interpreted as 0.\n */\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n (bool success, uint256 result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n * to operate modulo 0 or if the underlying precompile reverted.\n *\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n * of a revert, but the result may be incorrectly interpreted as 0.\n */\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n if (m == 0) return (false, 0);\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n // | Offset | Content | Content (Hex) |\n // |-----------|------------|--------------------------------------------------------------------|\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n mstore(ptr, 0x20)\n mstore(add(ptr, 0x20), 0x20)\n mstore(add(ptr, 0x40), 0x20)\n mstore(add(ptr, 0x60), b)\n mstore(add(ptr, 0x80), e)\n mstore(add(ptr, 0xa0), m)\n\n // Given the result < m, it's guaranteed to fit in 32 bytes,\n // so we can use the memory scratch space located at offset 0.\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n result := mload(0x00)\n }\n }\n\n /**\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\n */\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n (bool success, bytes memory result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n */\n function tryModExp(\n bytes memory b,\n bytes memory e,\n bytes memory m\n ) internal view returns (bool success, bytes memory result) {\n if (_zeroBytes(m)) return (false, new bytes(0));\n\n uint256 mLen = m.length;\n\n // Encode call args in result and move the free memory pointer\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n assembly (\"memory-safe\") {\n let dataPtr := add(result, 0x20)\n // Write result on top of args to avoid allocating extra memory.\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n // Overwrite the length.\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n mstore(result, mLen)\n // Set the memory pointer after the returned data.\n mstore(0x40, add(dataPtr, mLen))\n }\n }\n\n /**\n * @dev Returns whether the provided byte array is zero.\n */\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\n for (uint256 i = 0; i < byteArray.length; ++i) {\n if (byteArray[i] != 0) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n * towards zero.\n *\n * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n * using integer operations.\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n unchecked {\n // Take care of easy edge cases when a == 0 or a == 1\n if (a <= 1) {\n return a;\n }\n\n // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n // the current value as `ε_n = | x_n - sqrt(a) |`.\n //\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n // bigger than any uint256.\n //\n // By noticing that\n // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n // to the msb function.\n uint256 aa = a;\n uint256 xn = 1;\n\n if (aa >= (1 << 128)) {\n aa >>= 128;\n xn <<= 64;\n }\n if (aa >= (1 << 64)) {\n aa >>= 64;\n xn <<= 32;\n }\n if (aa >= (1 << 32)) {\n aa >>= 32;\n xn <<= 16;\n }\n if (aa >= (1 << 16)) {\n aa >>= 16;\n xn <<= 8;\n }\n if (aa >= (1 << 8)) {\n aa >>= 8;\n xn <<= 4;\n }\n if (aa >= (1 << 4)) {\n aa >>= 4;\n xn <<= 2;\n }\n if (aa >= (1 << 2)) {\n xn <<= 1;\n }\n\n // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n //\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n // This is going to be our x_0 (and ε_0)\n xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n // From here, Newton's method give us:\n // x_{n+1} = (x_n + a / x_n) / 2\n //\n // One should note that:\n // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n // = ((x_n² + a) / (2 * x_n))² - a\n // = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n // = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n // = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n // = (x_n² - a)² / (2 * x_n)²\n // = ((x_n² - a) / (2 * x_n))²\n // ≥ 0\n // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n //\n // This gives us the proof of quadratic convergence of the sequence:\n // ε_{n+1} = | x_{n+1} - sqrt(a) |\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\n // = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n // = | (x_n - sqrt(a))² / (2 * x_n) |\n // = | ε_n² / (2 * x_n) |\n // = ε_n² / | (2 * x_n) |\n //\n // For the first iteration, we have a special case where x_0 is known:\n // ε_1 = ε_0² / | (2 * x_0) |\n // ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n // ≤ 2**(2*e-4) / (3 * 2**(e-1))\n // ≤ 2**(e-3) / 3\n // ≤ 2**(e-3-log2(3))\n // ≤ 2**(e-4.5)\n //\n // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n // ε_{n+1} = ε_n² / | (2 * x_n) |\n // ≤ (2**(e-k))² / (2 * 2**(e-1))\n // ≤ 2**(2*e-2*k) / 2**e\n // ≤ 2**(e-2*k)\n xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5) -- special case, see above\n xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9) -- general case with k = 4.5\n xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18) -- general case with k = 9\n xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36) -- general case with k = 18\n xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72) -- general case with k = 36\n xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144) -- general case with k = 72\n\n // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n // sqrt(a) or sqrt(a) + 1.\n return xn - SafeCast.toUint(xn > a / xn);\n }\n }\n\n /**\n * @dev Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log2(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // If upper 8 bits of 16-bit half set, add 8 to result\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\n // If upper 4 bits of 8-bit half set, add 4 to result\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\n\n // Shifts value right by the current result and use it as an index into this lookup table:\n //\n // | x (4 bits) | index | table[index] = MSB position |\n // |------------|---------|-----------------------------|\n // | 0000 | 0 | table[0] = 0 |\n // | 0001 | 1 | table[1] = 0 |\n // | 0010 | 2 | table[2] = 1 |\n // | 0011 | 3 | table[3] = 1 |\n // | 0100 | 4 | table[4] = 2 |\n // | 0101 | 5 | table[5] = 2 |\n // | 0110 | 6 | table[6] = 2 |\n // | 0111 | 7 | table[7] = 2 |\n // | 1000 | 8 | table[8] = 3 |\n // | 1001 | 9 | table[9] = 3 |\n // | 1010 | 10 | table[10] = 3 |\n // | 1011 | 11 | table[11] = 3 |\n // | 1100 | 12 | table[12] = 3 |\n // | 1101 | 13 | table[13] = 3 |\n // | 1110 | 14 | table[14] = 3 |\n // | 1111 | 15 | table[15] = 3 |\n //\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\n assembly (\"memory-safe\") {\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\n }\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/SafeCast.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool 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 */\nlibrary SafeCast {\n /**\n * @dev Value doesn't fit in an uint of `bits` size.\n */\n error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n /**\n * @dev An int value doesn't fit in an uint of `bits` size.\n */\n error SafeCastOverflowedIntToUint(int256 value);\n\n /**\n * @dev Value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n /**\n * @dev An uint value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedUintToInt(uint256 value);\n\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 function toUint248(uint256 value) internal pure returns (uint248) {\n if (value > type(uint248).max) {\n revert SafeCastOverflowedUintDowncast(248, value);\n }\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 function toUint240(uint256 value) internal pure returns (uint240) {\n if (value > type(uint240).max) {\n revert SafeCastOverflowedUintDowncast(240, value);\n }\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 function toUint232(uint256 value) internal pure returns (uint232) {\n if (value > type(uint232).max) {\n revert SafeCastOverflowedUintDowncast(232, value);\n }\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 function toUint224(uint256 value) internal pure returns (uint224) {\n if (value > type(uint224).max) {\n revert SafeCastOverflowedUintDowncast(224, value);\n }\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 function toUint216(uint256 value) internal pure returns (uint216) {\n if (value > type(uint216).max) {\n revert SafeCastOverflowedUintDowncast(216, value);\n }\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 function toUint208(uint256 value) internal pure returns (uint208) {\n if (value > type(uint208).max) {\n revert SafeCastOverflowedUintDowncast(208, value);\n }\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 function toUint200(uint256 value) internal pure returns (uint200) {\n if (value > type(uint200).max) {\n revert SafeCastOverflowedUintDowncast(200, value);\n }\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 function toUint192(uint256 value) internal pure returns (uint192) {\n if (value > type(uint192).max) {\n revert SafeCastOverflowedUintDowncast(192, value);\n }\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 function toUint184(uint256 value) internal pure returns (uint184) {\n if (value > type(uint184).max) {\n revert SafeCastOverflowedUintDowncast(184, value);\n }\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 function toUint176(uint256 value) internal pure returns (uint176) {\n if (value > type(uint176).max) {\n revert SafeCastOverflowedUintDowncast(176, value);\n }\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 function toUint168(uint256 value) internal pure returns (uint168) {\n if (value > type(uint168).max) {\n revert SafeCastOverflowedUintDowncast(168, value);\n }\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 function toUint160(uint256 value) internal pure returns (uint160) {\n if (value > type(uint160).max) {\n revert SafeCastOverflowedUintDowncast(160, value);\n }\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 function toUint152(uint256 value) internal pure returns (uint152) {\n if (value > type(uint152).max) {\n revert SafeCastOverflowedUintDowncast(152, value);\n }\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 function toUint144(uint256 value) internal pure returns (uint144) {\n if (value > type(uint144).max) {\n revert SafeCastOverflowedUintDowncast(144, value);\n }\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 function toUint136(uint256 value) internal pure returns (uint136) {\n if (value > type(uint136).max) {\n revert SafeCastOverflowedUintDowncast(136, value);\n }\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 function toUint128(uint256 value) internal pure returns (uint128) {\n if (value > type(uint128).max) {\n revert SafeCastOverflowedUintDowncast(128, value);\n }\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 function toUint120(uint256 value) internal pure returns (uint120) {\n if (value > type(uint120).max) {\n revert SafeCastOverflowedUintDowncast(120, value);\n }\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 function toUint112(uint256 value) internal pure returns (uint112) {\n if (value > type(uint112).max) {\n revert SafeCastOverflowedUintDowncast(112, value);\n }\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 function toUint104(uint256 value) internal pure returns (uint104) {\n if (value > type(uint104).max) {\n revert SafeCastOverflowedUintDowncast(104, value);\n }\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 function toUint96(uint256 value) internal pure returns (uint96) {\n if (value > type(uint96).max) {\n revert SafeCastOverflowedUintDowncast(96, value);\n }\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 function toUint88(uint256 value) internal pure returns (uint88) {\n if (value > type(uint88).max) {\n revert SafeCastOverflowedUintDowncast(88, value);\n }\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 function toUint80(uint256 value) internal pure returns (uint80) {\n if (value > type(uint80).max) {\n revert SafeCastOverflowedUintDowncast(80, value);\n }\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 function toUint72(uint256 value) internal pure returns (uint72) {\n if (value > type(uint72).max) {\n revert SafeCastOverflowedUintDowncast(72, value);\n }\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 function toUint64(uint256 value) internal pure returns (uint64) {\n if (value > type(uint64).max) {\n revert SafeCastOverflowedUintDowncast(64, value);\n }\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 function toUint56(uint256 value) internal pure returns (uint56) {\n if (value > type(uint56).max) {\n revert SafeCastOverflowedUintDowncast(56, value);\n }\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 function toUint48(uint256 value) internal pure returns (uint48) {\n if (value > type(uint48).max) {\n revert SafeCastOverflowedUintDowncast(48, value);\n }\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 function toUint40(uint256 value) internal pure returns (uint40) {\n if (value > type(uint40).max) {\n revert SafeCastOverflowedUintDowncast(40, value);\n }\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 function toUint32(uint256 value) internal pure returns (uint32) {\n if (value > type(uint32).max) {\n revert SafeCastOverflowedUintDowncast(32, value);\n }\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 function toUint24(uint256 value) internal pure returns (uint24) {\n if (value > type(uint24).max) {\n revert SafeCastOverflowedUintDowncast(24, value);\n }\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 function toUint16(uint256 value) internal pure returns (uint16) {\n if (value > type(uint16).max) {\n revert SafeCastOverflowedUintDowncast(16, value);\n }\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 function toUint8(uint256 value) internal pure returns (uint8) {\n if (value > type(uint8).max) {\n revert SafeCastOverflowedUintDowncast(8, value);\n }\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 function toUint256(int256 value) internal pure returns (uint256) {\n if (value < 0) {\n revert SafeCastOverflowedIntToUint(value);\n }\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 function toInt248(int256 value) internal pure returns (int248 downcasted) {\n downcasted = int248(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(248, value);\n }\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 function toInt240(int256 value) internal pure returns (int240 downcasted) {\n downcasted = int240(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(240, value);\n }\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 function toInt232(int256 value) internal pure returns (int232 downcasted) {\n downcasted = int232(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(232, value);\n }\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 function toInt224(int256 value) internal pure returns (int224 downcasted) {\n downcasted = int224(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(224, value);\n }\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 function toInt216(int256 value) internal pure returns (int216 downcasted) {\n downcasted = int216(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(216, value);\n }\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 function toInt208(int256 value) internal pure returns (int208 downcasted) {\n downcasted = int208(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(208, value);\n }\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 function toInt200(int256 value) internal pure returns (int200 downcasted) {\n downcasted = int200(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(200, value);\n }\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 function toInt192(int256 value) internal pure returns (int192 downcasted) {\n downcasted = int192(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(192, value);\n }\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 function toInt184(int256 value) internal pure returns (int184 downcasted) {\n downcasted = int184(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(184, value);\n }\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 function toInt176(int256 value) internal pure returns (int176 downcasted) {\n downcasted = int176(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(176, value);\n }\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 function toInt168(int256 value) internal pure returns (int168 downcasted) {\n downcasted = int168(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(168, value);\n }\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 function toInt160(int256 value) internal pure returns (int160 downcasted) {\n downcasted = int160(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(160, value);\n }\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 function toInt152(int256 value) internal pure returns (int152 downcasted) {\n downcasted = int152(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(152, value);\n }\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 function toInt144(int256 value) internal pure returns (int144 downcasted) {\n downcasted = int144(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(144, value);\n }\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 function toInt136(int256 value) internal pure returns (int136 downcasted) {\n downcasted = int136(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(136, value);\n }\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 function toInt128(int256 value) internal pure returns (int128 downcasted) {\n downcasted = int128(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(128, value);\n }\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 function toInt120(int256 value) internal pure returns (int120 downcasted) {\n downcasted = int120(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(120, value);\n }\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 function toInt112(int256 value) internal pure returns (int112 downcasted) {\n downcasted = int112(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(112, value);\n }\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 function toInt104(int256 value) internal pure returns (int104 downcasted) {\n downcasted = int104(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(104, value);\n }\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 function toInt96(int256 value) internal pure returns (int96 downcasted) {\n downcasted = int96(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(96, value);\n }\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 function toInt88(int256 value) internal pure returns (int88 downcasted) {\n downcasted = int88(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(88, value);\n }\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 function toInt80(int256 value) internal pure returns (int80 downcasted) {\n downcasted = int80(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(80, value);\n }\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 function toInt72(int256 value) internal pure returns (int72 downcasted) {\n downcasted = int72(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(72, value);\n }\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 function toInt64(int256 value) internal pure returns (int64 downcasted) {\n downcasted = int64(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(64, value);\n }\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 function toInt56(int256 value) internal pure returns (int56 downcasted) {\n downcasted = int56(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(56, value);\n }\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 function toInt48(int256 value) internal pure returns (int48 downcasted) {\n downcasted = int48(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(48, value);\n }\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 function toInt40(int256 value) internal pure returns (int40 downcasted) {\n downcasted = int40(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(40, value);\n }\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 function toInt32(int256 value) internal pure returns (int32 downcasted) {\n downcasted = int32(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(32, value);\n }\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 function toInt24(int256 value) internal pure returns (int24 downcasted) {\n downcasted = int24(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(24, value);\n }\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 function toInt16(int256 value) internal pure returns (int16 downcasted) {\n downcasted = int16(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(16, value);\n }\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 function toInt8(int256 value) internal pure returns (int8 downcasted) {\n downcasted = int8(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(8, value);\n }\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 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 if (value > uint256(type(int256).max)) {\n revert SafeCastOverflowedUintToInt(value);\n }\n return int256(value);\n }\n\n /**\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n */\n function toUint(bool b) internal pure returns (uint256 u) {\n assembly (\"memory-safe\") {\n u := iszero(iszero(b))\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));\n }\n }\n\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return ternary(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 ternary(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 // Formula from the \"Bit Twiddling Hacks\" by Sean Eron Anderson.\n // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift,\n // taking advantage of the most significant (or \"sign\" bit) in two's complement representation.\n // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result,\n // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative).\n int256 mask = n >> 255;\n\n // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.\n return uint256((n + mask) ^ mask);\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Panic.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n * using Panic for uint256;\n *\n * // Use any of the declared internal constants\n * function foo() { Panic.GENERIC.panic(); }\n *\n * // Alternatively\n * function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n /// @dev generic / unspecified error\n uint256 internal constant GENERIC = 0x00;\n /// @dev used by the assert() builtin\n uint256 internal constant ASSERT = 0x01;\n /// @dev arithmetic underflow or overflow\n uint256 internal constant UNDER_OVERFLOW = 0x11;\n /// @dev division or modulo by zero\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\n /// @dev enum conversion error\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n /// @dev invalid encoding in storage\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n /// @dev empty array pop\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n /// @dev array out of bounds access\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n /// @dev resource error (too large allocation or too large array)\n uint256 internal constant RESOURCE_ERROR = 0x41;\n /// @dev calling invalid internal function\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n /// @dev Reverts with a panic code. Recommended to use with\n /// the internal constants with predefined codes.\n function panic(uint256 code) internal pure {\n assembly (\"memory-safe\") {\n mstore(0x00, 0x4e487b71)\n mstore(0x20, code)\n revert(0x1c, 0x24)\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\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" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC-1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n * // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(newImplementation.code.length > 0);\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * TIP: Consider using this library along with {SlotDerivation}.\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n struct Int256Slot {\n int256 value;\n }\n\n struct StringSlot {\n string value;\n }\n\n struct BytesSlot {\n bytes value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Int256Slot` with member `value` located at `slot`.\n */\n function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `StringSlot` with member `value` located at `slot`.\n */\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n */\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n\n /**\n * @dev Returns a `BytesSlot` with member `value` located at `slot`.\n */\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n */\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SafeCast} from \"./math/SafeCast.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n using SafeCast for *;\n\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n uint256 private constant SPECIAL_CHARS_LOOKUP =\n (1 << 0x08) | // backspace\n (1 << 0x09) | // tab\n (1 << 0x0a) | // newline\n (1 << 0x0c) | // form feed\n (1 << 0x0d) | // carriage return\n (1 << 0x22) | // double quote\n (1 << 0x5c); // backslash\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n /**\n * @dev The string being parsed contains characters that are not in scope of the given base.\n */\n error StringsInvalidChar();\n\n /**\n * @dev The string being parsed is not a properly formatted address.\n */\n error StringsInvalidAddressFormat();\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n assembly (\"memory-safe\") {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n assembly (\"memory-safe\") {\n mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n uint256 localValue = value;\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n * representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal\n * representation, according to EIP-55.\n */\n function toChecksumHexString(address addr) internal pure returns (string memory) {\n bytes memory buffer = bytes(toHexString(addr));\n\n // hash the hex part of buffer (skip length + 2 bytes, length 40)\n uint256 hashValue;\n assembly (\"memory-safe\") {\n hashValue := shr(96, keccak256(add(buffer, 0x22), 40))\n }\n\n for (uint256 i = 41; i > 1; --i) {\n // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f)\n if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) {\n // case shift by xoring with 0x20\n buffer[i] ^= 0x20;\n }\n hashValue >>= 4;\n }\n return string(buffer);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input) internal pure returns (uint256) {\n return parseUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n uint256 result = 0;\n for (uint256 i = begin; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 9) return (false, 0);\n result *= 10;\n result += chr;\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `int256`.\n *\n * Requirements:\n * - The string must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input) internal pure returns (int256) {\n return parseInt(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) {\n (bool success, int256 value) = tryParseInt(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if\n * the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(string memory input) internal pure returns (bool success, int256 value) {\n return _tryParseIntUncheckedBounds(input, 0, bytes(input).length);\n }\n\n uint256 private constant ABS_MIN_INT256 = 2 ** 255;\n\n /**\n * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character or if the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, int256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseIntUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseIntUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, int256 value) {\n bytes memory buffer = bytes(input);\n\n // Check presence of a negative sign.\n bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n bool positiveSign = sign == bytes1(\"+\");\n bool negativeSign = sign == bytes1(\"-\");\n uint256 offset = (positiveSign || negativeSign).toUint();\n\n (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end);\n\n if (absSuccess && absValue < ABS_MIN_INT256) {\n return (true, negativeSign ? -int256(absValue) : int256(absValue));\n } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) {\n return (true, type(int256).min);\n } else return (false, 0);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input) internal pure returns (uint256) {\n return parseHexUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseHexUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an\n * invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseHexUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseHexUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n // skip 0x prefix if present\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 offset = hasPrefix.toUint() * 2;\n\n uint256 result = 0;\n for (uint256 i = begin + offset; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 15) return (false, 0);\n result *= 16;\n unchecked {\n // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check).\n // This guarantees that adding a value < 16 will not cause an overflow, hence the unchecked.\n result += chr;\n }\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as an `address`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input) internal pure returns (address) {\n return parseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) {\n (bool success, address value) = tryParseAddress(input, begin, end);\n if (!success) revert StringsInvalidAddressFormat();\n return value;\n }\n\n /**\n * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly\n * formatted address. See {parseAddress-string} requirements.\n */\n function tryParseAddress(string memory input) internal pure returns (bool success, address value) {\n return tryParseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly\n * formatted address. See {parseAddress-string-uint256-uint256} requirements.\n */\n function tryParseAddress(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, address value) {\n if (end > bytes(input).length || begin > end) return (false, address(0));\n\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 expectedLength = 40 + hasPrefix.toUint() * 2;\n\n // check that input is the correct length\n if (end - begin == expectedLength) {\n // length guarantees that this does not overflow, and value is at most type(uint160).max\n (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end);\n return (s, address(uint160(v)));\n } else {\n return (false, address(0));\n }\n }\n\n function _tryParseChr(bytes1 chr) private pure returns (uint8) {\n uint8 value = uint8(chr);\n\n // Try to parse `chr`:\n // - Case 1: [0-9]\n // - Case 2: [a-f]\n // - Case 3: [A-F]\n // - otherwise not supported\n unchecked {\n if (value > 47 && value < 58) value -= 48;\n else if (value > 96 && value < 103) value -= 87;\n else if (value > 64 && value < 71) value -= 55;\n else return type(uint8).max;\n }\n\n return value;\n }\n\n /**\n * @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.\n *\n * WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.\n *\n * NOTE: This function escapes all unicode characters, and not just the ones in ranges defined in section 2.5 of\n * RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). ECMAScript's `JSON.parse` does recover escaped unicode\n * characters that are not in this range, but other tooling may provide different results.\n */\n function escapeJSON(string memory input) internal pure returns (string memory) {\n bytes memory buffer = bytes(input);\n bytes memory output = new bytes(2 * buffer.length); // worst case scenario\n uint256 outputLength = 0;\n\n for (uint256 i; i < buffer.length; ++i) {\n bytes1 char = bytes1(_unsafeReadBytesOffset(buffer, i));\n if (((SPECIAL_CHARS_LOOKUP & (1 << uint8(char))) != 0)) {\n output[outputLength++] = \"\\\\\";\n if (char == 0x08) output[outputLength++] = \"b\";\n else if (char == 0x09) output[outputLength++] = \"t\";\n else if (char == 0x0a) output[outputLength++] = \"n\";\n else if (char == 0x0c) output[outputLength++] = \"f\";\n else if (char == 0x0d) output[outputLength++] = \"r\";\n else if (char == 0x5c) output[outputLength++] = \"\\\\\";\n else if (char == 0x22) {\n // solhint-disable-next-line quotes\n output[outputLength++] = '\"';\n }\n } else {\n output[outputLength++] = char;\n }\n }\n // write the actual length and deallocate unused memory\n assembly (\"memory-safe\") {\n mstore(output, outputLength)\n mstore(0x40, add(output, shl(5, shr(5, add(outputLength, 63)))))\n }\n\n return string(output);\n }\n\n /**\n * @dev Reads a bytes32 from a bytes array without bounds checking.\n *\n * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n * assembly block as such would prevent some optimizations.\n */\n function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n // This is not memory safe in the general case, but all calls to this private function are within bounds.\n assembly (\"memory-safe\") {\n value := mload(add(buffer, add(0x20, offset)))\n }\n }\n}\n" + }, + "project/contracts/Controller.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\n\nimport './interfaces/IController.sol';\n\n/**\n * @title Controller\n * @dev Manages allow lists for solvers, executors, proposal signers and validators\n */\ncontract Controller is IController, Ownable {\n // List of allowed solvers\n mapping (address => bool) public override isSolverAllowed;\n\n // List of allowed executors\n mapping (address => bool) public override isExecutorAllowed;\n\n // List of allowed proposal signers\n mapping (address => bool) public override isProposalSignerAllowed;\n\n // List of allowed validators\n mapping (address => bool) public override isValidatorAllowed;\n\n // Minimum number of validations allowed\n uint8 public override minValidations;\n\n /**\n * @dev Creates a new Controller contract\n * @param owner Address that will own the contract\n * @param solvers List of allowed solvers\n * @param executors List of allowed executors\n * @param proposalSigners List of allowed proposal signers\n * @param validators List of allowed validators\n * @param _minValidations Minimum number of validations allowed\n */\n constructor(\n address owner,\n address[] memory solvers,\n address[] memory executors,\n address[] memory proposalSigners,\n address[] memory validators,\n uint8 _minValidations\n ) Ownable(owner) {\n for (uint256 i = 0; i < solvers.length; i++) _setAllowedSolver(solvers[i], true);\n for (uint256 i = 0; i < executors.length; i++) _setAllowedExecutor(executors[i], true);\n for (uint256 i = 0; i < proposalSigners.length; i++) _setAllowedProposalSigner(proposalSigners[i], true);\n for (uint256 i = 0; i < validators.length; i++) _setAllowedValidator(validators[i], true);\n _setMinValidations(_minValidations);\n }\n\n /**\n * @dev Sets permissions for multiple solvers\n * @param solvers List of solver addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedSolvers(address[] memory solvers, bool[] memory alloweds) external override onlyOwner {\n if (solvers.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < solvers.length; i++) _setAllowedSolver(solvers[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple executors\n * @param executors List of executor addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedExecutors(address[] memory executors, bool[] memory alloweds) external override onlyOwner {\n if (executors.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < executors.length; i++) _setAllowedExecutor(executors[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple proposal signers\n * @param signers List of proposal signer addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedProposalSigners(address[] memory signers, bool[] memory alloweds) external override onlyOwner {\n if (signers.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < signers.length; i++) _setAllowedProposalSigner(signers[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple validators\n * @param validators List of validator addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedValidators(address[] memory validators, bool[] memory alloweds) external override onlyOwner {\n if (validators.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < validators.length; i++) _setAllowedValidator(validators[i], alloweds[i]);\n }\n\n /**\n * @dev Sets the minimum number of validations allowed\n * @param newMinValidations minimum number of validations allowed\n */\n function setMinValidations(uint8 newMinValidations) external override onlyOwner {\n _setMinValidations(newMinValidations);\n }\n\n /**\n * @dev Sets a solver permission\n */\n function _setAllowedSolver(address solver, bool allowed) internal {\n isSolverAllowed[solver] = allowed;\n emit SolverAllowedSet(solver, allowed);\n }\n\n /**\n * @dev Sets an executor permission\n */\n function _setAllowedExecutor(address executor, bool allowed) internal {\n isExecutorAllowed[executor] = allowed;\n emit ExecutorAllowedSet(executor, allowed);\n }\n\n /**\n * @dev Sets a proposal signer permission\n */\n function _setAllowedProposalSigner(address signer, bool allowed) internal {\n isProposalSignerAllowed[signer] = allowed;\n emit ProposalSignerAllowedSet(signer, allowed);\n }\n\n /**\n * @dev Sets a validator permission\n */\n function _setAllowedValidator(address validator, bool allowed) internal {\n isValidatorAllowed[validator] = allowed;\n emit ValidatorAllowedSet(validator, allowed);\n }\n\n /**\n * @dev Sets the minimum number of validations allowed\n */\n function _setMinValidations(uint8 newMinValidations) internal {\n minValidations = newMinValidations;\n emit MinValidationSet(newMinValidations);\n }\n}\n" + }, + "project/contracts/dynamic-calls/DynamicCallEncoder.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport './DynamicCallTypes.sol';\nimport '../interfaces/IDynamicCallEncoder.sol';\nimport '../utils/BytesHelpers.sol';\n\n/**\n * @title DynamicCallEncoder\n * @dev Builds calldata for arbitrary contract calls from structured arguments.\n *\n * This encoder supports:\n * - Literal ABI-encoded arguments\n * - Variable references resolved from previous execution results\n *\n * The encoder follows standard ABI encoding rules, reconstructing\n * the calldata heads and tails dynamically based on argument types.\n */\ncontract DynamicCallEncoder is IDynamicCallEncoder {\n using BytesHelpers for bytes;\n\n /**\n * @dev Internal representation of a fully-encoded argument\n * @param data ABI-encoded argument payload\n * @param isDynamic Whether this argument requires a head offset\n */\n struct EncodedArg {\n bytes data;\n bool isDynamic;\n }\n\n /**\n * @dev Encodes a dynamic call into calldata\n * @param dynamicCall Dynamic call specification\n * @param variables List of resolved variable values\n * @param variablesLength Number of resolved variables\n * @return data Fully ABI-encoded calldata\n */\n function encode(DynamicCall memory dynamicCall, bytes[][] memory variables, uint256 variablesLength)\n external\n pure\n override\n returns (bytes memory data)\n {\n if (variablesLength > variables.length) revert DynamicCallEncoderVariablesLengthOutOfBounds();\n data = _buildCalldata(dynamicCall.selector, dynamicCall.arguments, variables, variablesLength);\n }\n\n /**\n * @dev Builds calldata from a selector and a list of dynamic arguments\n * This function performs standard ABI aggregation:\n * - static arguments are inlined in the head\n * - dynamic arguments place offsets in the head and append data to the tail\n */\n function _buildCalldata(\n bytes4 selector,\n DynamicArg[] memory args,\n bytes[][] memory variables,\n uint256 variablesLength\n ) internal pure returns (bytes memory data) {\n uint256 n = args.length;\n bytes[] memory encodedArgs = new bytes[](n);\n bool[] memory isDynamic = new bool[](n);\n uint256 headLength = 0;\n\n for (uint256 i = 0; i < n; i++) {\n EncodedArg memory enc = _encodeArg(args[i], variables, variablesLength);\n encodedArgs[i] = enc.data;\n isDynamic[i] = enc.isDynamic;\n headLength += enc.isDynamic ? 32 : enc.data.length;\n }\n\n bytes memory heads;\n bytes memory tails;\n uint256 nextDynamicHead = headLength;\n\n for (uint256 i = 0; i < n; i++) {\n if (isDynamic[i]) {\n heads = bytes.concat(heads, bytes32(nextDynamicHead));\n tails = bytes.concat(tails, encodedArgs[i]);\n nextDynamicHead += encodedArgs[i].length;\n } else {\n heads = bytes.concat(heads, encodedArgs[i]);\n }\n }\n\n data = bytes.concat(selector, heads, tails);\n }\n\n /**\n * @dev Encodes a single dynamic argument based on its kind\n */\n function _encodeArg(DynamicArg memory arg, bytes[][] memory variables, uint256 variablesLength)\n internal\n pure\n returns (EncodedArg memory out)\n {\n if (arg.kind == DynamicArgKind.Literal) return _encodeLiteral(arg);\n if (arg.kind == DynamicArgKind.Variable) return _encodeVariable(arg, variables, variablesLength);\n revert DynamicCallEncoderInvalidArgKind();\n }\n\n /**\n * @dev Encodes a literal argument\n */\n function _encodeLiteral(DynamicArg memory arg) internal pure returns (EncodedArg memory) {\n return _encodeAbiValue(arg.data, arg.isDynamic);\n }\n\n /**\n * @dev Encodes a variable argument by resolving it from the variables list\n */\n function _encodeVariable(DynamicArg memory arg, bytes[][] memory variables, uint256 variablesLength)\n internal\n pure\n returns (EncodedArg memory)\n {\n if (arg.data.length != 64) revert DynamicCallEncoderVariableRefBadLength();\n uint256 opIndex = arg.data.readWord0();\n uint256 subIndex = arg.data.readWord1();\n if (opIndex >= variablesLength) revert DynamicCallEncoderVariableOutOfBounds();\n if (subIndex >= variables[opIndex].length) revert DynamicCallEncoderVariableOutOfBounds();\n\n return _encodeAbiValue(variables[opIndex][subIndex], arg.isDynamic);\n }\n\n /**\n * @dev Interprets ABI-like bytes as either a static or dynamic value. Used for variable resolution.\n */\n function _encodeAbiValue(bytes memory data, bool isDynamic) internal pure returns (EncodedArg memory out) {\n if (data.length == 0 || data.length % 32 != 0) revert DynamicCallEncoderBadLength();\n\n if (isDynamic) {\n if (data.length < 64) revert DynamicCallEncoderEmptyDynamic();\n if (data.readWord0() != 0x20) revert DynamicCallEncoderBadLength();\n\n out.data = data.sliceFrom(32);\n out.isDynamic = true;\n } else {\n out.data = data;\n out.isDynamic = false;\n }\n }\n}\n" + }, + "project/contracts/dynamic-calls/DynamicCallTypes.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Kind of dynamic argument to be encoded\n * @param Literal ABI-encoded literal value provided by the resolver\n * @param Variable Reference to a previously resolved variable value\n */\nenum DynamicArgKind {\n Literal,\n Variable\n}\n\n/**\n * @dev Represents a single dynamic argument\n * @param kind Type of argument resolution strategy\n * @param data Encoded argument data, interpreted based on `kind`\n * @param isDynamic Whether the resolved argument is ABI-dynamic\n */\nstruct DynamicArg {\n DynamicArgKind kind;\n bytes data;\n bool isDynamic;\n}\n\n/**\n * @dev Represents a dynamic contract call intent\n * @param target Contract address to be called\n * @param value ETH value to be sent with the call\n * @param selector Function selector to invoke\n * @param arguments List of dynamically resolved arguments\n */\nstruct DynamicCall {\n address target;\n uint256 value;\n bytes4 selector;\n DynamicArg[] arguments;\n}\n" + }, + "project/contracts/Intents.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Enum representing the operation type.\n * - Swap: Swap tokens in the same chain.\n * - Transfer: Transfer tokens to one or more recipients.\n * - Call: Execute arbitrary contract calls.\n * - CrossChainSwap: Swap tokens between chains.\n * - DynamicCall: Execute arbitrary dynamic contract calls.\n */\nenum OpType {\n Swap,\n Transfer,\n Call,\n CrossChainSwap,\n DynamicCall\n}\n\n/**\n * @dev EIP-712 typed data struct representing a validator's approval of an intent.\n * @param intent The hash of the intent being validated.\n */\nstruct Validation {\n bytes32 intent;\n}\n\n/**\n * @dev General intent structure with different operations.\n * @param feePayer The payer of the intent.\n * @param settler The address responsible for executing the intent on-chain.\n * @param nonce A unique value used to prevent replay attacks and distinguish intents.\n * @param deadline The timestamp by which the intent must be executed.\n * @param maxFees List of max fees the feePayer is willing to pay for the intent.\n * @param triggerSig The signature of the trigger that this intent belongs to\n * @param minValidations The minimum number of validator approvals required for this intent to be considered valid.\n * @param validations The list validator signatures attesting to this intent.\n * @param operations List of operations of the intent.\n */\nstruct Intent {\n address feePayer;\n address settler;\n bytes32 nonce;\n uint256 deadline;\n MaxFee[] maxFees;\n bytes triggerSig;\n uint256 minValidations;\n bytes[] validations;\n Operation[] operations;\n}\n\n/**\n * @dev Operation structure used to abstract over different operation types.\n * @param opType The type of operation this operation represents.\n * @param user The user of the operation.\n * @param data ABI-encoded data representing a specific operation type (e.g. SwapOperation, TransferOperation, CallOperation).\n * @param events List of custom operation events to be emitted.\n */\nstruct Operation {\n uint8 opType;\n address user;\n bytes data;\n OperationEvent[] events;\n}\n\n/**\n * @dev Max fee representation\n * @param token Token used to pay for the execution fee.\n * @param amount Max amount of fee token to be paid for settling this intent.\n */\nstruct MaxFee {\n address token;\n uint256 amount;\n}\n\n/**\n * @dev Operation event representation.\n * @param topic Event topic to be emitted.\n * @param data Event data to be emitted.\n */\nstruct OperationEvent {\n bytes32 topic;\n bytes data;\n}\n\n/**\n * @dev Represents a swap operation between two chains.\n * @param sourceChain Chain ID where tokens will be sent from.\n * @param destinationChain Chain ID where tokens will be received.\n * @param tokensIn List of input tokens and amounts to swap.\n * @param tokensOut List of expected output tokens, minimum amounts, and recipients.\n */\nstruct SwapOperation {\n uint256 sourceChain;\n uint256 destinationChain;\n TokenIn[] tokensIn;\n TokenOut[] tokensOut;\n}\n\n/**\n * @dev Token in representation.\n * @param token Address of a token to be sent.\n * @param amount Amount of tokens to be sent.\n */\nstruct TokenIn {\n address token;\n uint256 amount;\n}\n\n/**\n * @dev Token out representation.\n * @param token Address of a token to be received.\n * @param minAmount Minimum amount of tokens to be received.\n * @param recipient Recipient address that will receive the token out.\n */\nstruct TokenOut {\n address token;\n uint256 minAmount;\n address recipient;\n}\n\n/**\n * @dev Represents a transfer operation containing multiple token transfers.\n * @param chainId Chain ID where the transfers should be executed.\n * @param transfers List of token transfers to be performed.\n */\nstruct TransferOperation {\n uint256 chainId;\n TransferData[] transfers;\n}\n\n/**\n * @dev Transfer data for a single token transfer.\n * @param token Address of the token to transfer.\n * @param amount Amount of the token to transfer.\n * @param recipient Recipient of the token transfer.\n */\nstruct TransferData {\n address token;\n uint256 amount;\n address recipient;\n}\n\n/**\n * @dev Represents a generic call operation consisting of one or more contract calls.\n * @param chainId Chain ID where the calls should be executed.\n * @param calls List of low-level contract calls to be executed.\n */\nstruct CallOperation {\n uint256 chainId;\n CallData[] calls;\n}\n\n/**\n * @dev Low-level call data for a target contract interaction.\n * @param target Target contract address.\n * @param data Calldata to be sent to the target.\n * @param value ETH value to send along with the call.\n */\nstruct CallData {\n address target;\n bytes data;\n uint256 value;\n}\n\n/**\n * @dev Represents a generic dynamic call operation consisting of one or more dynamic contract calls.\n * @param chainId Chain ID where the calls should be executed.\n * @param calls List of ABI-encoded low-level dynamic contract calls to be executed.\n */\nstruct DynamicCallOperation {\n uint256 chainId;\n bytes[] calls;\n}\n\n/**\n * @dev Generic proposal structure representing a solver’s response to an intent.\n * @param deadline Timestamp until when the proposal is valid.\n * @param datas List of ABI-encoded proposal-specific data (e.g. SwapProposal).\n * @param fees List of fee amounts the solver requires for execution.\n */\nstruct Proposal {\n uint256 deadline;\n bytes[] datas;\n uint256[] fees;\n}\n\n/**\n * @dev Swap proposal representation for a swap operation.\n * @param executor Address of the executor contract that should be called during operation execution.\n * @param data Arbitrary data used to call the executor contract.\n * @param amountsOut List of amounts of tokens out proposed by the solver.\n */\nstruct SwapProposal {\n address executor;\n bytes data;\n uint256[] amountsOut;\n}\n\nlibrary IntentsHelpers {\n bytes32 internal constant INTENT_TYPE_HASH =\n keccak256(\n 'Intent(address feePayer,address settler,bytes32 nonce,uint256 deadline,MaxFee[] maxFees,bytes triggerSig,uint256 minValidations,Operation[] operations)MaxFee(address token,uint256 amount)Operation(uint8 opType,address user,bytes data,OperationEvent[] events)OperationEvent(bytes32 topic,bytes data)'\n );\n\n bytes32 internal constant PROPOSAL_TYPE_HASH =\n keccak256('Proposal(bytes32 intent,address solver,uint256 deadline,bytes[] datas,uint256[] fees)');\n\n bytes32 internal constant VALIDATION_TYPE_HASH = keccak256('Validation(bytes32 intent)');\n\n bytes32 internal constant MAX_FEE_TYPE_HASH = keccak256('MaxFee(address token,uint256 amount)');\n\n bytes32 internal constant OPERATION_TYPE_HASH =\n keccak256('Operation(uint8 opType,address user,bytes data,OperationEvent[] events)');\n\n bytes32 internal constant OPERATION_EVENT_TYPE_HASH = keccak256('OperationEvent(bytes32 topic,bytes data)');\n\n function hash(Intent memory intent) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n INTENT_TYPE_HASH,\n intent.feePayer,\n intent.settler,\n intent.nonce,\n intent.deadline,\n hash(intent.maxFees),\n intent.triggerSig,\n intent.minValidations,\n hash(intent.operations)\n )\n );\n }\n\n function hash(Proposal memory proposal, Intent memory intent, address solver) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n PROPOSAL_TYPE_HASH,\n hash(intent),\n solver,\n proposal.deadline,\n hash(proposal.datas),\n hash(proposal.fees)\n )\n );\n }\n\n function hash(MaxFee[] memory fees) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](fees.length);\n for (uint256 i = 0; i < fees.length; i++) {\n hashes[i] = keccak256(abi.encode(MAX_FEE_TYPE_HASH, fees[i].token, fees[i].amount));\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Operation[] memory operations) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](operations.length);\n for (uint256 i = 0; i < operations.length; i++) hashes[i] = hash(operations[i]);\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Operation memory operation) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n OPERATION_TYPE_HASH,\n operation.opType,\n operation.user,\n keccak256(operation.data),\n hash(operation.events)\n )\n );\n }\n\n function hash(OperationEvent[] memory events) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](events.length);\n for (uint256 i = 0; i < events.length; i++) {\n hashes[i] = keccak256(abi.encode(OPERATION_EVENT_TYPE_HASH, events[i].topic, keccak256(events[i].data)));\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(uint256[] memory fees) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(fees));\n }\n\n function hash(bytes[] memory datas) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](datas.length);\n for (uint256 i = 0; i < datas.length; i++) {\n hashes[i] = keccak256(datas[i]);\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Validation memory validation) internal pure returns (bytes32) {\n return keccak256(abi.encode(VALIDATION_TYPE_HASH, validation.intent));\n }\n}\n" + }, + "project/contracts/interfaces/IController.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @title Controller interface\n */\ninterface IController {\n /**\n * @dev The input arrays are not of equal length\n */\n error ControllerInputInvalidLength();\n\n /**\n * @dev Emitted every time a solver permission is set\n */\n event SolverAllowedSet(address indexed solver, bool allowed);\n\n /**\n * @dev Emitted every time an executor permission is set\n */\n event ExecutorAllowedSet(address indexed executor, bool allowed);\n\n /**\n * @dev Emitted every time a proposal signer permission is set\n */\n event ProposalSignerAllowedSet(address indexed proposalSigner, bool allowed);\n\n /**\n * @dev Emitted every time a validator permission is set\n */\n event ValidatorAllowedSet(address indexed validator, bool allowed);\n\n /**\n * @dev Emitted when the minimum validations changes\n */\n event MinValidationSet(uint8 indexed newMinValidation);\n\n /**\n * @dev Tells whether a solver is allowed\n * @param solver Address of the solver being queried\n */\n function isSolverAllowed(address solver) external view returns (bool);\n\n /**\n * @dev Tells whether an executor is allowed\n * @param executor Address of the executor being queried\n */\n function isExecutorAllowed(address executor) external view returns (bool);\n\n /**\n * @dev Tells whether a proposal signer is allowed\n * @param signer Address of the proposal signer being queried\n */\n function isProposalSignerAllowed(address signer) external view returns (bool);\n\n /**\n * @dev Tells whether a validator is allowed\n * @param validator Address of the validator being queried\n */\n function isValidatorAllowed(address validator) external view returns (bool);\n\n /**\n * @dev Tells the minimum number of validations allowed\n */\n function minValidations() external view returns (uint8);\n\n /**\n * @dev Sets permissions for multiple solvers\n * @param solvers List of solver addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedSolvers(address[] memory solvers, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple executors\n * @param executors List of executor addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedExecutors(address[] memory executors, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple proposal signers\n * @param signers List of proposal signer addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedProposalSigners(address[] memory signers, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple validators\n * @param validators List of validator addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedValidators(address[] memory validators, bool[] memory alloweds) external;\n\n /**\n * @dev Sets the minimum number of validations allowed\n * @param newMinValidations minimum number of validations allowed\n */\n function setMinValidations(uint8 newMinValidations) external;\n}\n" + }, + "project/contracts/interfaces/ICreateX.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity ^0.8.4;\n\n/**\n * @title CreateX Factory Interface Definition\n * @author pcaversaccio (https://web.archive.org/web/20230921103111/https://pcaversaccio.com/)\n * @custom:coauthor Matt Solomon (https://web.archive.org/web/20230921103335/https://mattsolomon.dev/)\n */\ninterface ICreateX {\n event ContractCreation(address indexed newContract);\n\n function deployCreate3(bytes32 salt, bytes memory initCode) external payable returns (address newContract);\n}\n" + }, + "project/contracts/interfaces/IDynamicCallEncoder.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../dynamic-calls/DynamicCallTypes.sol';\n\ninterface IDynamicCallEncoder {\n /**\n * @dev The argument is not word-aligned\n */\n error DynamicCallEncoderBadLength();\n\n /**\n * @dev The dynamic value resolves to empty data\n */\n error DynamicCallEncoderEmptyDynamic();\n\n /**\n * @dev The variable reference is not exactly one word\n */\n error DynamicCallEncoderVariableRefBadLength();\n\n /**\n * @dev The variable index is outside the variables array\n */\n error DynamicCallEncoderVariableOutOfBounds();\n\n /**\n * @dev The declared variables length exceeds the variables array length\n */\n error DynamicCallEncoderVariablesLengthOutOfBounds();\n\n /**\n * @dev The argument kind is not valid\n */\n error DynamicCallEncoderInvalidArgKind();\n\n /**\n * @dev Encodes a dynamic call into calldata.\n * @param dynamicCall Dynamic call specification.\n * @param variables List of resolved variable values.\n * @param variablesLength Number of resolved variables.\n */\n function encode(DynamicCall memory dynamicCall, bytes[][] memory variables, uint256 variablesLength)\n external\n pure\n returns (bytes memory);\n}\n" + }, + "project/contracts/interfaces/IExecutor.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\n\n/**\n * @title Executor interface\n */\ninterface IExecutor {\n /**\n * @dev Executes an operation proposal\n * @param operation Operation to be executed\n * @param operationHash unique hash of the operation\n * @param proposalData data of the proposal to be executed to fulfill the operation\n */\n function execute(Operation memory operation, bytes32 operationHash, bytes memory proposalData) external;\n}\n" + }, + "project/contracts/interfaces/IOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\nimport '../safeguards/Safeguards.sol';\n\n/**\n * @title OperationsValidator\n * @dev Performs operations validations based on safeguards\n */\ninterface IOperationsValidator {\n /**\n * @dev Validates an operation for a safeguard\n * @param operation Operation to be validated\n * @param config Safeguard config to validate the operation with\n */\n function validate(Operation memory operation, bytes memory config) external pure;\n}\n" + }, + "project/contracts/interfaces/IPaymentsReceiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @title PaymentsReceiver interface\n */\ninterface IPaymentsReceiver {\n /**\n * @dev The token address is zero\n */\n error PaymentsReceiverTokenZero();\n\n /**\n * @dev The recipient address is zero\n */\n error PaymentsReceiverRecipientZero();\n\n /**\n * @dev The amount is zero\n */\n error PaymentsReceiverAmountZero();\n\n /**\n * @dev The user address is zero\n */\n error PaymentsReceiverUserZero();\n\n /**\n * @dev The input arrays are not of equal length\n */\n error PaymentsReceiverInputInvalidLength();\n\n /**\n * @dev The token is not allowed\n */\n error PaymentsReceiverTokenNotAllowed(address token);\n\n /**\n * @dev Emitted every time a deposit is made\n */\n event Deposited(\n address indexed token,\n address indexed depositor,\n address indexed user,\n uint256 amount,\n uint8 decimals\n );\n\n /**\n * @dev Emitted every time a withdrawal is made\n */\n event Withdrawn(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time a token permission is set\n */\n event TokenAllowedSet(address indexed token, bool allowed);\n\n /**\n * @dev Tells whether a token is allowed\n * @param token Address of the token being queried\n */\n function isTokenAllowed(address token) external view returns (bool);\n\n /**\n * @dev Sets permissions for multiple tokens\n * @param tokens List of token addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedTokens(address[] memory tokens, bool[] memory alloweds) external;\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param amount Amount to deposit\n */\n function deposit(address token, uint256 amount) external;\n\n /**\n * @dev Deposits ERC20 tokens on behalf of a user\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function depositOnBehalf(address token, address user, uint256 amount) external;\n\n /**\n * @dev Withdraws ERC20 tokens to a recipient\n * @param token Address of the token to withdraw\n * @param recipient Address of the recipient\n * @param amount Amount to withdraw\n */\n function withdraw(address token, address recipient, uint256 amount) external;\n}\n" + }, + "project/contracts/interfaces/ISafe.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nenum SafeOperation {\n Call,\n DelegateCall\n}\n\ninterface ISafe {\n function getThreshold() external view returns (uint256);\n\n function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, SafeOperation operation)\n external\n returns (bool success, bytes memory returnData);\n}\n" + }, + "project/contracts/interfaces/ISettler.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\nimport '../safeguards/Safeguards.sol';\n\n/**\n * @title Settler interface\n */\ninterface ISettler {\n /**\n * @dev The requested operation type is unknown\n */\n error SettlerUnknownOperationType(uint8 opType);\n\n /**\n * @dev The simulation has been successful\n */\n error SettlerSimulationSuccess(uint256 gasUsed);\n\n /**\n * @dev The solver is not allowed\n */\n error SettlerSolverNotAllowed(address solver);\n\n /**\n * @dev The executor is not allowed\n */\n error SettlerExecutorNotAllowed(address executor);\n\n /**\n * @dev The proposal signer is not allowed\n */\n error SettlerProposalSignerNotAllowed(address signer);\n\n /**\n * @dev The validator is not allowed\n */\n error SettlerValidatorNotAllowed(address validator);\n\n /**\n * @dev The validator is duplicated\n */\n error SettlerValidatorDuplicatedOrUnsorted(address previous, address current);\n\n /**\n * @dev The settler is not the current contract\n */\n error SettlerInvalidSettler(address settler);\n\n /**\n * @dev The nonce is zero\n */\n error SettlerNonceZero();\n\n /**\n * @dev The intent has already been executed\n */\n error SettlerIntentAlreadyExecuted(bytes32 hash);\n\n /**\n * @dev The intent deadline is in the past\n */\n error SettlerIntentPastDeadline(uint256 deadline, uint256 timestamp);\n\n /**\n * @dev The current chain is not valid\n */\n error SettlerInvalidChain(uint256 chainId);\n\n /**\n * @dev The recipient is the settler contract\n */\n error SettlerInvalidRecipient(address to);\n\n /**\n * @dev The user is not a smart account\n */\n error SettlerUserNotSmartAccount(address user);\n\n /**\n * @dev The amount out is lower than the proposed amount\n */\n error SettlerAmountOutLtProposed(uint256 index, uint256 amountOut, uint256 proposed);\n\n /**\n * @dev The proposed amount is lower than the minimum amount\n */\n error SettlerProposedAmountLtMinAmount(uint256 index, uint256 proposed, uint256 minAmount);\n\n /**\n * @dev The proposed amounts array and the tokens out array are not of equal length\n */\n error SettlerInvalidProposedAmounts();\n\n /**\n * @dev The balance after the proposal execution is lower than the balance before\n */\n error SettlerPostBalanceOutLtPre(uint256 index, uint256 post, uint256 pre);\n\n /**\n * @dev The solver fees length does not match the requested by the user\n */\n error SettlerSolverFeeInvalidLength();\n\n /**\n * @dev The intent operations array is empty\n */\n error SettlerIntentOperationsEmpty();\n\n /**\n * @dev The proposal datas length does not match the intent operations length\n */\n error SettlerProposalDataInvalidLength();\n\n /**\n * @dev The solver fee is too high\n */\n error SettlerSolverFeeTooHigh(uint256 fee, uint256 max);\n\n /**\n * @dev The intent validations are not enough\n */\n error SettlerIntentValidationsNotEnough(uint256 min, uint256 current);\n\n /**\n * @dev The proposal deadline is in the past\n */\n error SettlerProposalPastDeadline(uint256 deadline, uint256 timestamp);\n\n /**\n * @dev The proposal data is not empty\n */\n error SettlerProposalDataNotEmpty();\n\n /**\n * @dev The rescue funds recipient is zero\n */\n error SettlerRescueFundsRecipientZero();\n\n /**\n * @dev The list of safeguards exceed the maximum allowed\n */\n error SettlerTooManySafeguards(uint256 lengthRequested);\n\n /**\n * @dev The chains of a swap operation do not match the swap type (single or cross chain)\n */\n error SettlerOperationChainsMismatch();\n\n /**\n * @dev A CrossChainSwap operation must be the only operation in the intent\n */\n error SettlerCrossChainSwapMustBeOnlyOperation();\n\n /**\n * @dev The new smart accounts handler is zero\n */\n error SmartAccountsHandlerZero();\n\n /**\n * @dev The new dynamic call encoder is zero\n */\n error SettlerDynamicCallEncoderZero();\n\n /**\n * @dev Custom events emitted for each operation\n */\n event OperationExecuted(\n address indexed user,\n bytes32 indexed topic,\n uint8 indexed opType,\n Operation operation,\n Proposal proposal,\n bytes32 intentHash,\n uint256 index,\n bytes output,\n bytes data\n );\n\n /**\n * @dev Emitted every time an intent is fulfilled\n */\n event ProposalExecuted(bytes32 indexed proposal);\n\n /**\n * @dev Emitted every time tokens are withdrawn from the contract balance\n */\n event FundsRescued(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time the smart accounts handler is set\n */\n event SmartAccountsHandlerSet(address indexed smartAccountsHandler);\n\n /**\n * @dev Emitted every time the operations validator is set\n */\n event OperationsValidatorSet(address indexed operationsValidator);\n\n /**\n * @dev Emitted every time the dynamic call encoder is set\n */\n event DynamicCallEncoderSet(address indexed dynamicCallEncoder);\n\n /**\n * @dev Emitted every time a safeguard is set\n */\n event SafeguardSet(address indexed user);\n\n /**\n * @dev Tells the reference to the Mimic controller\n */\n function controller() external view returns (address);\n\n /**\n * @dev Tells the reference to the smart accounts handler\n */\n function smartAccountsHandler() external view returns (address);\n\n /**\n * @dev Tells the reference to the operations validator\n */\n function operationsValidator() external view returns (address);\n\n /**\n * @dev Tells the reference to the dynamic call encoder\n */\n function dynamicCallEncoder() external view returns (address);\n\n /**\n * @dev Tells the block at which an intent was executed. Returns 0 if unexecuted.\n * @param hash Hash of the intent being queried\n */\n function getIntentBlock(bytes32 hash) external view returns (uint256);\n\n /**\n * @dev Tells the safeguard set for a user\n * @param user Address of the user being queried\n */\n function getUserSafeguard(address user) external view returns (bytes memory);\n\n /**\n * @dev Tells the hash of an intent\n * @param intent Intent to get the hash of\n */\n function getIntentHash(Intent memory intent) external pure returns (bytes32);\n\n /**\n * @dev Tells the hash of a proposal\n * @param proposal Proposal to be hashed\n * @param intent Intent being fulfilled by the requested proposal\n * @param solver Address of the solver that made the proposal\n */\n function getProposalHash(Proposal memory proposal, Intent memory intent, address solver)\n external\n pure\n returns (bytes32);\n\n /**\n * @dev Withdraws ERC20 or native tokens from the contract\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function rescueFunds(address token, address recipient, uint256 amount) external;\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function setSmartAccountsHandler(address newSmartAccountsHandler) external;\n\n /**\n * @dev Sets a new operations validator address\n * @param newOperationsValidator New operations validator to be set\n */\n function setOperationsValidator(address newOperationsValidator) external;\n\n /**\n * @dev Sets a new dynamic call encoder address\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function setDynamicCallEncoder(address newDynamicCallEncoder) external;\n\n /**\n * @dev Sets a safeguard for a user\n * @param safeguard Safeguard to be set\n */\n function setSafeguard(bytes memory safeguard) external;\n\n /**\n * @dev Executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function execute(Intent memory intent, Proposal memory proposal, bytes memory signature) external;\n\n /**\n * @dev Simulates an execution. It will always revert. Successful executions are returned as\n * `SettlerSimulationSuccess` errors. Any other error should be treated as failure.\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function simulate(Intent memory intent, Proposal memory proposal, bytes memory signature) external;\n}\n" + }, + "project/contracts/interfaces/ISmartAccount.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/introspection/IERC165.sol';\n\n/**\n * @title SmartAccount interface\n */\ninterface ISmartAccount is IERC165 {\n /**\n * @dev Emitted every time tokens are transferred\n */\n event Transferred(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time `call` is called\n */\n event Called(address indexed target, bytes data, uint256 value, bytes result);\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the owner or the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) external;\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the owner or the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n */\n function call(address target, bytes memory data, uint256 value) external returns (bytes memory result);\n}\n" + }, + "project/contracts/interfaces/ISmartAccountContract.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/interfaces/IERC1271.sol';\n\nimport './ISmartAccount.sol';\n\n/**\n * @title SmartAccountContract interface\n */\ninterface ISmartAccountContract is ISmartAccount, IERC1271 {\n // solhint-disable-previous-line no-empty-blocks\n}\n" + }, + "project/contracts/interfaces/ISmartAccountsHandler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\ninterface ISmartAccountsHandler {\n /**\n * @dev The smart account given is not supported\n */\n error SmartAccountsHandlerUnsupportedAccount(address account);\n\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address account) external view returns (bool);\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address account, address token, address to, uint256 amount) external;\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address account, address target, bytes memory data, uint256 value) external returns (bytes memory);\n}\n" + }, + "project/contracts/payments/PaymentsReceiver.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\n\nimport '../interfaces/IPaymentsReceiver.sol';\n\n/**\n * @title PaymentsReceiver\n * @dev Receives ERC20 deposits and lets the owner withdraw them\n */\ncontract PaymentsReceiver is IPaymentsReceiver, Ownable {\n using SafeERC20 for IERC20;\n\n // List of allowed tokens\n mapping (address => bool) public override isTokenAllowed;\n\n /**\n * @dev Creates a new PaymentsReceiver contract\n * @param owner Address that will own the contract\n * @param tokens List of allowed tokens\n */\n constructor(address owner, address[] memory tokens) Ownable(owner) {\n for (uint256 i = 0; i < tokens.length; i++) _setAllowedToken(tokens[i], true);\n }\n\n /**\n * @dev Sets permissions for multiple tokens\n * @param tokens List of token addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedTokens(address[] memory tokens, bool[] memory alloweds) external override onlyOwner {\n if (tokens.length != alloweds.length) revert PaymentsReceiverInputInvalidLength();\n for (uint256 i = 0; i < tokens.length; i++) _setAllowedToken(tokens[i], alloweds[i]);\n }\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param amount Amount to deposit\n */\n function deposit(address token, uint256 amount) external override {\n _deposit(token, _msgSender(), amount);\n }\n\n /**\n * @dev Deposits ERC20 tokens on behalf of a user\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function depositOnBehalf(address token, address user, uint256 amount) external override {\n if (user == address(0)) revert PaymentsReceiverUserZero();\n _deposit(token, user, amount);\n }\n\n /**\n * @dev Withdraws ERC20 tokens to a recipient\n * @param token Address of the token to withdraw\n * @param recipient Address of the recipient\n * @param amount Amount to withdraw\n */\n function withdraw(address token, address recipient, uint256 amount) external override onlyOwner {\n if (token == address(0)) revert PaymentsReceiverTokenZero();\n if (recipient == address(0)) revert PaymentsReceiverRecipientZero();\n if (amount == 0) revert PaymentsReceiverAmountZero();\n\n IERC20(token).safeTransfer(recipient, amount);\n\n emit Withdrawn(token, recipient, amount);\n }\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function _deposit(address token, address user, uint256 amount) internal {\n if (token == address(0)) revert PaymentsReceiverTokenZero();\n if (amount == 0) revert PaymentsReceiverAmountZero();\n if (!isTokenAllowed[token]) revert PaymentsReceiverTokenNotAllowed(token);\n\n address depositor = _msgSender();\n IERC20(token).safeTransferFrom(depositor, address(this), amount);\n\n uint8 decimals = IERC20Metadata(token).decimals();\n emit Deposited(token, depositor, user, amount, decimals);\n }\n\n /**\n * @dev Sets a token permission\n */\n function _setAllowedToken(address token, bool allowed) internal {\n isTokenAllowed[token] = allowed;\n emit TokenAllowedSet(token, allowed);\n }\n}\n" + }, + "project/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol';\n\ncontract Proxy is TransparentUpgradeableProxy {\n constructor(address implementation, address initialOwner, bytes memory data)\n TransparentUpgradeableProxy(implementation, initialOwner, data)\n {}\n}\n" + }, + "project/contracts/safeguards/BaseOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @title BaseOperationsValidator\n */\ncontract BaseOperationsValidator {\n /**\n * @dev No operations allowed\n */\n error OperationsValidatorNoneAllowed();\n\n /**\n * @dev Operation type unknown\n */\n error OperationsValidatorUnknownOperationType(uint8 opType);\n\n /**\n * @dev Invalid safeguard mode\n */\n error OperationsValidatorInvalidSafeguardMode(uint8 mode);\n\n /**\n * @dev Tells whether a chain is allowed\n */\n function _isChainAllowed(uint256 chainId, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, uint256[] memory values) = abi.decode(config, (bool, uint256[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (chainId == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (chainId == values[i]) return true;\n }\n return false;\n }\n }\n\n /**\n * @dev Tells whether an account is allowed\n */\n function _isAccountAllowed(address account, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, address[] memory values) = abi.decode(config, (bool, address[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (account == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (account == values[i]) return true;\n }\n return false;\n }\n }\n\n /**\n * @dev Tells whether a selector is allowed\n */\n function _isSelectorAllowed(bytes4 selector, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, bytes4[] memory values) = abi.decode(config, (bool, bytes4[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (selector == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (selector == values[i]) return true;\n }\n return false;\n }\n }\n}\n" + }, + "project/contracts/safeguards/CallOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './Safeguards.sol';\nimport './BaseOperationsValidator.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Call safeguard modes to validate call operations\n * @param None To ensure no calls are allowed\n * @param Chain To validate that the chain where calls execute is allowed\n * @param Target To validate that the call targets (contract addresses) are allowed\n * @param Selector To validate that the function selectors being called are allowed\n */\nenum CallSafeguardMode {\n None,\n Chain,\n Target,\n Selector\n}\n\n/**\n * @title CallOperationsValidator\n * @dev Performs call operations validations based on safeguards\n */\ncontract CallOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a call operation is valid for a safeguard\n * @param operation Call operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isCallOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n CallOperation memory callOperation = abi.decode(operation.data, (CallOperation));\n if (safeguard.mode == uint8(CallSafeguardMode.Chain))\n return _isChainAllowed(callOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Target))\n return _areCallTargetsValid(callOperation.calls, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Selector))\n return _areCallSelectorsValid(callOperation.calls, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the call targets are allowed\n */\n function _areCallTargetsValid(CallData[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n if (!_isAccountAllowed(calls[i].target, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the call selectors are allowed\n */\n function _areCallSelectorsValid(CallData[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n if (!_isSelectorAllowed(bytes4(calls[i].data), config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/DynamicCallOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './CallOperationsValidator.sol';\nimport './Safeguards.sol';\nimport './BaseOperationsValidator.sol';\nimport '../Intents.sol';\nimport '../dynamic-calls/DynamicCallTypes.sol';\n\n/**\n * @title DynamicCallOperationsValidator\n * @dev Performs dynamic call operations validations based on call safeguards\n */\ncontract DynamicCallOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a dynamic call operation is valid for a safeguard\n * @param operation Dynamic call operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isDynamicCallOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n DynamicCallOperation memory dynamicCallOperation = abi.decode(operation.data, (DynamicCallOperation));\n if (safeguard.mode == uint8(CallSafeguardMode.Chain))\n return _isChainAllowed(dynamicCallOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Target))\n return _areDynamicCallTargetsValid(dynamicCallOperation.calls, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Selector))\n return _areDynamicCallSelectorsValid(dynamicCallOperation.calls, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the dynamic call targets are allowed\n */\n function _areDynamicCallTargetsValid(bytes[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n DynamicCall memory call = abi.decode(calls[i], (DynamicCall));\n if (!_isAccountAllowed(call.target, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the dynamic call selectors are allowed\n */\n function _areDynamicCallSelectorsValid(bytes[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n DynamicCall memory call = abi.decode(calls[i], (DynamicCall));\n if (!_isSelectorAllowed(call.selector, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/OperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './CallOperationsValidator.sol';\nimport './DynamicCallOperationsValidator.sol';\nimport './TransferOperationsValidator.sol';\nimport './Safeguards.sol';\nimport './SwapOperationsValidator.sol';\nimport '../Intents.sol';\nimport '../interfaces/IOperationsValidator.sol';\n\n/**\n * @title OperationsValidator\n * @dev Performs operations validations based on safeguards\n */\ncontract OperationsValidator is\n IOperationsValidator,\n SwapOperationsValidator,\n TransferOperationsValidator,\n CallOperationsValidator,\n DynamicCallOperationsValidator\n{\n /**\n * @dev Safeguard validation failed\n */\n error OperationsValidatorSafeguardFailed();\n\n /**\n * @dev Invalid safeguard config mode\n */\n error OperationsValidatorInvalidSafeguardConfigMode(uint8 mode);\n\n /**\n * @dev Invalid safeguard group logic mode\n */\n error OperationsValidatorInvalidSafeguardGroupLogicMode(uint8 mode);\n\n /**\n * @dev Tells whether an operation is valid for a safeguard\n * @param operation Operation to be validated\n * @param config Safeguard config to validate the operation with\n */\n function validate(Operation memory operation, bytes memory config) external pure override {\n (uint8 mode, bytes memory safeguard) = abi.decode(config, (uint8, bytes));\n if (mode == uint8(SafeguardConfigMode.List)) _validate(operation, abi.decode(safeguard, (Safeguard[])));\n else if (mode == uint8(SafeguardConfigMode.Tree)) _validate(operation, _decodeSafeguardTree(safeguard));\n else revert OperationsValidatorInvalidSafeguardConfigMode(mode);\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguards list\n * @param operation Operation to be validated\n * @param safeguards Safeguard list to validate the operation with\n */\n function _validate(Operation memory operation, Safeguard[] memory safeguards) internal pure {\n if (safeguards.length == 0) revert OperationsValidatorSafeguardFailed();\n for (uint256 i = 0; i < safeguards.length; i++) {\n if (!_isSafeguardValid(operation, safeguards[i])) revert OperationsValidatorSafeguardFailed();\n }\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard tree\n * @param operation Operation to be validated\n * @param tree Safeguard tree to validate the operation with\n */\n function _validate(Operation memory operation, SafeguardTree memory tree) internal pure {\n if (tree.nodes.length == 0) revert OperationsValidatorSafeguardFailed();\n if (!_isSafeguardGroupValid(operation, tree, 0)) revert OperationsValidatorSafeguardFailed();\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard tree at a certain level\n * @param operation Operation to be validated\n * @param tree Safeguard tree to validate the operation with\n * @param index Index of the group node to evaluate\n */\n function _isSafeguardGroupValid(Operation memory operation, SafeguardTree memory tree, uint16 index)\n internal\n pure\n returns (bool)\n {\n SafeguardGroup memory group = tree.nodes[index];\n\n if (group.logic == uint8(SafeguardGroupLogic.NOT)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i])) return false;\n }\n return true;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.AND)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (!_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (!_isSafeguardGroupValid(operation, tree, group.children[i])) return false;\n }\n return true;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.OR)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return true;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i])) return true;\n }\n return false;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.XOR)) {\n uint256 hits = 0;\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]]))\n if (++hits > 1) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i]))\n if (++hits > 1) return false;\n }\n return hits == 1;\n }\n\n revert OperationsValidatorInvalidSafeguardGroupLogicMode(group.logic);\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard\n * @param operation Operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isSafeguardValid(Operation memory operation, Safeguard memory safeguard) internal pure returns (bool) {\n if (safeguard.mode == uint8(0)) revert OperationsValidatorNoneAllowed();\n if (operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap)) {\n return _isSwapOperationValid(operation, safeguard);\n }\n if (operation.opType == uint8(OpType.Transfer)) return _isTransferOperationValid(operation, safeguard);\n if (operation.opType == uint8(OpType.Call)) return _isCallOperationValid(operation, safeguard);\n if (operation.opType == uint8(OpType.DynamicCall)) return _isDynamicCallOperationValid(operation, safeguard);\n revert OperationsValidatorUnknownOperationType(uint8(operation.opType));\n }\n\n /**\n * @dev Safely decodes a safeguard tree avoiding compiler issues with dynamic arrays\n * @param data Safeguard tree data to be decoded\n */\n function _decodeSafeguardTree(bytes memory data) private pure returns (SafeguardTree memory) {\n (SafeguardGroup[] memory nodes, Safeguard[] memory leaves) = abi.decode(data, (SafeguardGroup[], Safeguard[]));\n return SafeguardTree(nodes, leaves);\n }\n}\n" + }, + "project/contracts/safeguards/Safeguards.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Safeguard config modes\n * - List: Safeguard lists\n * - Tree: Safeguard groups\n */\nenum SafeguardConfigMode {\n List,\n Tree\n}\n\n/**\n * @dev Logical operators for safeguard groups\n * - AND: every child must pass\n * - OR: at least one child must pass\n * - XOR: exactly one child must pass\n * - NOT: every child must fail\n */\nenum SafeguardGroupLogic {\n AND,\n OR,\n XOR,\n NOT\n}\n\n/**\n * @dev Flat node in the safeguard tree\n * @param logic Group operator (AND/OR/XOR/NOT)\n * @param leaves Indices into `SafeguardTree.leaves`\n * @param children Indices into `SafeguardTree.nodes`\n */\nstruct SafeguardGroup {\n uint8 logic;\n uint16[] leaves;\n uint16[] children;\n}\n\n/**\n * @dev Safeguard tree representation\n * @param nodes List of all the nodes in the tree\n * @param leaves List of all the leaves in the tree\n */\nstruct SafeguardTree {\n SafeguardGroup[] nodes;\n Safeguard[] leaves;\n}\n\n/**\n * @dev Safeguard representation\n * @param mode Safeguard mode\n * @param config Safeguard configuration settings or parameters\n */\nstruct Safeguard {\n uint8 mode;\n bytes config;\n}\n" + }, + "project/contracts/safeguards/SwapOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './BaseOperationsValidator.sol';\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Swap safeguard modes to validate swap operations\n * @param None To ensure no swaps are allowed\n * @param SourceChain To validate that the source chain is allowed\n * @param DestinationChain To validate that the destination chain is allowed\n * @param TokenIn To validate that the tokens to be sent are allowed\n * @param TokenOut To validate that the tokens to be received are allowed\n * @param Recipient To validate that the recipients that will receive the tokens are allowed\n */\nenum SwapSafeguardMode {\n None,\n SourceChain,\n DestinationChain,\n TokenIn,\n TokenOut,\n Recipient\n}\n\n/**\n * @title SwapOperationsValidator\n * @dev Performs swap operations validations based on safeguards\n */\ncontract SwapOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a swap operation is valid for a safeguard\n * @param operation Swap operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isSwapOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n SwapOperation memory swapOperation = abi.decode(operation.data, (SwapOperation));\n if (safeguard.mode == uint8(SwapSafeguardMode.SourceChain))\n return _isChainAllowed(swapOperation.sourceChain, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.DestinationChain))\n return _isChainAllowed(swapOperation.destinationChain, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.TokenIn))\n return _areSwapTokensInValid(swapOperation.tokensIn, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.TokenOut))\n return _areSwapTokensOutValid(swapOperation.tokensOut, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.Recipient))\n return _areSwapRecipientsValid(swapOperation.tokensOut, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the tokens to be sent are allowed\n */\n function _areSwapTokensInValid(TokenIn[] memory tokensIn, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensIn.length; i++) {\n if (!_isAccountAllowed(tokensIn[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the tokens to be received are allowed\n */\n function _areSwapTokensOutValid(TokenOut[] memory tokensOut, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensOut.length; i++) {\n if (!_isAccountAllowed(tokensOut[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the recipients to be received are allowed\n */\n function _areSwapRecipientsValid(TokenOut[] memory tokensOut, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensOut.length; i++) {\n if (!_isAccountAllowed(tokensOut[i].recipient, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/TransferOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './BaseOperationsValidator.sol';\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Transfer safeguard modes to validate transfer operations\n * @param None To ensure no transfers are allowed\n * @param Chain To validate that the chain where transfers execute is allowed\n * @param Token To validate that the tokens being transferred are allowed\n * @param Recipient To validate that the recipients of the transfers are allowed\n */\nenum TransferSafeguardMode {\n None,\n Chain,\n Token,\n Recipient\n}\n\n/**\n * @title TransferOperationsValidator\n * @dev Performs transfer operations validations based on safeguards\n */\ncontract TransferOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a transfer operation is valid for a safeguard\n * @param operation Transfer operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isTransferOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n TransferOperation memory transferOperation = abi.decode(operation.data, (TransferOperation));\n if (safeguard.mode == uint8(TransferSafeguardMode.Chain))\n return _isChainAllowed(transferOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(TransferSafeguardMode.Token))\n return _areTransferTokensValid(transferOperation.transfers, safeguard.config);\n if (safeguard.mode == uint8(TransferSafeguardMode.Recipient))\n return _areTransferRecipientsValid(transferOperation.transfers, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the tokens being transferred are allowed\n */\n function _areTransferTokensValid(TransferData[] memory transfers, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < transfers.length; i++) {\n if (!_isAccountAllowed(transfers[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the recipients of the transfers are allowed\n */\n function _areTransferRecipientsValid(TransferData[] memory transfers, bytes memory config)\n private\n pure\n returns (bool)\n {\n for (uint256 i = 0; i < transfers.length; i++) {\n if (!_isAccountAllowed(transfers[i].recipient, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/Settler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';\nimport '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\nimport '@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol';\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\nimport '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';\n\nimport './Intents.sol';\nimport './interfaces/IController.sol';\nimport './interfaces/IDynamicCallEncoder.sol';\nimport './interfaces/IOperationsValidator.sol';\nimport './interfaces/IExecutor.sol';\nimport './interfaces/ISettler.sol';\nimport './utils/Denominations.sol';\nimport './utils/ERC20Helpers.sol';\nimport './smart-accounts/SmartAccountsHandler.sol';\nimport './smart-accounts/SmartAccountsHandlerHelpers.sol';\n\n/**\n * @title Settler\n * @dev Contract that provides the appropriate context for solvers to execute proposals that fulfill user intents\n */\ncontract Settler is ISettler, Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, EIP712Upgradeable {\n using SafeERC20 for IERC20;\n using IntentsHelpers for Intent;\n using IntentsHelpers for Proposal;\n using IntentsHelpers for Validation;\n using SmartAccountsHandlerHelpers for address;\n\n // Mimic controller reference\n address public override controller;\n\n // Smart accounts handler reference\n address public override smartAccountsHandler;\n\n // Operations validator reference\n address public override operationsValidator;\n\n // Dynamic call encoder reference\n address public dynamicCallEncoder;\n\n // List of block numbers at which an intent was executed\n mapping (bytes32 => uint256) public override getIntentBlock;\n\n // Safeguard config per user\n mapping (address => bytes) internal _userSafeguard;\n\n /**\n * @dev Modifier to tag settler functions in order to check if the sender is an allowed solver\n */\n modifier onlySolver() {\n address sender = _msgSender();\n if (!IController(controller).isSolverAllowed(sender)) revert SettlerSolverNotAllowed(sender);\n _;\n }\n\n /**\n * @dev Disables initializers to prevent implementation contract from being initialized directly\n */\n constructor() {\n _disableInitializers();\n }\n\n /**\n * @dev Initializes a new Settler contract\n * @param _controller Address of the Settler controller\n * @param _owner Address that will own the contract\n * @param _dynamicCallEncoder Address of the dynamic call encoder\n */\n function initialize(address _controller, address _owner, address _dynamicCallEncoder) external initializer {\n __Ownable_init(_owner);\n __ReentrancyGuard_init();\n __EIP712_init('Mimic Protocol Settler', '1');\n\n controller = _controller;\n smartAccountsHandler = address(new SmartAccountsHandler());\n _setDynamicCallEncoder(_dynamicCallEncoder);\n }\n\n /**\n * @dev Tells the hash of an intent\n * @param intent Intent to get the hash of\n */\n function getIntentHash(Intent memory intent) external pure override returns (bytes32) {\n return intent.hash();\n }\n\n /**\n * @dev Tells the hash of a proposal\n * @param proposal Proposal to be hashed\n * @param intent Intent being fulfilled by the requested proposal\n * @param solver Address of the solver that made the proposal\n */\n function getProposalHash(Proposal memory proposal, Intent memory intent, address solver)\n external\n pure\n override\n returns (bytes32)\n {\n return proposal.hash(intent, solver);\n }\n\n /**\n * @dev Tells the safeguard set for a user\n * @param user Address of the user being queried\n */\n function getUserSafeguard(address user) external view override returns (bytes memory) {\n return _userSafeguard[user];\n }\n\n /**\n * @dev It allows receiving native token transfers\n * Note: This method mainly allows supporting native tokens for swaps\n */\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n /**\n * @dev Withdraws ERC20 or native tokens from the contract\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function rescueFunds(address token, address recipient, uint256 amount) external override onlyOwner nonReentrant {\n if (recipient == address(0)) revert SettlerRescueFundsRecipientZero();\n ERC20Helpers.transfer(token, recipient, amount);\n emit FundsRescued(token, recipient, amount);\n }\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function setSmartAccountsHandler(address newSmartAccountsHandler) external override onlyOwner {\n _setSmartAccountsHandler(newSmartAccountsHandler);\n }\n\n /**\n * @dev Sets a new operations validator address\n * @param newOperationsValidator New operations validator to be set\n */\n function setOperationsValidator(address newOperationsValidator) external override onlyOwner {\n _setOperationsValidator(newOperationsValidator);\n }\n\n /**\n * @dev Sets a new dynamic call encoder address\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function setDynamicCallEncoder(address newDynamicCallEncoder) external override onlyOwner {\n _setDynamicCallEncoder(newDynamicCallEncoder);\n }\n\n /**\n * @dev Sets a safeguard for a user\n * @param safeguard Safeguard to be set\n */\n function setSafeguard(bytes memory safeguard) external override {\n _setSafeguard(msg.sender, safeguard);\n }\n\n /**\n * @dev Executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function execute(Intent memory intent, Proposal memory proposal, bytes memory signature)\n external\n override\n onlySolver\n {\n _execute(intent, proposal, signature, false);\n }\n\n /**\n * @dev Simulates an execution. It will always revert. Successful executions are returned as\n * `SettlerSimulationSuccess` errors. Any other error should be treated as failure.\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function simulate(Intent memory intent, Proposal memory proposal, bytes memory signature)\n external\n override\n onlySolver\n {\n uint256 initialGas = gasleft();\n _execute(intent, proposal, signature, true);\n uint256 gasUsed = initialGas - gasleft();\n revert SettlerSimulationSuccess(gasUsed);\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n * @param simulated Whether the execution is a simulation\n */\n function _execute(Intent memory intent, Proposal memory proposal, bytes memory signature, bool simulated)\n internal\n nonReentrant\n {\n _validateIntent(intent, proposal, signature, simulated);\n getIntentBlock[intent.hash()] = block.number;\n\n bytes[][] memory outputs = new bytes[][](intent.operations.length);\n for (uint256 i = 0; i < intent.operations.length; i++) {\n outputs[i] = _executeOperation(intent, proposal, i, outputs);\n }\n\n _payFees(intent, proposal);\n emit ProposalExecuted(proposal.hash(intent, _msgSender()));\n }\n\n /**\n * @dev Executes proposal to fulfill an operation\n * @param intent Intent being fulfilled\n * @param proposal Proposal being executed\n * @param index Position where the operation and its corresponding proposal data are located\n * @param outputs List of operations outputs\n */\n function _executeOperation(Intent memory intent, Proposal memory proposal, uint256 index, bytes[][] memory outputs)\n internal\n returns (bytes[] memory)\n {\n uint8 opType = intent.operations[index].opType;\n if (opType == uint8(OpType.Swap) || opType == uint8(OpType.CrossChainSwap)) {\n return _executeSwap(intent, proposal, index);\n }\n if (opType == uint8(OpType.Transfer)) return _executeTransfer(intent, proposal, index);\n if (opType == uint8(OpType.Call)) return _executeCall(intent, proposal, index);\n if (opType == uint8(OpType.DynamicCall)) return _executeDynamicCall(intent, proposal, index, outputs);\n revert SettlerUnknownOperationType(opType);\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a swap operation\n * @param intent Intent that contains swap operation to be fulfilled\n * @param proposal Proposal with swap data to be executed\n * @param index Position where the swap proposal data and operation are located\n */\n function _executeSwap(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n SwapOperation memory swapOperation = abi.decode(operation.data, (SwapOperation));\n SwapProposal memory swapProposal = abi.decode(proposal.datas[index], (SwapProposal));\n if (operation.opType == uint8(OpType.CrossChainSwap)) {\n if (intent.operations.length > 1) revert SettlerCrossChainSwapMustBeOnlyOperation();\n _validateCrossChainSwapOperation(swapOperation, swapProposal);\n } else _validateSingleChainSwapOperation(swapOperation, swapProposal);\n\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(operation.user);\n if (swapOperation.sourceChain == block.chainid) {\n for (uint256 i = 0; i < swapOperation.tokensIn.length; i++) {\n TokenIn memory tokenIn = swapOperation.tokensIn[i];\n _transferFrom(tokenIn.token, operation.user, swapProposal.executor, tokenIn.amount, isSmartAccount);\n }\n }\n\n uint256[] memory preBalancesOut = _getTokensOutBalance(swapOperation);\n // Using the intent hash as the unique operation hash because cross-chain swap has only one operation per intent and the single swap executor does not use it\n bytes32 operationHash = intent.hash();\n IExecutor(swapProposal.executor).execute(operation, operationHash, proposal.datas[index]);\n\n outputs = new bytes[](swapOperation.tokensOut.length);\n if (swapOperation.destinationChain == block.chainid) {\n uint256[] memory amounts = new uint256[](swapOperation.tokensOut.length);\n for (uint256 i = 0; i < swapOperation.tokensOut.length; i++) {\n TokenOut memory tokenOut = swapOperation.tokensOut[i];\n uint256 postBalanceOut = ERC20Helpers.balanceOf(tokenOut.token, address(this));\n uint256 preBalanceOut = preBalancesOut[i];\n if (postBalanceOut < preBalanceOut) revert SettlerPostBalanceOutLtPre(i, postBalanceOut, preBalanceOut);\n\n amounts[i] = postBalanceOut - preBalanceOut;\n uint256 proposedAmount = swapProposal.amountsOut[i];\n if (amounts[i] < proposedAmount) revert SettlerAmountOutLtProposed(i, amounts[i], proposedAmount);\n\n ERC20Helpers.transfer(tokenOut.token, tokenOut.recipient, amounts[i]);\n outputs[i] = abi.encode(amounts[i]);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(amounts));\n }\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a transfer operation\n * @param intent Intent that contains transfer operation to be fulfilled\n * @param proposal Transfer proposal to be executed\n * @param index Position where the transfer proposal data and operation are located\n */\n function _executeTransfer(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n TransferOperation memory transferOperation = abi.decode(operation.data, (TransferOperation));\n _validateTransferOperation(transferOperation, proposal.datas[index]);\n\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(operation.user);\n for (uint256 i = 0; i < transferOperation.transfers.length; i++) {\n TransferData memory transfer = transferOperation.transfers[i];\n _transferFrom(transfer.token, operation.user, transfer.recipient, transfer.amount, isSmartAccount);\n }\n\n outputs = new bytes[](0);\n _emitOperationEvents(operation, proposal, intent.hash(), index, new bytes(0));\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a call operation\n * @param intent Intent that contains call operation to be fulfilled\n * @param proposal Call proposal to be executed\n * @param index Position where the call proposal data and operation are located\n */\n function _executeCall(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n CallOperation memory callOperation = abi.decode(operation.data, (CallOperation));\n _validateCallOperation(callOperation, proposal.datas[index], operation.user);\n\n outputs = new bytes[](callOperation.calls.length);\n for (uint256 i = 0; i < callOperation.calls.length; i++) {\n CallData memory call = callOperation.calls[i];\n // solhint-disable-next-line avoid-low-level-calls\n outputs[i] = smartAccountsHandler.call(operation.user, call.target, call.data, call.value);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(outputs));\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a dynamic call operation\n * @param intent Intent that contains dynamic call operation to be fulfilled\n * @param proposal Dynamic call proposal to be executed\n * @param index Position where the dynamic call proposal data and operation are located\n * @param variables List of operations outputs\n */\n function _executeDynamicCall(\n Intent memory intent,\n Proposal memory proposal,\n uint256 index,\n bytes[][] memory variables\n ) internal returns (bytes[] memory outputs) {\n Operation memory operation = intent.operations[index];\n DynamicCallOperation memory dynamicCallOperation = abi.decode(operation.data, (DynamicCallOperation));\n _validateDynamicCallOperation(dynamicCallOperation, proposal.datas[index], operation.user);\n\n outputs = new bytes[](dynamicCallOperation.calls.length);\n for (uint256 i = 0; i < dynamicCallOperation.calls.length; i++) {\n DynamicCall memory dynamicCall = abi.decode(dynamicCallOperation.calls[i], (DynamicCall));\n bytes memory data = IDynamicCallEncoder(dynamicCallEncoder).encode(dynamicCall, variables, index);\n // solhint-disable-next-line avoid-low-level-calls\n outputs[i] = smartAccountsHandler.call(operation.user, dynamicCall.target, data, dynamicCall.value);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(outputs));\n }\n\n /**\n * @dev Validates an intent and its corresponding proposal\n The off-chain validators are assuring that:\n - The trigger signer has authorization over the intent.feePayer and each operations[i].user\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n * @param simulated Whether the execution is a simulation\n */\n function _validateIntent(Intent memory intent, Proposal memory proposal, bytes memory signature, bool simulated)\n internal\n view\n {\n if (intent.settler != address(this)) revert SettlerInvalidSettler(intent.settler);\n if (intent.nonce == bytes32(0)) revert SettlerNonceZero();\n bytes32 intentHash = intent.hash();\n if (getIntentBlock[intentHash] != 0) revert SettlerIntentAlreadyExecuted(intentHash);\n\n if (intent.operations.length == 0) revert SettlerIntentOperationsEmpty();\n if (intent.operations.length != proposal.datas.length) revert SettlerProposalDataInvalidLength();\n\n if (operationsValidator != address(0)) {\n for (uint256 i = 0; i < intent.operations.length; i++) {\n Operation memory operation = intent.operations[i];\n bytes memory safeguard = _userSafeguard[operation.user];\n if (safeguard.length > 0) IOperationsValidator(operationsValidator).validate(operation, safeguard);\n }\n }\n\n bool shouldValidateDeadlines = _shouldValidateDeadlines(intent);\n if (shouldValidateDeadlines) {\n if (intent.deadline <= block.timestamp) revert SettlerIntentPastDeadline(intent.deadline, block.timestamp);\n bool isProposalPastDeadline = proposal.deadline <= block.timestamp;\n if (isProposalPastDeadline) revert SettlerProposalPastDeadline(proposal.deadline, block.timestamp);\n }\n\n if (intent.maxFees.length != proposal.fees.length) revert SettlerSolverFeeInvalidLength();\n for (uint256 i = 0; i < intent.maxFees.length; i++) {\n uint256 maxFee = intent.maxFees[i].amount;\n uint256 proposalFee = proposal.fees[i];\n if (proposalFee > maxFee) revert SettlerSolverFeeTooHigh(proposalFee, maxFee);\n }\n\n uint8 minValidations = IController(controller).minValidations();\n uint256 requiredValidations = intent.minValidations > minValidations ? intent.minValidations : minValidations;\n\n if (intent.validations.length < requiredValidations) {\n revert SettlerIntentValidationsNotEnough(requiredValidations, intent.validations.length);\n }\n\n address lastValidator = address(0);\n Validation memory validation = Validation(intentHash);\n bytes32 typedDataHash = _hashTypedDataV4(validation.hash());\n for (uint256 i = 0; i < intent.validations.length; i++) {\n address validator = ECDSA.recover(typedDataHash, intent.validations[i]);\n if (validator <= lastValidator) {\n revert SettlerValidatorDuplicatedOrUnsorted(lastValidator, validator);\n }\n lastValidator = validator;\n bool isValidatorNotAllowed = !IController(controller).isValidatorAllowed(validator);\n if (isValidatorNotAllowed) revert SettlerValidatorNotAllowed(validator);\n }\n\n address signer = ECDSA.recover(_hashTypedDataV4(proposal.hash(intent, _msgSender())), signature);\n bool isProposalSignerNotAllowed = !IController(controller).isProposalSignerAllowed(signer) && !simulated;\n if (isProposalSignerNotAllowed) revert SettlerProposalSignerNotAllowed(signer);\n }\n\n /**\n * @dev Validates a swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateSwapOperation(SwapOperation memory operation, SwapProposal memory proposal) internal view {\n if (proposal.amountsOut.length != operation.tokensOut.length) revert SettlerInvalidProposedAmounts();\n\n for (uint256 i = 0; i < operation.tokensOut.length; i++) {\n TokenOut memory tokenOut = operation.tokensOut[i];\n address recipient = tokenOut.recipient;\n if (recipient == address(this)) revert SettlerInvalidRecipient(recipient);\n\n uint256 minAmount = tokenOut.minAmount;\n uint256 proposedAmount = proposal.amountsOut[i];\n if (proposedAmount < minAmount) revert SettlerProposedAmountLtMinAmount(i, proposedAmount, minAmount);\n }\n }\n\n /**\n * @dev Validates a single-chain swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateSingleChainSwapOperation(SwapOperation memory operation, SwapProposal memory proposal)\n internal\n view\n {\n if (operation.sourceChain != operation.destinationChain) revert SettlerOperationChainsMismatch();\n if (operation.sourceChain != block.chainid) revert SettlerInvalidChain(block.chainid);\n _validateSwapOperation(operation, proposal);\n }\n\n /**\n * @dev Validates a transfer operation and its corresponding proposal\n * @param operation Transfer operation to be fulfilled\n * @param proposalData data of the proposal\n */\n function _validateTransferOperation(TransferOperation memory operation, bytes memory proposalData) internal view {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n for (uint256 i = 0; i < operation.transfers.length; i++) {\n address recipient = operation.transfers[i].recipient;\n if (recipient == address(this)) revert SettlerInvalidRecipient(recipient);\n }\n }\n\n /**\n * @dev Validates a call operation and its corresponding proposal\n * @param operation Call operation to be fulfilled\n * @param proposalData data of the proposal\n * @param user The originator of the operation\n */\n function _validateCallOperation(CallOperation memory operation, bytes memory proposalData, address user)\n internal\n view\n {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n if (!smartAccountsHandler.isSmartAccount(user)) revert SettlerUserNotSmartAccount(user);\n }\n\n /**\n * @dev Validates a dynamic call operation and its corresponding proposal\n * @param operation Dynamic call operation to be fulfilled\n * @param proposalData data of the proposal\n * @param user The originator of the operation\n */\n function _validateDynamicCallOperation(\n DynamicCallOperation memory operation,\n bytes memory proposalData,\n address user\n ) internal view {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n if (!smartAccountsHandler.isSmartAccount(user)) revert SettlerUserNotSmartAccount(user);\n }\n\n /**\n * @dev Validates a cross-chain swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateCrossChainSwapOperation(SwapOperation memory operation, SwapProposal memory proposal)\n internal\n view\n {\n if (operation.sourceChain == operation.destinationChain) revert SettlerOperationChainsMismatch();\n bool isChainInvalid = operation.sourceChain != block.chainid && operation.destinationChain != block.chainid;\n if (isChainInvalid) revert SettlerInvalidChain(block.chainid);\n _validateSwapOperation(operation, proposal);\n bool isExecutorInvalid = !IController(controller).isExecutorAllowed(proposal.executor);\n if (isExecutorInvalid) revert SettlerExecutorNotAllowed(proposal.executor);\n }\n\n /**\n * @dev Tells the contract balance for each token out of a swap operation\n * @param operation Swap operation containing the list of tokens out\n */\n function _getTokensOutBalance(SwapOperation memory operation) internal view returns (uint256[] memory balances) {\n balances = new uint256[](operation.tokensOut.length);\n if (operation.destinationChain == block.chainid) {\n for (uint256 i = 0; i < operation.tokensOut.length; i++) {\n balances[i] = ERC20Helpers.balanceOf(operation.tokensOut[i].token, address(this));\n }\n }\n }\n\n /**\n * @dev Tells if the intent and proposal deadlines should be validated\n In the case the intent is being executed on the destination chain of a cross-chain swap, the deadlines are ignored\n * @param intent Intent to be fulfilled\n */\n function _shouldValidateDeadlines(Intent memory intent) internal view returns (bool) {\n // Cross-chain operation can only be the first (and only) operation\n Operation memory operation = intent.operations[0];\n if (operation.opType != uint8(OpType.CrossChainSwap)) return true;\n SwapOperation memory swapIntent = abi.decode(operation.data, (SwapOperation));\n return swapIntent.sourceChain == block.chainid;\n }\n\n /**\n * @dev Emits operation custom events\n * @param operation Operation to emit the custom events for\n * @param proposal Proposal that fulfills the operation\n * @param intentHash Hash of the intent the operation belongs to\n * @param index Position of the operation on operations\n * @param output Encoded array of outputs\n */\n function _emitOperationEvents(\n Operation memory operation,\n Proposal memory proposal,\n bytes32 intentHash,\n uint256 index,\n bytes memory output\n ) internal {\n for (uint256 i = 0; i < operation.events.length; i++) {\n OperationEvent memory operationEvent = operation.events[i];\n emit OperationExecuted(\n operation.user,\n operationEvent.topic,\n uint8(operation.opType),\n operation,\n proposal,\n intentHash,\n index,\n output,\n operationEvent.data\n );\n }\n }\n\n /**\n * @dev Pays fees from the intent feePayer\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _payFees(Intent memory intent, Proposal memory proposal) internal {\n // A CrossChainSwap only pays fees on destination chain and must be the only operation\n if (intent.operations[0].opType == uint8(OpType.CrossChainSwap)) {\n SwapOperation memory swapOperation = abi.decode(intent.operations[0].data, (SwapOperation));\n if (swapOperation.sourceChain == block.chainid) return;\n }\n address from = intent.feePayer;\n address to = _msgSender();\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(from);\n for (uint256 i = 0; i < intent.maxFees.length; i++) {\n address token = intent.maxFees[i].token;\n if (!Denominations.isUSD(token)) _transferFrom(token, from, to, proposal.fees[i], isSmartAccount);\n }\n }\n\n /**\n * @dev Transfers tokens from one account to another\n * @param token Address of the token to transfer\n * @param from Address of the account sending the tokens\n * @param to Address of the account receiving the tokens\n * @param amount Amount of tokens to transfer\n * @param isSmartAccount Whether the sender is a smart account\n */\n function _transferFrom(address token, address from, address to, uint256 amount, bool isSmartAccount) internal {\n if (isSmartAccount) {\n smartAccountsHandler.transfer(from, token, to, amount);\n } else {\n IERC20(token).safeTransferFrom(from, to, amount);\n }\n }\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function _setSmartAccountsHandler(address newSmartAccountsHandler) internal {\n if (newSmartAccountsHandler == address(0)) revert SmartAccountsHandlerZero();\n smartAccountsHandler = newSmartAccountsHandler;\n emit SmartAccountsHandlerSet(newSmartAccountsHandler);\n }\n\n /**\n * @dev Sets the operations validator\n * @param newOperationsValidator New operations validator to be set\n */\n function _setOperationsValidator(address newOperationsValidator) internal {\n operationsValidator = newOperationsValidator;\n emit OperationsValidatorSet(newOperationsValidator);\n }\n\n /**\n * @dev Sets the dynamic call encoder\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function _setDynamicCallEncoder(address newDynamicCallEncoder) internal {\n if (newDynamicCallEncoder == address(0)) revert SettlerDynamicCallEncoderZero();\n dynamicCallEncoder = newDynamicCallEncoder;\n emit DynamicCallEncoderSet(newDynamicCallEncoder);\n }\n\n /**\n * @dev Sets a safeguard for a user\n * @param user Address of the user to set the safeguard for\n * @param safeguard Safeguard to be set\n */\n function _setSafeguard(address user, bytes memory safeguard) internal {\n delete _userSafeguard[user];\n _userSafeguard[user] = safeguard;\n emit SafeguardSet(user);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccount7702.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/Context.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccount.sol';\nimport '../utils/ERC20Helpers.sol';\nimport './SmartAccountBase.sol';\n\n/**\n * @title SmartAccount7702\n * @dev Provides the smart account logic to use with EIP7702\n */\ncontract SmartAccount7702 is SmartAccountBase {\n // Mimic settler reference\n // solhint-disable-next-line immutable-vars-naming\n address public immutable settler;\n\n /**\n * @dev The sender is not the settler\n */\n error SmartAccount7702SenderNotSettler();\n\n /**\n * @dev Reverts unless the sender is the settler\n */\n modifier onlySettler() {\n if (_msgSender() != settler) revert SmartAccount7702SenderNotSettler();\n _;\n }\n\n /**\n * @dev Creates a new SmartAccount7702 contract\n * @param _settler Address of the Mimic settler\n */\n constructor(address _settler) {\n settler = _settler;\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) public override onlySettler {\n super.transfer(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value) public override onlySettler returns (bytes memory) {\n // solhint-disable-next-line avoid-low-level-calls\n return super.call(target, data, value);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountBase.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/Context.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccount.sol';\nimport '../utils/ERC20Helpers.sol';\n\n/**\n * @title SmartAccountBase\n * @dev Provides the base logic for managing assets and executing arbitrary calls\n */\ncontract SmartAccountBase is ISmartAccount, Context, ERC165, ReentrancyGuard {\n /**\n * @dev Tells whether the contract supports the given interface ID. Overrides ERC165 to declare support for ISmartAccount interface.\n * @param interfaceId Interface ID is defined as the XOR of all function selectors in the interface\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {\n return interfaceId == type(ISmartAccount).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) public virtual override nonReentrant {\n ERC20Helpers.transfer(token, recipient, amount);\n emit Transferred(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value)\n public\n virtual\n override\n nonReentrant\n returns (bytes memory result)\n {\n result = Address.functionCallWithValue(target, data, value);\n emit Called(target, data, value, result);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountContract.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccountContract.sol';\nimport './SmartAccountBase.sol';\n\n/**\n * @title SmartAccountContract\n * @dev Provides the smart account logic to use as a standalone contract\n */\ncontract SmartAccountContract is ISmartAccountContract, Ownable, SmartAccountBase {\n // EIP1271 magic return value\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x1626ba7e;\n\n // EIP1271 invalid signature return value\n bytes4 internal constant EIP1271_INVALID_SIGNATURE = 0xffffffff;\n\n // List of account permissions\n mapping (address => bool) public isSignerAllowed;\n\n // Mimic settler reference\n address public settler;\n\n /**\n * @dev The settler is zero\n */\n error SmartAccountSettlerZero();\n\n /**\n * @dev The input arrays are not of equal length\n */\n error SmartAccountInputInvalidLength();\n\n /**\n * @dev The sender is not the owner or the settler\n */\n error SmartAccountUnauthorizedSender(address sender);\n\n /**\n * @dev Emitted every time the settler is set\n */\n event SettlerSet(address indexed settler);\n\n /**\n * @dev Emitted every time a signer allowance is set\n */\n event SignerAllowedSet(address indexed account, bool allowed);\n\n /**\n * @dev Reverts unless the sender is the owner or the settler\n */\n modifier onlyOwnerOrSettler() {\n address sender = _msgSender();\n bool isAuthorized = sender == owner() || sender == settler;\n if (!isAuthorized) revert SmartAccountUnauthorizedSender(sender);\n _;\n }\n\n /**\n * @dev Creates a new SmartAccount contract\n * @param _settler Address of the Mimic settler\n * @param _owner Address that will own the contract\n */\n constructor(address _settler, address _owner) Ownable(_owner) {\n _setSettler(_settler);\n }\n\n /**\n * @dev Tells whether the signature provided belongs to an allowed account.\n * @param hash Message signed by the account\n * @param signature Signature provided to be verified\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view override returns (bytes4) {\n (address signer, , ) = ECDSA.tryRecover(hash, signature);\n if (signer != address(0) && (signer == owner() || isSignerAllowed[signer])) return EIP1271_MAGIC_VALUE;\n return EIP1271_INVALID_SIGNATURE;\n }\n\n /**\n * @dev It allows receiving native token transfers\n */\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n /**\n * @dev Sets the settler. Sender must be the owner.\n * @param newSettler Address of the new settler to be set\n */\n function setSettler(address newSettler) external onlyOwner {\n _setSettler(newSettler);\n }\n\n /**\n * @dev Sets a list of allowed signers. Sender must be the owner.\n * @param accounts List of account addresses\n * @param allowances List of allowed condition per account\n */\n function setAllowedSigners(address[] memory accounts, bool[] memory allowances) external onlyOwner {\n if (accounts.length != allowances.length) revert SmartAccountInputInvalidLength();\n for (uint256 i = 0; i < accounts.length; i++) {\n address account = accounts[i];\n bool allowed = allowances[i];\n isSignerAllowed[account] = allowed;\n emit SignerAllowedSet(account, allowed);\n }\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the owner or the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount)\n public\n override(ISmartAccount, SmartAccountBase)\n onlyOwnerOrSettler\n {\n super.transfer(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the owner or the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value)\n public\n override(ISmartAccount, SmartAccountBase)\n onlyOwnerOrSettler\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n return super.call(target, data, value);\n }\n\n /**\n * @dev Sets the settler\n * @param newSettler Address of the new settler to be set\n */\n function _setSettler(address newSettler) internal {\n if (newSettler == address(0)) revert SmartAccountSettlerZero();\n settler = newSettler;\n emit SettlerSet(newSettler);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountsHandler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport '../interfaces/ISafe.sol';\nimport '../interfaces/ISmartAccount.sol';\nimport '../interfaces/ISmartAccountsHandler.sol';\nimport '../utils/Denominations.sol';\n\ncontract SmartAccountsHandler is ISmartAccountsHandler {\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address account) external view override returns (bool) {\n if (account.code.length == 0) return false;\n if (_isMimicSmartAccount(account)) return true;\n if (_isSafe(account)) return true;\n return false;\n }\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address account, address token, address to, uint256 amount) external override {\n if (_isMimicSmartAccount(account)) return ISmartAccount(account).transfer(token, to, amount);\n if (_isSafe(account)) return _transferSafe(account, token, to, amount);\n revert SmartAccountsHandlerUnsupportedAccount(account);\n }\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address account, address target, bytes memory data, uint256 value)\n external\n override\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n if (_isMimicSmartAccount(account)) return ISmartAccount(account).call(target, data, value);\n if (_isSafe(account)) return _callSafe(account, target, data, value);\n revert SmartAccountsHandlerUnsupportedAccount(account);\n }\n\n /**\n * @dev Performs a transfer from a safe\n */\n function _transferSafe(address account, address token, address to, uint256 amount) internal {\n Denominations.isNativeToken(token)\n ? _callSafe(account, to, new bytes(0), amount)\n : _callSafe(account, token, abi.encodeWithSelector(IERC20.transfer.selector, to, amount), 0);\n }\n\n /**\n * @dev Performs a call from a safe\n */\n function _callSafe(address account, address target, bytes memory data, uint256 value)\n internal\n returns (bytes memory)\n {\n (bool success, bytes memory result) = ISafe(account).execTransactionFromModuleReturnData(\n target,\n value,\n data,\n SafeOperation.Call\n );\n return\n data.length == 0\n ? Address.verifyCallResult(success, result)\n : Address.verifyCallResultFromTarget(target, success, result);\n }\n\n /**\n * @dev Tells whether an account is a Mimic smart account\n * @param account Address of the account being queried\n */\n function _isMimicSmartAccount(address account) internal view returns (bool) {\n try ISmartAccount(account).supportsInterface(type(ISmartAccount).interfaceId) returns (bool ok) {\n return ok;\n } catch {\n return false;\n }\n }\n\n /**\n * @dev Tells whether an account is a Gnosis Safe\n * @param account Address of the account being queried\n */\n function _isSafe(address account) internal view returns (bool) {\n try ISafe(account).getThreshold() returns (uint256) {\n return true;\n } catch {\n return false;\n }\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountsHandlerHelpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport '../interfaces/ISmartAccountsHandler.sol';\n\nlibrary SmartAccountsHandlerHelpers {\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address handler, address account) internal view returns (bool) {\n return ISmartAccountsHandler(handler).isSmartAccount(account);\n }\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address handler, address account, address token, address to, uint256 amount) internal {\n Address.functionDelegateCall(\n handler,\n abi.encodeWithSelector(ISmartAccountsHandler.transfer.selector, account, token, to, amount)\n );\n }\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address handler, address account, address target, bytes memory data, uint256 value)\n internal\n returns (bytes memory result)\n {\n result = Address.functionDelegateCall(\n handler,\n abi.encodeWithSelector(ISmartAccountsHandler.call.selector, account, target, data, value)\n );\n // Skip the ABI-encoded offset and length of the outer `bytes` to point at the inner payload\n assembly {\n result := add(result, 64)\n }\n }\n}\n" + }, + "project/contracts/test/CallMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\ncontract CallMock {\n event CallReceived(address indexed sender, uint256 value);\n error CallError();\n\n function call() external payable {\n emit CallReceived(msg.sender, msg.value);\n }\n\n function callError() external payable {\n revert CallError();\n }\n}\n" + }, + "project/contracts/test/dynamic-calls/StaticCallMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\ncontract StaticCallMock {\n struct StructMock {\n uint256 a;\n address b;\n }\n\n function returnUint(uint256 value) external pure returns (uint256) {\n return value;\n }\n\n function returnAddress(address value) external payable returns (address) {\n return value;\n }\n\n function returnArray(uint256[] calldata value) external pure returns (uint256[] memory) {\n return value;\n }\n\n function returnFixedArray(uint256[3] calldata value) external pure returns (uint256[3] memory) {\n return value;\n }\n\n function returnStruct(StructMock calldata value) external pure returns (StructMock memory) {\n return value;\n }\n}\n" + }, + "project/contracts/test/executors/EmptyExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\n\ncontract EmptyExecutorMock is IExecutor {\n event Executed();\n\n function execute(Operation memory, bytes32, bytes memory) external override {\n emit Executed();\n }\n}\n" + }, + "project/contracts/test/executors/MintExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../TokenMock.sol';\nimport '../../interfaces/IExecutor.sol';\n\n/* solhint-disable custom-errors */\n\ncontract MintExecutorMock is IExecutor {\n event Minted();\n\n function execute(Operation memory operation, bytes32, bytes memory proposalData) external override {\n require(\n operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap),\n 'Invalid operation type'\n );\n\n SwapProposal memory swapProposal = abi.decode(proposalData, (SwapProposal));\n (address[] memory tokens, uint256[] memory amounts) = abi.decode(swapProposal.data, (address[], uint256[]));\n\n require(tokens.length == amounts.length, 'Invalid inputs');\n\n for (uint256 i = 0; i < tokens.length; i++) {\n TokenMock(tokens[i]).mint(msg.sender, amounts[i]);\n emit Minted();\n }\n }\n}\n" + }, + "project/contracts/test/executors/ReentrantExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\nimport '../../interfaces/ISettler.sol';\n\ncontract ReentrantExecutorMock is IExecutor {\n // solhint-disable-next-line immutable-vars-naming\n address payable public immutable settler;\n\n constructor(address payable _settler) {\n settler = _settler;\n }\n\n function execute(Operation memory, bytes32, bytes memory) external override {\n Intent memory intent;\n Proposal memory proposal;\n ISettler(settler).execute(intent, proposal, new bytes(0));\n }\n}\n" + }, + "project/contracts/test/executors/TransferExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\nimport '../../utils/ERC20Helpers.sol';\n\n/* solhint-disable custom-errors */\n\ncontract TransferExecutorMock is IExecutor {\n event Transferred();\n\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n function execute(Operation memory operation, bytes32, bytes memory proposalData) external override {\n require(\n operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap),\n 'Invalid operation type'\n );\n\n SwapProposal memory swapProposal = abi.decode(proposalData, (SwapProposal));\n (address[] memory tokens, uint256[] memory amounts) = abi.decode(swapProposal.data, (address[], uint256[]));\n\n require(tokens.length == amounts.length, 'Invalid inputs');\n\n for (uint256 i = 0; i < tokens.length; i++) {\n ERC20Helpers.transfer(tokens[i], msg.sender, amounts[i]);\n emit Transferred();\n }\n }\n}\n" + }, + "project/contracts/test/SettlerV2Mock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../Settler.sol';\n\ncontract SettlerV2Mock is Settler {\n function someNewFunction() external pure returns (string memory) {\n return 'Some new function';\n }\n}\n" + }, + "project/contracts/test/smart-accounts/SafeMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/ISafe.sol';\n\ncontract SafeMock is ISafe {\n event ModuleTxExecuted(\n address indexed target,\n bytes data,\n uint256 value,\n SafeOperation operation,\n bool success,\n bytes result\n );\n\n receive() external payable {}\n\n function getThreshold() external pure returns (uint256) {\n return 1;\n }\n\n function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, SafeOperation operation)\n external\n returns (bool success, bytes memory result)\n {\n // solhint-disable-next-line avoid-low-level-calls\n (success, result) = to.call{ value: value }(data);\n emit ModuleTxExecuted(to, data, value, operation, success, result);\n }\n}\n" + }, + "project/contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../smart-accounts/SmartAccountsHandlerHelpers.sol';\n\ncontract SmartAccountsHandlerHelpersMock {\n using SmartAccountsHandlerHelpers for address;\n\n function call(address handler, address account, address target, bytes memory data, uint256 value)\n external\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n return handler.call(account, target, data, value);\n }\n}\n" + }, + "project/contracts/test/TokenMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\n\ncontract TokenMock is ERC20 {\n uint8 internal _decimals;\n\n constructor(string memory symbol, uint8 dec) ERC20(symbol, symbol) {\n _decimals = dec;\n }\n\n function mint(address account, uint256 amount) external {\n _mint(account, amount);\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n}\n" + }, + "project/contracts/test/utils/BytesHelpersMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.24;\n\nimport '../../utils/BytesHelpers.sol';\n\ncontract BytesHelpersMock {\n using BytesHelpers for bytes;\n\n function readWord0(bytes memory data) external pure returns (uint256) {\n return data.readWord0();\n }\n\n function readWord1(bytes memory data) external pure returns (uint256) {\n return data.readWord1();\n }\n\n function slice(bytes memory data, uint256 start, uint256 end) external pure returns (bytes memory) {\n return data.slice(start, end);\n }\n\n function sliceFrom(bytes memory data, uint256 start) external pure returns (bytes memory) {\n return data.sliceFrom(start);\n }\n}\n" + }, + "project/contracts/test/utils/DenominationsMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../../utils/Denominations.sol';\n\n// solhint-disable func-name-mixedcase\n\ncontract DenominationsMock {\n function NATIVE_TOKEN() external pure returns (address) {\n return Denominations.NATIVE_TOKEN;\n }\n\n function USD() external pure returns (address) {\n return Denominations.USD;\n }\n}\n" + }, + "project/contracts/test/utils/ERC20HelpersMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../../utils/ERC20Helpers.sol';\n\ncontract ERC20HelpersMock {\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n function approve(address token, address to, uint256 amount) external {\n ERC20Helpers.approve(token, to, amount);\n }\n\n function transfer(address token, address to, uint256 amount) external {\n ERC20Helpers.transfer(token, to, amount);\n }\n\n function balanceOf(address token, address account) external view returns (uint256) {\n return ERC20Helpers.balanceOf(token, account);\n }\n}\n" + }, + "project/contracts/utils/BytesHelpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.24;\n\n/**\n * @title BytesHelpers\n * @dev Collection of low-level helpers to operate on `bytes` values in memory.\n */\nlibrary BytesHelpers {\n /**\n * @dev Thrown when a slice operation exceeds the bounds of the input bytes\n */\n error BytesLibSliceOutOfBounds();\n\n /**\n * @dev Reads the first 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @return result First ABI word of `data`\n */\n function readWord0(bytes memory data) internal pure returns (uint256) {\n return readWord(data, 0);\n }\n\n /**\n * @dev Reads the second 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @return result Second ABI word of `data`\n */\n function readWord1(bytes memory data) internal pure returns (uint256) {\n return readWord(data, 1);\n }\n\n /**\n * @dev Reads the N-th 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @param index Word index to read (0-based)\n * @return result N-th ABI word of `data`\n */\n function readWord(bytes memory data, uint256 index) private pure returns (uint256 result) {\n assembly {\n result := mload(add(data, add(32, mul(index, 32))))\n }\n }\n\n /**\n * @dev Returns a slice of a bytes array from `start` (inclusive) to `end` (exclusive)\n * @param data Bytes array to slice\n * @param start Starting byte index (inclusive)\n * @param end Ending byte index (exclusive)\n */\n function slice(bytes memory data, uint256 start, uint256 end) internal pure returns (bytes memory out) {\n if (end < start) revert BytesLibSliceOutOfBounds();\n if (end > data.length) revert BytesLibSliceOutOfBounds();\n\n uint256 len = end - start;\n out = new bytes(len);\n\n assembly {\n let src := add(add(data, 32), start)\n let dst := add(out, 32)\n mcopy(dst, src, len)\n }\n }\n\n /**\n * @dev Returns a slice of a bytes array starting at `start` until the end\n * @param data Bytes array to slice\n * @param start Starting byte index (inclusive)\n */\n function sliceFrom(bytes memory data, uint256 start) internal pure returns (bytes memory out) {\n return slice(data, start, data.length);\n }\n}\n" + }, + "project/contracts/utils/Denominations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @title Denominations\n * @dev Provides a list of ground denominations for those tokens that cannot be represented by an ERC20.\n * For now, the only needed is the native token that could be ETH, MATIC, or other depending on the layer being operated.\n */\nlibrary Denominations {\n address internal constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n // Fiat currencies follow https://en.wikipedia.org/wiki/ISO_4217\n address internal constant USD = address(840);\n\n function isUSD(address token) internal pure returns (bool) {\n return token == USD;\n }\n\n function isNativeToken(address token) internal pure returns (bool) {\n return token == NATIVE_TOKEN;\n }\n}\n" + }, + "project/contracts/utils/ERC20Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport './Denominations.sol';\n\n/**\n * @title ERC20Helpers\n * @dev Provides a list of ERC20 helper methods\n */\nlibrary ERC20Helpers {\n function approve(address token, address to, uint256 amount) internal {\n SafeERC20.forceApprove(IERC20(token), to, amount);\n }\n\n function transfer(address token, address to, uint256 amount) internal {\n if (Denominations.isNativeToken(token)) Address.sendValue(payable(to), amount);\n else SafeERC20.safeTransfer(IERC20(token), to, amount);\n }\n\n function balanceOf(address token, address account) internal view returns (uint256) {\n if (Denominations.isNativeToken(token)) return address(account).balance;\n else return IERC20(token).balanceOf(address(account));\n }\n}\n" + }, + "project/contracts/utils/MimicHelper.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @title Mimic Helper\n * @dev Collection of helper functions for the Mimic Protocol\n */\ncontract MimicHelper {\n // Custom byte storage per user and key\n mapping (address => mapping (string => bytes)) internal _customStorage;\n\n /**\n * @dev Emitted every time the storage is set\n */\n event StorageSet(address indexed user, string indexed key, bytes indexed data);\n\n /**\n * @dev Tells the native token balance of an address\n * @param target Address to get native token balance\n */\n function getNativeTokenBalance(address target) external view returns (uint256) {\n return target.balance;\n }\n\n /**\n * @dev Tells the code of an address\n * @param target Address to get code\n */\n function getCode(address target) external view returns (bytes memory) {\n return target.code;\n }\n\n /**\n * @dev Tells the data set for the user and the key\n * @param user Address of the user being queried\n * @param key String of the key being queried\n */\n function getStorage(address user, string calldata key) external view returns (bytes memory) {\n return _customStorage[user][key];\n }\n\n /**\n * @dev Sets a data for the user and a key\n * @param key String of the key to set the data for\n * @param data Bytes to be set\n */\n function setStorage(string calldata key, bytes memory data) external {\n _customStorage[msg.sender][key] = data;\n emit StorageSet(msg.sender, key, data);\n }\n}\n" + } + } + } +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-100/deployed_addresses.json b/packages/evm/ignition/deployments/chain-100/deployed_addresses.json index f6f9d5f..9086ca7 100644 --- a/packages/evm/ignition/deployments/chain-100/deployed_addresses.json +++ b/packages/evm/ignition/deployments/chain-100/deployed_addresses.json @@ -10,5 +10,9 @@ "Create3Proxy#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", "Create3Proxy#Proxy": "0x8be430d29a2c5692f9345a28506b849C6a99eDaA", "Create3SmartAccount7702#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", - "Create3SmartAccount7702#SmartAccount7702": "0x14AE3C251881d2214E376bfa38dD98A4Bd33550c" + "Create3SmartAccount7702#SmartAccount7702": "0x14AE3C251881d2214E376bfa38dD98A4Bd33550c", + "Create3DynamicCallEncoderV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", + "Create3DynamicCallEncoderV1#DynamicCallEncoder": "0x183E61BDE23a80f4D1e003653288d4B4551681ed", + "Create3SettlerV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", + "Create3SettlerV1#Settler": "0x3734D7284f46037688252b13ef6d88E3FFDF5e1B" } \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-100/journal.jsonl b/packages/evm/ignition/deployments/chain-100/journal.jsonl index d2b26da..171f949 100644 --- a/packages/evm/ignition/deployments/chain-100/journal.jsonl +++ b/packages/evm/ignition/deployments/chain-100/journal.jsonl @@ -86,4 +86,22 @@ {"futureId":"Create3SmartAccount7702#ICreateX.deployCreate3","hash":"0x0771445722b2120dd628fe9d8d125126c85769d9df2a269f33c789b26e2b4a9b","networkInteractionId":1,"receipt":{"blockHash":"0x390a1cc1cf16c112cf12abdad6b4ab727c018c8274b176c372d263491d0e5ef3","blockNumber":45935729,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":29,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x000000000000000000000000b800ea953426e361efda80da69765895ab3b04da","0x4d548e60a06ca5826dcab93682802743ae2369c7da6162da7a3f4201826a6d33"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":30,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x00000000000000000000000014ae3c251881d2214e376bfa38dd98a4bd33550c"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} {"futureId":"Create3SmartAccount7702#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} {"artifactId":"Create3SmartAccount7702#ICreateX","dependencies":["Create3SmartAccount7702#ICreateX.deployCreate3","Create3SmartAccount7702#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","strategy":"basic","strategyConfig":{},"txToReadFrom":"0x0771445722b2120dd628fe9d8d125126c85769d9df2a269f33c789b26e2b4a9b","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} -{"artifactId":"Create3SmartAccount7702#SmartAccount7702","contractAddress":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","contractName":"SmartAccount7702","dependencies":["Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SmartAccount7702#SmartAccount7702","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} \ No newline at end of file +{"artifactId":"Create3SmartAccount7702#SmartAccount7702","contractAddress":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","contractName":"SmartAccount7702","dependencies":["Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SmartAccount7702#SmartAccount7702","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3DynamicCallEncoderV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","contractName":"ICreateX","dependencies":[],"futureId":"Create3DynamicCallEncoderV1#ICreateX","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"args":["0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b000000000000000004302606","0x6080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033"],"artifactId":"Create3DynamicCallEncoderV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","dependencies":["Create3DynamicCallEncoderV1#ICreateX"],"from":"0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b","functionName":"deployCreate3","futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","strategy":"basic","strategyConfig":{},"type":"CALL_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000c586080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c00330000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":35,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":35,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"121"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"69"}},"hash":"0x2cacfcbac96b5724c7a73f9b9ca0bcea745a32d7f725be313cf94ffaae11eef2"},"type":"TRANSACTION_SEND"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","hash":"0x2cacfcbac96b5724c7a73f9b9ca0bcea745a32d7f725be313cf94ffaae11eef2","networkInteractionId":1,"receipt":{"blockHash":"0xe9d6a7bd1a60cc5b15b4cda5ccde4ff34ffc5583603d5f6d0da0f7a422f3f654","blockNumber":45938219,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":70,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x0000000000000000000000001d9bd3390aaef5bbcf3beb4f60e0ee28805f6779","0xa13cc826172bbf7683ce89033f741800ae55529a93ee495908820a8471d913b0"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":71,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x000000000000000000000000183e61bde23a80f4d1e003653288d4b4551681ed"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} +{"artifactId":"Create3DynamicCallEncoderV1#ICreateX","dependencies":["Create3DynamicCallEncoderV1#ICreateX.deployCreate3","Create3DynamicCallEncoderV1#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3DynamicCallEncoderV1#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x183E61BDE23a80f4D1e003653288d4B4551681ed","strategy":"basic","strategyConfig":{},"txToReadFrom":"0x2cacfcbac96b5724c7a73f9b9ca0bcea745a32d7f725be313cf94ffaae11eef2","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","contractAddress":"0x183E61BDE23a80f4D1e003653288d4B4551681ed","contractName":"DynamicCallEncoder","dependencies":["Create3DynamicCallEncoderV1#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","contractName":"ICreateX","dependencies":[],"futureId":"Create3SettlerV1#ICreateX","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"args":["0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b000000000000000004302605","0x6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033"],"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","dependencies":["Create3SettlerV1#ICreateX"],"from":"0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b","functionName":"deployCreate3","futureId":"Create3SettlerV1#ICreateX.deployCreate3","strategy":"basic","strategyConfig":{},"type":"CALL_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000005d166080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c003300000000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":37,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":37,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"117"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"69"}},"hash":"0xac16be405d349f0d1beec922f3382ef38efd8f28d0bc6bd73dbcae3cd179748f"},"type":"TRANSACTION_SEND"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","hash":"0xac16be405d349f0d1beec922f3382ef38efd8f28d0bc6bd73dbcae3cd179748f","networkInteractionId":1,"receipt":{"blockHash":"0x9c45806001e8b8afa733299a9c89d55cddf6917f748141f7d20a43318b10b19a","blockNumber":45938265,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":103,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x000000000000000000000000b5439ac30ce4daeb02b265d758436e65087047ab","0x660e7900ab9b67f261d92573714530e140aa4f3b2855e1dd677cfa672309b2ee"]},{"address":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","data":"0x000000000000000000000000000000000000000000000000ffffffffffffffff","logIndex":104,"topics":["0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":105,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x0000000000000000000000003734d7284f46037688252b13ef6d88e3ffdf5e1b"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} +{"artifactId":"Create3SettlerV1#ICreateX","dependencies":["Create3SettlerV1#ICreateX.deployCreate3","Create3SettlerV1#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3SettlerV1#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","strategy":"basic","strategyConfig":{},"txToReadFrom":"0xac16be405d349f0d1beec922f3382ef38efd8f28d0bc6bd73dbcae3cd179748f","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3SettlerV1#Settler","contractAddress":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","contractName":"Settler","dependencies":["Create3SettlerV1#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SettlerV1#Settler","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-137/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json b/packages/evm/ignition/deployments/chain-137/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-137/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-137/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json b/packages/evm/ignition/deployments/chain-137/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json new file mode 100644 index 0000000..aa424ed --- /dev/null +++ b/packages/evm/ignition/deployments/chain-137/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json @@ -0,0 +1,117 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "DynamicCallEncoder", + "sourceName": "contracts/dynamic-calls/DynamicCallEncoder.sol", + "abi": [ + { + "inputs": [], + "name": "BytesLibSliceOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderBadLength", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderEmptyDynamic", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderInvalidArgKind", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariableOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariableRefBadLength", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariablesLengthOutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum DynamicArgKind", + "name": "kind", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "isDynamic", + "type": "bool" + } + ], + "internalType": "struct DynamicArg[]", + "name": "arguments", + "type": "tuple[]" + } + ], + "internalType": "struct DynamicCall", + "name": "dynamicCall", + "type": "tuple" + }, + { + "internalType": "bytes[][]", + "name": "variables", + "type": "bytes[][]" + }, + { + "internalType": "uint256", + "name": "variablesLength", + "type": "uint256" + } + ], + "name": "encode", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/dynamic-calls/DynamicCallEncoder.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-137/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json b/packages/evm/ignition/deployments/chain-137/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-137/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-137/artifacts/Create3DynamicCallEncoderV1#ICreateX.json b/packages/evm/ignition/deployments/chain-137/artifacts/Create3DynamicCallEncoderV1#ICreateX.json new file mode 100644 index 0000000..837192d --- /dev/null +++ b/packages/evm/ignition/deployments/chain-137/artifacts/Create3DynamicCallEncoderV1#ICreateX.json @@ -0,0 +1,51 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "ICreateX", + "sourceName": "contracts/interfaces/ICreateX.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "name": "ContractCreation", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + } + ], + "name": "deployCreate3", + "outputs": [ + { + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/interfaces/ICreateX.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-137/artifacts/Create3SettlerV1#ICreateX.dbg.json b/packages/evm/ignition/deployments/chain-137/artifacts/Create3SettlerV1#ICreateX.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-137/artifacts/Create3SettlerV1#ICreateX.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-137/artifacts/Create3SettlerV1#ICreateX.json b/packages/evm/ignition/deployments/chain-137/artifacts/Create3SettlerV1#ICreateX.json new file mode 100644 index 0000000..837192d --- /dev/null +++ b/packages/evm/ignition/deployments/chain-137/artifacts/Create3SettlerV1#ICreateX.json @@ -0,0 +1,51 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "ICreateX", + "sourceName": "contracts/interfaces/ICreateX.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "name": "ContractCreation", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + } + ], + "name": "deployCreate3", + "outputs": [ + { + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/interfaces/ICreateX.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-137/artifacts/Create3SettlerV1#Settler.dbg.json b/packages/evm/ignition/deployments/chain-137/artifacts/Create3SettlerV1#Settler.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-137/artifacts/Create3SettlerV1#Settler.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-137/artifacts/Create3SettlerV1#Settler.json b/packages/evm/ignition/deployments/chain-137/artifacts/Create3SettlerV1#Settler.json new file mode 100644 index 0000000..cd9fdca --- /dev/null +++ b/packages/evm/ignition/deployments/chain-137/artifacts/Create3SettlerV1#Settler.json @@ -0,0 +1,1481 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "Settler", + "sourceName": "contracts/Settler.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposed", + "type": "uint256" + } + ], + "name": "SettlerAmountOutLtProposed", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerCrossChainSwapMustBeOnlyOperation", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerDynamicCallEncoderZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "executor", + "type": "address" + } + ], + "name": "SettlerExecutorNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "SettlerIntentAlreadyExecuted", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerIntentOperationsEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SettlerIntentPastDeadline", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "current", + "type": "uint256" + } + ], + "name": "SettlerIntentValidationsNotEnough", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "name": "SettlerInvalidChain", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerInvalidProposedAmounts", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "SettlerInvalidRecipient", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "settler", + "type": "address" + } + ], + "name": "SettlerInvalidSettler", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerNonceZero", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerOperationChainsMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "post", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pre", + "type": "uint256" + } + ], + "name": "SettlerPostBalanceOutLtPre", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerProposalDataInvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerProposalDataNotEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SettlerProposalPastDeadline", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + } + ], + "name": "SettlerProposalSignerNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minAmount", + "type": "uint256" + } + ], + "name": "SettlerProposedAmountLtMinAmount", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerRescueFundsRecipientZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gasUsed", + "type": "uint256" + } + ], + "name": "SettlerSimulationSuccess", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerSolverFeeInvalidLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "SettlerSolverFeeTooHigh", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "solver", + "type": "address" + } + ], + "name": "SettlerSolverNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "lengthRequested", + "type": "uint256" + } + ], + "name": "SettlerTooManySafeguards", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + } + ], + "name": "SettlerUnknownOperationType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "SettlerUserNotSmartAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "previous", + "type": "address" + }, + { + "internalType": "address", + "name": "current", + "type": "address" + } + ], + "name": "SettlerValidatorDuplicatedOrUnsorted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "validator", + "type": "address" + } + ], + "name": "SettlerValidatorNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "SmartAccountsHandlerZero", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dynamicCallEncoder", + "type": "address" + } + ], + "name": "DynamicCallEncoderSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "FundsRescued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "indexed": false, + "internalType": "struct Operation", + "name": "operation", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "indexed": false, + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "intentHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "output", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "OperationExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operationsValidator", + "type": "address" + } + ], + "name": "OperationsValidatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "proposal", + "type": "bytes32" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "SafeguardSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "smartAccountsHandler", + "type": "address" + } + ], + "name": "SmartAccountsHandlerSet", + "type": "event" + }, + { + "inputs": [], + "name": "controller", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dynamicCallEncoder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "getIntentBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + } + ], + "name": "getIntentHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "internalType": "address", + "name": "solver", + "type": "address" + } + ], + "name": "getProposalHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getUserSafeguard", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controller", + "type": "address" + }, + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_dynamicCallEncoder", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "operationsValidator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "rescueFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newDynamicCallEncoder", + "type": "address" + } + ], + "name": "setDynamicCallEncoder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOperationsValidator", + "type": "address" + } + ], + "name": "setOperationsValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "safeguard", + "type": "bytes" + } + ], + "name": "setSafeguard", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newSmartAccountsHandler", + "type": "address" + } + ], + "name": "setSmartAccountsHandler", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "simulate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "smartAccountsHandler", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033", + "deployedBytecode": "0x60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/Settler.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-137/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json b/packages/evm/ignition/deployments/chain-137/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json new file mode 100644 index 0000000..dc33803 --- /dev/null +++ b/packages/evm/ignition/deployments/chain-137/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json @@ -0,0 +1,373 @@ +{ + "_format": "hh3-sol-build-info-1", + "id": "167571dafa48e7ff636310c6c9f0fc8e202e44bc", + "solcVersion": "0.8.28", + "solcLongVersion": "0.8.28+commit.7893614a", + "userSourceNameMap": { + "contracts/Controller.sol": "project/contracts/Controller.sol", + "contracts/Intents.sol": "project/contracts/Intents.sol", + "contracts/Settler.sol": "project/contracts/Settler.sol", + "contracts/dynamic-calls/DynamicCallEncoder.sol": "project/contracts/dynamic-calls/DynamicCallEncoder.sol", + "contracts/dynamic-calls/DynamicCallTypes.sol": "project/contracts/dynamic-calls/DynamicCallTypes.sol", + "contracts/interfaces/IController.sol": "project/contracts/interfaces/IController.sol", + "contracts/interfaces/ICreateX.sol": "project/contracts/interfaces/ICreateX.sol", + "contracts/interfaces/IDynamicCallEncoder.sol": "project/contracts/interfaces/IDynamicCallEncoder.sol", + "contracts/interfaces/IExecutor.sol": "project/contracts/interfaces/IExecutor.sol", + "contracts/interfaces/IOperationsValidator.sol": "project/contracts/interfaces/IOperationsValidator.sol", + "contracts/interfaces/IPaymentsReceiver.sol": "project/contracts/interfaces/IPaymentsReceiver.sol", + "contracts/interfaces/ISafe.sol": "project/contracts/interfaces/ISafe.sol", + "contracts/interfaces/ISettler.sol": "project/contracts/interfaces/ISettler.sol", + "contracts/interfaces/ISmartAccount.sol": "project/contracts/interfaces/ISmartAccount.sol", + "contracts/interfaces/ISmartAccountContract.sol": "project/contracts/interfaces/ISmartAccountContract.sol", + "contracts/interfaces/ISmartAccountsHandler.sol": "project/contracts/interfaces/ISmartAccountsHandler.sol", + "contracts/payments/PaymentsReceiver.sol": "project/contracts/payments/PaymentsReceiver.sol", + "contracts/proxy/Proxy.sol": "project/contracts/proxy/Proxy.sol", + "contracts/safeguards/BaseOperationsValidator.sol": "project/contracts/safeguards/BaseOperationsValidator.sol", + "contracts/safeguards/CallOperationsValidator.sol": "project/contracts/safeguards/CallOperationsValidator.sol", + "contracts/safeguards/DynamicCallOperationsValidator.sol": "project/contracts/safeguards/DynamicCallOperationsValidator.sol", + "contracts/safeguards/OperationsValidator.sol": "project/contracts/safeguards/OperationsValidator.sol", + "contracts/safeguards/Safeguards.sol": "project/contracts/safeguards/Safeguards.sol", + "contracts/safeguards/SwapOperationsValidator.sol": "project/contracts/safeguards/SwapOperationsValidator.sol", + "contracts/safeguards/TransferOperationsValidator.sol": "project/contracts/safeguards/TransferOperationsValidator.sol", + "contracts/smart-accounts/SmartAccount7702.sol": "project/contracts/smart-accounts/SmartAccount7702.sol", + "contracts/smart-accounts/SmartAccountBase.sol": "project/contracts/smart-accounts/SmartAccountBase.sol", + "contracts/smart-accounts/SmartAccountContract.sol": "project/contracts/smart-accounts/SmartAccountContract.sol", + "contracts/smart-accounts/SmartAccountsHandler.sol": "project/contracts/smart-accounts/SmartAccountsHandler.sol", + "contracts/smart-accounts/SmartAccountsHandlerHelpers.sol": "project/contracts/smart-accounts/SmartAccountsHandlerHelpers.sol", + "contracts/test/CallMock.sol": "project/contracts/test/CallMock.sol", + "contracts/test/SettlerV2Mock.sol": "project/contracts/test/SettlerV2Mock.sol", + "contracts/test/TokenMock.sol": "project/contracts/test/TokenMock.sol", + "contracts/test/dynamic-calls/StaticCallMock.sol": "project/contracts/test/dynamic-calls/StaticCallMock.sol", + "contracts/test/executors/EmptyExecutorMock.sol": "project/contracts/test/executors/EmptyExecutorMock.sol", + "contracts/test/executors/MintExecutorMock.sol": "project/contracts/test/executors/MintExecutorMock.sol", + "contracts/test/executors/ReentrantExecutorMock.sol": "project/contracts/test/executors/ReentrantExecutorMock.sol", + "contracts/test/executors/TransferExecutorMock.sol": "project/contracts/test/executors/TransferExecutorMock.sol", + "contracts/test/smart-accounts/SafeMock.sol": "project/contracts/test/smart-accounts/SafeMock.sol", + "contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol": "project/contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol", + "contracts/test/utils/BytesHelpersMock.sol": "project/contracts/test/utils/BytesHelpersMock.sol", + "contracts/test/utils/DenominationsMock.sol": "project/contracts/test/utils/DenominationsMock.sol", + "contracts/test/utils/ERC20HelpersMock.sol": "project/contracts/test/utils/ERC20HelpersMock.sol", + "contracts/utils/BytesHelpers.sol": "project/contracts/utils/BytesHelpers.sol", + "contracts/utils/Denominations.sol": "project/contracts/utils/Denominations.sol", + "contracts/utils/ERC20Helpers.sol": "project/contracts/utils/ERC20Helpers.sol", + "contracts/utils/MimicHelper.sol": "project/contracts/utils/MimicHelper.sol", + "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol": "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/ProxyAdmin.sol" + }, + "input": { + "language": "Solidity", + "settings": { + "optimizer": { + "enabled": true, + "runs": 1000 + }, + "evmVersion": "cancun", + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "remappings": [ + "npm/@openzeppelin/contracts-upgradeable@5.3.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "npm/@openzeppelin/contracts-upgradeable@5.3.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/" + ] + }, + "sources": { + "npm/@openzeppelin/contracts-upgradeable@5.3.0/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\n struct OwnableStorage {\n address _owner;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Ownable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\n\n function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\n assembly {\n $.slot := OwnableStorageLocation\n }\n }\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n function __Ownable_init(address initialOwner) internal onlyInitializing {\n __Ownable_init_unchained(initialOwner);\n }\n\n function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n OwnableStorage storage $ = _getOwnableStorage();\n return $._owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n OwnableStorage storage $ = _getOwnableStorage();\n address oldOwner = $._owner;\n $._owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Storage of the initializable contract.\n *\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\n * when using with upgradeable contracts.\n *\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\n */\n struct InitializableStorage {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n uint64 _initialized;\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool _initializing;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Initializable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\n\n /**\n * @dev The contract is already initialized.\n */\n error InvalidInitialization();\n\n /**\n * @dev The contract is not initializing.\n */\n error NotInitializing();\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint64 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\n * production.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n // Cache values to avoid duplicated sloads\n bool isTopLevelCall = !$._initializing;\n uint64 initialized = $._initialized;\n\n // Allowed calls:\n // - initialSetup: the contract is not in the initializing state and no previous version was\n // initialized\n // - construction: the contract is initialized at version 1 (no reinitialization) and the\n // current contract is just being deployed\n bool initialSetup = initialized == 0 && isTopLevelCall;\n bool construction = initialized == 1 && address(this).code.length == 0;\n\n if (!initialSetup && !construction) {\n revert InvalidInitialization();\n }\n $._initialized = 1;\n if (isTopLevelCall) {\n $._initializing = true;\n }\n _;\n if (isTopLevelCall) {\n $._initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint64 version) {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing || $._initialized >= version) {\n revert InvalidInitialization();\n }\n $._initialized = version;\n $._initializing = true;\n _;\n $._initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n _checkInitializing();\n _;\n }\n\n /**\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\n */\n function _checkInitializing() internal view virtual {\n if (!_isInitializing()) {\n revert NotInitializing();\n }\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing) {\n revert InvalidInitialization();\n }\n if ($._initialized != type(uint64).max) {\n $._initialized = type(uint64).max;\n emit Initialized(type(uint64).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint64) {\n return _getInitializableStorage()._initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _getInitializableStorage()._initializing;\n }\n\n /**\n * @dev Pointer to storage slot. Allows integrators to override it with a custom storage location.\n *\n * NOTE: Consider following the ERC-7201 formula to derive storage locations.\n */\n function _initializableStorageSlot() internal pure virtual returns (bytes32) {\n return INITIALIZABLE_STORAGE;\n }\n\n /**\n * @dev Returns a pointer to the storage namespace.\n */\n // solhint-disable-next-line var-name-mixedcase\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\n bytes32 slot = _initializableStorageSlot();\n assembly {\n $.slot := slot\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/cryptography/EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.20;\n\nimport {MessageHashUtils} from \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\nimport {IERC5267} from \"@openzeppelin/contracts/interfaces/IERC5267.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose\n * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract\n * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to\n * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\n * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\n */\nabstract contract EIP712Upgradeable is Initializable, IERC5267 {\n bytes32 private constant TYPE_HASH =\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /// @custom:storage-location erc7201:openzeppelin.storage.EIP712\n struct EIP712Storage {\n /// @custom:oz-renamed-from _HASHED_NAME\n bytes32 _hashedName;\n /// @custom:oz-renamed-from _HASHED_VERSION\n bytes32 _hashedVersion;\n\n string _name;\n string _version;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.EIP712\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant EIP712StorageLocation = 0xa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100;\n\n function _getEIP712Storage() private pure returns (EIP712Storage storage $) {\n assembly {\n $.slot := EIP712StorageLocation\n }\n }\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n __EIP712_init_unchained(name, version);\n }\n\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n EIP712Storage storage $ = _getEIP712Storage();\n $._name = name;\n $._version = version;\n\n // Reset prior values in storage if upgrading\n $._hashedName = 0;\n $._hashedVersion = 0;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n return _buildDomainSeparator();\n }\n\n function _buildDomainSeparator() private view returns (bytes32) {\n return keccak256(abi.encode(TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n\n /**\n * @inheritdoc IERC5267\n */\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n EIP712Storage storage $ = _getEIP712Storage();\n // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized\n // and the EIP712 domain is not reliable, as it will be missing name and version.\n require($._hashedName == 0 && $._hashedVersion == 0, \"EIP712: Uninitialized\");\n\n return (\n hex\"0f\", // 01111\n _EIP712Name(),\n _EIP712Version(),\n block.chainid,\n address(this),\n bytes32(0),\n new uint256[](0)\n );\n }\n\n /**\n * @dev The name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712Name() internal view virtual returns (string memory) {\n EIP712Storage storage $ = _getEIP712Storage();\n return $._name;\n }\n\n /**\n * @dev The version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712Version() internal view virtual returns (string memory) {\n EIP712Storage storage $ = _getEIP712Storage();\n return $._version;\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead.\n */\n function _EIP712NameHash() internal view returns (bytes32) {\n EIP712Storage storage $ = _getEIP712Storage();\n string memory name = _EIP712Name();\n if (bytes(name).length > 0) {\n return keccak256(bytes(name));\n } else {\n // If the name is empty, the contract may have been upgraded without initializing the new storage.\n // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design.\n bytes32 hashedName = $._hashedName;\n if (hashedName != 0) {\n return hashedName;\n } else {\n return keccak256(\"\");\n }\n }\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead.\n */\n function _EIP712VersionHash() internal view returns (bytes32) {\n EIP712Storage storage $ = _getEIP712Storage();\n string memory version = _EIP712Version();\n if (bytes(version).length > 0) {\n return keccak256(bytes(version));\n } else {\n // If the version is empty, the contract may have been upgraded without initializing the new storage.\n // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design.\n bytes32 hashedVersion = $._hashedVersion;\n if (hashedVersion != 0) {\n return hashedVersion;\n } else {\n return keccak256(\"\");\n }\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/ReentrancyGuardUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\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 EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\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 ReentrancyGuardUpgradeable is Initializable {\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 /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard\n struct ReentrancyGuardStorage {\n uint256 _status;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.ReentrancyGuard\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;\n\n function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) {\n assembly {\n $.slot := ReentrancyGuardStorageLocation\n }\n }\n\n /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\n\n function __ReentrancyGuard_init() internal onlyInitializing {\n __ReentrancyGuard_init_unchained();\n }\n\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\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 ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n // On the first call to nonReentrant, _status will be NOT_ENTERED\n if ($._status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n $._status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\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 ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n return $._status == ENTERED;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC-20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC-721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC-1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n */\ninterface IERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with `hash`\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1363.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n /*\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n * 0xb0202a11 ===\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n */\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @param data Additional data with no specified format, sent in call to `spender`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1967.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1967.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n */\ninterface IERC1967 {\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Emitted when the beacon is changed.\n */\n event BeaconUpgraded(address indexed beacon);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC5267.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)\n\npragma solidity ^0.8.20;\n\ninterface IERC5267 {\n /**\n * @dev MAY be emitted to signal that the domain could have changed.\n */\n event EIP712DomainChanged();\n\n /**\n * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\n * signature.\n */\n function eip712Domain()\n external\n view\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n );\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {UpgradeableBeacon} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.22;\n\nimport {Proxy} from \"../Proxy.sol\";\nimport {ERC1967Utils} from \"./ERC1967Utils.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `implementation`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `implementation`. This will typically be an\n * encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\n *\n * Requirements:\n *\n * - If `data` is empty, `msg.value` must be zero.\n */\n constructor(address implementation, bytes memory _data) payable {\n ERC1967Utils.upgradeToAndCall(implementation, _data);\n }\n\n /**\n * @dev Returns the current implementation address.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using\n * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function _implementation() internal view virtual override returns (address) {\n return ERC1967Utils.getImplementation();\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/ERC1967/ERC1967Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Utils.sol)\n\npragma solidity ^0.8.22;\n\nimport {IBeacon} from \"../beacon/IBeacon.sol\";\nimport {IERC1967} from \"../../interfaces/IERC1967.sol\";\nimport {Address} from \"../../utils/Address.sol\";\nimport {StorageSlot} from \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This library provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] slots.\n */\nlibrary ERC1967Utils {\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev The `implementation` of the proxy is invalid.\n */\n error ERC1967InvalidImplementation(address implementation);\n\n /**\n * @dev The `admin` of the proxy is invalid.\n */\n error ERC1967InvalidAdmin(address admin);\n\n /**\n * @dev The `beacon` of the proxy is invalid.\n */\n error ERC1967InvalidBeacon(address beacon);\n\n /**\n * @dev An upgrade function sees `msg.value > 0` that may be lost.\n */\n error ERC1967NonPayable();\n\n /**\n * @dev Returns the current implementation address.\n */\n function getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the ERC-1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n if (newImplementation.code.length == 0) {\n revert ERC1967InvalidImplementation(newImplementation);\n }\n StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Performs implementation upgrade with additional setup call if data is nonempty.\n * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n * to avoid stuck value in the contract.\n *\n * Emits an {IERC1967-Upgraded} event.\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) internal {\n _setImplementation(newImplementation);\n emit IERC1967.Upgraded(newImplementation);\n\n if (data.length > 0) {\n Address.functionDelegateCall(newImplementation, data);\n } else {\n _checkNonPayable();\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Returns the current admin.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using\n * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the ERC-1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n if (newAdmin == address(0)) {\n revert ERC1967InvalidAdmin(address(0));\n }\n StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {IERC1967-AdminChanged} event.\n */\n function changeAdmin(address newAdmin) internal {\n emit IERC1967.AdminChanged(getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is the keccak-256 hash of \"eip1967.proxy.beacon\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Returns the current beacon.\n */\n function getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the ERC-1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n if (newBeacon.code.length == 0) {\n revert ERC1967InvalidBeacon(newBeacon);\n }\n\n StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;\n\n address beaconImplementation = IBeacon(newBeacon).implementation();\n if (beaconImplementation.code.length == 0) {\n revert ERC1967InvalidImplementation(beaconImplementation);\n }\n }\n\n /**\n * @dev Change the beacon and trigger a setup call if data is nonempty.\n * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n * to avoid stuck value in the contract.\n *\n * Emits an {IERC1967-BeaconUpgraded} event.\n *\n * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since\n * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for\n * efficiency.\n */\n function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {\n _setBeacon(newBeacon);\n emit IERC1967.BeaconUpgraded(newBeacon);\n\n if (data.length > 0) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n } else {\n _checkNonPayable();\n }\n }\n\n /**\n * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract\n * if an upgrade doesn't perform an initialization call.\n */\n function _checkNonPayable() private {\n if (msg.value > 0) {\n revert ERC1967NonPayable();\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback\n * function and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/ProxyAdmin.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/transparent/ProxyAdmin.sol)\n\npragma solidity ^0.8.22;\n\nimport {ITransparentUpgradeableProxy} from \"./TransparentUpgradeableProxy.sol\";\nimport {Ownable} from \"../../access/Ownable.sol\";\n\n/**\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\n */\ncontract ProxyAdmin is Ownable {\n /**\n * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgrade(address,address)`\n * and `upgradeAndCall(address,address,bytes)` are present, and `upgrade` must be used if no function should be called,\n * while `upgradeAndCall` will invoke the `receive` function if the third argument is the empty byte string.\n * If the getter returns `\"5.0.0\"`, only `upgradeAndCall(address,address,bytes)` is present, and the third argument must\n * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function\n * during an upgrade.\n */\n string public constant UPGRADE_INTERFACE_VERSION = \"5.0.0\";\n\n /**\n * @dev Sets the initial owner who can perform upgrades.\n */\n constructor(address initialOwner) Ownable(initialOwner) {}\n\n /**\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation.\n * See {TransparentUpgradeableProxy-_dispatchUpgradeToAndCall}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n * - If `data` is empty, `msg.value` must be zero.\n */\n function upgradeAndCall(\n ITransparentUpgradeableProxy proxy,\n address implementation,\n bytes memory data\n ) public payable virtual onlyOwner {\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/TransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.22;\n\nimport {ERC1967Utils} from \"../ERC1967/ERC1967Utils.sol\";\nimport {ERC1967Proxy} from \"../ERC1967/ERC1967Proxy.sol\";\nimport {IERC1967} from \"../../interfaces/IERC1967.sol\";\nimport {ProxyAdmin} from \"./ProxyAdmin.sol\";\n\n/**\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\n * does not implement this interface directly, and its upgradeability mechanism is implemented by an internal dispatch\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\n * include them in the ABI so this interface must be used to interact with it.\n */\ninterface ITransparentUpgradeableProxy is IERC1967 {\n /// @dev See {UUPSUpgradeable-upgradeToAndCall}\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable;\n}\n\n/**\n * @dev This contract implements a proxy that is upgradeable through an associated {ProxyAdmin} instance.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches the {ITransparentUpgradeableProxy-upgradeToAndCall} function exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can call the `upgradeToAndCall` function but any other call won't be forwarded to\n * the implementation. If the admin tries to call a function on the implementation it will fail with an error indicating\n * the proxy admin cannot fallback to the target implementation.\n *\n * These properties mean that the admin account can only be used for upgrading the proxy, so it's best if it's a\n * dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to\n * call a function from the proxy implementation. For this reason, the proxy deploys an instance of {ProxyAdmin} and\n * allows upgrades only if they come through it. You should think of the `ProxyAdmin` instance as the administrative\n * interface of the proxy, including the ability to change who can trigger upgrades by transferring ownership.\n *\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\n * inherit from that interface, and instead `upgradeToAndCall` is implicitly implemented using a custom dispatch\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\n * implementation.\n *\n * NOTE: This proxy does not inherit from {Context} deliberately. The {ProxyAdmin} of this contract won't send a\n * meta-transaction in any way, and any other meta-transaction setup should be made in the implementation contract.\n *\n * IMPORTANT: This contract avoids unnecessary storage reads by setting the admin only during construction as an\n * immutable variable, preventing any changes thereafter. However, the admin slot defined in ERC-1967 can still be\n * overwritten by the implementation logic pointed to by this proxy. In such cases, the contract may end up in an\n * undesirable state where the admin slot is different from the actual admin. Relying on the value of the admin slot\n * is generally fine if the implementation is trusted.\n *\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the\n * compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new\n * function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This\n * could render the `upgradeToAndCall` function inaccessible, preventing upgradeability and compromising transparency.\n */\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\n // An immutable address for the admin to avoid unnecessary SLOADs before each call\n // at the expense of removing the ability to change the admin once it's set.\n // This is acceptable if the admin is always a ProxyAdmin instance or similar contract\n // with its own ability to transfer the permissions to another account.\n address private immutable _admin;\n\n /**\n * @dev The proxy caller is the current admin, and can't fallback to the proxy target.\n */\n error ProxyDeniedAdminAccess();\n\n /**\n * @dev Initializes an upgradeable proxy managed by an instance of a {ProxyAdmin} with an `initialOwner`,\n * backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in\n * {ERC1967Proxy-constructor}.\n */\n constructor(address _logic, address initialOwner, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\n _admin = address(new ProxyAdmin(initialOwner));\n // Set the storage value and emit an event for ERC-1967 compatibility\n ERC1967Utils.changeAdmin(_proxyAdmin());\n }\n\n /**\n * @dev Returns the admin of this proxy.\n */\n function _proxyAdmin() internal view virtual returns (address) {\n return _admin;\n }\n\n /**\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior.\n */\n function _fallback() internal virtual override {\n if (msg.sender == _proxyAdmin()) {\n if (msg.sig != ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\n revert ProxyDeniedAdminAccess();\n } else {\n _dispatchUpgradeToAndCall();\n }\n } else {\n super._fallback();\n }\n }\n\n /**\n * @dev Upgrade the implementation of the proxy. See {ERC1967Utils-upgradeToAndCall}.\n *\n * Requirements:\n *\n * - If `data` is empty, `msg.value` must be zero.\n */\n function _dispatchUpgradeToAndCall() private {\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\n ERC1967Utils.upgradeToAndCall(newImplementation, data);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC-20\n * applications.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * Both values are immutable: they can only be set once during construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Skips emitting an {Approval} event indicating an allowance update. This is not\n * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n *\n * ```solidity\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner`'s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance < type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC-20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\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 value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens as the allowance of `spender` over the\n * 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 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` 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 value) external returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 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 /**\n * @dev An operation with an ERC-20 token failed.\n */\n error SafeERC20FailedOperation(address token);\n\n /**\n * @dev Indicates a failed `decreaseAllowance` request.\n */\n error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\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.encodeCall(token.transfer, (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.encodeCall(token.transferFrom, (from, to, value)));\n }\n\n /**\n * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\n }\n\n /**\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\n return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, 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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n forceApprove(token, spender, oldAllowance + value);\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n * value, non-reverting calls are assumed to be successful.\n *\n * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n unchecked {\n uint256 currentAllowance = token.allowance(address(this), spender);\n if (currentAllowance < requestedDecrease) {\n revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n }\n forceApprove(token, spender, currentAllowance - requestedDecrease);\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n * set here.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n safeTransfer(token, to, value);\n } else if (!token.transferAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferFromAndCallRelaxed(\n IERC1363 token,\n address from,\n address to,\n uint256 value,\n bytes memory data\n ) internal {\n if (to.code.length == 0) {\n safeTransferFrom(token, from, to, value);\n } else if (!token.transferFromAndCall(from, to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n * once without retrying, and relies on the returned value to be true.\n *\n * Reverts if the returned value is other than `true`.\n */\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n forceApprove(token, to, value);\n } else if (!token.approveAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n uint256 returnSize;\n uint256 returnValue;\n assembly (\"memory-safe\") {\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n // bubble errors\n if iszero(success) {\n let ptr := mload(0x40)\n returndatacopy(ptr, 0, returndatasize())\n revert(ptr, returndatasize())\n }\n returnSize := returndatasize()\n returnValue := mload(0)\n }\n\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\n revert SafeERC20FailedOperation(address(token));\n }\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 silently catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n bool success;\n uint256 returnSize;\n uint256 returnValue;\n assembly (\"memory-safe\") {\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n returnSize := returndatasize()\n returnValue := mload(0)\n }\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (utils/Address.sol)\n\npragma solidity ^0.8.20;\n\nimport {Errors} from \"./Errors.sol\";\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev There's no code at `target` (it is not a contract).\n */\n error AddressEmptyCode(address target);\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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n if (address(this).balance < amount) {\n revert Errors.InsufficientBalance(address(this).balance, amount);\n }\n\n (bool success, bytes memory returndata) = recipient.call{value: amount}(\"\");\n if (!success) {\n _revert(returndata);\n }\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 or custom error, it is bubbled\n * up by this function (like regular Solidity function calls). However, if\n * the call reverted with no returned reason, this function reverts with a\n * {Errors.FailedCall} error.\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 function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0);\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 function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n if (address(this).balance < value) {\n revert Errors.InsufficientBalance(address(this).balance, value);\n }\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\n * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case\n * of an unsuccessful call.\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata\n ) internal view returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n // only check if target is a contract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n if (returndata.length == 0 && target.code.length == 0) {\n revert AddressEmptyCode(target);\n }\n return returndata;\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\n * revert reason or with a default {Errors.FailedCall} error.\n */\n function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n return returndata;\n }\n }\n\n /**\n * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.\n */\n function _revert(bytes memory returndata) 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 assembly (\"memory-safe\") {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert Errors.FailedCall();\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS\n }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n */\n function tryRecover(\n bytes32 hash,\n bytes memory signature\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly (\"memory-safe\") {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32.\n */\n function toDataWithIntendedValidatorHash(\n address validator,\n bytes32 messageHash\n ) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, hex\"19_00\")\n mstore(0x02, shl(96, validator))\n mstore(0x16, messageHash)\n digest := keccak256(0x00, 0x36)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Errors.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Collection of common custom errors used in multiple contracts\n *\n * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.\n * It is recommended to avoid relying on the error API for critical functionality.\n *\n * _Available since v5.1._\n */\nlibrary Errors {\n /**\n * @dev The ETH balance of the account is not enough to perform the operation.\n */\n error InsufficientBalance(uint256 balance, uint256 needed);\n\n /**\n * @dev A call to an address target failed. The target may have reverted.\n */\n error FailedCall();\n\n /**\n * @dev The deployment failed.\n */\n error FailedDeployment();\n\n /**\n * @dev A necessary precompile is missing.\n */\n error MissingPrecompile(address);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Return the 512-bit addition of two uint256.\n *\n * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.\n */\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n assembly (\"memory-safe\") {\n low := add(a, b)\n high := lt(low, a)\n }\n }\n\n /**\n * @dev Return the 512-bit multiplication of two uint256.\n *\n * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.\n */\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = high * 2²⁵⁶ + low.\n assembly (\"memory-safe\") {\n let mm := mulmod(a, b, not(0))\n low := mul(a, b)\n high := sub(sub(mm, low), lt(mm, low))\n }\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a + b;\n success = c >= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a - b;\n success = c <= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a * b;\n assembly (\"memory-safe\") {\n // Only true when the multiplication doesn't overflow\n // (c / a == b) || (a == 0)\n success := or(eq(div(c, a), b), iszero(a))\n }\n // equivalent to: success ? c : 0\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `DIV` opcode returns zero when the denominator is 0.\n result := div(a, b)\n }\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `MOD` opcode returns zero when the denominator is 0.\n result := mod(a, b)\n }\n }\n }\n\n /**\n * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryAdd(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\n */\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\n (, uint256 result) = trySub(a, b);\n return result;\n }\n\n /**\n * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryMul(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\n }\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a > b, a, b);\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a < b, a, b);\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n\n // The following calculation ensures accurate ceiling division without overflow.\n // Since a is non-zero, (a - 1) / b will not overflow.\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n // but the largest value we can obtain is type(uint256).max - 1, which happens\n // when a = type(uint256).max and b = 1.\n unchecked {\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n }\n }\n\n /**\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n * denominator == 0.\n *\n * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n\n // Handle non-overflow cases, 256 by 256 division.\n if (high == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return low / denominator;\n }\n\n // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n if (denominator <= high) {\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n }\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [high low].\n uint256 remainder;\n assembly (\"memory-safe\") {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n high := sub(high, gt(remainder, low))\n low := sub(low, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\n assembly (\"memory-safe\") {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [high low] by twos.\n low := div(low, twos)\n\n // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from high into low.\n low |= high * twos;\n\n // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n // works in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n inverse *= 2 - denominator * inverse; // inverse mod 2³²\n inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high\n // is no longer required.\n result = low * inverse;\n return result;\n }\n }\n\n /**\n * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n }\n\n /**\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\n */\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n if (high >= 1 << n) {\n Panic.panic(Panic.UNDER_OVERFLOW);\n }\n return (high << (256 - n)) | (low >> n);\n }\n }\n\n /**\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\n */\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\n }\n\n /**\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n *\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n *\n * If the input value is not inversible, 0 is returned.\n *\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n */\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n unchecked {\n if (n == 0) return 0;\n\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n // ax + ny = 1\n // ax = 1 + (-y)n\n // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n // If the remainder is 0 the gcd is n right away.\n uint256 remainder = a % n;\n uint256 gcd = n;\n\n // Therefore the initial coefficients are:\n // ax + ny = gcd(a, n) = n\n // 0a + 1n = n\n int256 x = 0;\n int256 y = 1;\n\n while (remainder != 0) {\n uint256 quotient = gcd / remainder;\n\n (gcd, remainder) = (\n // The old remainder is the next gcd to try.\n remainder,\n // Compute the next remainder.\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n // where gcd is at most n (capped to type(uint256).max)\n gcd - remainder * quotient\n );\n\n (x, y) = (\n // Increment the coefficient of a.\n y,\n // Decrement the coefficient of n.\n // Can overflow, but the result is casted to uint256 so that the\n // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n x - y * int256(quotient)\n );\n }\n\n if (gcd != 1) return 0; // No inverse exists.\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n }\n }\n\n /**\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n *\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n *\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n */\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n unchecked {\n return Math.modExp(a, p - 2, p);\n }\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n *\n * Requirements:\n * - modulus can't be zero\n * - underlying staticcall to precompile must succeed\n *\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n * interpreted as 0.\n */\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n (bool success, uint256 result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n * to operate modulo 0 or if the underlying precompile reverted.\n *\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n * of a revert, but the result may be incorrectly interpreted as 0.\n */\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n if (m == 0) return (false, 0);\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n // | Offset | Content | Content (Hex) |\n // |-----------|------------|--------------------------------------------------------------------|\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n mstore(ptr, 0x20)\n mstore(add(ptr, 0x20), 0x20)\n mstore(add(ptr, 0x40), 0x20)\n mstore(add(ptr, 0x60), b)\n mstore(add(ptr, 0x80), e)\n mstore(add(ptr, 0xa0), m)\n\n // Given the result < m, it's guaranteed to fit in 32 bytes,\n // so we can use the memory scratch space located at offset 0.\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n result := mload(0x00)\n }\n }\n\n /**\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\n */\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n (bool success, bytes memory result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n */\n function tryModExp(\n bytes memory b,\n bytes memory e,\n bytes memory m\n ) internal view returns (bool success, bytes memory result) {\n if (_zeroBytes(m)) return (false, new bytes(0));\n\n uint256 mLen = m.length;\n\n // Encode call args in result and move the free memory pointer\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n assembly (\"memory-safe\") {\n let dataPtr := add(result, 0x20)\n // Write result on top of args to avoid allocating extra memory.\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n // Overwrite the length.\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n mstore(result, mLen)\n // Set the memory pointer after the returned data.\n mstore(0x40, add(dataPtr, mLen))\n }\n }\n\n /**\n * @dev Returns whether the provided byte array is zero.\n */\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\n for (uint256 i = 0; i < byteArray.length; ++i) {\n if (byteArray[i] != 0) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n * towards zero.\n *\n * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n * using integer operations.\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n unchecked {\n // Take care of easy edge cases when a == 0 or a == 1\n if (a <= 1) {\n return a;\n }\n\n // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n // the current value as `ε_n = | x_n - sqrt(a) |`.\n //\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n // bigger than any uint256.\n //\n // By noticing that\n // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n // to the msb function.\n uint256 aa = a;\n uint256 xn = 1;\n\n if (aa >= (1 << 128)) {\n aa >>= 128;\n xn <<= 64;\n }\n if (aa >= (1 << 64)) {\n aa >>= 64;\n xn <<= 32;\n }\n if (aa >= (1 << 32)) {\n aa >>= 32;\n xn <<= 16;\n }\n if (aa >= (1 << 16)) {\n aa >>= 16;\n xn <<= 8;\n }\n if (aa >= (1 << 8)) {\n aa >>= 8;\n xn <<= 4;\n }\n if (aa >= (1 << 4)) {\n aa >>= 4;\n xn <<= 2;\n }\n if (aa >= (1 << 2)) {\n xn <<= 1;\n }\n\n // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n //\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n // This is going to be our x_0 (and ε_0)\n xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n // From here, Newton's method give us:\n // x_{n+1} = (x_n + a / x_n) / 2\n //\n // One should note that:\n // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n // = ((x_n² + a) / (2 * x_n))² - a\n // = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n // = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n // = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n // = (x_n² - a)² / (2 * x_n)²\n // = ((x_n² - a) / (2 * x_n))²\n // ≥ 0\n // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n //\n // This gives us the proof of quadratic convergence of the sequence:\n // ε_{n+1} = | x_{n+1} - sqrt(a) |\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\n // = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n // = | (x_n - sqrt(a))² / (2 * x_n) |\n // = | ε_n² / (2 * x_n) |\n // = ε_n² / | (2 * x_n) |\n //\n // For the first iteration, we have a special case where x_0 is known:\n // ε_1 = ε_0² / | (2 * x_0) |\n // ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n // ≤ 2**(2*e-4) / (3 * 2**(e-1))\n // ≤ 2**(e-3) / 3\n // ≤ 2**(e-3-log2(3))\n // ≤ 2**(e-4.5)\n //\n // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n // ε_{n+1} = ε_n² / | (2 * x_n) |\n // ≤ (2**(e-k))² / (2 * 2**(e-1))\n // ≤ 2**(2*e-2*k) / 2**e\n // ≤ 2**(e-2*k)\n xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5) -- special case, see above\n xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9) -- general case with k = 4.5\n xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18) -- general case with k = 9\n xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36) -- general case with k = 18\n xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72) -- general case with k = 36\n xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144) -- general case with k = 72\n\n // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n // sqrt(a) or sqrt(a) + 1.\n return xn - SafeCast.toUint(xn > a / xn);\n }\n }\n\n /**\n * @dev Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log2(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // If upper 8 bits of 16-bit half set, add 8 to result\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\n // If upper 4 bits of 8-bit half set, add 4 to result\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\n\n // Shifts value right by the current result and use it as an index into this lookup table:\n //\n // | x (4 bits) | index | table[index] = MSB position |\n // |------------|---------|-----------------------------|\n // | 0000 | 0 | table[0] = 0 |\n // | 0001 | 1 | table[1] = 0 |\n // | 0010 | 2 | table[2] = 1 |\n // | 0011 | 3 | table[3] = 1 |\n // | 0100 | 4 | table[4] = 2 |\n // | 0101 | 5 | table[5] = 2 |\n // | 0110 | 6 | table[6] = 2 |\n // | 0111 | 7 | table[7] = 2 |\n // | 1000 | 8 | table[8] = 3 |\n // | 1001 | 9 | table[9] = 3 |\n // | 1010 | 10 | table[10] = 3 |\n // | 1011 | 11 | table[11] = 3 |\n // | 1100 | 12 | table[12] = 3 |\n // | 1101 | 13 | table[13] = 3 |\n // | 1110 | 14 | table[14] = 3 |\n // | 1111 | 15 | table[15] = 3 |\n //\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\n assembly (\"memory-safe\") {\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\n }\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/SafeCast.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool 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 */\nlibrary SafeCast {\n /**\n * @dev Value doesn't fit in an uint of `bits` size.\n */\n error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n /**\n * @dev An int value doesn't fit in an uint of `bits` size.\n */\n error SafeCastOverflowedIntToUint(int256 value);\n\n /**\n * @dev Value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n /**\n * @dev An uint value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedUintToInt(uint256 value);\n\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 function toUint248(uint256 value) internal pure returns (uint248) {\n if (value > type(uint248).max) {\n revert SafeCastOverflowedUintDowncast(248, value);\n }\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 function toUint240(uint256 value) internal pure returns (uint240) {\n if (value > type(uint240).max) {\n revert SafeCastOverflowedUintDowncast(240, value);\n }\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 function toUint232(uint256 value) internal pure returns (uint232) {\n if (value > type(uint232).max) {\n revert SafeCastOverflowedUintDowncast(232, value);\n }\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 function toUint224(uint256 value) internal pure returns (uint224) {\n if (value > type(uint224).max) {\n revert SafeCastOverflowedUintDowncast(224, value);\n }\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 function toUint216(uint256 value) internal pure returns (uint216) {\n if (value > type(uint216).max) {\n revert SafeCastOverflowedUintDowncast(216, value);\n }\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 function toUint208(uint256 value) internal pure returns (uint208) {\n if (value > type(uint208).max) {\n revert SafeCastOverflowedUintDowncast(208, value);\n }\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 function toUint200(uint256 value) internal pure returns (uint200) {\n if (value > type(uint200).max) {\n revert SafeCastOverflowedUintDowncast(200, value);\n }\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 function toUint192(uint256 value) internal pure returns (uint192) {\n if (value > type(uint192).max) {\n revert SafeCastOverflowedUintDowncast(192, value);\n }\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 function toUint184(uint256 value) internal pure returns (uint184) {\n if (value > type(uint184).max) {\n revert SafeCastOverflowedUintDowncast(184, value);\n }\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 function toUint176(uint256 value) internal pure returns (uint176) {\n if (value > type(uint176).max) {\n revert SafeCastOverflowedUintDowncast(176, value);\n }\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 function toUint168(uint256 value) internal pure returns (uint168) {\n if (value > type(uint168).max) {\n revert SafeCastOverflowedUintDowncast(168, value);\n }\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 function toUint160(uint256 value) internal pure returns (uint160) {\n if (value > type(uint160).max) {\n revert SafeCastOverflowedUintDowncast(160, value);\n }\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 function toUint152(uint256 value) internal pure returns (uint152) {\n if (value > type(uint152).max) {\n revert SafeCastOverflowedUintDowncast(152, value);\n }\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 function toUint144(uint256 value) internal pure returns (uint144) {\n if (value > type(uint144).max) {\n revert SafeCastOverflowedUintDowncast(144, value);\n }\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 function toUint136(uint256 value) internal pure returns (uint136) {\n if (value > type(uint136).max) {\n revert SafeCastOverflowedUintDowncast(136, value);\n }\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 function toUint128(uint256 value) internal pure returns (uint128) {\n if (value > type(uint128).max) {\n revert SafeCastOverflowedUintDowncast(128, value);\n }\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 function toUint120(uint256 value) internal pure returns (uint120) {\n if (value > type(uint120).max) {\n revert SafeCastOverflowedUintDowncast(120, value);\n }\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 function toUint112(uint256 value) internal pure returns (uint112) {\n if (value > type(uint112).max) {\n revert SafeCastOverflowedUintDowncast(112, value);\n }\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 function toUint104(uint256 value) internal pure returns (uint104) {\n if (value > type(uint104).max) {\n revert SafeCastOverflowedUintDowncast(104, value);\n }\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 function toUint96(uint256 value) internal pure returns (uint96) {\n if (value > type(uint96).max) {\n revert SafeCastOverflowedUintDowncast(96, value);\n }\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 function toUint88(uint256 value) internal pure returns (uint88) {\n if (value > type(uint88).max) {\n revert SafeCastOverflowedUintDowncast(88, value);\n }\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 function toUint80(uint256 value) internal pure returns (uint80) {\n if (value > type(uint80).max) {\n revert SafeCastOverflowedUintDowncast(80, value);\n }\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 function toUint72(uint256 value) internal pure returns (uint72) {\n if (value > type(uint72).max) {\n revert SafeCastOverflowedUintDowncast(72, value);\n }\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 function toUint64(uint256 value) internal pure returns (uint64) {\n if (value > type(uint64).max) {\n revert SafeCastOverflowedUintDowncast(64, value);\n }\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 function toUint56(uint256 value) internal pure returns (uint56) {\n if (value > type(uint56).max) {\n revert SafeCastOverflowedUintDowncast(56, value);\n }\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 function toUint48(uint256 value) internal pure returns (uint48) {\n if (value > type(uint48).max) {\n revert SafeCastOverflowedUintDowncast(48, value);\n }\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 function toUint40(uint256 value) internal pure returns (uint40) {\n if (value > type(uint40).max) {\n revert SafeCastOverflowedUintDowncast(40, value);\n }\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 function toUint32(uint256 value) internal pure returns (uint32) {\n if (value > type(uint32).max) {\n revert SafeCastOverflowedUintDowncast(32, value);\n }\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 function toUint24(uint256 value) internal pure returns (uint24) {\n if (value > type(uint24).max) {\n revert SafeCastOverflowedUintDowncast(24, value);\n }\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 function toUint16(uint256 value) internal pure returns (uint16) {\n if (value > type(uint16).max) {\n revert SafeCastOverflowedUintDowncast(16, value);\n }\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 function toUint8(uint256 value) internal pure returns (uint8) {\n if (value > type(uint8).max) {\n revert SafeCastOverflowedUintDowncast(8, value);\n }\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 function toUint256(int256 value) internal pure returns (uint256) {\n if (value < 0) {\n revert SafeCastOverflowedIntToUint(value);\n }\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 function toInt248(int256 value) internal pure returns (int248 downcasted) {\n downcasted = int248(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(248, value);\n }\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 function toInt240(int256 value) internal pure returns (int240 downcasted) {\n downcasted = int240(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(240, value);\n }\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 function toInt232(int256 value) internal pure returns (int232 downcasted) {\n downcasted = int232(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(232, value);\n }\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 function toInt224(int256 value) internal pure returns (int224 downcasted) {\n downcasted = int224(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(224, value);\n }\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 function toInt216(int256 value) internal pure returns (int216 downcasted) {\n downcasted = int216(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(216, value);\n }\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 function toInt208(int256 value) internal pure returns (int208 downcasted) {\n downcasted = int208(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(208, value);\n }\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 function toInt200(int256 value) internal pure returns (int200 downcasted) {\n downcasted = int200(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(200, value);\n }\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 function toInt192(int256 value) internal pure returns (int192 downcasted) {\n downcasted = int192(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(192, value);\n }\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 function toInt184(int256 value) internal pure returns (int184 downcasted) {\n downcasted = int184(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(184, value);\n }\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 function toInt176(int256 value) internal pure returns (int176 downcasted) {\n downcasted = int176(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(176, value);\n }\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 function toInt168(int256 value) internal pure returns (int168 downcasted) {\n downcasted = int168(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(168, value);\n }\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 function toInt160(int256 value) internal pure returns (int160 downcasted) {\n downcasted = int160(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(160, value);\n }\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 function toInt152(int256 value) internal pure returns (int152 downcasted) {\n downcasted = int152(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(152, value);\n }\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 function toInt144(int256 value) internal pure returns (int144 downcasted) {\n downcasted = int144(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(144, value);\n }\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 function toInt136(int256 value) internal pure returns (int136 downcasted) {\n downcasted = int136(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(136, value);\n }\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 function toInt128(int256 value) internal pure returns (int128 downcasted) {\n downcasted = int128(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(128, value);\n }\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 function toInt120(int256 value) internal pure returns (int120 downcasted) {\n downcasted = int120(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(120, value);\n }\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 function toInt112(int256 value) internal pure returns (int112 downcasted) {\n downcasted = int112(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(112, value);\n }\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 function toInt104(int256 value) internal pure returns (int104 downcasted) {\n downcasted = int104(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(104, value);\n }\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 function toInt96(int256 value) internal pure returns (int96 downcasted) {\n downcasted = int96(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(96, value);\n }\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 function toInt88(int256 value) internal pure returns (int88 downcasted) {\n downcasted = int88(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(88, value);\n }\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 function toInt80(int256 value) internal pure returns (int80 downcasted) {\n downcasted = int80(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(80, value);\n }\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 function toInt72(int256 value) internal pure returns (int72 downcasted) {\n downcasted = int72(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(72, value);\n }\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 function toInt64(int256 value) internal pure returns (int64 downcasted) {\n downcasted = int64(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(64, value);\n }\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 function toInt56(int256 value) internal pure returns (int56 downcasted) {\n downcasted = int56(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(56, value);\n }\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 function toInt48(int256 value) internal pure returns (int48 downcasted) {\n downcasted = int48(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(48, value);\n }\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 function toInt40(int256 value) internal pure returns (int40 downcasted) {\n downcasted = int40(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(40, value);\n }\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 function toInt32(int256 value) internal pure returns (int32 downcasted) {\n downcasted = int32(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(32, value);\n }\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 function toInt24(int256 value) internal pure returns (int24 downcasted) {\n downcasted = int24(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(24, value);\n }\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 function toInt16(int256 value) internal pure returns (int16 downcasted) {\n downcasted = int16(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(16, value);\n }\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 function toInt8(int256 value) internal pure returns (int8 downcasted) {\n downcasted = int8(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(8, value);\n }\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 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 if (value > uint256(type(int256).max)) {\n revert SafeCastOverflowedUintToInt(value);\n }\n return int256(value);\n }\n\n /**\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n */\n function toUint(bool b) internal pure returns (uint256 u) {\n assembly (\"memory-safe\") {\n u := iszero(iszero(b))\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));\n }\n }\n\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return ternary(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 ternary(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 // Formula from the \"Bit Twiddling Hacks\" by Sean Eron Anderson.\n // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift,\n // taking advantage of the most significant (or \"sign\" bit) in two's complement representation.\n // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result,\n // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative).\n int256 mask = n >> 255;\n\n // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.\n return uint256((n + mask) ^ mask);\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Panic.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n * using Panic for uint256;\n *\n * // Use any of the declared internal constants\n * function foo() { Panic.GENERIC.panic(); }\n *\n * // Alternatively\n * function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n /// @dev generic / unspecified error\n uint256 internal constant GENERIC = 0x00;\n /// @dev used by the assert() builtin\n uint256 internal constant ASSERT = 0x01;\n /// @dev arithmetic underflow or overflow\n uint256 internal constant UNDER_OVERFLOW = 0x11;\n /// @dev division or modulo by zero\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\n /// @dev enum conversion error\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n /// @dev invalid encoding in storage\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n /// @dev empty array pop\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n /// @dev array out of bounds access\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n /// @dev resource error (too large allocation or too large array)\n uint256 internal constant RESOURCE_ERROR = 0x41;\n /// @dev calling invalid internal function\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n /// @dev Reverts with a panic code. Recommended to use with\n /// the internal constants with predefined codes.\n function panic(uint256 code) internal pure {\n assembly (\"memory-safe\") {\n mstore(0x00, 0x4e487b71)\n mstore(0x20, code)\n revert(0x1c, 0x24)\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\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" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC-1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n * // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(newImplementation.code.length > 0);\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * TIP: Consider using this library along with {SlotDerivation}.\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n struct Int256Slot {\n int256 value;\n }\n\n struct StringSlot {\n string value;\n }\n\n struct BytesSlot {\n bytes value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Int256Slot` with member `value` located at `slot`.\n */\n function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `StringSlot` with member `value` located at `slot`.\n */\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n */\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n\n /**\n * @dev Returns a `BytesSlot` with member `value` located at `slot`.\n */\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n */\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SafeCast} from \"./math/SafeCast.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n using SafeCast for *;\n\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n uint256 private constant SPECIAL_CHARS_LOOKUP =\n (1 << 0x08) | // backspace\n (1 << 0x09) | // tab\n (1 << 0x0a) | // newline\n (1 << 0x0c) | // form feed\n (1 << 0x0d) | // carriage return\n (1 << 0x22) | // double quote\n (1 << 0x5c); // backslash\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n /**\n * @dev The string being parsed contains characters that are not in scope of the given base.\n */\n error StringsInvalidChar();\n\n /**\n * @dev The string being parsed is not a properly formatted address.\n */\n error StringsInvalidAddressFormat();\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n assembly (\"memory-safe\") {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n assembly (\"memory-safe\") {\n mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n uint256 localValue = value;\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n * representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal\n * representation, according to EIP-55.\n */\n function toChecksumHexString(address addr) internal pure returns (string memory) {\n bytes memory buffer = bytes(toHexString(addr));\n\n // hash the hex part of buffer (skip length + 2 bytes, length 40)\n uint256 hashValue;\n assembly (\"memory-safe\") {\n hashValue := shr(96, keccak256(add(buffer, 0x22), 40))\n }\n\n for (uint256 i = 41; i > 1; --i) {\n // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f)\n if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) {\n // case shift by xoring with 0x20\n buffer[i] ^= 0x20;\n }\n hashValue >>= 4;\n }\n return string(buffer);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input) internal pure returns (uint256) {\n return parseUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n uint256 result = 0;\n for (uint256 i = begin; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 9) return (false, 0);\n result *= 10;\n result += chr;\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `int256`.\n *\n * Requirements:\n * - The string must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input) internal pure returns (int256) {\n return parseInt(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) {\n (bool success, int256 value) = tryParseInt(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if\n * the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(string memory input) internal pure returns (bool success, int256 value) {\n return _tryParseIntUncheckedBounds(input, 0, bytes(input).length);\n }\n\n uint256 private constant ABS_MIN_INT256 = 2 ** 255;\n\n /**\n * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character or if the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, int256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseIntUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseIntUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, int256 value) {\n bytes memory buffer = bytes(input);\n\n // Check presence of a negative sign.\n bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n bool positiveSign = sign == bytes1(\"+\");\n bool negativeSign = sign == bytes1(\"-\");\n uint256 offset = (positiveSign || negativeSign).toUint();\n\n (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end);\n\n if (absSuccess && absValue < ABS_MIN_INT256) {\n return (true, negativeSign ? -int256(absValue) : int256(absValue));\n } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) {\n return (true, type(int256).min);\n } else return (false, 0);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input) internal pure returns (uint256) {\n return parseHexUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseHexUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an\n * invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseHexUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseHexUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n // skip 0x prefix if present\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 offset = hasPrefix.toUint() * 2;\n\n uint256 result = 0;\n for (uint256 i = begin + offset; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 15) return (false, 0);\n result *= 16;\n unchecked {\n // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check).\n // This guarantees that adding a value < 16 will not cause an overflow, hence the unchecked.\n result += chr;\n }\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as an `address`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input) internal pure returns (address) {\n return parseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) {\n (bool success, address value) = tryParseAddress(input, begin, end);\n if (!success) revert StringsInvalidAddressFormat();\n return value;\n }\n\n /**\n * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly\n * formatted address. See {parseAddress-string} requirements.\n */\n function tryParseAddress(string memory input) internal pure returns (bool success, address value) {\n return tryParseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly\n * formatted address. See {parseAddress-string-uint256-uint256} requirements.\n */\n function tryParseAddress(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, address value) {\n if (end > bytes(input).length || begin > end) return (false, address(0));\n\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 expectedLength = 40 + hasPrefix.toUint() * 2;\n\n // check that input is the correct length\n if (end - begin == expectedLength) {\n // length guarantees that this does not overflow, and value is at most type(uint160).max\n (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end);\n return (s, address(uint160(v)));\n } else {\n return (false, address(0));\n }\n }\n\n function _tryParseChr(bytes1 chr) private pure returns (uint8) {\n uint8 value = uint8(chr);\n\n // Try to parse `chr`:\n // - Case 1: [0-9]\n // - Case 2: [a-f]\n // - Case 3: [A-F]\n // - otherwise not supported\n unchecked {\n if (value > 47 && value < 58) value -= 48;\n else if (value > 96 && value < 103) value -= 87;\n else if (value > 64 && value < 71) value -= 55;\n else return type(uint8).max;\n }\n\n return value;\n }\n\n /**\n * @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.\n *\n * WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.\n *\n * NOTE: This function escapes all unicode characters, and not just the ones in ranges defined in section 2.5 of\n * RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). ECMAScript's `JSON.parse` does recover escaped unicode\n * characters that are not in this range, but other tooling may provide different results.\n */\n function escapeJSON(string memory input) internal pure returns (string memory) {\n bytes memory buffer = bytes(input);\n bytes memory output = new bytes(2 * buffer.length); // worst case scenario\n uint256 outputLength = 0;\n\n for (uint256 i; i < buffer.length; ++i) {\n bytes1 char = bytes1(_unsafeReadBytesOffset(buffer, i));\n if (((SPECIAL_CHARS_LOOKUP & (1 << uint8(char))) != 0)) {\n output[outputLength++] = \"\\\\\";\n if (char == 0x08) output[outputLength++] = \"b\";\n else if (char == 0x09) output[outputLength++] = \"t\";\n else if (char == 0x0a) output[outputLength++] = \"n\";\n else if (char == 0x0c) output[outputLength++] = \"f\";\n else if (char == 0x0d) output[outputLength++] = \"r\";\n else if (char == 0x5c) output[outputLength++] = \"\\\\\";\n else if (char == 0x22) {\n // solhint-disable-next-line quotes\n output[outputLength++] = '\"';\n }\n } else {\n output[outputLength++] = char;\n }\n }\n // write the actual length and deallocate unused memory\n assembly (\"memory-safe\") {\n mstore(output, outputLength)\n mstore(0x40, add(output, shl(5, shr(5, add(outputLength, 63)))))\n }\n\n return string(output);\n }\n\n /**\n * @dev Reads a bytes32 from a bytes array without bounds checking.\n *\n * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n * assembly block as such would prevent some optimizations.\n */\n function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n // This is not memory safe in the general case, but all calls to this private function are within bounds.\n assembly (\"memory-safe\") {\n value := mload(add(buffer, add(0x20, offset)))\n }\n }\n}\n" + }, + "project/contracts/Controller.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\n\nimport './interfaces/IController.sol';\n\n/**\n * @title Controller\n * @dev Manages allow lists for solvers, executors, proposal signers and validators\n */\ncontract Controller is IController, Ownable {\n // List of allowed solvers\n mapping (address => bool) public override isSolverAllowed;\n\n // List of allowed executors\n mapping (address => bool) public override isExecutorAllowed;\n\n // List of allowed proposal signers\n mapping (address => bool) public override isProposalSignerAllowed;\n\n // List of allowed validators\n mapping (address => bool) public override isValidatorAllowed;\n\n // Minimum number of validations allowed\n uint8 public override minValidations;\n\n /**\n * @dev Creates a new Controller contract\n * @param owner Address that will own the contract\n * @param solvers List of allowed solvers\n * @param executors List of allowed executors\n * @param proposalSigners List of allowed proposal signers\n * @param validators List of allowed validators\n * @param _minValidations Minimum number of validations allowed\n */\n constructor(\n address owner,\n address[] memory solvers,\n address[] memory executors,\n address[] memory proposalSigners,\n address[] memory validators,\n uint8 _minValidations\n ) Ownable(owner) {\n for (uint256 i = 0; i < solvers.length; i++) _setAllowedSolver(solvers[i], true);\n for (uint256 i = 0; i < executors.length; i++) _setAllowedExecutor(executors[i], true);\n for (uint256 i = 0; i < proposalSigners.length; i++) _setAllowedProposalSigner(proposalSigners[i], true);\n for (uint256 i = 0; i < validators.length; i++) _setAllowedValidator(validators[i], true);\n _setMinValidations(_minValidations);\n }\n\n /**\n * @dev Sets permissions for multiple solvers\n * @param solvers List of solver addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedSolvers(address[] memory solvers, bool[] memory alloweds) external override onlyOwner {\n if (solvers.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < solvers.length; i++) _setAllowedSolver(solvers[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple executors\n * @param executors List of executor addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedExecutors(address[] memory executors, bool[] memory alloweds) external override onlyOwner {\n if (executors.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < executors.length; i++) _setAllowedExecutor(executors[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple proposal signers\n * @param signers List of proposal signer addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedProposalSigners(address[] memory signers, bool[] memory alloweds) external override onlyOwner {\n if (signers.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < signers.length; i++) _setAllowedProposalSigner(signers[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple validators\n * @param validators List of validator addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedValidators(address[] memory validators, bool[] memory alloweds) external override onlyOwner {\n if (validators.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < validators.length; i++) _setAllowedValidator(validators[i], alloweds[i]);\n }\n\n /**\n * @dev Sets the minimum number of validations allowed\n * @param newMinValidations minimum number of validations allowed\n */\n function setMinValidations(uint8 newMinValidations) external override onlyOwner {\n _setMinValidations(newMinValidations);\n }\n\n /**\n * @dev Sets a solver permission\n */\n function _setAllowedSolver(address solver, bool allowed) internal {\n isSolverAllowed[solver] = allowed;\n emit SolverAllowedSet(solver, allowed);\n }\n\n /**\n * @dev Sets an executor permission\n */\n function _setAllowedExecutor(address executor, bool allowed) internal {\n isExecutorAllowed[executor] = allowed;\n emit ExecutorAllowedSet(executor, allowed);\n }\n\n /**\n * @dev Sets a proposal signer permission\n */\n function _setAllowedProposalSigner(address signer, bool allowed) internal {\n isProposalSignerAllowed[signer] = allowed;\n emit ProposalSignerAllowedSet(signer, allowed);\n }\n\n /**\n * @dev Sets a validator permission\n */\n function _setAllowedValidator(address validator, bool allowed) internal {\n isValidatorAllowed[validator] = allowed;\n emit ValidatorAllowedSet(validator, allowed);\n }\n\n /**\n * @dev Sets the minimum number of validations allowed\n */\n function _setMinValidations(uint8 newMinValidations) internal {\n minValidations = newMinValidations;\n emit MinValidationSet(newMinValidations);\n }\n}\n" + }, + "project/contracts/dynamic-calls/DynamicCallEncoder.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport './DynamicCallTypes.sol';\nimport '../interfaces/IDynamicCallEncoder.sol';\nimport '../utils/BytesHelpers.sol';\n\n/**\n * @title DynamicCallEncoder\n * @dev Builds calldata for arbitrary contract calls from structured arguments.\n *\n * This encoder supports:\n * - Literal ABI-encoded arguments\n * - Variable references resolved from previous execution results\n *\n * The encoder follows standard ABI encoding rules, reconstructing\n * the calldata heads and tails dynamically based on argument types.\n */\ncontract DynamicCallEncoder is IDynamicCallEncoder {\n using BytesHelpers for bytes;\n\n /**\n * @dev Internal representation of a fully-encoded argument\n * @param data ABI-encoded argument payload\n * @param isDynamic Whether this argument requires a head offset\n */\n struct EncodedArg {\n bytes data;\n bool isDynamic;\n }\n\n /**\n * @dev Encodes a dynamic call into calldata\n * @param dynamicCall Dynamic call specification\n * @param variables List of resolved variable values\n * @param variablesLength Number of resolved variables\n * @return data Fully ABI-encoded calldata\n */\n function encode(DynamicCall memory dynamicCall, bytes[][] memory variables, uint256 variablesLength)\n external\n pure\n override\n returns (bytes memory data)\n {\n if (variablesLength > variables.length) revert DynamicCallEncoderVariablesLengthOutOfBounds();\n data = _buildCalldata(dynamicCall.selector, dynamicCall.arguments, variables, variablesLength);\n }\n\n /**\n * @dev Builds calldata from a selector and a list of dynamic arguments\n * This function performs standard ABI aggregation:\n * - static arguments are inlined in the head\n * - dynamic arguments place offsets in the head and append data to the tail\n */\n function _buildCalldata(\n bytes4 selector,\n DynamicArg[] memory args,\n bytes[][] memory variables,\n uint256 variablesLength\n ) internal pure returns (bytes memory data) {\n uint256 n = args.length;\n bytes[] memory encodedArgs = new bytes[](n);\n bool[] memory isDynamic = new bool[](n);\n uint256 headLength = 0;\n\n for (uint256 i = 0; i < n; i++) {\n EncodedArg memory enc = _encodeArg(args[i], variables, variablesLength);\n encodedArgs[i] = enc.data;\n isDynamic[i] = enc.isDynamic;\n headLength += enc.isDynamic ? 32 : enc.data.length;\n }\n\n bytes memory heads;\n bytes memory tails;\n uint256 nextDynamicHead = headLength;\n\n for (uint256 i = 0; i < n; i++) {\n if (isDynamic[i]) {\n heads = bytes.concat(heads, bytes32(nextDynamicHead));\n tails = bytes.concat(tails, encodedArgs[i]);\n nextDynamicHead += encodedArgs[i].length;\n } else {\n heads = bytes.concat(heads, encodedArgs[i]);\n }\n }\n\n data = bytes.concat(selector, heads, tails);\n }\n\n /**\n * @dev Encodes a single dynamic argument based on its kind\n */\n function _encodeArg(DynamicArg memory arg, bytes[][] memory variables, uint256 variablesLength)\n internal\n pure\n returns (EncodedArg memory out)\n {\n if (arg.kind == DynamicArgKind.Literal) return _encodeLiteral(arg);\n if (arg.kind == DynamicArgKind.Variable) return _encodeVariable(arg, variables, variablesLength);\n revert DynamicCallEncoderInvalidArgKind();\n }\n\n /**\n * @dev Encodes a literal argument\n */\n function _encodeLiteral(DynamicArg memory arg) internal pure returns (EncodedArg memory) {\n return _encodeAbiValue(arg.data, arg.isDynamic);\n }\n\n /**\n * @dev Encodes a variable argument by resolving it from the variables list\n */\n function _encodeVariable(DynamicArg memory arg, bytes[][] memory variables, uint256 variablesLength)\n internal\n pure\n returns (EncodedArg memory)\n {\n if (arg.data.length != 64) revert DynamicCallEncoderVariableRefBadLength();\n uint256 opIndex = arg.data.readWord0();\n uint256 subIndex = arg.data.readWord1();\n if (opIndex >= variablesLength) revert DynamicCallEncoderVariableOutOfBounds();\n if (subIndex >= variables[opIndex].length) revert DynamicCallEncoderVariableOutOfBounds();\n\n return _encodeAbiValue(variables[opIndex][subIndex], arg.isDynamic);\n }\n\n /**\n * @dev Interprets ABI-like bytes as either a static or dynamic value. Used for variable resolution.\n */\n function _encodeAbiValue(bytes memory data, bool isDynamic) internal pure returns (EncodedArg memory out) {\n if (data.length == 0 || data.length % 32 != 0) revert DynamicCallEncoderBadLength();\n\n if (isDynamic) {\n if (data.length < 64) revert DynamicCallEncoderEmptyDynamic();\n if (data.readWord0() != 0x20) revert DynamicCallEncoderBadLength();\n\n out.data = data.sliceFrom(32);\n out.isDynamic = true;\n } else {\n out.data = data;\n out.isDynamic = false;\n }\n }\n}\n" + }, + "project/contracts/dynamic-calls/DynamicCallTypes.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Kind of dynamic argument to be encoded\n * @param Literal ABI-encoded literal value provided by the resolver\n * @param Variable Reference to a previously resolved variable value\n */\nenum DynamicArgKind {\n Literal,\n Variable\n}\n\n/**\n * @dev Represents a single dynamic argument\n * @param kind Type of argument resolution strategy\n * @param data Encoded argument data, interpreted based on `kind`\n * @param isDynamic Whether the resolved argument is ABI-dynamic\n */\nstruct DynamicArg {\n DynamicArgKind kind;\n bytes data;\n bool isDynamic;\n}\n\n/**\n * @dev Represents a dynamic contract call intent\n * @param target Contract address to be called\n * @param value ETH value to be sent with the call\n * @param selector Function selector to invoke\n * @param arguments List of dynamically resolved arguments\n */\nstruct DynamicCall {\n address target;\n uint256 value;\n bytes4 selector;\n DynamicArg[] arguments;\n}\n" + }, + "project/contracts/Intents.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Enum representing the operation type.\n * - Swap: Swap tokens in the same chain.\n * - Transfer: Transfer tokens to one or more recipients.\n * - Call: Execute arbitrary contract calls.\n * - CrossChainSwap: Swap tokens between chains.\n * - DynamicCall: Execute arbitrary dynamic contract calls.\n */\nenum OpType {\n Swap,\n Transfer,\n Call,\n CrossChainSwap,\n DynamicCall\n}\n\n/**\n * @dev EIP-712 typed data struct representing a validator's approval of an intent.\n * @param intent The hash of the intent being validated.\n */\nstruct Validation {\n bytes32 intent;\n}\n\n/**\n * @dev General intent structure with different operations.\n * @param feePayer The payer of the intent.\n * @param settler The address responsible for executing the intent on-chain.\n * @param nonce A unique value used to prevent replay attacks and distinguish intents.\n * @param deadline The timestamp by which the intent must be executed.\n * @param maxFees List of max fees the feePayer is willing to pay for the intent.\n * @param triggerSig The signature of the trigger that this intent belongs to\n * @param minValidations The minimum number of validator approvals required for this intent to be considered valid.\n * @param validations The list validator signatures attesting to this intent.\n * @param operations List of operations of the intent.\n */\nstruct Intent {\n address feePayer;\n address settler;\n bytes32 nonce;\n uint256 deadline;\n MaxFee[] maxFees;\n bytes triggerSig;\n uint256 minValidations;\n bytes[] validations;\n Operation[] operations;\n}\n\n/**\n * @dev Operation structure used to abstract over different operation types.\n * @param opType The type of operation this operation represents.\n * @param user The user of the operation.\n * @param data ABI-encoded data representing a specific operation type (e.g. SwapOperation, TransferOperation, CallOperation).\n * @param events List of custom operation events to be emitted.\n */\nstruct Operation {\n uint8 opType;\n address user;\n bytes data;\n OperationEvent[] events;\n}\n\n/**\n * @dev Max fee representation\n * @param token Token used to pay for the execution fee.\n * @param amount Max amount of fee token to be paid for settling this intent.\n */\nstruct MaxFee {\n address token;\n uint256 amount;\n}\n\n/**\n * @dev Operation event representation.\n * @param topic Event topic to be emitted.\n * @param data Event data to be emitted.\n */\nstruct OperationEvent {\n bytes32 topic;\n bytes data;\n}\n\n/**\n * @dev Represents a swap operation between two chains.\n * @param sourceChain Chain ID where tokens will be sent from.\n * @param destinationChain Chain ID where tokens will be received.\n * @param tokensIn List of input tokens and amounts to swap.\n * @param tokensOut List of expected output tokens, minimum amounts, and recipients.\n */\nstruct SwapOperation {\n uint256 sourceChain;\n uint256 destinationChain;\n TokenIn[] tokensIn;\n TokenOut[] tokensOut;\n}\n\n/**\n * @dev Token in representation.\n * @param token Address of a token to be sent.\n * @param amount Amount of tokens to be sent.\n */\nstruct TokenIn {\n address token;\n uint256 amount;\n}\n\n/**\n * @dev Token out representation.\n * @param token Address of a token to be received.\n * @param minAmount Minimum amount of tokens to be received.\n * @param recipient Recipient address that will receive the token out.\n */\nstruct TokenOut {\n address token;\n uint256 minAmount;\n address recipient;\n}\n\n/**\n * @dev Represents a transfer operation containing multiple token transfers.\n * @param chainId Chain ID where the transfers should be executed.\n * @param transfers List of token transfers to be performed.\n */\nstruct TransferOperation {\n uint256 chainId;\n TransferData[] transfers;\n}\n\n/**\n * @dev Transfer data for a single token transfer.\n * @param token Address of the token to transfer.\n * @param amount Amount of the token to transfer.\n * @param recipient Recipient of the token transfer.\n */\nstruct TransferData {\n address token;\n uint256 amount;\n address recipient;\n}\n\n/**\n * @dev Represents a generic call operation consisting of one or more contract calls.\n * @param chainId Chain ID where the calls should be executed.\n * @param calls List of low-level contract calls to be executed.\n */\nstruct CallOperation {\n uint256 chainId;\n CallData[] calls;\n}\n\n/**\n * @dev Low-level call data for a target contract interaction.\n * @param target Target contract address.\n * @param data Calldata to be sent to the target.\n * @param value ETH value to send along with the call.\n */\nstruct CallData {\n address target;\n bytes data;\n uint256 value;\n}\n\n/**\n * @dev Represents a generic dynamic call operation consisting of one or more dynamic contract calls.\n * @param chainId Chain ID where the calls should be executed.\n * @param calls List of ABI-encoded low-level dynamic contract calls to be executed.\n */\nstruct DynamicCallOperation {\n uint256 chainId;\n bytes[] calls;\n}\n\n/**\n * @dev Generic proposal structure representing a solver’s response to an intent.\n * @param deadline Timestamp until when the proposal is valid.\n * @param datas List of ABI-encoded proposal-specific data (e.g. SwapProposal).\n * @param fees List of fee amounts the solver requires for execution.\n */\nstruct Proposal {\n uint256 deadline;\n bytes[] datas;\n uint256[] fees;\n}\n\n/**\n * @dev Swap proposal representation for a swap operation.\n * @param executor Address of the executor contract that should be called during operation execution.\n * @param data Arbitrary data used to call the executor contract.\n * @param amountsOut List of amounts of tokens out proposed by the solver.\n */\nstruct SwapProposal {\n address executor;\n bytes data;\n uint256[] amountsOut;\n}\n\nlibrary IntentsHelpers {\n bytes32 internal constant INTENT_TYPE_HASH =\n keccak256(\n 'Intent(address feePayer,address settler,bytes32 nonce,uint256 deadline,MaxFee[] maxFees,bytes triggerSig,uint256 minValidations,Operation[] operations)MaxFee(address token,uint256 amount)Operation(uint8 opType,address user,bytes data,OperationEvent[] events)OperationEvent(bytes32 topic,bytes data)'\n );\n\n bytes32 internal constant PROPOSAL_TYPE_HASH =\n keccak256('Proposal(bytes32 intent,address solver,uint256 deadline,bytes[] datas,uint256[] fees)');\n\n bytes32 internal constant VALIDATION_TYPE_HASH = keccak256('Validation(bytes32 intent)');\n\n bytes32 internal constant MAX_FEE_TYPE_HASH = keccak256('MaxFee(address token,uint256 amount)');\n\n bytes32 internal constant OPERATION_TYPE_HASH =\n keccak256('Operation(uint8 opType,address user,bytes data,OperationEvent[] events)');\n\n bytes32 internal constant OPERATION_EVENT_TYPE_HASH = keccak256('OperationEvent(bytes32 topic,bytes data)');\n\n function hash(Intent memory intent) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n INTENT_TYPE_HASH,\n intent.feePayer,\n intent.settler,\n intent.nonce,\n intent.deadline,\n hash(intent.maxFees),\n intent.triggerSig,\n intent.minValidations,\n hash(intent.operations)\n )\n );\n }\n\n function hash(Proposal memory proposal, Intent memory intent, address solver) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n PROPOSAL_TYPE_HASH,\n hash(intent),\n solver,\n proposal.deadline,\n hash(proposal.datas),\n hash(proposal.fees)\n )\n );\n }\n\n function hash(MaxFee[] memory fees) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](fees.length);\n for (uint256 i = 0; i < fees.length; i++) {\n hashes[i] = keccak256(abi.encode(MAX_FEE_TYPE_HASH, fees[i].token, fees[i].amount));\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Operation[] memory operations) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](operations.length);\n for (uint256 i = 0; i < operations.length; i++) hashes[i] = hash(operations[i]);\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Operation memory operation) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n OPERATION_TYPE_HASH,\n operation.opType,\n operation.user,\n keccak256(operation.data),\n hash(operation.events)\n )\n );\n }\n\n function hash(OperationEvent[] memory events) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](events.length);\n for (uint256 i = 0; i < events.length; i++) {\n hashes[i] = keccak256(abi.encode(OPERATION_EVENT_TYPE_HASH, events[i].topic, keccak256(events[i].data)));\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(uint256[] memory fees) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(fees));\n }\n\n function hash(bytes[] memory datas) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](datas.length);\n for (uint256 i = 0; i < datas.length; i++) {\n hashes[i] = keccak256(datas[i]);\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Validation memory validation) internal pure returns (bytes32) {\n return keccak256(abi.encode(VALIDATION_TYPE_HASH, validation.intent));\n }\n}\n" + }, + "project/contracts/interfaces/IController.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @title Controller interface\n */\ninterface IController {\n /**\n * @dev The input arrays are not of equal length\n */\n error ControllerInputInvalidLength();\n\n /**\n * @dev Emitted every time a solver permission is set\n */\n event SolverAllowedSet(address indexed solver, bool allowed);\n\n /**\n * @dev Emitted every time an executor permission is set\n */\n event ExecutorAllowedSet(address indexed executor, bool allowed);\n\n /**\n * @dev Emitted every time a proposal signer permission is set\n */\n event ProposalSignerAllowedSet(address indexed proposalSigner, bool allowed);\n\n /**\n * @dev Emitted every time a validator permission is set\n */\n event ValidatorAllowedSet(address indexed validator, bool allowed);\n\n /**\n * @dev Emitted when the minimum validations changes\n */\n event MinValidationSet(uint8 indexed newMinValidation);\n\n /**\n * @dev Tells whether a solver is allowed\n * @param solver Address of the solver being queried\n */\n function isSolverAllowed(address solver) external view returns (bool);\n\n /**\n * @dev Tells whether an executor is allowed\n * @param executor Address of the executor being queried\n */\n function isExecutorAllowed(address executor) external view returns (bool);\n\n /**\n * @dev Tells whether a proposal signer is allowed\n * @param signer Address of the proposal signer being queried\n */\n function isProposalSignerAllowed(address signer) external view returns (bool);\n\n /**\n * @dev Tells whether a validator is allowed\n * @param validator Address of the validator being queried\n */\n function isValidatorAllowed(address validator) external view returns (bool);\n\n /**\n * @dev Tells the minimum number of validations allowed\n */\n function minValidations() external view returns (uint8);\n\n /**\n * @dev Sets permissions for multiple solvers\n * @param solvers List of solver addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedSolvers(address[] memory solvers, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple executors\n * @param executors List of executor addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedExecutors(address[] memory executors, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple proposal signers\n * @param signers List of proposal signer addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedProposalSigners(address[] memory signers, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple validators\n * @param validators List of validator addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedValidators(address[] memory validators, bool[] memory alloweds) external;\n\n /**\n * @dev Sets the minimum number of validations allowed\n * @param newMinValidations minimum number of validations allowed\n */\n function setMinValidations(uint8 newMinValidations) external;\n}\n" + }, + "project/contracts/interfaces/ICreateX.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity ^0.8.4;\n\n/**\n * @title CreateX Factory Interface Definition\n * @author pcaversaccio (https://web.archive.org/web/20230921103111/https://pcaversaccio.com/)\n * @custom:coauthor Matt Solomon (https://web.archive.org/web/20230921103335/https://mattsolomon.dev/)\n */\ninterface ICreateX {\n event ContractCreation(address indexed newContract);\n\n function deployCreate3(bytes32 salt, bytes memory initCode) external payable returns (address newContract);\n}\n" + }, + "project/contracts/interfaces/IDynamicCallEncoder.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../dynamic-calls/DynamicCallTypes.sol';\n\ninterface IDynamicCallEncoder {\n /**\n * @dev The argument is not word-aligned\n */\n error DynamicCallEncoderBadLength();\n\n /**\n * @dev The dynamic value resolves to empty data\n */\n error DynamicCallEncoderEmptyDynamic();\n\n /**\n * @dev The variable reference is not exactly one word\n */\n error DynamicCallEncoderVariableRefBadLength();\n\n /**\n * @dev The variable index is outside the variables array\n */\n error DynamicCallEncoderVariableOutOfBounds();\n\n /**\n * @dev The declared variables length exceeds the variables array length\n */\n error DynamicCallEncoderVariablesLengthOutOfBounds();\n\n /**\n * @dev The argument kind is not valid\n */\n error DynamicCallEncoderInvalidArgKind();\n\n /**\n * @dev Encodes a dynamic call into calldata.\n * @param dynamicCall Dynamic call specification.\n * @param variables List of resolved variable values.\n * @param variablesLength Number of resolved variables.\n */\n function encode(DynamicCall memory dynamicCall, bytes[][] memory variables, uint256 variablesLength)\n external\n pure\n returns (bytes memory);\n}\n" + }, + "project/contracts/interfaces/IExecutor.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\n\n/**\n * @title Executor interface\n */\ninterface IExecutor {\n /**\n * @dev Executes an operation proposal\n * @param operation Operation to be executed\n * @param operationHash unique hash of the operation\n * @param proposalData data of the proposal to be executed to fulfill the operation\n */\n function execute(Operation memory operation, bytes32 operationHash, bytes memory proposalData) external;\n}\n" + }, + "project/contracts/interfaces/IOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\nimport '../safeguards/Safeguards.sol';\n\n/**\n * @title OperationsValidator\n * @dev Performs operations validations based on safeguards\n */\ninterface IOperationsValidator {\n /**\n * @dev Validates an operation for a safeguard\n * @param operation Operation to be validated\n * @param config Safeguard config to validate the operation with\n */\n function validate(Operation memory operation, bytes memory config) external pure;\n}\n" + }, + "project/contracts/interfaces/IPaymentsReceiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @title PaymentsReceiver interface\n */\ninterface IPaymentsReceiver {\n /**\n * @dev The token address is zero\n */\n error PaymentsReceiverTokenZero();\n\n /**\n * @dev The recipient address is zero\n */\n error PaymentsReceiverRecipientZero();\n\n /**\n * @dev The amount is zero\n */\n error PaymentsReceiverAmountZero();\n\n /**\n * @dev The user address is zero\n */\n error PaymentsReceiverUserZero();\n\n /**\n * @dev The input arrays are not of equal length\n */\n error PaymentsReceiverInputInvalidLength();\n\n /**\n * @dev The token is not allowed\n */\n error PaymentsReceiverTokenNotAllowed(address token);\n\n /**\n * @dev Emitted every time a deposit is made\n */\n event Deposited(\n address indexed token,\n address indexed depositor,\n address indexed user,\n uint256 amount,\n uint8 decimals\n );\n\n /**\n * @dev Emitted every time a withdrawal is made\n */\n event Withdrawn(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time a token permission is set\n */\n event TokenAllowedSet(address indexed token, bool allowed);\n\n /**\n * @dev Tells whether a token is allowed\n * @param token Address of the token being queried\n */\n function isTokenAllowed(address token) external view returns (bool);\n\n /**\n * @dev Sets permissions for multiple tokens\n * @param tokens List of token addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedTokens(address[] memory tokens, bool[] memory alloweds) external;\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param amount Amount to deposit\n */\n function deposit(address token, uint256 amount) external;\n\n /**\n * @dev Deposits ERC20 tokens on behalf of a user\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function depositOnBehalf(address token, address user, uint256 amount) external;\n\n /**\n * @dev Withdraws ERC20 tokens to a recipient\n * @param token Address of the token to withdraw\n * @param recipient Address of the recipient\n * @param amount Amount to withdraw\n */\n function withdraw(address token, address recipient, uint256 amount) external;\n}\n" + }, + "project/contracts/interfaces/ISafe.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nenum SafeOperation {\n Call,\n DelegateCall\n}\n\ninterface ISafe {\n function getThreshold() external view returns (uint256);\n\n function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, SafeOperation operation)\n external\n returns (bool success, bytes memory returnData);\n}\n" + }, + "project/contracts/interfaces/ISettler.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\nimport '../safeguards/Safeguards.sol';\n\n/**\n * @title Settler interface\n */\ninterface ISettler {\n /**\n * @dev The requested operation type is unknown\n */\n error SettlerUnknownOperationType(uint8 opType);\n\n /**\n * @dev The simulation has been successful\n */\n error SettlerSimulationSuccess(uint256 gasUsed);\n\n /**\n * @dev The solver is not allowed\n */\n error SettlerSolverNotAllowed(address solver);\n\n /**\n * @dev The executor is not allowed\n */\n error SettlerExecutorNotAllowed(address executor);\n\n /**\n * @dev The proposal signer is not allowed\n */\n error SettlerProposalSignerNotAllowed(address signer);\n\n /**\n * @dev The validator is not allowed\n */\n error SettlerValidatorNotAllowed(address validator);\n\n /**\n * @dev The validator is duplicated\n */\n error SettlerValidatorDuplicatedOrUnsorted(address previous, address current);\n\n /**\n * @dev The settler is not the current contract\n */\n error SettlerInvalidSettler(address settler);\n\n /**\n * @dev The nonce is zero\n */\n error SettlerNonceZero();\n\n /**\n * @dev The intent has already been executed\n */\n error SettlerIntentAlreadyExecuted(bytes32 hash);\n\n /**\n * @dev The intent deadline is in the past\n */\n error SettlerIntentPastDeadline(uint256 deadline, uint256 timestamp);\n\n /**\n * @dev The current chain is not valid\n */\n error SettlerInvalidChain(uint256 chainId);\n\n /**\n * @dev The recipient is the settler contract\n */\n error SettlerInvalidRecipient(address to);\n\n /**\n * @dev The user is not a smart account\n */\n error SettlerUserNotSmartAccount(address user);\n\n /**\n * @dev The amount out is lower than the proposed amount\n */\n error SettlerAmountOutLtProposed(uint256 index, uint256 amountOut, uint256 proposed);\n\n /**\n * @dev The proposed amount is lower than the minimum amount\n */\n error SettlerProposedAmountLtMinAmount(uint256 index, uint256 proposed, uint256 minAmount);\n\n /**\n * @dev The proposed amounts array and the tokens out array are not of equal length\n */\n error SettlerInvalidProposedAmounts();\n\n /**\n * @dev The balance after the proposal execution is lower than the balance before\n */\n error SettlerPostBalanceOutLtPre(uint256 index, uint256 post, uint256 pre);\n\n /**\n * @dev The solver fees length does not match the requested by the user\n */\n error SettlerSolverFeeInvalidLength();\n\n /**\n * @dev The intent operations array is empty\n */\n error SettlerIntentOperationsEmpty();\n\n /**\n * @dev The proposal datas length does not match the intent operations length\n */\n error SettlerProposalDataInvalidLength();\n\n /**\n * @dev The solver fee is too high\n */\n error SettlerSolverFeeTooHigh(uint256 fee, uint256 max);\n\n /**\n * @dev The intent validations are not enough\n */\n error SettlerIntentValidationsNotEnough(uint256 min, uint256 current);\n\n /**\n * @dev The proposal deadline is in the past\n */\n error SettlerProposalPastDeadline(uint256 deadline, uint256 timestamp);\n\n /**\n * @dev The proposal data is not empty\n */\n error SettlerProposalDataNotEmpty();\n\n /**\n * @dev The rescue funds recipient is zero\n */\n error SettlerRescueFundsRecipientZero();\n\n /**\n * @dev The list of safeguards exceed the maximum allowed\n */\n error SettlerTooManySafeguards(uint256 lengthRequested);\n\n /**\n * @dev The chains of a swap operation do not match the swap type (single or cross chain)\n */\n error SettlerOperationChainsMismatch();\n\n /**\n * @dev A CrossChainSwap operation must be the only operation in the intent\n */\n error SettlerCrossChainSwapMustBeOnlyOperation();\n\n /**\n * @dev The new smart accounts handler is zero\n */\n error SmartAccountsHandlerZero();\n\n /**\n * @dev The new dynamic call encoder is zero\n */\n error SettlerDynamicCallEncoderZero();\n\n /**\n * @dev Custom events emitted for each operation\n */\n event OperationExecuted(\n address indexed user,\n bytes32 indexed topic,\n uint8 indexed opType,\n Operation operation,\n Proposal proposal,\n bytes32 intentHash,\n uint256 index,\n bytes output,\n bytes data\n );\n\n /**\n * @dev Emitted every time an intent is fulfilled\n */\n event ProposalExecuted(bytes32 indexed proposal);\n\n /**\n * @dev Emitted every time tokens are withdrawn from the contract balance\n */\n event FundsRescued(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time the smart accounts handler is set\n */\n event SmartAccountsHandlerSet(address indexed smartAccountsHandler);\n\n /**\n * @dev Emitted every time the operations validator is set\n */\n event OperationsValidatorSet(address indexed operationsValidator);\n\n /**\n * @dev Emitted every time the dynamic call encoder is set\n */\n event DynamicCallEncoderSet(address indexed dynamicCallEncoder);\n\n /**\n * @dev Emitted every time a safeguard is set\n */\n event SafeguardSet(address indexed user);\n\n /**\n * @dev Tells the reference to the Mimic controller\n */\n function controller() external view returns (address);\n\n /**\n * @dev Tells the reference to the smart accounts handler\n */\n function smartAccountsHandler() external view returns (address);\n\n /**\n * @dev Tells the reference to the operations validator\n */\n function operationsValidator() external view returns (address);\n\n /**\n * @dev Tells the reference to the dynamic call encoder\n */\n function dynamicCallEncoder() external view returns (address);\n\n /**\n * @dev Tells the block at which an intent was executed. Returns 0 if unexecuted.\n * @param hash Hash of the intent being queried\n */\n function getIntentBlock(bytes32 hash) external view returns (uint256);\n\n /**\n * @dev Tells the safeguard set for a user\n * @param user Address of the user being queried\n */\n function getUserSafeguard(address user) external view returns (bytes memory);\n\n /**\n * @dev Tells the hash of an intent\n * @param intent Intent to get the hash of\n */\n function getIntentHash(Intent memory intent) external pure returns (bytes32);\n\n /**\n * @dev Tells the hash of a proposal\n * @param proposal Proposal to be hashed\n * @param intent Intent being fulfilled by the requested proposal\n * @param solver Address of the solver that made the proposal\n */\n function getProposalHash(Proposal memory proposal, Intent memory intent, address solver)\n external\n pure\n returns (bytes32);\n\n /**\n * @dev Withdraws ERC20 or native tokens from the contract\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function rescueFunds(address token, address recipient, uint256 amount) external;\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function setSmartAccountsHandler(address newSmartAccountsHandler) external;\n\n /**\n * @dev Sets a new operations validator address\n * @param newOperationsValidator New operations validator to be set\n */\n function setOperationsValidator(address newOperationsValidator) external;\n\n /**\n * @dev Sets a new dynamic call encoder address\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function setDynamicCallEncoder(address newDynamicCallEncoder) external;\n\n /**\n * @dev Sets a safeguard for a user\n * @param safeguard Safeguard to be set\n */\n function setSafeguard(bytes memory safeguard) external;\n\n /**\n * @dev Executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function execute(Intent memory intent, Proposal memory proposal, bytes memory signature) external;\n\n /**\n * @dev Simulates an execution. It will always revert. Successful executions are returned as\n * `SettlerSimulationSuccess` errors. Any other error should be treated as failure.\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function simulate(Intent memory intent, Proposal memory proposal, bytes memory signature) external;\n}\n" + }, + "project/contracts/interfaces/ISmartAccount.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/introspection/IERC165.sol';\n\n/**\n * @title SmartAccount interface\n */\ninterface ISmartAccount is IERC165 {\n /**\n * @dev Emitted every time tokens are transferred\n */\n event Transferred(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time `call` is called\n */\n event Called(address indexed target, bytes data, uint256 value, bytes result);\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the owner or the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) external;\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the owner or the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n */\n function call(address target, bytes memory data, uint256 value) external returns (bytes memory result);\n}\n" + }, + "project/contracts/interfaces/ISmartAccountContract.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/interfaces/IERC1271.sol';\n\nimport './ISmartAccount.sol';\n\n/**\n * @title SmartAccountContract interface\n */\ninterface ISmartAccountContract is ISmartAccount, IERC1271 {\n // solhint-disable-previous-line no-empty-blocks\n}\n" + }, + "project/contracts/interfaces/ISmartAccountsHandler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\ninterface ISmartAccountsHandler {\n /**\n * @dev The smart account given is not supported\n */\n error SmartAccountsHandlerUnsupportedAccount(address account);\n\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address account) external view returns (bool);\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address account, address token, address to, uint256 amount) external;\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address account, address target, bytes memory data, uint256 value) external returns (bytes memory);\n}\n" + }, + "project/contracts/payments/PaymentsReceiver.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\n\nimport '../interfaces/IPaymentsReceiver.sol';\n\n/**\n * @title PaymentsReceiver\n * @dev Receives ERC20 deposits and lets the owner withdraw them\n */\ncontract PaymentsReceiver is IPaymentsReceiver, Ownable {\n using SafeERC20 for IERC20;\n\n // List of allowed tokens\n mapping (address => bool) public override isTokenAllowed;\n\n /**\n * @dev Creates a new PaymentsReceiver contract\n * @param owner Address that will own the contract\n * @param tokens List of allowed tokens\n */\n constructor(address owner, address[] memory tokens) Ownable(owner) {\n for (uint256 i = 0; i < tokens.length; i++) _setAllowedToken(tokens[i], true);\n }\n\n /**\n * @dev Sets permissions for multiple tokens\n * @param tokens List of token addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedTokens(address[] memory tokens, bool[] memory alloweds) external override onlyOwner {\n if (tokens.length != alloweds.length) revert PaymentsReceiverInputInvalidLength();\n for (uint256 i = 0; i < tokens.length; i++) _setAllowedToken(tokens[i], alloweds[i]);\n }\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param amount Amount to deposit\n */\n function deposit(address token, uint256 amount) external override {\n _deposit(token, _msgSender(), amount);\n }\n\n /**\n * @dev Deposits ERC20 tokens on behalf of a user\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function depositOnBehalf(address token, address user, uint256 amount) external override {\n if (user == address(0)) revert PaymentsReceiverUserZero();\n _deposit(token, user, amount);\n }\n\n /**\n * @dev Withdraws ERC20 tokens to a recipient\n * @param token Address of the token to withdraw\n * @param recipient Address of the recipient\n * @param amount Amount to withdraw\n */\n function withdraw(address token, address recipient, uint256 amount) external override onlyOwner {\n if (token == address(0)) revert PaymentsReceiverTokenZero();\n if (recipient == address(0)) revert PaymentsReceiverRecipientZero();\n if (amount == 0) revert PaymentsReceiverAmountZero();\n\n IERC20(token).safeTransfer(recipient, amount);\n\n emit Withdrawn(token, recipient, amount);\n }\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function _deposit(address token, address user, uint256 amount) internal {\n if (token == address(0)) revert PaymentsReceiverTokenZero();\n if (amount == 0) revert PaymentsReceiverAmountZero();\n if (!isTokenAllowed[token]) revert PaymentsReceiverTokenNotAllowed(token);\n\n address depositor = _msgSender();\n IERC20(token).safeTransferFrom(depositor, address(this), amount);\n\n uint8 decimals = IERC20Metadata(token).decimals();\n emit Deposited(token, depositor, user, amount, decimals);\n }\n\n /**\n * @dev Sets a token permission\n */\n function _setAllowedToken(address token, bool allowed) internal {\n isTokenAllowed[token] = allowed;\n emit TokenAllowedSet(token, allowed);\n }\n}\n" + }, + "project/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol';\n\ncontract Proxy is TransparentUpgradeableProxy {\n constructor(address implementation, address initialOwner, bytes memory data)\n TransparentUpgradeableProxy(implementation, initialOwner, data)\n {}\n}\n" + }, + "project/contracts/safeguards/BaseOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @title BaseOperationsValidator\n */\ncontract BaseOperationsValidator {\n /**\n * @dev No operations allowed\n */\n error OperationsValidatorNoneAllowed();\n\n /**\n * @dev Operation type unknown\n */\n error OperationsValidatorUnknownOperationType(uint8 opType);\n\n /**\n * @dev Invalid safeguard mode\n */\n error OperationsValidatorInvalidSafeguardMode(uint8 mode);\n\n /**\n * @dev Tells whether a chain is allowed\n */\n function _isChainAllowed(uint256 chainId, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, uint256[] memory values) = abi.decode(config, (bool, uint256[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (chainId == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (chainId == values[i]) return true;\n }\n return false;\n }\n }\n\n /**\n * @dev Tells whether an account is allowed\n */\n function _isAccountAllowed(address account, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, address[] memory values) = abi.decode(config, (bool, address[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (account == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (account == values[i]) return true;\n }\n return false;\n }\n }\n\n /**\n * @dev Tells whether a selector is allowed\n */\n function _isSelectorAllowed(bytes4 selector, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, bytes4[] memory values) = abi.decode(config, (bool, bytes4[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (selector == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (selector == values[i]) return true;\n }\n return false;\n }\n }\n}\n" + }, + "project/contracts/safeguards/CallOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './Safeguards.sol';\nimport './BaseOperationsValidator.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Call safeguard modes to validate call operations\n * @param None To ensure no calls are allowed\n * @param Chain To validate that the chain where calls execute is allowed\n * @param Target To validate that the call targets (contract addresses) are allowed\n * @param Selector To validate that the function selectors being called are allowed\n */\nenum CallSafeguardMode {\n None,\n Chain,\n Target,\n Selector\n}\n\n/**\n * @title CallOperationsValidator\n * @dev Performs call operations validations based on safeguards\n */\ncontract CallOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a call operation is valid for a safeguard\n * @param operation Call operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isCallOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n CallOperation memory callOperation = abi.decode(operation.data, (CallOperation));\n if (safeguard.mode == uint8(CallSafeguardMode.Chain))\n return _isChainAllowed(callOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Target))\n return _areCallTargetsValid(callOperation.calls, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Selector))\n return _areCallSelectorsValid(callOperation.calls, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the call targets are allowed\n */\n function _areCallTargetsValid(CallData[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n if (!_isAccountAllowed(calls[i].target, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the call selectors are allowed\n */\n function _areCallSelectorsValid(CallData[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n if (!_isSelectorAllowed(bytes4(calls[i].data), config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/DynamicCallOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './CallOperationsValidator.sol';\nimport './Safeguards.sol';\nimport './BaseOperationsValidator.sol';\nimport '../Intents.sol';\nimport '../dynamic-calls/DynamicCallTypes.sol';\n\n/**\n * @title DynamicCallOperationsValidator\n * @dev Performs dynamic call operations validations based on call safeguards\n */\ncontract DynamicCallOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a dynamic call operation is valid for a safeguard\n * @param operation Dynamic call operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isDynamicCallOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n DynamicCallOperation memory dynamicCallOperation = abi.decode(operation.data, (DynamicCallOperation));\n if (safeguard.mode == uint8(CallSafeguardMode.Chain))\n return _isChainAllowed(dynamicCallOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Target))\n return _areDynamicCallTargetsValid(dynamicCallOperation.calls, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Selector))\n return _areDynamicCallSelectorsValid(dynamicCallOperation.calls, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the dynamic call targets are allowed\n */\n function _areDynamicCallTargetsValid(bytes[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n DynamicCall memory call = abi.decode(calls[i], (DynamicCall));\n if (!_isAccountAllowed(call.target, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the dynamic call selectors are allowed\n */\n function _areDynamicCallSelectorsValid(bytes[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n DynamicCall memory call = abi.decode(calls[i], (DynamicCall));\n if (!_isSelectorAllowed(call.selector, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/OperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './CallOperationsValidator.sol';\nimport './DynamicCallOperationsValidator.sol';\nimport './TransferOperationsValidator.sol';\nimport './Safeguards.sol';\nimport './SwapOperationsValidator.sol';\nimport '../Intents.sol';\nimport '../interfaces/IOperationsValidator.sol';\n\n/**\n * @title OperationsValidator\n * @dev Performs operations validations based on safeguards\n */\ncontract OperationsValidator is\n IOperationsValidator,\n SwapOperationsValidator,\n TransferOperationsValidator,\n CallOperationsValidator,\n DynamicCallOperationsValidator\n{\n /**\n * @dev Safeguard validation failed\n */\n error OperationsValidatorSafeguardFailed();\n\n /**\n * @dev Invalid safeguard config mode\n */\n error OperationsValidatorInvalidSafeguardConfigMode(uint8 mode);\n\n /**\n * @dev Invalid safeguard group logic mode\n */\n error OperationsValidatorInvalidSafeguardGroupLogicMode(uint8 mode);\n\n /**\n * @dev Tells whether an operation is valid for a safeguard\n * @param operation Operation to be validated\n * @param config Safeguard config to validate the operation with\n */\n function validate(Operation memory operation, bytes memory config) external pure override {\n (uint8 mode, bytes memory safeguard) = abi.decode(config, (uint8, bytes));\n if (mode == uint8(SafeguardConfigMode.List)) _validate(operation, abi.decode(safeguard, (Safeguard[])));\n else if (mode == uint8(SafeguardConfigMode.Tree)) _validate(operation, _decodeSafeguardTree(safeguard));\n else revert OperationsValidatorInvalidSafeguardConfigMode(mode);\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguards list\n * @param operation Operation to be validated\n * @param safeguards Safeguard list to validate the operation with\n */\n function _validate(Operation memory operation, Safeguard[] memory safeguards) internal pure {\n if (safeguards.length == 0) revert OperationsValidatorSafeguardFailed();\n for (uint256 i = 0; i < safeguards.length; i++) {\n if (!_isSafeguardValid(operation, safeguards[i])) revert OperationsValidatorSafeguardFailed();\n }\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard tree\n * @param operation Operation to be validated\n * @param tree Safeguard tree to validate the operation with\n */\n function _validate(Operation memory operation, SafeguardTree memory tree) internal pure {\n if (tree.nodes.length == 0) revert OperationsValidatorSafeguardFailed();\n if (!_isSafeguardGroupValid(operation, tree, 0)) revert OperationsValidatorSafeguardFailed();\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard tree at a certain level\n * @param operation Operation to be validated\n * @param tree Safeguard tree to validate the operation with\n * @param index Index of the group node to evaluate\n */\n function _isSafeguardGroupValid(Operation memory operation, SafeguardTree memory tree, uint16 index)\n internal\n pure\n returns (bool)\n {\n SafeguardGroup memory group = tree.nodes[index];\n\n if (group.logic == uint8(SafeguardGroupLogic.NOT)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i])) return false;\n }\n return true;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.AND)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (!_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (!_isSafeguardGroupValid(operation, tree, group.children[i])) return false;\n }\n return true;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.OR)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return true;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i])) return true;\n }\n return false;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.XOR)) {\n uint256 hits = 0;\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]]))\n if (++hits > 1) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i]))\n if (++hits > 1) return false;\n }\n return hits == 1;\n }\n\n revert OperationsValidatorInvalidSafeguardGroupLogicMode(group.logic);\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard\n * @param operation Operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isSafeguardValid(Operation memory operation, Safeguard memory safeguard) internal pure returns (bool) {\n if (safeguard.mode == uint8(0)) revert OperationsValidatorNoneAllowed();\n if (operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap)) {\n return _isSwapOperationValid(operation, safeguard);\n }\n if (operation.opType == uint8(OpType.Transfer)) return _isTransferOperationValid(operation, safeguard);\n if (operation.opType == uint8(OpType.Call)) return _isCallOperationValid(operation, safeguard);\n if (operation.opType == uint8(OpType.DynamicCall)) return _isDynamicCallOperationValid(operation, safeguard);\n revert OperationsValidatorUnknownOperationType(uint8(operation.opType));\n }\n\n /**\n * @dev Safely decodes a safeguard tree avoiding compiler issues with dynamic arrays\n * @param data Safeguard tree data to be decoded\n */\n function _decodeSafeguardTree(bytes memory data) private pure returns (SafeguardTree memory) {\n (SafeguardGroup[] memory nodes, Safeguard[] memory leaves) = abi.decode(data, (SafeguardGroup[], Safeguard[]));\n return SafeguardTree(nodes, leaves);\n }\n}\n" + }, + "project/contracts/safeguards/Safeguards.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Safeguard config modes\n * - List: Safeguard lists\n * - Tree: Safeguard groups\n */\nenum SafeguardConfigMode {\n List,\n Tree\n}\n\n/**\n * @dev Logical operators for safeguard groups\n * - AND: every child must pass\n * - OR: at least one child must pass\n * - XOR: exactly one child must pass\n * - NOT: every child must fail\n */\nenum SafeguardGroupLogic {\n AND,\n OR,\n XOR,\n NOT\n}\n\n/**\n * @dev Flat node in the safeguard tree\n * @param logic Group operator (AND/OR/XOR/NOT)\n * @param leaves Indices into `SafeguardTree.leaves`\n * @param children Indices into `SafeguardTree.nodes`\n */\nstruct SafeguardGroup {\n uint8 logic;\n uint16[] leaves;\n uint16[] children;\n}\n\n/**\n * @dev Safeguard tree representation\n * @param nodes List of all the nodes in the tree\n * @param leaves List of all the leaves in the tree\n */\nstruct SafeguardTree {\n SafeguardGroup[] nodes;\n Safeguard[] leaves;\n}\n\n/**\n * @dev Safeguard representation\n * @param mode Safeguard mode\n * @param config Safeguard configuration settings or parameters\n */\nstruct Safeguard {\n uint8 mode;\n bytes config;\n}\n" + }, + "project/contracts/safeguards/SwapOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './BaseOperationsValidator.sol';\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Swap safeguard modes to validate swap operations\n * @param None To ensure no swaps are allowed\n * @param SourceChain To validate that the source chain is allowed\n * @param DestinationChain To validate that the destination chain is allowed\n * @param TokenIn To validate that the tokens to be sent are allowed\n * @param TokenOut To validate that the tokens to be received are allowed\n * @param Recipient To validate that the recipients that will receive the tokens are allowed\n */\nenum SwapSafeguardMode {\n None,\n SourceChain,\n DestinationChain,\n TokenIn,\n TokenOut,\n Recipient\n}\n\n/**\n * @title SwapOperationsValidator\n * @dev Performs swap operations validations based on safeguards\n */\ncontract SwapOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a swap operation is valid for a safeguard\n * @param operation Swap operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isSwapOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n SwapOperation memory swapOperation = abi.decode(operation.data, (SwapOperation));\n if (safeguard.mode == uint8(SwapSafeguardMode.SourceChain))\n return _isChainAllowed(swapOperation.sourceChain, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.DestinationChain))\n return _isChainAllowed(swapOperation.destinationChain, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.TokenIn))\n return _areSwapTokensInValid(swapOperation.tokensIn, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.TokenOut))\n return _areSwapTokensOutValid(swapOperation.tokensOut, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.Recipient))\n return _areSwapRecipientsValid(swapOperation.tokensOut, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the tokens to be sent are allowed\n */\n function _areSwapTokensInValid(TokenIn[] memory tokensIn, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensIn.length; i++) {\n if (!_isAccountAllowed(tokensIn[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the tokens to be received are allowed\n */\n function _areSwapTokensOutValid(TokenOut[] memory tokensOut, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensOut.length; i++) {\n if (!_isAccountAllowed(tokensOut[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the recipients to be received are allowed\n */\n function _areSwapRecipientsValid(TokenOut[] memory tokensOut, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensOut.length; i++) {\n if (!_isAccountAllowed(tokensOut[i].recipient, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/TransferOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './BaseOperationsValidator.sol';\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Transfer safeguard modes to validate transfer operations\n * @param None To ensure no transfers are allowed\n * @param Chain To validate that the chain where transfers execute is allowed\n * @param Token To validate that the tokens being transferred are allowed\n * @param Recipient To validate that the recipients of the transfers are allowed\n */\nenum TransferSafeguardMode {\n None,\n Chain,\n Token,\n Recipient\n}\n\n/**\n * @title TransferOperationsValidator\n * @dev Performs transfer operations validations based on safeguards\n */\ncontract TransferOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a transfer operation is valid for a safeguard\n * @param operation Transfer operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isTransferOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n TransferOperation memory transferOperation = abi.decode(operation.data, (TransferOperation));\n if (safeguard.mode == uint8(TransferSafeguardMode.Chain))\n return _isChainAllowed(transferOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(TransferSafeguardMode.Token))\n return _areTransferTokensValid(transferOperation.transfers, safeguard.config);\n if (safeguard.mode == uint8(TransferSafeguardMode.Recipient))\n return _areTransferRecipientsValid(transferOperation.transfers, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the tokens being transferred are allowed\n */\n function _areTransferTokensValid(TransferData[] memory transfers, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < transfers.length; i++) {\n if (!_isAccountAllowed(transfers[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the recipients of the transfers are allowed\n */\n function _areTransferRecipientsValid(TransferData[] memory transfers, bytes memory config)\n private\n pure\n returns (bool)\n {\n for (uint256 i = 0; i < transfers.length; i++) {\n if (!_isAccountAllowed(transfers[i].recipient, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/Settler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';\nimport '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\nimport '@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol';\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\nimport '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';\n\nimport './Intents.sol';\nimport './interfaces/IController.sol';\nimport './interfaces/IDynamicCallEncoder.sol';\nimport './interfaces/IOperationsValidator.sol';\nimport './interfaces/IExecutor.sol';\nimport './interfaces/ISettler.sol';\nimport './utils/Denominations.sol';\nimport './utils/ERC20Helpers.sol';\nimport './smart-accounts/SmartAccountsHandler.sol';\nimport './smart-accounts/SmartAccountsHandlerHelpers.sol';\n\n/**\n * @title Settler\n * @dev Contract that provides the appropriate context for solvers to execute proposals that fulfill user intents\n */\ncontract Settler is ISettler, Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, EIP712Upgradeable {\n using SafeERC20 for IERC20;\n using IntentsHelpers for Intent;\n using IntentsHelpers for Proposal;\n using IntentsHelpers for Validation;\n using SmartAccountsHandlerHelpers for address;\n\n // Mimic controller reference\n address public override controller;\n\n // Smart accounts handler reference\n address public override smartAccountsHandler;\n\n // Operations validator reference\n address public override operationsValidator;\n\n // Dynamic call encoder reference\n address public dynamicCallEncoder;\n\n // List of block numbers at which an intent was executed\n mapping (bytes32 => uint256) public override getIntentBlock;\n\n // Safeguard config per user\n mapping (address => bytes) internal _userSafeguard;\n\n /**\n * @dev Modifier to tag settler functions in order to check if the sender is an allowed solver\n */\n modifier onlySolver() {\n address sender = _msgSender();\n if (!IController(controller).isSolverAllowed(sender)) revert SettlerSolverNotAllowed(sender);\n _;\n }\n\n /**\n * @dev Disables initializers to prevent implementation contract from being initialized directly\n */\n constructor() {\n _disableInitializers();\n }\n\n /**\n * @dev Initializes a new Settler contract\n * @param _controller Address of the Settler controller\n * @param _owner Address that will own the contract\n * @param _dynamicCallEncoder Address of the dynamic call encoder\n */\n function initialize(address _controller, address _owner, address _dynamicCallEncoder) external initializer {\n __Ownable_init(_owner);\n __ReentrancyGuard_init();\n __EIP712_init('Mimic Protocol Settler', '1');\n\n controller = _controller;\n smartAccountsHandler = address(new SmartAccountsHandler());\n _setDynamicCallEncoder(_dynamicCallEncoder);\n }\n\n /**\n * @dev Tells the hash of an intent\n * @param intent Intent to get the hash of\n */\n function getIntentHash(Intent memory intent) external pure override returns (bytes32) {\n return intent.hash();\n }\n\n /**\n * @dev Tells the hash of a proposal\n * @param proposal Proposal to be hashed\n * @param intent Intent being fulfilled by the requested proposal\n * @param solver Address of the solver that made the proposal\n */\n function getProposalHash(Proposal memory proposal, Intent memory intent, address solver)\n external\n pure\n override\n returns (bytes32)\n {\n return proposal.hash(intent, solver);\n }\n\n /**\n * @dev Tells the safeguard set for a user\n * @param user Address of the user being queried\n */\n function getUserSafeguard(address user) external view override returns (bytes memory) {\n return _userSafeguard[user];\n }\n\n /**\n * @dev It allows receiving native token transfers\n * Note: This method mainly allows supporting native tokens for swaps\n */\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n /**\n * @dev Withdraws ERC20 or native tokens from the contract\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function rescueFunds(address token, address recipient, uint256 amount) external override onlyOwner nonReentrant {\n if (recipient == address(0)) revert SettlerRescueFundsRecipientZero();\n ERC20Helpers.transfer(token, recipient, amount);\n emit FundsRescued(token, recipient, amount);\n }\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function setSmartAccountsHandler(address newSmartAccountsHandler) external override onlyOwner {\n _setSmartAccountsHandler(newSmartAccountsHandler);\n }\n\n /**\n * @dev Sets a new operations validator address\n * @param newOperationsValidator New operations validator to be set\n */\n function setOperationsValidator(address newOperationsValidator) external override onlyOwner {\n _setOperationsValidator(newOperationsValidator);\n }\n\n /**\n * @dev Sets a new dynamic call encoder address\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function setDynamicCallEncoder(address newDynamicCallEncoder) external override onlyOwner {\n _setDynamicCallEncoder(newDynamicCallEncoder);\n }\n\n /**\n * @dev Sets a safeguard for a user\n * @param safeguard Safeguard to be set\n */\n function setSafeguard(bytes memory safeguard) external override {\n _setSafeguard(msg.sender, safeguard);\n }\n\n /**\n * @dev Executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function execute(Intent memory intent, Proposal memory proposal, bytes memory signature)\n external\n override\n onlySolver\n {\n _execute(intent, proposal, signature, false);\n }\n\n /**\n * @dev Simulates an execution. It will always revert. Successful executions are returned as\n * `SettlerSimulationSuccess` errors. Any other error should be treated as failure.\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function simulate(Intent memory intent, Proposal memory proposal, bytes memory signature)\n external\n override\n onlySolver\n {\n uint256 initialGas = gasleft();\n _execute(intent, proposal, signature, true);\n uint256 gasUsed = initialGas - gasleft();\n revert SettlerSimulationSuccess(gasUsed);\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n * @param simulated Whether the execution is a simulation\n */\n function _execute(Intent memory intent, Proposal memory proposal, bytes memory signature, bool simulated)\n internal\n nonReentrant\n {\n _validateIntent(intent, proposal, signature, simulated);\n getIntentBlock[intent.hash()] = block.number;\n\n bytes[][] memory outputs = new bytes[][](intent.operations.length);\n for (uint256 i = 0; i < intent.operations.length; i++) {\n outputs[i] = _executeOperation(intent, proposal, i, outputs);\n }\n\n _payFees(intent, proposal);\n emit ProposalExecuted(proposal.hash(intent, _msgSender()));\n }\n\n /**\n * @dev Executes proposal to fulfill an operation\n * @param intent Intent being fulfilled\n * @param proposal Proposal being executed\n * @param index Position where the operation and its corresponding proposal data are located\n * @param outputs List of operations outputs\n */\n function _executeOperation(Intent memory intent, Proposal memory proposal, uint256 index, bytes[][] memory outputs)\n internal\n returns (bytes[] memory)\n {\n uint8 opType = intent.operations[index].opType;\n if (opType == uint8(OpType.Swap) || opType == uint8(OpType.CrossChainSwap)) {\n return _executeSwap(intent, proposal, index);\n }\n if (opType == uint8(OpType.Transfer)) return _executeTransfer(intent, proposal, index);\n if (opType == uint8(OpType.Call)) return _executeCall(intent, proposal, index);\n if (opType == uint8(OpType.DynamicCall)) return _executeDynamicCall(intent, proposal, index, outputs);\n revert SettlerUnknownOperationType(opType);\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a swap operation\n * @param intent Intent that contains swap operation to be fulfilled\n * @param proposal Proposal with swap data to be executed\n * @param index Position where the swap proposal data and operation are located\n */\n function _executeSwap(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n SwapOperation memory swapOperation = abi.decode(operation.data, (SwapOperation));\n SwapProposal memory swapProposal = abi.decode(proposal.datas[index], (SwapProposal));\n if (operation.opType == uint8(OpType.CrossChainSwap)) {\n if (intent.operations.length > 1) revert SettlerCrossChainSwapMustBeOnlyOperation();\n _validateCrossChainSwapOperation(swapOperation, swapProposal);\n } else _validateSingleChainSwapOperation(swapOperation, swapProposal);\n\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(operation.user);\n if (swapOperation.sourceChain == block.chainid) {\n for (uint256 i = 0; i < swapOperation.tokensIn.length; i++) {\n TokenIn memory tokenIn = swapOperation.tokensIn[i];\n _transferFrom(tokenIn.token, operation.user, swapProposal.executor, tokenIn.amount, isSmartAccount);\n }\n }\n\n uint256[] memory preBalancesOut = _getTokensOutBalance(swapOperation);\n // Using the intent hash as the unique operation hash because cross-chain swap has only one operation per intent and the single swap executor does not use it\n bytes32 operationHash = intent.hash();\n IExecutor(swapProposal.executor).execute(operation, operationHash, proposal.datas[index]);\n\n outputs = new bytes[](swapOperation.tokensOut.length);\n if (swapOperation.destinationChain == block.chainid) {\n uint256[] memory amounts = new uint256[](swapOperation.tokensOut.length);\n for (uint256 i = 0; i < swapOperation.tokensOut.length; i++) {\n TokenOut memory tokenOut = swapOperation.tokensOut[i];\n uint256 postBalanceOut = ERC20Helpers.balanceOf(tokenOut.token, address(this));\n uint256 preBalanceOut = preBalancesOut[i];\n if (postBalanceOut < preBalanceOut) revert SettlerPostBalanceOutLtPre(i, postBalanceOut, preBalanceOut);\n\n amounts[i] = postBalanceOut - preBalanceOut;\n uint256 proposedAmount = swapProposal.amountsOut[i];\n if (amounts[i] < proposedAmount) revert SettlerAmountOutLtProposed(i, amounts[i], proposedAmount);\n\n ERC20Helpers.transfer(tokenOut.token, tokenOut.recipient, amounts[i]);\n outputs[i] = abi.encode(amounts[i]);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(amounts));\n }\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a transfer operation\n * @param intent Intent that contains transfer operation to be fulfilled\n * @param proposal Transfer proposal to be executed\n * @param index Position where the transfer proposal data and operation are located\n */\n function _executeTransfer(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n TransferOperation memory transferOperation = abi.decode(operation.data, (TransferOperation));\n _validateTransferOperation(transferOperation, proposal.datas[index]);\n\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(operation.user);\n for (uint256 i = 0; i < transferOperation.transfers.length; i++) {\n TransferData memory transfer = transferOperation.transfers[i];\n _transferFrom(transfer.token, operation.user, transfer.recipient, transfer.amount, isSmartAccount);\n }\n\n outputs = new bytes[](0);\n _emitOperationEvents(operation, proposal, intent.hash(), index, new bytes(0));\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a call operation\n * @param intent Intent that contains call operation to be fulfilled\n * @param proposal Call proposal to be executed\n * @param index Position where the call proposal data and operation are located\n */\n function _executeCall(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n CallOperation memory callOperation = abi.decode(operation.data, (CallOperation));\n _validateCallOperation(callOperation, proposal.datas[index], operation.user);\n\n outputs = new bytes[](callOperation.calls.length);\n for (uint256 i = 0; i < callOperation.calls.length; i++) {\n CallData memory call = callOperation.calls[i];\n // solhint-disable-next-line avoid-low-level-calls\n outputs[i] = smartAccountsHandler.call(operation.user, call.target, call.data, call.value);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(outputs));\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a dynamic call operation\n * @param intent Intent that contains dynamic call operation to be fulfilled\n * @param proposal Dynamic call proposal to be executed\n * @param index Position where the dynamic call proposal data and operation are located\n * @param variables List of operations outputs\n */\n function _executeDynamicCall(\n Intent memory intent,\n Proposal memory proposal,\n uint256 index,\n bytes[][] memory variables\n ) internal returns (bytes[] memory outputs) {\n Operation memory operation = intent.operations[index];\n DynamicCallOperation memory dynamicCallOperation = abi.decode(operation.data, (DynamicCallOperation));\n _validateDynamicCallOperation(dynamicCallOperation, proposal.datas[index], operation.user);\n\n outputs = new bytes[](dynamicCallOperation.calls.length);\n for (uint256 i = 0; i < dynamicCallOperation.calls.length; i++) {\n DynamicCall memory dynamicCall = abi.decode(dynamicCallOperation.calls[i], (DynamicCall));\n bytes memory data = IDynamicCallEncoder(dynamicCallEncoder).encode(dynamicCall, variables, index);\n // solhint-disable-next-line avoid-low-level-calls\n outputs[i] = smartAccountsHandler.call(operation.user, dynamicCall.target, data, dynamicCall.value);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(outputs));\n }\n\n /**\n * @dev Validates an intent and its corresponding proposal\n The off-chain validators are assuring that:\n - The trigger signer has authorization over the intent.feePayer and each operations[i].user\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n * @param simulated Whether the execution is a simulation\n */\n function _validateIntent(Intent memory intent, Proposal memory proposal, bytes memory signature, bool simulated)\n internal\n view\n {\n if (intent.settler != address(this)) revert SettlerInvalidSettler(intent.settler);\n if (intent.nonce == bytes32(0)) revert SettlerNonceZero();\n bytes32 intentHash = intent.hash();\n if (getIntentBlock[intentHash] != 0) revert SettlerIntentAlreadyExecuted(intentHash);\n\n if (intent.operations.length == 0) revert SettlerIntentOperationsEmpty();\n if (intent.operations.length != proposal.datas.length) revert SettlerProposalDataInvalidLength();\n\n if (operationsValidator != address(0)) {\n for (uint256 i = 0; i < intent.operations.length; i++) {\n Operation memory operation = intent.operations[i];\n bytes memory safeguard = _userSafeguard[operation.user];\n if (safeguard.length > 0) IOperationsValidator(operationsValidator).validate(operation, safeguard);\n }\n }\n\n bool shouldValidateDeadlines = _shouldValidateDeadlines(intent);\n if (shouldValidateDeadlines) {\n if (intent.deadline <= block.timestamp) revert SettlerIntentPastDeadline(intent.deadline, block.timestamp);\n bool isProposalPastDeadline = proposal.deadline <= block.timestamp;\n if (isProposalPastDeadline) revert SettlerProposalPastDeadline(proposal.deadline, block.timestamp);\n }\n\n if (intent.maxFees.length != proposal.fees.length) revert SettlerSolverFeeInvalidLength();\n for (uint256 i = 0; i < intent.maxFees.length; i++) {\n uint256 maxFee = intent.maxFees[i].amount;\n uint256 proposalFee = proposal.fees[i];\n if (proposalFee > maxFee) revert SettlerSolverFeeTooHigh(proposalFee, maxFee);\n }\n\n uint8 minValidations = IController(controller).minValidations();\n uint256 requiredValidations = intent.minValidations > minValidations ? intent.minValidations : minValidations;\n\n if (intent.validations.length < requiredValidations) {\n revert SettlerIntentValidationsNotEnough(requiredValidations, intent.validations.length);\n }\n\n address lastValidator = address(0);\n Validation memory validation = Validation(intentHash);\n bytes32 typedDataHash = _hashTypedDataV4(validation.hash());\n for (uint256 i = 0; i < intent.validations.length; i++) {\n address validator = ECDSA.recover(typedDataHash, intent.validations[i]);\n if (validator <= lastValidator) {\n revert SettlerValidatorDuplicatedOrUnsorted(lastValidator, validator);\n }\n lastValidator = validator;\n bool isValidatorNotAllowed = !IController(controller).isValidatorAllowed(validator);\n if (isValidatorNotAllowed) revert SettlerValidatorNotAllowed(validator);\n }\n\n address signer = ECDSA.recover(_hashTypedDataV4(proposal.hash(intent, _msgSender())), signature);\n bool isProposalSignerNotAllowed = !IController(controller).isProposalSignerAllowed(signer) && !simulated;\n if (isProposalSignerNotAllowed) revert SettlerProposalSignerNotAllowed(signer);\n }\n\n /**\n * @dev Validates a swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateSwapOperation(SwapOperation memory operation, SwapProposal memory proposal) internal view {\n if (proposal.amountsOut.length != operation.tokensOut.length) revert SettlerInvalidProposedAmounts();\n\n for (uint256 i = 0; i < operation.tokensOut.length; i++) {\n TokenOut memory tokenOut = operation.tokensOut[i];\n address recipient = tokenOut.recipient;\n if (recipient == address(this)) revert SettlerInvalidRecipient(recipient);\n\n uint256 minAmount = tokenOut.minAmount;\n uint256 proposedAmount = proposal.amountsOut[i];\n if (proposedAmount < minAmount) revert SettlerProposedAmountLtMinAmount(i, proposedAmount, minAmount);\n }\n }\n\n /**\n * @dev Validates a single-chain swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateSingleChainSwapOperation(SwapOperation memory operation, SwapProposal memory proposal)\n internal\n view\n {\n if (operation.sourceChain != operation.destinationChain) revert SettlerOperationChainsMismatch();\n if (operation.sourceChain != block.chainid) revert SettlerInvalidChain(block.chainid);\n _validateSwapOperation(operation, proposal);\n }\n\n /**\n * @dev Validates a transfer operation and its corresponding proposal\n * @param operation Transfer operation to be fulfilled\n * @param proposalData data of the proposal\n */\n function _validateTransferOperation(TransferOperation memory operation, bytes memory proposalData) internal view {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n for (uint256 i = 0; i < operation.transfers.length; i++) {\n address recipient = operation.transfers[i].recipient;\n if (recipient == address(this)) revert SettlerInvalidRecipient(recipient);\n }\n }\n\n /**\n * @dev Validates a call operation and its corresponding proposal\n * @param operation Call operation to be fulfilled\n * @param proposalData data of the proposal\n * @param user The originator of the operation\n */\n function _validateCallOperation(CallOperation memory operation, bytes memory proposalData, address user)\n internal\n view\n {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n if (!smartAccountsHandler.isSmartAccount(user)) revert SettlerUserNotSmartAccount(user);\n }\n\n /**\n * @dev Validates a dynamic call operation and its corresponding proposal\n * @param operation Dynamic call operation to be fulfilled\n * @param proposalData data of the proposal\n * @param user The originator of the operation\n */\n function _validateDynamicCallOperation(\n DynamicCallOperation memory operation,\n bytes memory proposalData,\n address user\n ) internal view {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n if (!smartAccountsHandler.isSmartAccount(user)) revert SettlerUserNotSmartAccount(user);\n }\n\n /**\n * @dev Validates a cross-chain swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateCrossChainSwapOperation(SwapOperation memory operation, SwapProposal memory proposal)\n internal\n view\n {\n if (operation.sourceChain == operation.destinationChain) revert SettlerOperationChainsMismatch();\n bool isChainInvalid = operation.sourceChain != block.chainid && operation.destinationChain != block.chainid;\n if (isChainInvalid) revert SettlerInvalidChain(block.chainid);\n _validateSwapOperation(operation, proposal);\n bool isExecutorInvalid = !IController(controller).isExecutorAllowed(proposal.executor);\n if (isExecutorInvalid) revert SettlerExecutorNotAllowed(proposal.executor);\n }\n\n /**\n * @dev Tells the contract balance for each token out of a swap operation\n * @param operation Swap operation containing the list of tokens out\n */\n function _getTokensOutBalance(SwapOperation memory operation) internal view returns (uint256[] memory balances) {\n balances = new uint256[](operation.tokensOut.length);\n if (operation.destinationChain == block.chainid) {\n for (uint256 i = 0; i < operation.tokensOut.length; i++) {\n balances[i] = ERC20Helpers.balanceOf(operation.tokensOut[i].token, address(this));\n }\n }\n }\n\n /**\n * @dev Tells if the intent and proposal deadlines should be validated\n In the case the intent is being executed on the destination chain of a cross-chain swap, the deadlines are ignored\n * @param intent Intent to be fulfilled\n */\n function _shouldValidateDeadlines(Intent memory intent) internal view returns (bool) {\n // Cross-chain operation can only be the first (and only) operation\n Operation memory operation = intent.operations[0];\n if (operation.opType != uint8(OpType.CrossChainSwap)) return true;\n SwapOperation memory swapIntent = abi.decode(operation.data, (SwapOperation));\n return swapIntent.sourceChain == block.chainid;\n }\n\n /**\n * @dev Emits operation custom events\n * @param operation Operation to emit the custom events for\n * @param proposal Proposal that fulfills the operation\n * @param intentHash Hash of the intent the operation belongs to\n * @param index Position of the operation on operations\n * @param output Encoded array of outputs\n */\n function _emitOperationEvents(\n Operation memory operation,\n Proposal memory proposal,\n bytes32 intentHash,\n uint256 index,\n bytes memory output\n ) internal {\n for (uint256 i = 0; i < operation.events.length; i++) {\n OperationEvent memory operationEvent = operation.events[i];\n emit OperationExecuted(\n operation.user,\n operationEvent.topic,\n uint8(operation.opType),\n operation,\n proposal,\n intentHash,\n index,\n output,\n operationEvent.data\n );\n }\n }\n\n /**\n * @dev Pays fees from the intent feePayer\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _payFees(Intent memory intent, Proposal memory proposal) internal {\n // A CrossChainSwap only pays fees on destination chain and must be the only operation\n if (intent.operations[0].opType == uint8(OpType.CrossChainSwap)) {\n SwapOperation memory swapOperation = abi.decode(intent.operations[0].data, (SwapOperation));\n if (swapOperation.sourceChain == block.chainid) return;\n }\n address from = intent.feePayer;\n address to = _msgSender();\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(from);\n for (uint256 i = 0; i < intent.maxFees.length; i++) {\n address token = intent.maxFees[i].token;\n if (!Denominations.isUSD(token)) _transferFrom(token, from, to, proposal.fees[i], isSmartAccount);\n }\n }\n\n /**\n * @dev Transfers tokens from one account to another\n * @param token Address of the token to transfer\n * @param from Address of the account sending the tokens\n * @param to Address of the account receiving the tokens\n * @param amount Amount of tokens to transfer\n * @param isSmartAccount Whether the sender is a smart account\n */\n function _transferFrom(address token, address from, address to, uint256 amount, bool isSmartAccount) internal {\n if (isSmartAccount) {\n smartAccountsHandler.transfer(from, token, to, amount);\n } else {\n IERC20(token).safeTransferFrom(from, to, amount);\n }\n }\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function _setSmartAccountsHandler(address newSmartAccountsHandler) internal {\n if (newSmartAccountsHandler == address(0)) revert SmartAccountsHandlerZero();\n smartAccountsHandler = newSmartAccountsHandler;\n emit SmartAccountsHandlerSet(newSmartAccountsHandler);\n }\n\n /**\n * @dev Sets the operations validator\n * @param newOperationsValidator New operations validator to be set\n */\n function _setOperationsValidator(address newOperationsValidator) internal {\n operationsValidator = newOperationsValidator;\n emit OperationsValidatorSet(newOperationsValidator);\n }\n\n /**\n * @dev Sets the dynamic call encoder\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function _setDynamicCallEncoder(address newDynamicCallEncoder) internal {\n if (newDynamicCallEncoder == address(0)) revert SettlerDynamicCallEncoderZero();\n dynamicCallEncoder = newDynamicCallEncoder;\n emit DynamicCallEncoderSet(newDynamicCallEncoder);\n }\n\n /**\n * @dev Sets a safeguard for a user\n * @param user Address of the user to set the safeguard for\n * @param safeguard Safeguard to be set\n */\n function _setSafeguard(address user, bytes memory safeguard) internal {\n delete _userSafeguard[user];\n _userSafeguard[user] = safeguard;\n emit SafeguardSet(user);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccount7702.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/Context.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccount.sol';\nimport '../utils/ERC20Helpers.sol';\nimport './SmartAccountBase.sol';\n\n/**\n * @title SmartAccount7702\n * @dev Provides the smart account logic to use with EIP7702\n */\ncontract SmartAccount7702 is SmartAccountBase {\n // Mimic settler reference\n // solhint-disable-next-line immutable-vars-naming\n address public immutable settler;\n\n /**\n * @dev The sender is not the settler\n */\n error SmartAccount7702SenderNotSettler();\n\n /**\n * @dev Reverts unless the sender is the settler\n */\n modifier onlySettler() {\n if (_msgSender() != settler) revert SmartAccount7702SenderNotSettler();\n _;\n }\n\n /**\n * @dev Creates a new SmartAccount7702 contract\n * @param _settler Address of the Mimic settler\n */\n constructor(address _settler) {\n settler = _settler;\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) public override onlySettler {\n super.transfer(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value) public override onlySettler returns (bytes memory) {\n // solhint-disable-next-line avoid-low-level-calls\n return super.call(target, data, value);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountBase.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/Context.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccount.sol';\nimport '../utils/ERC20Helpers.sol';\n\n/**\n * @title SmartAccountBase\n * @dev Provides the base logic for managing assets and executing arbitrary calls\n */\ncontract SmartAccountBase is ISmartAccount, Context, ERC165, ReentrancyGuard {\n /**\n * @dev Tells whether the contract supports the given interface ID. Overrides ERC165 to declare support for ISmartAccount interface.\n * @param interfaceId Interface ID is defined as the XOR of all function selectors in the interface\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {\n return interfaceId == type(ISmartAccount).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) public virtual override nonReentrant {\n ERC20Helpers.transfer(token, recipient, amount);\n emit Transferred(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value)\n public\n virtual\n override\n nonReentrant\n returns (bytes memory result)\n {\n result = Address.functionCallWithValue(target, data, value);\n emit Called(target, data, value, result);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountContract.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccountContract.sol';\nimport './SmartAccountBase.sol';\n\n/**\n * @title SmartAccountContract\n * @dev Provides the smart account logic to use as a standalone contract\n */\ncontract SmartAccountContract is ISmartAccountContract, Ownable, SmartAccountBase {\n // EIP1271 magic return value\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x1626ba7e;\n\n // EIP1271 invalid signature return value\n bytes4 internal constant EIP1271_INVALID_SIGNATURE = 0xffffffff;\n\n // List of account permissions\n mapping (address => bool) public isSignerAllowed;\n\n // Mimic settler reference\n address public settler;\n\n /**\n * @dev The settler is zero\n */\n error SmartAccountSettlerZero();\n\n /**\n * @dev The input arrays are not of equal length\n */\n error SmartAccountInputInvalidLength();\n\n /**\n * @dev The sender is not the owner or the settler\n */\n error SmartAccountUnauthorizedSender(address sender);\n\n /**\n * @dev Emitted every time the settler is set\n */\n event SettlerSet(address indexed settler);\n\n /**\n * @dev Emitted every time a signer allowance is set\n */\n event SignerAllowedSet(address indexed account, bool allowed);\n\n /**\n * @dev Reverts unless the sender is the owner or the settler\n */\n modifier onlyOwnerOrSettler() {\n address sender = _msgSender();\n bool isAuthorized = sender == owner() || sender == settler;\n if (!isAuthorized) revert SmartAccountUnauthorizedSender(sender);\n _;\n }\n\n /**\n * @dev Creates a new SmartAccount contract\n * @param _settler Address of the Mimic settler\n * @param _owner Address that will own the contract\n */\n constructor(address _settler, address _owner) Ownable(_owner) {\n _setSettler(_settler);\n }\n\n /**\n * @dev Tells whether the signature provided belongs to an allowed account.\n * @param hash Message signed by the account\n * @param signature Signature provided to be verified\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view override returns (bytes4) {\n (address signer, , ) = ECDSA.tryRecover(hash, signature);\n if (signer != address(0) && (signer == owner() || isSignerAllowed[signer])) return EIP1271_MAGIC_VALUE;\n return EIP1271_INVALID_SIGNATURE;\n }\n\n /**\n * @dev It allows receiving native token transfers\n */\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n /**\n * @dev Sets the settler. Sender must be the owner.\n * @param newSettler Address of the new settler to be set\n */\n function setSettler(address newSettler) external onlyOwner {\n _setSettler(newSettler);\n }\n\n /**\n * @dev Sets a list of allowed signers. Sender must be the owner.\n * @param accounts List of account addresses\n * @param allowances List of allowed condition per account\n */\n function setAllowedSigners(address[] memory accounts, bool[] memory allowances) external onlyOwner {\n if (accounts.length != allowances.length) revert SmartAccountInputInvalidLength();\n for (uint256 i = 0; i < accounts.length; i++) {\n address account = accounts[i];\n bool allowed = allowances[i];\n isSignerAllowed[account] = allowed;\n emit SignerAllowedSet(account, allowed);\n }\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the owner or the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount)\n public\n override(ISmartAccount, SmartAccountBase)\n onlyOwnerOrSettler\n {\n super.transfer(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the owner or the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value)\n public\n override(ISmartAccount, SmartAccountBase)\n onlyOwnerOrSettler\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n return super.call(target, data, value);\n }\n\n /**\n * @dev Sets the settler\n * @param newSettler Address of the new settler to be set\n */\n function _setSettler(address newSettler) internal {\n if (newSettler == address(0)) revert SmartAccountSettlerZero();\n settler = newSettler;\n emit SettlerSet(newSettler);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountsHandler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport '../interfaces/ISafe.sol';\nimport '../interfaces/ISmartAccount.sol';\nimport '../interfaces/ISmartAccountsHandler.sol';\nimport '../utils/Denominations.sol';\n\ncontract SmartAccountsHandler is ISmartAccountsHandler {\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address account) external view override returns (bool) {\n if (account.code.length == 0) return false;\n if (_isMimicSmartAccount(account)) return true;\n if (_isSafe(account)) return true;\n return false;\n }\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address account, address token, address to, uint256 amount) external override {\n if (_isMimicSmartAccount(account)) return ISmartAccount(account).transfer(token, to, amount);\n if (_isSafe(account)) return _transferSafe(account, token, to, amount);\n revert SmartAccountsHandlerUnsupportedAccount(account);\n }\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address account, address target, bytes memory data, uint256 value)\n external\n override\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n if (_isMimicSmartAccount(account)) return ISmartAccount(account).call(target, data, value);\n if (_isSafe(account)) return _callSafe(account, target, data, value);\n revert SmartAccountsHandlerUnsupportedAccount(account);\n }\n\n /**\n * @dev Performs a transfer from a safe\n */\n function _transferSafe(address account, address token, address to, uint256 amount) internal {\n Denominations.isNativeToken(token)\n ? _callSafe(account, to, new bytes(0), amount)\n : _callSafe(account, token, abi.encodeWithSelector(IERC20.transfer.selector, to, amount), 0);\n }\n\n /**\n * @dev Performs a call from a safe\n */\n function _callSafe(address account, address target, bytes memory data, uint256 value)\n internal\n returns (bytes memory)\n {\n (bool success, bytes memory result) = ISafe(account).execTransactionFromModuleReturnData(\n target,\n value,\n data,\n SafeOperation.Call\n );\n return\n data.length == 0\n ? Address.verifyCallResult(success, result)\n : Address.verifyCallResultFromTarget(target, success, result);\n }\n\n /**\n * @dev Tells whether an account is a Mimic smart account\n * @param account Address of the account being queried\n */\n function _isMimicSmartAccount(address account) internal view returns (bool) {\n try ISmartAccount(account).supportsInterface(type(ISmartAccount).interfaceId) returns (bool ok) {\n return ok;\n } catch {\n return false;\n }\n }\n\n /**\n * @dev Tells whether an account is a Gnosis Safe\n * @param account Address of the account being queried\n */\n function _isSafe(address account) internal view returns (bool) {\n try ISafe(account).getThreshold() returns (uint256) {\n return true;\n } catch {\n return false;\n }\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountsHandlerHelpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport '../interfaces/ISmartAccountsHandler.sol';\n\nlibrary SmartAccountsHandlerHelpers {\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address handler, address account) internal view returns (bool) {\n return ISmartAccountsHandler(handler).isSmartAccount(account);\n }\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address handler, address account, address token, address to, uint256 amount) internal {\n Address.functionDelegateCall(\n handler,\n abi.encodeWithSelector(ISmartAccountsHandler.transfer.selector, account, token, to, amount)\n );\n }\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address handler, address account, address target, bytes memory data, uint256 value)\n internal\n returns (bytes memory result)\n {\n result = Address.functionDelegateCall(\n handler,\n abi.encodeWithSelector(ISmartAccountsHandler.call.selector, account, target, data, value)\n );\n // Skip the ABI-encoded offset and length of the outer `bytes` to point at the inner payload\n assembly {\n result := add(result, 64)\n }\n }\n}\n" + }, + "project/contracts/test/CallMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\ncontract CallMock {\n event CallReceived(address indexed sender, uint256 value);\n error CallError();\n\n function call() external payable {\n emit CallReceived(msg.sender, msg.value);\n }\n\n function callError() external payable {\n revert CallError();\n }\n}\n" + }, + "project/contracts/test/dynamic-calls/StaticCallMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\ncontract StaticCallMock {\n struct StructMock {\n uint256 a;\n address b;\n }\n\n function returnUint(uint256 value) external pure returns (uint256) {\n return value;\n }\n\n function returnAddress(address value) external payable returns (address) {\n return value;\n }\n\n function returnArray(uint256[] calldata value) external pure returns (uint256[] memory) {\n return value;\n }\n\n function returnFixedArray(uint256[3] calldata value) external pure returns (uint256[3] memory) {\n return value;\n }\n\n function returnStruct(StructMock calldata value) external pure returns (StructMock memory) {\n return value;\n }\n}\n" + }, + "project/contracts/test/executors/EmptyExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\n\ncontract EmptyExecutorMock is IExecutor {\n event Executed();\n\n function execute(Operation memory, bytes32, bytes memory) external override {\n emit Executed();\n }\n}\n" + }, + "project/contracts/test/executors/MintExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../TokenMock.sol';\nimport '../../interfaces/IExecutor.sol';\n\n/* solhint-disable custom-errors */\n\ncontract MintExecutorMock is IExecutor {\n event Minted();\n\n function execute(Operation memory operation, bytes32, bytes memory proposalData) external override {\n require(\n operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap),\n 'Invalid operation type'\n );\n\n SwapProposal memory swapProposal = abi.decode(proposalData, (SwapProposal));\n (address[] memory tokens, uint256[] memory amounts) = abi.decode(swapProposal.data, (address[], uint256[]));\n\n require(tokens.length == amounts.length, 'Invalid inputs');\n\n for (uint256 i = 0; i < tokens.length; i++) {\n TokenMock(tokens[i]).mint(msg.sender, amounts[i]);\n emit Minted();\n }\n }\n}\n" + }, + "project/contracts/test/executors/ReentrantExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\nimport '../../interfaces/ISettler.sol';\n\ncontract ReentrantExecutorMock is IExecutor {\n // solhint-disable-next-line immutable-vars-naming\n address payable public immutable settler;\n\n constructor(address payable _settler) {\n settler = _settler;\n }\n\n function execute(Operation memory, bytes32, bytes memory) external override {\n Intent memory intent;\n Proposal memory proposal;\n ISettler(settler).execute(intent, proposal, new bytes(0));\n }\n}\n" + }, + "project/contracts/test/executors/TransferExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\nimport '../../utils/ERC20Helpers.sol';\n\n/* solhint-disable custom-errors */\n\ncontract TransferExecutorMock is IExecutor {\n event Transferred();\n\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n function execute(Operation memory operation, bytes32, bytes memory proposalData) external override {\n require(\n operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap),\n 'Invalid operation type'\n );\n\n SwapProposal memory swapProposal = abi.decode(proposalData, (SwapProposal));\n (address[] memory tokens, uint256[] memory amounts) = abi.decode(swapProposal.data, (address[], uint256[]));\n\n require(tokens.length == amounts.length, 'Invalid inputs');\n\n for (uint256 i = 0; i < tokens.length; i++) {\n ERC20Helpers.transfer(tokens[i], msg.sender, amounts[i]);\n emit Transferred();\n }\n }\n}\n" + }, + "project/contracts/test/SettlerV2Mock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../Settler.sol';\n\ncontract SettlerV2Mock is Settler {\n function someNewFunction() external pure returns (string memory) {\n return 'Some new function';\n }\n}\n" + }, + "project/contracts/test/smart-accounts/SafeMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/ISafe.sol';\n\ncontract SafeMock is ISafe {\n event ModuleTxExecuted(\n address indexed target,\n bytes data,\n uint256 value,\n SafeOperation operation,\n bool success,\n bytes result\n );\n\n receive() external payable {}\n\n function getThreshold() external pure returns (uint256) {\n return 1;\n }\n\n function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, SafeOperation operation)\n external\n returns (bool success, bytes memory result)\n {\n // solhint-disable-next-line avoid-low-level-calls\n (success, result) = to.call{ value: value }(data);\n emit ModuleTxExecuted(to, data, value, operation, success, result);\n }\n}\n" + }, + "project/contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../smart-accounts/SmartAccountsHandlerHelpers.sol';\n\ncontract SmartAccountsHandlerHelpersMock {\n using SmartAccountsHandlerHelpers for address;\n\n function call(address handler, address account, address target, bytes memory data, uint256 value)\n external\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n return handler.call(account, target, data, value);\n }\n}\n" + }, + "project/contracts/test/TokenMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\n\ncontract TokenMock is ERC20 {\n uint8 internal _decimals;\n\n constructor(string memory symbol, uint8 dec) ERC20(symbol, symbol) {\n _decimals = dec;\n }\n\n function mint(address account, uint256 amount) external {\n _mint(account, amount);\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n}\n" + }, + "project/contracts/test/utils/BytesHelpersMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.24;\n\nimport '../../utils/BytesHelpers.sol';\n\ncontract BytesHelpersMock {\n using BytesHelpers for bytes;\n\n function readWord0(bytes memory data) external pure returns (uint256) {\n return data.readWord0();\n }\n\n function readWord1(bytes memory data) external pure returns (uint256) {\n return data.readWord1();\n }\n\n function slice(bytes memory data, uint256 start, uint256 end) external pure returns (bytes memory) {\n return data.slice(start, end);\n }\n\n function sliceFrom(bytes memory data, uint256 start) external pure returns (bytes memory) {\n return data.sliceFrom(start);\n }\n}\n" + }, + "project/contracts/test/utils/DenominationsMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../../utils/Denominations.sol';\n\n// solhint-disable func-name-mixedcase\n\ncontract DenominationsMock {\n function NATIVE_TOKEN() external pure returns (address) {\n return Denominations.NATIVE_TOKEN;\n }\n\n function USD() external pure returns (address) {\n return Denominations.USD;\n }\n}\n" + }, + "project/contracts/test/utils/ERC20HelpersMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../../utils/ERC20Helpers.sol';\n\ncontract ERC20HelpersMock {\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n function approve(address token, address to, uint256 amount) external {\n ERC20Helpers.approve(token, to, amount);\n }\n\n function transfer(address token, address to, uint256 amount) external {\n ERC20Helpers.transfer(token, to, amount);\n }\n\n function balanceOf(address token, address account) external view returns (uint256) {\n return ERC20Helpers.balanceOf(token, account);\n }\n}\n" + }, + "project/contracts/utils/BytesHelpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.24;\n\n/**\n * @title BytesHelpers\n * @dev Collection of low-level helpers to operate on `bytes` values in memory.\n */\nlibrary BytesHelpers {\n /**\n * @dev Thrown when a slice operation exceeds the bounds of the input bytes\n */\n error BytesLibSliceOutOfBounds();\n\n /**\n * @dev Reads the first 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @return result First ABI word of `data`\n */\n function readWord0(bytes memory data) internal pure returns (uint256) {\n return readWord(data, 0);\n }\n\n /**\n * @dev Reads the second 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @return result Second ABI word of `data`\n */\n function readWord1(bytes memory data) internal pure returns (uint256) {\n return readWord(data, 1);\n }\n\n /**\n * @dev Reads the N-th 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @param index Word index to read (0-based)\n * @return result N-th ABI word of `data`\n */\n function readWord(bytes memory data, uint256 index) private pure returns (uint256 result) {\n assembly {\n result := mload(add(data, add(32, mul(index, 32))))\n }\n }\n\n /**\n * @dev Returns a slice of a bytes array from `start` (inclusive) to `end` (exclusive)\n * @param data Bytes array to slice\n * @param start Starting byte index (inclusive)\n * @param end Ending byte index (exclusive)\n */\n function slice(bytes memory data, uint256 start, uint256 end) internal pure returns (bytes memory out) {\n if (end < start) revert BytesLibSliceOutOfBounds();\n if (end > data.length) revert BytesLibSliceOutOfBounds();\n\n uint256 len = end - start;\n out = new bytes(len);\n\n assembly {\n let src := add(add(data, 32), start)\n let dst := add(out, 32)\n mcopy(dst, src, len)\n }\n }\n\n /**\n * @dev Returns a slice of a bytes array starting at `start` until the end\n * @param data Bytes array to slice\n * @param start Starting byte index (inclusive)\n */\n function sliceFrom(bytes memory data, uint256 start) internal pure returns (bytes memory out) {\n return slice(data, start, data.length);\n }\n}\n" + }, + "project/contracts/utils/Denominations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @title Denominations\n * @dev Provides a list of ground denominations for those tokens that cannot be represented by an ERC20.\n * For now, the only needed is the native token that could be ETH, MATIC, or other depending on the layer being operated.\n */\nlibrary Denominations {\n address internal constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n // Fiat currencies follow https://en.wikipedia.org/wiki/ISO_4217\n address internal constant USD = address(840);\n\n function isUSD(address token) internal pure returns (bool) {\n return token == USD;\n }\n\n function isNativeToken(address token) internal pure returns (bool) {\n return token == NATIVE_TOKEN;\n }\n}\n" + }, + "project/contracts/utils/ERC20Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport './Denominations.sol';\n\n/**\n * @title ERC20Helpers\n * @dev Provides a list of ERC20 helper methods\n */\nlibrary ERC20Helpers {\n function approve(address token, address to, uint256 amount) internal {\n SafeERC20.forceApprove(IERC20(token), to, amount);\n }\n\n function transfer(address token, address to, uint256 amount) internal {\n if (Denominations.isNativeToken(token)) Address.sendValue(payable(to), amount);\n else SafeERC20.safeTransfer(IERC20(token), to, amount);\n }\n\n function balanceOf(address token, address account) internal view returns (uint256) {\n if (Denominations.isNativeToken(token)) return address(account).balance;\n else return IERC20(token).balanceOf(address(account));\n }\n}\n" + }, + "project/contracts/utils/MimicHelper.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @title Mimic Helper\n * @dev Collection of helper functions for the Mimic Protocol\n */\ncontract MimicHelper {\n // Custom byte storage per user and key\n mapping (address => mapping (string => bytes)) internal _customStorage;\n\n /**\n * @dev Emitted every time the storage is set\n */\n event StorageSet(address indexed user, string indexed key, bytes indexed data);\n\n /**\n * @dev Tells the native token balance of an address\n * @param target Address to get native token balance\n */\n function getNativeTokenBalance(address target) external view returns (uint256) {\n return target.balance;\n }\n\n /**\n * @dev Tells the code of an address\n * @param target Address to get code\n */\n function getCode(address target) external view returns (bytes memory) {\n return target.code;\n }\n\n /**\n * @dev Tells the data set for the user and the key\n * @param user Address of the user being queried\n * @param key String of the key being queried\n */\n function getStorage(address user, string calldata key) external view returns (bytes memory) {\n return _customStorage[user][key];\n }\n\n /**\n * @dev Sets a data for the user and a key\n * @param key String of the key to set the data for\n * @param data Bytes to be set\n */\n function setStorage(string calldata key, bytes memory data) external {\n _customStorage[msg.sender][key] = data;\n emit StorageSet(msg.sender, key, data);\n }\n}\n" + } + } + } +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-137/deployed_addresses.json b/packages/evm/ignition/deployments/chain-137/deployed_addresses.json index c18d8fb..c9347ec 100644 --- a/packages/evm/ignition/deployments/chain-137/deployed_addresses.json +++ b/packages/evm/ignition/deployments/chain-137/deployed_addresses.json @@ -10,5 +10,9 @@ "Create3DynamicCallEncoder#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", "Create3DynamicCallEncoder#DynamicCallEncoder": "0xb3F0F65FA3f94890B7a5Bd17843a6fdfB9407dbD", "Create3Proxy#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", - "Create3Proxy#Proxy": "0x8be430d29a2c5692f9345a28506b849C6a99eDaA" + "Create3Proxy#Proxy": "0x8be430d29a2c5692f9345a28506b849C6a99eDaA", + "Create3DynamicCallEncoderV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", + "Create3DynamicCallEncoderV1#DynamicCallEncoder": "0x183E61BDE23a80f4D1e003653288d4B4551681ed", + "Create3SettlerV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", + "Create3SettlerV1#Settler": "0x3734D7284f46037688252b13ef6d88E3FFDF5e1B" } \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-137/journal.jsonl b/packages/evm/ignition/deployments/chain-137/journal.jsonl index c6239cf..1d246e7 100644 --- a/packages/evm/ignition/deployments/chain-137/journal.jsonl +++ b/packages/evm/ignition/deployments/chain-137/journal.jsonl @@ -75,4 +75,22 @@ {"futureId":"Create3SmartAccount7702#ICreateX.deployCreate3","hash":"0x93079296586533c8e0776b689543a829e09f233bd4db9bc5b2c11acf151f5937","networkInteractionId":1,"receipt":{"blockHash":"0x21c8648c03b4f93543f7e5f768f023bc6a7b9cfe4c7bddd8864acf18fd31c68e","blockNumber":86219870,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":1988,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x000000000000000000000000b800ea953426e361efda80da69765895ab3b04da","0x4d548e60a06ca5826dcab93682802743ae2369c7da6162da7a3f4201826a6d33"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":1989,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x00000000000000000000000014ae3c251881d2214e376bfa38dd98a4bd33550c"]},{"address":"0x0000000000000000000000000000000000001010","data":"0x00000000000000000000000000000000000000000000000000431070d8d56c9300000000000000000000000000000000000000000000000087620f52e100dc6a0000000000000000000000000000000000000000000932efd1935f7fbc34f56d000000000000000000000000000000000000000000000000871efee2082b6fd70000000000000000000000000000000000000000000932efd1d66ff0950a6200","logIndex":1990,"topics":["0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63","0x0000000000000000000000000000000000000000000000000000000000001010","0x0000000000000000000000003a0ce8115b4913f42c4928d6bc3f554e9a81468b","0x0000000000000000000000007ee41d8a25641000661b1ef5e6ae8a00400466b0"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} {"futureId":"Create3SmartAccount7702#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} {"artifactId":"Create3SmartAccount7702#ICreateX","dependencies":["Create3SmartAccount7702#ICreateX.deployCreate3","Create3SmartAccount7702#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","strategy":"basic","strategyConfig":{},"txToReadFrom":"0x93079296586533c8e0776b689543a829e09f233bd4db9bc5b2c11acf151f5937","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} -{"artifactId":"Create3SmartAccount7702#SmartAccount7702","contractAddress":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","contractName":"SmartAccount7702","dependencies":["Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SmartAccount7702#SmartAccount7702","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} \ No newline at end of file +{"artifactId":"Create3SmartAccount7702#SmartAccount7702","contractAddress":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","contractName":"SmartAccount7702","dependencies":["Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SmartAccount7702#SmartAccount7702","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3DynamicCallEncoderV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","contractName":"ICreateX","dependencies":[],"futureId":"Create3DynamicCallEncoderV1#ICreateX","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"args":["0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b000000000000000004302606","0x6080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033"],"artifactId":"Create3DynamicCallEncoderV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","dependencies":["Create3DynamicCallEncoderV1#ICreateX"],"from":"0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b","functionName":"deployCreate3","futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","strategy":"basic","strategyConfig":{},"type":"CALL_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000c586080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c00330000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":15,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":15,"transaction":{"fees":{"gasPrice":{"_kind":"bigint","value":"126418919722"}},"hash":"0xe7c12ad8e89786aa7e889e5f213e560acbc78b50f6d7ff3459aa6e0161a6eff7"},"type":"TRANSACTION_SEND"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","hash":"0xe7c12ad8e89786aa7e889e5f213e560acbc78b50f6d7ff3459aa6e0161a6eff7","networkInteractionId":1,"receipt":{"blockHash":"0xe9191d5cf4f43812ad72eaf23753f80ed8ebd74acb7ed1f76d75c56c405bf856","blockNumber":86226101,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":2182,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x0000000000000000000000001d9bd3390aaef5bbcf3beb4f60e0ee28805f6779","0xa13cc826172bbf7683ce89033f741800ae55529a93ee495908820a8471d913b0"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":2183,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x000000000000000000000000183e61bde23a80f4d1e003653288d4b4551681ed"]},{"address":"0x0000000000000000000000000000000000001010","data":"0x000000000000000000000000000000000000000000000000004637b9e0fe14c3000000000000000000000000000000000000000000000000861ae97616ab4e2d000000000000000000000000000000000000000000095fa686490c3bfa6b622100000000000000000000000000000000000000000000000085d4b1bc35ad396a000000000000000000000000000000000000000000095fa6868f43f5db6976e4","logIndex":2184,"topics":["0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63","0x0000000000000000000000000000000000000000000000000000000000001010","0x0000000000000000000000003a0ce8115b4913f42c4928d6bc3f554e9a81468b","0x0000000000000000000000007ee41d8a25641000661b1ef5e6ae8a00400466b0"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} +{"artifactId":"Create3DynamicCallEncoderV1#ICreateX","dependencies":["Create3DynamicCallEncoderV1#ICreateX.deployCreate3","Create3DynamicCallEncoderV1#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3DynamicCallEncoderV1#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x183E61BDE23a80f4D1e003653288d4B4551681ed","strategy":"basic","strategyConfig":{},"txToReadFrom":"0xe7c12ad8e89786aa7e889e5f213e560acbc78b50f6d7ff3459aa6e0161a6eff7","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","contractAddress":"0x183E61BDE23a80f4D1e003653288d4B4551681ed","contractName":"DynamicCallEncoder","dependencies":["Create3DynamicCallEncoderV1#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","contractName":"ICreateX","dependencies":[],"futureId":"Create3SettlerV1#ICreateX","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"args":["0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b000000000000000004302605","0x6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033"],"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","dependencies":["Create3SettlerV1#ICreateX"],"from":"0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b","functionName":"deployCreate3","futureId":"Create3SettlerV1#ICreateX.deployCreate3","strategy":"basic","strategyConfig":{},"type":"CALL_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000005d166080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c003300000000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":17,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":17,"transaction":{"fees":{"gasPrice":{"_kind":"bigint","value":"125584996623"}},"hash":"0x81f13cfa863bff0ea3bfee05053fde64cd41b8caac9deca00970eea186b41556"},"type":"TRANSACTION_SEND"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","hash":"0x81f13cfa863bff0ea3bfee05053fde64cd41b8caac9deca00970eea186b41556","networkInteractionId":1,"receipt":{"blockHash":"0x41be6e696a54816121e269f1eacdd61a9b4da152c18e6457596fc74424cab643","blockNumber":86226206,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":3003,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x000000000000000000000000b5439ac30ce4daeb02b265d758436e65087047ab","0x660e7900ab9b67f261d92573714530e140aa4f3b2855e1dd677cfa672309b2ee"]},{"address":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","data":"0x000000000000000000000000000000000000000000000000ffffffffffffffff","logIndex":3004,"topics":["0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":3005,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x0000000000000000000000003734d7284f46037688252b13ef6d88e3ffdf5e1b"]},{"address":"0x0000000000000000000000000000000000001010","data":"0x00000000000000000000000000000000000000000000000001daadf322e5bdf500000000000000000000000000000000000000000000000084aea2df13b3a9fb000000000000000000000000000000000000000000095fc25a23a157939eabfe00000000000000000000000000000000000000000000000082d3f4ebf0cdec06000000000000000000000000000000000000000000095fc25bfe4f4ab68469f3","logIndex":3006,"topics":["0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63","0x0000000000000000000000000000000000000000000000000000000000001010","0x0000000000000000000000003a0ce8115b4913f42c4928d6bc3f554e9a81468b","0x0000000000000000000000007ee41d8a25641000661b1ef5e6ae8a00400466b0"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} +{"artifactId":"Create3SettlerV1#ICreateX","dependencies":["Create3SettlerV1#ICreateX.deployCreate3","Create3SettlerV1#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3SettlerV1#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","strategy":"basic","strategyConfig":{},"txToReadFrom":"0x81f13cfa863bff0ea3bfee05053fde64cd41b8caac9deca00970eea186b41556","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3SettlerV1#Settler","contractAddress":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","contractName":"Settler","dependencies":["Create3SettlerV1#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SettlerV1#Settler","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-146/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json b/packages/evm/ignition/deployments/chain-146/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-146/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-146/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json b/packages/evm/ignition/deployments/chain-146/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json new file mode 100644 index 0000000..aa424ed --- /dev/null +++ b/packages/evm/ignition/deployments/chain-146/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json @@ -0,0 +1,117 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "DynamicCallEncoder", + "sourceName": "contracts/dynamic-calls/DynamicCallEncoder.sol", + "abi": [ + { + "inputs": [], + "name": "BytesLibSliceOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderBadLength", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderEmptyDynamic", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderInvalidArgKind", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariableOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariableRefBadLength", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariablesLengthOutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum DynamicArgKind", + "name": "kind", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "isDynamic", + "type": "bool" + } + ], + "internalType": "struct DynamicArg[]", + "name": "arguments", + "type": "tuple[]" + } + ], + "internalType": "struct DynamicCall", + "name": "dynamicCall", + "type": "tuple" + }, + { + "internalType": "bytes[][]", + "name": "variables", + "type": "bytes[][]" + }, + { + "internalType": "uint256", + "name": "variablesLength", + "type": "uint256" + } + ], + "name": "encode", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/dynamic-calls/DynamicCallEncoder.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-146/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json b/packages/evm/ignition/deployments/chain-146/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-146/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-146/artifacts/Create3DynamicCallEncoderV1#ICreateX.json b/packages/evm/ignition/deployments/chain-146/artifacts/Create3DynamicCallEncoderV1#ICreateX.json new file mode 100644 index 0000000..837192d --- /dev/null +++ b/packages/evm/ignition/deployments/chain-146/artifacts/Create3DynamicCallEncoderV1#ICreateX.json @@ -0,0 +1,51 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "ICreateX", + "sourceName": "contracts/interfaces/ICreateX.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "name": "ContractCreation", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + } + ], + "name": "deployCreate3", + "outputs": [ + { + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/interfaces/ICreateX.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-146/artifacts/Create3SettlerV1#ICreateX.dbg.json b/packages/evm/ignition/deployments/chain-146/artifacts/Create3SettlerV1#ICreateX.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-146/artifacts/Create3SettlerV1#ICreateX.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-146/artifacts/Create3SettlerV1#ICreateX.json b/packages/evm/ignition/deployments/chain-146/artifacts/Create3SettlerV1#ICreateX.json new file mode 100644 index 0000000..837192d --- /dev/null +++ b/packages/evm/ignition/deployments/chain-146/artifacts/Create3SettlerV1#ICreateX.json @@ -0,0 +1,51 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "ICreateX", + "sourceName": "contracts/interfaces/ICreateX.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "name": "ContractCreation", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + } + ], + "name": "deployCreate3", + "outputs": [ + { + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/interfaces/ICreateX.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-146/artifacts/Create3SettlerV1#Settler.dbg.json b/packages/evm/ignition/deployments/chain-146/artifacts/Create3SettlerV1#Settler.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-146/artifacts/Create3SettlerV1#Settler.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-146/artifacts/Create3SettlerV1#Settler.json b/packages/evm/ignition/deployments/chain-146/artifacts/Create3SettlerV1#Settler.json new file mode 100644 index 0000000..cd9fdca --- /dev/null +++ b/packages/evm/ignition/deployments/chain-146/artifacts/Create3SettlerV1#Settler.json @@ -0,0 +1,1481 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "Settler", + "sourceName": "contracts/Settler.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposed", + "type": "uint256" + } + ], + "name": "SettlerAmountOutLtProposed", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerCrossChainSwapMustBeOnlyOperation", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerDynamicCallEncoderZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "executor", + "type": "address" + } + ], + "name": "SettlerExecutorNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "SettlerIntentAlreadyExecuted", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerIntentOperationsEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SettlerIntentPastDeadline", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "current", + "type": "uint256" + } + ], + "name": "SettlerIntentValidationsNotEnough", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "name": "SettlerInvalidChain", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerInvalidProposedAmounts", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "SettlerInvalidRecipient", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "settler", + "type": "address" + } + ], + "name": "SettlerInvalidSettler", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerNonceZero", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerOperationChainsMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "post", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pre", + "type": "uint256" + } + ], + "name": "SettlerPostBalanceOutLtPre", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerProposalDataInvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerProposalDataNotEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SettlerProposalPastDeadline", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + } + ], + "name": "SettlerProposalSignerNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minAmount", + "type": "uint256" + } + ], + "name": "SettlerProposedAmountLtMinAmount", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerRescueFundsRecipientZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gasUsed", + "type": "uint256" + } + ], + "name": "SettlerSimulationSuccess", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerSolverFeeInvalidLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "SettlerSolverFeeTooHigh", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "solver", + "type": "address" + } + ], + "name": "SettlerSolverNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "lengthRequested", + "type": "uint256" + } + ], + "name": "SettlerTooManySafeguards", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + } + ], + "name": "SettlerUnknownOperationType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "SettlerUserNotSmartAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "previous", + "type": "address" + }, + { + "internalType": "address", + "name": "current", + "type": "address" + } + ], + "name": "SettlerValidatorDuplicatedOrUnsorted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "validator", + "type": "address" + } + ], + "name": "SettlerValidatorNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "SmartAccountsHandlerZero", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dynamicCallEncoder", + "type": "address" + } + ], + "name": "DynamicCallEncoderSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "FundsRescued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "indexed": false, + "internalType": "struct Operation", + "name": "operation", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "indexed": false, + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "intentHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "output", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "OperationExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operationsValidator", + "type": "address" + } + ], + "name": "OperationsValidatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "proposal", + "type": "bytes32" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "SafeguardSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "smartAccountsHandler", + "type": "address" + } + ], + "name": "SmartAccountsHandlerSet", + "type": "event" + }, + { + "inputs": [], + "name": "controller", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dynamicCallEncoder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "getIntentBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + } + ], + "name": "getIntentHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "internalType": "address", + "name": "solver", + "type": "address" + } + ], + "name": "getProposalHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getUserSafeguard", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controller", + "type": "address" + }, + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_dynamicCallEncoder", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "operationsValidator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "rescueFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newDynamicCallEncoder", + "type": "address" + } + ], + "name": "setDynamicCallEncoder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOperationsValidator", + "type": "address" + } + ], + "name": "setOperationsValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "safeguard", + "type": "bytes" + } + ], + "name": "setSafeguard", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newSmartAccountsHandler", + "type": "address" + } + ], + "name": "setSmartAccountsHandler", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "simulate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "smartAccountsHandler", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033", + "deployedBytecode": "0x60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/Settler.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-146/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json b/packages/evm/ignition/deployments/chain-146/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json new file mode 100644 index 0000000..dc33803 --- /dev/null +++ b/packages/evm/ignition/deployments/chain-146/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json @@ -0,0 +1,373 @@ +{ + "_format": "hh3-sol-build-info-1", + "id": "167571dafa48e7ff636310c6c9f0fc8e202e44bc", + "solcVersion": "0.8.28", + "solcLongVersion": "0.8.28+commit.7893614a", + "userSourceNameMap": { + "contracts/Controller.sol": "project/contracts/Controller.sol", + "contracts/Intents.sol": "project/contracts/Intents.sol", + "contracts/Settler.sol": "project/contracts/Settler.sol", + "contracts/dynamic-calls/DynamicCallEncoder.sol": "project/contracts/dynamic-calls/DynamicCallEncoder.sol", + "contracts/dynamic-calls/DynamicCallTypes.sol": "project/contracts/dynamic-calls/DynamicCallTypes.sol", + "contracts/interfaces/IController.sol": "project/contracts/interfaces/IController.sol", + "contracts/interfaces/ICreateX.sol": "project/contracts/interfaces/ICreateX.sol", + "contracts/interfaces/IDynamicCallEncoder.sol": "project/contracts/interfaces/IDynamicCallEncoder.sol", + "contracts/interfaces/IExecutor.sol": "project/contracts/interfaces/IExecutor.sol", + "contracts/interfaces/IOperationsValidator.sol": "project/contracts/interfaces/IOperationsValidator.sol", + "contracts/interfaces/IPaymentsReceiver.sol": "project/contracts/interfaces/IPaymentsReceiver.sol", + "contracts/interfaces/ISafe.sol": "project/contracts/interfaces/ISafe.sol", + "contracts/interfaces/ISettler.sol": "project/contracts/interfaces/ISettler.sol", + "contracts/interfaces/ISmartAccount.sol": "project/contracts/interfaces/ISmartAccount.sol", + "contracts/interfaces/ISmartAccountContract.sol": "project/contracts/interfaces/ISmartAccountContract.sol", + "contracts/interfaces/ISmartAccountsHandler.sol": "project/contracts/interfaces/ISmartAccountsHandler.sol", + "contracts/payments/PaymentsReceiver.sol": "project/contracts/payments/PaymentsReceiver.sol", + "contracts/proxy/Proxy.sol": "project/contracts/proxy/Proxy.sol", + "contracts/safeguards/BaseOperationsValidator.sol": "project/contracts/safeguards/BaseOperationsValidator.sol", + "contracts/safeguards/CallOperationsValidator.sol": "project/contracts/safeguards/CallOperationsValidator.sol", + "contracts/safeguards/DynamicCallOperationsValidator.sol": "project/contracts/safeguards/DynamicCallOperationsValidator.sol", + "contracts/safeguards/OperationsValidator.sol": "project/contracts/safeguards/OperationsValidator.sol", + "contracts/safeguards/Safeguards.sol": "project/contracts/safeguards/Safeguards.sol", + "contracts/safeguards/SwapOperationsValidator.sol": "project/contracts/safeguards/SwapOperationsValidator.sol", + "contracts/safeguards/TransferOperationsValidator.sol": "project/contracts/safeguards/TransferOperationsValidator.sol", + "contracts/smart-accounts/SmartAccount7702.sol": "project/contracts/smart-accounts/SmartAccount7702.sol", + "contracts/smart-accounts/SmartAccountBase.sol": "project/contracts/smart-accounts/SmartAccountBase.sol", + "contracts/smart-accounts/SmartAccountContract.sol": "project/contracts/smart-accounts/SmartAccountContract.sol", + "contracts/smart-accounts/SmartAccountsHandler.sol": "project/contracts/smart-accounts/SmartAccountsHandler.sol", + "contracts/smart-accounts/SmartAccountsHandlerHelpers.sol": "project/contracts/smart-accounts/SmartAccountsHandlerHelpers.sol", + "contracts/test/CallMock.sol": "project/contracts/test/CallMock.sol", + "contracts/test/SettlerV2Mock.sol": "project/contracts/test/SettlerV2Mock.sol", + "contracts/test/TokenMock.sol": "project/contracts/test/TokenMock.sol", + "contracts/test/dynamic-calls/StaticCallMock.sol": "project/contracts/test/dynamic-calls/StaticCallMock.sol", + "contracts/test/executors/EmptyExecutorMock.sol": "project/contracts/test/executors/EmptyExecutorMock.sol", + "contracts/test/executors/MintExecutorMock.sol": "project/contracts/test/executors/MintExecutorMock.sol", + "contracts/test/executors/ReentrantExecutorMock.sol": "project/contracts/test/executors/ReentrantExecutorMock.sol", + "contracts/test/executors/TransferExecutorMock.sol": "project/contracts/test/executors/TransferExecutorMock.sol", + "contracts/test/smart-accounts/SafeMock.sol": "project/contracts/test/smart-accounts/SafeMock.sol", + "contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol": "project/contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol", + "contracts/test/utils/BytesHelpersMock.sol": "project/contracts/test/utils/BytesHelpersMock.sol", + "contracts/test/utils/DenominationsMock.sol": "project/contracts/test/utils/DenominationsMock.sol", + "contracts/test/utils/ERC20HelpersMock.sol": "project/contracts/test/utils/ERC20HelpersMock.sol", + "contracts/utils/BytesHelpers.sol": "project/contracts/utils/BytesHelpers.sol", + "contracts/utils/Denominations.sol": "project/contracts/utils/Denominations.sol", + "contracts/utils/ERC20Helpers.sol": "project/contracts/utils/ERC20Helpers.sol", + "contracts/utils/MimicHelper.sol": "project/contracts/utils/MimicHelper.sol", + "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol": "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/ProxyAdmin.sol" + }, + "input": { + "language": "Solidity", + "settings": { + "optimizer": { + "enabled": true, + "runs": 1000 + }, + "evmVersion": "cancun", + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "remappings": [ + "npm/@openzeppelin/contracts-upgradeable@5.3.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "npm/@openzeppelin/contracts-upgradeable@5.3.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/" + ] + }, + "sources": { + "npm/@openzeppelin/contracts-upgradeable@5.3.0/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\n struct OwnableStorage {\n address _owner;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Ownable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\n\n function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\n assembly {\n $.slot := OwnableStorageLocation\n }\n }\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n function __Ownable_init(address initialOwner) internal onlyInitializing {\n __Ownable_init_unchained(initialOwner);\n }\n\n function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n OwnableStorage storage $ = _getOwnableStorage();\n return $._owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n OwnableStorage storage $ = _getOwnableStorage();\n address oldOwner = $._owner;\n $._owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Storage of the initializable contract.\n *\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\n * when using with upgradeable contracts.\n *\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\n */\n struct InitializableStorage {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n uint64 _initialized;\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool _initializing;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Initializable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\n\n /**\n * @dev The contract is already initialized.\n */\n error InvalidInitialization();\n\n /**\n * @dev The contract is not initializing.\n */\n error NotInitializing();\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint64 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\n * production.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n // Cache values to avoid duplicated sloads\n bool isTopLevelCall = !$._initializing;\n uint64 initialized = $._initialized;\n\n // Allowed calls:\n // - initialSetup: the contract is not in the initializing state and no previous version was\n // initialized\n // - construction: the contract is initialized at version 1 (no reinitialization) and the\n // current contract is just being deployed\n bool initialSetup = initialized == 0 && isTopLevelCall;\n bool construction = initialized == 1 && address(this).code.length == 0;\n\n if (!initialSetup && !construction) {\n revert InvalidInitialization();\n }\n $._initialized = 1;\n if (isTopLevelCall) {\n $._initializing = true;\n }\n _;\n if (isTopLevelCall) {\n $._initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint64 version) {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing || $._initialized >= version) {\n revert InvalidInitialization();\n }\n $._initialized = version;\n $._initializing = true;\n _;\n $._initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n _checkInitializing();\n _;\n }\n\n /**\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\n */\n function _checkInitializing() internal view virtual {\n if (!_isInitializing()) {\n revert NotInitializing();\n }\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing) {\n revert InvalidInitialization();\n }\n if ($._initialized != type(uint64).max) {\n $._initialized = type(uint64).max;\n emit Initialized(type(uint64).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint64) {\n return _getInitializableStorage()._initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _getInitializableStorage()._initializing;\n }\n\n /**\n * @dev Pointer to storage slot. Allows integrators to override it with a custom storage location.\n *\n * NOTE: Consider following the ERC-7201 formula to derive storage locations.\n */\n function _initializableStorageSlot() internal pure virtual returns (bytes32) {\n return INITIALIZABLE_STORAGE;\n }\n\n /**\n * @dev Returns a pointer to the storage namespace.\n */\n // solhint-disable-next-line var-name-mixedcase\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\n bytes32 slot = _initializableStorageSlot();\n assembly {\n $.slot := slot\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/cryptography/EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.20;\n\nimport {MessageHashUtils} from \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\nimport {IERC5267} from \"@openzeppelin/contracts/interfaces/IERC5267.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose\n * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract\n * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to\n * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\n * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\n */\nabstract contract EIP712Upgradeable is Initializable, IERC5267 {\n bytes32 private constant TYPE_HASH =\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /// @custom:storage-location erc7201:openzeppelin.storage.EIP712\n struct EIP712Storage {\n /// @custom:oz-renamed-from _HASHED_NAME\n bytes32 _hashedName;\n /// @custom:oz-renamed-from _HASHED_VERSION\n bytes32 _hashedVersion;\n\n string _name;\n string _version;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.EIP712\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant EIP712StorageLocation = 0xa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100;\n\n function _getEIP712Storage() private pure returns (EIP712Storage storage $) {\n assembly {\n $.slot := EIP712StorageLocation\n }\n }\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n __EIP712_init_unchained(name, version);\n }\n\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n EIP712Storage storage $ = _getEIP712Storage();\n $._name = name;\n $._version = version;\n\n // Reset prior values in storage if upgrading\n $._hashedName = 0;\n $._hashedVersion = 0;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n return _buildDomainSeparator();\n }\n\n function _buildDomainSeparator() private view returns (bytes32) {\n return keccak256(abi.encode(TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n\n /**\n * @inheritdoc IERC5267\n */\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n EIP712Storage storage $ = _getEIP712Storage();\n // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized\n // and the EIP712 domain is not reliable, as it will be missing name and version.\n require($._hashedName == 0 && $._hashedVersion == 0, \"EIP712: Uninitialized\");\n\n return (\n hex\"0f\", // 01111\n _EIP712Name(),\n _EIP712Version(),\n block.chainid,\n address(this),\n bytes32(0),\n new uint256[](0)\n );\n }\n\n /**\n * @dev The name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712Name() internal view virtual returns (string memory) {\n EIP712Storage storage $ = _getEIP712Storage();\n return $._name;\n }\n\n /**\n * @dev The version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712Version() internal view virtual returns (string memory) {\n EIP712Storage storage $ = _getEIP712Storage();\n return $._version;\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead.\n */\n function _EIP712NameHash() internal view returns (bytes32) {\n EIP712Storage storage $ = _getEIP712Storage();\n string memory name = _EIP712Name();\n if (bytes(name).length > 0) {\n return keccak256(bytes(name));\n } else {\n // If the name is empty, the contract may have been upgraded without initializing the new storage.\n // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design.\n bytes32 hashedName = $._hashedName;\n if (hashedName != 0) {\n return hashedName;\n } else {\n return keccak256(\"\");\n }\n }\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead.\n */\n function _EIP712VersionHash() internal view returns (bytes32) {\n EIP712Storage storage $ = _getEIP712Storage();\n string memory version = _EIP712Version();\n if (bytes(version).length > 0) {\n return keccak256(bytes(version));\n } else {\n // If the version is empty, the contract may have been upgraded without initializing the new storage.\n // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design.\n bytes32 hashedVersion = $._hashedVersion;\n if (hashedVersion != 0) {\n return hashedVersion;\n } else {\n return keccak256(\"\");\n }\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/ReentrancyGuardUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\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 EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\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 ReentrancyGuardUpgradeable is Initializable {\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 /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard\n struct ReentrancyGuardStorage {\n uint256 _status;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.ReentrancyGuard\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;\n\n function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) {\n assembly {\n $.slot := ReentrancyGuardStorageLocation\n }\n }\n\n /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\n\n function __ReentrancyGuard_init() internal onlyInitializing {\n __ReentrancyGuard_init_unchained();\n }\n\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\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 ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n // On the first call to nonReentrant, _status will be NOT_ENTERED\n if ($._status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n $._status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\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 ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n return $._status == ENTERED;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC-20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC-721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC-1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n */\ninterface IERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with `hash`\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1363.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n /*\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n * 0xb0202a11 ===\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n */\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @param data Additional data with no specified format, sent in call to `spender`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1967.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1967.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n */\ninterface IERC1967 {\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Emitted when the beacon is changed.\n */\n event BeaconUpgraded(address indexed beacon);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC5267.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)\n\npragma solidity ^0.8.20;\n\ninterface IERC5267 {\n /**\n * @dev MAY be emitted to signal that the domain could have changed.\n */\n event EIP712DomainChanged();\n\n /**\n * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\n * signature.\n */\n function eip712Domain()\n external\n view\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n );\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {UpgradeableBeacon} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.22;\n\nimport {Proxy} from \"../Proxy.sol\";\nimport {ERC1967Utils} from \"./ERC1967Utils.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `implementation`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `implementation`. This will typically be an\n * encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\n *\n * Requirements:\n *\n * - If `data` is empty, `msg.value` must be zero.\n */\n constructor(address implementation, bytes memory _data) payable {\n ERC1967Utils.upgradeToAndCall(implementation, _data);\n }\n\n /**\n * @dev Returns the current implementation address.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using\n * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function _implementation() internal view virtual override returns (address) {\n return ERC1967Utils.getImplementation();\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/ERC1967/ERC1967Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Utils.sol)\n\npragma solidity ^0.8.22;\n\nimport {IBeacon} from \"../beacon/IBeacon.sol\";\nimport {IERC1967} from \"../../interfaces/IERC1967.sol\";\nimport {Address} from \"../../utils/Address.sol\";\nimport {StorageSlot} from \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This library provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] slots.\n */\nlibrary ERC1967Utils {\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev The `implementation` of the proxy is invalid.\n */\n error ERC1967InvalidImplementation(address implementation);\n\n /**\n * @dev The `admin` of the proxy is invalid.\n */\n error ERC1967InvalidAdmin(address admin);\n\n /**\n * @dev The `beacon` of the proxy is invalid.\n */\n error ERC1967InvalidBeacon(address beacon);\n\n /**\n * @dev An upgrade function sees `msg.value > 0` that may be lost.\n */\n error ERC1967NonPayable();\n\n /**\n * @dev Returns the current implementation address.\n */\n function getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the ERC-1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n if (newImplementation.code.length == 0) {\n revert ERC1967InvalidImplementation(newImplementation);\n }\n StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Performs implementation upgrade with additional setup call if data is nonempty.\n * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n * to avoid stuck value in the contract.\n *\n * Emits an {IERC1967-Upgraded} event.\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) internal {\n _setImplementation(newImplementation);\n emit IERC1967.Upgraded(newImplementation);\n\n if (data.length > 0) {\n Address.functionDelegateCall(newImplementation, data);\n } else {\n _checkNonPayable();\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Returns the current admin.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using\n * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the ERC-1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n if (newAdmin == address(0)) {\n revert ERC1967InvalidAdmin(address(0));\n }\n StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {IERC1967-AdminChanged} event.\n */\n function changeAdmin(address newAdmin) internal {\n emit IERC1967.AdminChanged(getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is the keccak-256 hash of \"eip1967.proxy.beacon\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Returns the current beacon.\n */\n function getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the ERC-1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n if (newBeacon.code.length == 0) {\n revert ERC1967InvalidBeacon(newBeacon);\n }\n\n StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;\n\n address beaconImplementation = IBeacon(newBeacon).implementation();\n if (beaconImplementation.code.length == 0) {\n revert ERC1967InvalidImplementation(beaconImplementation);\n }\n }\n\n /**\n * @dev Change the beacon and trigger a setup call if data is nonempty.\n * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n * to avoid stuck value in the contract.\n *\n * Emits an {IERC1967-BeaconUpgraded} event.\n *\n * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since\n * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for\n * efficiency.\n */\n function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {\n _setBeacon(newBeacon);\n emit IERC1967.BeaconUpgraded(newBeacon);\n\n if (data.length > 0) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n } else {\n _checkNonPayable();\n }\n }\n\n /**\n * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract\n * if an upgrade doesn't perform an initialization call.\n */\n function _checkNonPayable() private {\n if (msg.value > 0) {\n revert ERC1967NonPayable();\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback\n * function and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/ProxyAdmin.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/transparent/ProxyAdmin.sol)\n\npragma solidity ^0.8.22;\n\nimport {ITransparentUpgradeableProxy} from \"./TransparentUpgradeableProxy.sol\";\nimport {Ownable} from \"../../access/Ownable.sol\";\n\n/**\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\n */\ncontract ProxyAdmin is Ownable {\n /**\n * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgrade(address,address)`\n * and `upgradeAndCall(address,address,bytes)` are present, and `upgrade` must be used if no function should be called,\n * while `upgradeAndCall` will invoke the `receive` function if the third argument is the empty byte string.\n * If the getter returns `\"5.0.0\"`, only `upgradeAndCall(address,address,bytes)` is present, and the third argument must\n * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function\n * during an upgrade.\n */\n string public constant UPGRADE_INTERFACE_VERSION = \"5.0.0\";\n\n /**\n * @dev Sets the initial owner who can perform upgrades.\n */\n constructor(address initialOwner) Ownable(initialOwner) {}\n\n /**\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation.\n * See {TransparentUpgradeableProxy-_dispatchUpgradeToAndCall}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n * - If `data` is empty, `msg.value` must be zero.\n */\n function upgradeAndCall(\n ITransparentUpgradeableProxy proxy,\n address implementation,\n bytes memory data\n ) public payable virtual onlyOwner {\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/TransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.22;\n\nimport {ERC1967Utils} from \"../ERC1967/ERC1967Utils.sol\";\nimport {ERC1967Proxy} from \"../ERC1967/ERC1967Proxy.sol\";\nimport {IERC1967} from \"../../interfaces/IERC1967.sol\";\nimport {ProxyAdmin} from \"./ProxyAdmin.sol\";\n\n/**\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\n * does not implement this interface directly, and its upgradeability mechanism is implemented by an internal dispatch\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\n * include them in the ABI so this interface must be used to interact with it.\n */\ninterface ITransparentUpgradeableProxy is IERC1967 {\n /// @dev See {UUPSUpgradeable-upgradeToAndCall}\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable;\n}\n\n/**\n * @dev This contract implements a proxy that is upgradeable through an associated {ProxyAdmin} instance.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches the {ITransparentUpgradeableProxy-upgradeToAndCall} function exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can call the `upgradeToAndCall` function but any other call won't be forwarded to\n * the implementation. If the admin tries to call a function on the implementation it will fail with an error indicating\n * the proxy admin cannot fallback to the target implementation.\n *\n * These properties mean that the admin account can only be used for upgrading the proxy, so it's best if it's a\n * dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to\n * call a function from the proxy implementation. For this reason, the proxy deploys an instance of {ProxyAdmin} and\n * allows upgrades only if they come through it. You should think of the `ProxyAdmin` instance as the administrative\n * interface of the proxy, including the ability to change who can trigger upgrades by transferring ownership.\n *\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\n * inherit from that interface, and instead `upgradeToAndCall` is implicitly implemented using a custom dispatch\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\n * implementation.\n *\n * NOTE: This proxy does not inherit from {Context} deliberately. The {ProxyAdmin} of this contract won't send a\n * meta-transaction in any way, and any other meta-transaction setup should be made in the implementation contract.\n *\n * IMPORTANT: This contract avoids unnecessary storage reads by setting the admin only during construction as an\n * immutable variable, preventing any changes thereafter. However, the admin slot defined in ERC-1967 can still be\n * overwritten by the implementation logic pointed to by this proxy. In such cases, the contract may end up in an\n * undesirable state where the admin slot is different from the actual admin. Relying on the value of the admin slot\n * is generally fine if the implementation is trusted.\n *\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the\n * compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new\n * function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This\n * could render the `upgradeToAndCall` function inaccessible, preventing upgradeability and compromising transparency.\n */\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\n // An immutable address for the admin to avoid unnecessary SLOADs before each call\n // at the expense of removing the ability to change the admin once it's set.\n // This is acceptable if the admin is always a ProxyAdmin instance or similar contract\n // with its own ability to transfer the permissions to another account.\n address private immutable _admin;\n\n /**\n * @dev The proxy caller is the current admin, and can't fallback to the proxy target.\n */\n error ProxyDeniedAdminAccess();\n\n /**\n * @dev Initializes an upgradeable proxy managed by an instance of a {ProxyAdmin} with an `initialOwner`,\n * backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in\n * {ERC1967Proxy-constructor}.\n */\n constructor(address _logic, address initialOwner, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\n _admin = address(new ProxyAdmin(initialOwner));\n // Set the storage value and emit an event for ERC-1967 compatibility\n ERC1967Utils.changeAdmin(_proxyAdmin());\n }\n\n /**\n * @dev Returns the admin of this proxy.\n */\n function _proxyAdmin() internal view virtual returns (address) {\n return _admin;\n }\n\n /**\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior.\n */\n function _fallback() internal virtual override {\n if (msg.sender == _proxyAdmin()) {\n if (msg.sig != ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\n revert ProxyDeniedAdminAccess();\n } else {\n _dispatchUpgradeToAndCall();\n }\n } else {\n super._fallback();\n }\n }\n\n /**\n * @dev Upgrade the implementation of the proxy. See {ERC1967Utils-upgradeToAndCall}.\n *\n * Requirements:\n *\n * - If `data` is empty, `msg.value` must be zero.\n */\n function _dispatchUpgradeToAndCall() private {\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\n ERC1967Utils.upgradeToAndCall(newImplementation, data);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC-20\n * applications.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * Both values are immutable: they can only be set once during construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Skips emitting an {Approval} event indicating an allowance update. This is not\n * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n *\n * ```solidity\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner`'s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance < type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC-20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\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 value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens as the allowance of `spender` over the\n * 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 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` 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 value) external returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 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 /**\n * @dev An operation with an ERC-20 token failed.\n */\n error SafeERC20FailedOperation(address token);\n\n /**\n * @dev Indicates a failed `decreaseAllowance` request.\n */\n error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\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.encodeCall(token.transfer, (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.encodeCall(token.transferFrom, (from, to, value)));\n }\n\n /**\n * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\n }\n\n /**\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\n return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, 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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n forceApprove(token, spender, oldAllowance + value);\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n * value, non-reverting calls are assumed to be successful.\n *\n * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n unchecked {\n uint256 currentAllowance = token.allowance(address(this), spender);\n if (currentAllowance < requestedDecrease) {\n revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n }\n forceApprove(token, spender, currentAllowance - requestedDecrease);\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n * set here.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n safeTransfer(token, to, value);\n } else if (!token.transferAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferFromAndCallRelaxed(\n IERC1363 token,\n address from,\n address to,\n uint256 value,\n bytes memory data\n ) internal {\n if (to.code.length == 0) {\n safeTransferFrom(token, from, to, value);\n } else if (!token.transferFromAndCall(from, to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n * once without retrying, and relies on the returned value to be true.\n *\n * Reverts if the returned value is other than `true`.\n */\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n forceApprove(token, to, value);\n } else if (!token.approveAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n uint256 returnSize;\n uint256 returnValue;\n assembly (\"memory-safe\") {\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n // bubble errors\n if iszero(success) {\n let ptr := mload(0x40)\n returndatacopy(ptr, 0, returndatasize())\n revert(ptr, returndatasize())\n }\n returnSize := returndatasize()\n returnValue := mload(0)\n }\n\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\n revert SafeERC20FailedOperation(address(token));\n }\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 silently catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n bool success;\n uint256 returnSize;\n uint256 returnValue;\n assembly (\"memory-safe\") {\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n returnSize := returndatasize()\n returnValue := mload(0)\n }\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (utils/Address.sol)\n\npragma solidity ^0.8.20;\n\nimport {Errors} from \"./Errors.sol\";\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev There's no code at `target` (it is not a contract).\n */\n error AddressEmptyCode(address target);\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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n if (address(this).balance < amount) {\n revert Errors.InsufficientBalance(address(this).balance, amount);\n }\n\n (bool success, bytes memory returndata) = recipient.call{value: amount}(\"\");\n if (!success) {\n _revert(returndata);\n }\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 or custom error, it is bubbled\n * up by this function (like regular Solidity function calls). However, if\n * the call reverted with no returned reason, this function reverts with a\n * {Errors.FailedCall} error.\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 function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0);\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 function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n if (address(this).balance < value) {\n revert Errors.InsufficientBalance(address(this).balance, value);\n }\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\n * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case\n * of an unsuccessful call.\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata\n ) internal view returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n // only check if target is a contract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n if (returndata.length == 0 && target.code.length == 0) {\n revert AddressEmptyCode(target);\n }\n return returndata;\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\n * revert reason or with a default {Errors.FailedCall} error.\n */\n function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n return returndata;\n }\n }\n\n /**\n * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.\n */\n function _revert(bytes memory returndata) 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 assembly (\"memory-safe\") {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert Errors.FailedCall();\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS\n }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n */\n function tryRecover(\n bytes32 hash,\n bytes memory signature\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly (\"memory-safe\") {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32.\n */\n function toDataWithIntendedValidatorHash(\n address validator,\n bytes32 messageHash\n ) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, hex\"19_00\")\n mstore(0x02, shl(96, validator))\n mstore(0x16, messageHash)\n digest := keccak256(0x00, 0x36)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Errors.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Collection of common custom errors used in multiple contracts\n *\n * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.\n * It is recommended to avoid relying on the error API for critical functionality.\n *\n * _Available since v5.1._\n */\nlibrary Errors {\n /**\n * @dev The ETH balance of the account is not enough to perform the operation.\n */\n error InsufficientBalance(uint256 balance, uint256 needed);\n\n /**\n * @dev A call to an address target failed. The target may have reverted.\n */\n error FailedCall();\n\n /**\n * @dev The deployment failed.\n */\n error FailedDeployment();\n\n /**\n * @dev A necessary precompile is missing.\n */\n error MissingPrecompile(address);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Return the 512-bit addition of two uint256.\n *\n * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.\n */\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n assembly (\"memory-safe\") {\n low := add(a, b)\n high := lt(low, a)\n }\n }\n\n /**\n * @dev Return the 512-bit multiplication of two uint256.\n *\n * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.\n */\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = high * 2²⁵⁶ + low.\n assembly (\"memory-safe\") {\n let mm := mulmod(a, b, not(0))\n low := mul(a, b)\n high := sub(sub(mm, low), lt(mm, low))\n }\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a + b;\n success = c >= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a - b;\n success = c <= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a * b;\n assembly (\"memory-safe\") {\n // Only true when the multiplication doesn't overflow\n // (c / a == b) || (a == 0)\n success := or(eq(div(c, a), b), iszero(a))\n }\n // equivalent to: success ? c : 0\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `DIV` opcode returns zero when the denominator is 0.\n result := div(a, b)\n }\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `MOD` opcode returns zero when the denominator is 0.\n result := mod(a, b)\n }\n }\n }\n\n /**\n * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryAdd(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\n */\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\n (, uint256 result) = trySub(a, b);\n return result;\n }\n\n /**\n * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryMul(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\n }\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a > b, a, b);\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a < b, a, b);\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n\n // The following calculation ensures accurate ceiling division without overflow.\n // Since a is non-zero, (a - 1) / b will not overflow.\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n // but the largest value we can obtain is type(uint256).max - 1, which happens\n // when a = type(uint256).max and b = 1.\n unchecked {\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n }\n }\n\n /**\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n * denominator == 0.\n *\n * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n\n // Handle non-overflow cases, 256 by 256 division.\n if (high == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return low / denominator;\n }\n\n // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n if (denominator <= high) {\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n }\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [high low].\n uint256 remainder;\n assembly (\"memory-safe\") {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n high := sub(high, gt(remainder, low))\n low := sub(low, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\n assembly (\"memory-safe\") {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [high low] by twos.\n low := div(low, twos)\n\n // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from high into low.\n low |= high * twos;\n\n // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n // works in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n inverse *= 2 - denominator * inverse; // inverse mod 2³²\n inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high\n // is no longer required.\n result = low * inverse;\n return result;\n }\n }\n\n /**\n * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n }\n\n /**\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\n */\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n if (high >= 1 << n) {\n Panic.panic(Panic.UNDER_OVERFLOW);\n }\n return (high << (256 - n)) | (low >> n);\n }\n }\n\n /**\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\n */\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\n }\n\n /**\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n *\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n *\n * If the input value is not inversible, 0 is returned.\n *\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n */\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n unchecked {\n if (n == 0) return 0;\n\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n // ax + ny = 1\n // ax = 1 + (-y)n\n // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n // If the remainder is 0 the gcd is n right away.\n uint256 remainder = a % n;\n uint256 gcd = n;\n\n // Therefore the initial coefficients are:\n // ax + ny = gcd(a, n) = n\n // 0a + 1n = n\n int256 x = 0;\n int256 y = 1;\n\n while (remainder != 0) {\n uint256 quotient = gcd / remainder;\n\n (gcd, remainder) = (\n // The old remainder is the next gcd to try.\n remainder,\n // Compute the next remainder.\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n // where gcd is at most n (capped to type(uint256).max)\n gcd - remainder * quotient\n );\n\n (x, y) = (\n // Increment the coefficient of a.\n y,\n // Decrement the coefficient of n.\n // Can overflow, but the result is casted to uint256 so that the\n // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n x - y * int256(quotient)\n );\n }\n\n if (gcd != 1) return 0; // No inverse exists.\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n }\n }\n\n /**\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n *\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n *\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n */\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n unchecked {\n return Math.modExp(a, p - 2, p);\n }\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n *\n * Requirements:\n * - modulus can't be zero\n * - underlying staticcall to precompile must succeed\n *\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n * interpreted as 0.\n */\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n (bool success, uint256 result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n * to operate modulo 0 or if the underlying precompile reverted.\n *\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n * of a revert, but the result may be incorrectly interpreted as 0.\n */\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n if (m == 0) return (false, 0);\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n // | Offset | Content | Content (Hex) |\n // |-----------|------------|--------------------------------------------------------------------|\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n mstore(ptr, 0x20)\n mstore(add(ptr, 0x20), 0x20)\n mstore(add(ptr, 0x40), 0x20)\n mstore(add(ptr, 0x60), b)\n mstore(add(ptr, 0x80), e)\n mstore(add(ptr, 0xa0), m)\n\n // Given the result < m, it's guaranteed to fit in 32 bytes,\n // so we can use the memory scratch space located at offset 0.\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n result := mload(0x00)\n }\n }\n\n /**\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\n */\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n (bool success, bytes memory result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n */\n function tryModExp(\n bytes memory b,\n bytes memory e,\n bytes memory m\n ) internal view returns (bool success, bytes memory result) {\n if (_zeroBytes(m)) return (false, new bytes(0));\n\n uint256 mLen = m.length;\n\n // Encode call args in result and move the free memory pointer\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n assembly (\"memory-safe\") {\n let dataPtr := add(result, 0x20)\n // Write result on top of args to avoid allocating extra memory.\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n // Overwrite the length.\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n mstore(result, mLen)\n // Set the memory pointer after the returned data.\n mstore(0x40, add(dataPtr, mLen))\n }\n }\n\n /**\n * @dev Returns whether the provided byte array is zero.\n */\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\n for (uint256 i = 0; i < byteArray.length; ++i) {\n if (byteArray[i] != 0) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n * towards zero.\n *\n * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n * using integer operations.\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n unchecked {\n // Take care of easy edge cases when a == 0 or a == 1\n if (a <= 1) {\n return a;\n }\n\n // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n // the current value as `ε_n = | x_n - sqrt(a) |`.\n //\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n // bigger than any uint256.\n //\n // By noticing that\n // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n // to the msb function.\n uint256 aa = a;\n uint256 xn = 1;\n\n if (aa >= (1 << 128)) {\n aa >>= 128;\n xn <<= 64;\n }\n if (aa >= (1 << 64)) {\n aa >>= 64;\n xn <<= 32;\n }\n if (aa >= (1 << 32)) {\n aa >>= 32;\n xn <<= 16;\n }\n if (aa >= (1 << 16)) {\n aa >>= 16;\n xn <<= 8;\n }\n if (aa >= (1 << 8)) {\n aa >>= 8;\n xn <<= 4;\n }\n if (aa >= (1 << 4)) {\n aa >>= 4;\n xn <<= 2;\n }\n if (aa >= (1 << 2)) {\n xn <<= 1;\n }\n\n // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n //\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n // This is going to be our x_0 (and ε_0)\n xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n // From here, Newton's method give us:\n // x_{n+1} = (x_n + a / x_n) / 2\n //\n // One should note that:\n // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n // = ((x_n² + a) / (2 * x_n))² - a\n // = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n // = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n // = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n // = (x_n² - a)² / (2 * x_n)²\n // = ((x_n² - a) / (2 * x_n))²\n // ≥ 0\n // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n //\n // This gives us the proof of quadratic convergence of the sequence:\n // ε_{n+1} = | x_{n+1} - sqrt(a) |\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\n // = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n // = | (x_n - sqrt(a))² / (2 * x_n) |\n // = | ε_n² / (2 * x_n) |\n // = ε_n² / | (2 * x_n) |\n //\n // For the first iteration, we have a special case where x_0 is known:\n // ε_1 = ε_0² / | (2 * x_0) |\n // ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n // ≤ 2**(2*e-4) / (3 * 2**(e-1))\n // ≤ 2**(e-3) / 3\n // ≤ 2**(e-3-log2(3))\n // ≤ 2**(e-4.5)\n //\n // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n // ε_{n+1} = ε_n² / | (2 * x_n) |\n // ≤ (2**(e-k))² / (2 * 2**(e-1))\n // ≤ 2**(2*e-2*k) / 2**e\n // ≤ 2**(e-2*k)\n xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5) -- special case, see above\n xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9) -- general case with k = 4.5\n xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18) -- general case with k = 9\n xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36) -- general case with k = 18\n xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72) -- general case with k = 36\n xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144) -- general case with k = 72\n\n // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n // sqrt(a) or sqrt(a) + 1.\n return xn - SafeCast.toUint(xn > a / xn);\n }\n }\n\n /**\n * @dev Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log2(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // If upper 8 bits of 16-bit half set, add 8 to result\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\n // If upper 4 bits of 8-bit half set, add 4 to result\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\n\n // Shifts value right by the current result and use it as an index into this lookup table:\n //\n // | x (4 bits) | index | table[index] = MSB position |\n // |------------|---------|-----------------------------|\n // | 0000 | 0 | table[0] = 0 |\n // | 0001 | 1 | table[1] = 0 |\n // | 0010 | 2 | table[2] = 1 |\n // | 0011 | 3 | table[3] = 1 |\n // | 0100 | 4 | table[4] = 2 |\n // | 0101 | 5 | table[5] = 2 |\n // | 0110 | 6 | table[6] = 2 |\n // | 0111 | 7 | table[7] = 2 |\n // | 1000 | 8 | table[8] = 3 |\n // | 1001 | 9 | table[9] = 3 |\n // | 1010 | 10 | table[10] = 3 |\n // | 1011 | 11 | table[11] = 3 |\n // | 1100 | 12 | table[12] = 3 |\n // | 1101 | 13 | table[13] = 3 |\n // | 1110 | 14 | table[14] = 3 |\n // | 1111 | 15 | table[15] = 3 |\n //\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\n assembly (\"memory-safe\") {\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\n }\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/SafeCast.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool 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 */\nlibrary SafeCast {\n /**\n * @dev Value doesn't fit in an uint of `bits` size.\n */\n error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n /**\n * @dev An int value doesn't fit in an uint of `bits` size.\n */\n error SafeCastOverflowedIntToUint(int256 value);\n\n /**\n * @dev Value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n /**\n * @dev An uint value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedUintToInt(uint256 value);\n\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 function toUint248(uint256 value) internal pure returns (uint248) {\n if (value > type(uint248).max) {\n revert SafeCastOverflowedUintDowncast(248, value);\n }\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 function toUint240(uint256 value) internal pure returns (uint240) {\n if (value > type(uint240).max) {\n revert SafeCastOverflowedUintDowncast(240, value);\n }\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 function toUint232(uint256 value) internal pure returns (uint232) {\n if (value > type(uint232).max) {\n revert SafeCastOverflowedUintDowncast(232, value);\n }\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 function toUint224(uint256 value) internal pure returns (uint224) {\n if (value > type(uint224).max) {\n revert SafeCastOverflowedUintDowncast(224, value);\n }\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 function toUint216(uint256 value) internal pure returns (uint216) {\n if (value > type(uint216).max) {\n revert SafeCastOverflowedUintDowncast(216, value);\n }\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 function toUint208(uint256 value) internal pure returns (uint208) {\n if (value > type(uint208).max) {\n revert SafeCastOverflowedUintDowncast(208, value);\n }\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 function toUint200(uint256 value) internal pure returns (uint200) {\n if (value > type(uint200).max) {\n revert SafeCastOverflowedUintDowncast(200, value);\n }\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 function toUint192(uint256 value) internal pure returns (uint192) {\n if (value > type(uint192).max) {\n revert SafeCastOverflowedUintDowncast(192, value);\n }\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 function toUint184(uint256 value) internal pure returns (uint184) {\n if (value > type(uint184).max) {\n revert SafeCastOverflowedUintDowncast(184, value);\n }\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 function toUint176(uint256 value) internal pure returns (uint176) {\n if (value > type(uint176).max) {\n revert SafeCastOverflowedUintDowncast(176, value);\n }\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 function toUint168(uint256 value) internal pure returns (uint168) {\n if (value > type(uint168).max) {\n revert SafeCastOverflowedUintDowncast(168, value);\n }\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 function toUint160(uint256 value) internal pure returns (uint160) {\n if (value > type(uint160).max) {\n revert SafeCastOverflowedUintDowncast(160, value);\n }\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 function toUint152(uint256 value) internal pure returns (uint152) {\n if (value > type(uint152).max) {\n revert SafeCastOverflowedUintDowncast(152, value);\n }\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 function toUint144(uint256 value) internal pure returns (uint144) {\n if (value > type(uint144).max) {\n revert SafeCastOverflowedUintDowncast(144, value);\n }\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 function toUint136(uint256 value) internal pure returns (uint136) {\n if (value > type(uint136).max) {\n revert SafeCastOverflowedUintDowncast(136, value);\n }\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 function toUint128(uint256 value) internal pure returns (uint128) {\n if (value > type(uint128).max) {\n revert SafeCastOverflowedUintDowncast(128, value);\n }\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 function toUint120(uint256 value) internal pure returns (uint120) {\n if (value > type(uint120).max) {\n revert SafeCastOverflowedUintDowncast(120, value);\n }\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 function toUint112(uint256 value) internal pure returns (uint112) {\n if (value > type(uint112).max) {\n revert SafeCastOverflowedUintDowncast(112, value);\n }\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 function toUint104(uint256 value) internal pure returns (uint104) {\n if (value > type(uint104).max) {\n revert SafeCastOverflowedUintDowncast(104, value);\n }\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 function toUint96(uint256 value) internal pure returns (uint96) {\n if (value > type(uint96).max) {\n revert SafeCastOverflowedUintDowncast(96, value);\n }\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 function toUint88(uint256 value) internal pure returns (uint88) {\n if (value > type(uint88).max) {\n revert SafeCastOverflowedUintDowncast(88, value);\n }\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 function toUint80(uint256 value) internal pure returns (uint80) {\n if (value > type(uint80).max) {\n revert SafeCastOverflowedUintDowncast(80, value);\n }\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 function toUint72(uint256 value) internal pure returns (uint72) {\n if (value > type(uint72).max) {\n revert SafeCastOverflowedUintDowncast(72, value);\n }\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 function toUint64(uint256 value) internal pure returns (uint64) {\n if (value > type(uint64).max) {\n revert SafeCastOverflowedUintDowncast(64, value);\n }\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 function toUint56(uint256 value) internal pure returns (uint56) {\n if (value > type(uint56).max) {\n revert SafeCastOverflowedUintDowncast(56, value);\n }\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 function toUint48(uint256 value) internal pure returns (uint48) {\n if (value > type(uint48).max) {\n revert SafeCastOverflowedUintDowncast(48, value);\n }\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 function toUint40(uint256 value) internal pure returns (uint40) {\n if (value > type(uint40).max) {\n revert SafeCastOverflowedUintDowncast(40, value);\n }\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 function toUint32(uint256 value) internal pure returns (uint32) {\n if (value > type(uint32).max) {\n revert SafeCastOverflowedUintDowncast(32, value);\n }\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 function toUint24(uint256 value) internal pure returns (uint24) {\n if (value > type(uint24).max) {\n revert SafeCastOverflowedUintDowncast(24, value);\n }\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 function toUint16(uint256 value) internal pure returns (uint16) {\n if (value > type(uint16).max) {\n revert SafeCastOverflowedUintDowncast(16, value);\n }\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 function toUint8(uint256 value) internal pure returns (uint8) {\n if (value > type(uint8).max) {\n revert SafeCastOverflowedUintDowncast(8, value);\n }\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 function toUint256(int256 value) internal pure returns (uint256) {\n if (value < 0) {\n revert SafeCastOverflowedIntToUint(value);\n }\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 function toInt248(int256 value) internal pure returns (int248 downcasted) {\n downcasted = int248(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(248, value);\n }\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 function toInt240(int256 value) internal pure returns (int240 downcasted) {\n downcasted = int240(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(240, value);\n }\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 function toInt232(int256 value) internal pure returns (int232 downcasted) {\n downcasted = int232(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(232, value);\n }\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 function toInt224(int256 value) internal pure returns (int224 downcasted) {\n downcasted = int224(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(224, value);\n }\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 function toInt216(int256 value) internal pure returns (int216 downcasted) {\n downcasted = int216(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(216, value);\n }\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 function toInt208(int256 value) internal pure returns (int208 downcasted) {\n downcasted = int208(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(208, value);\n }\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 function toInt200(int256 value) internal pure returns (int200 downcasted) {\n downcasted = int200(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(200, value);\n }\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 function toInt192(int256 value) internal pure returns (int192 downcasted) {\n downcasted = int192(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(192, value);\n }\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 function toInt184(int256 value) internal pure returns (int184 downcasted) {\n downcasted = int184(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(184, value);\n }\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 function toInt176(int256 value) internal pure returns (int176 downcasted) {\n downcasted = int176(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(176, value);\n }\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 function toInt168(int256 value) internal pure returns (int168 downcasted) {\n downcasted = int168(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(168, value);\n }\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 function toInt160(int256 value) internal pure returns (int160 downcasted) {\n downcasted = int160(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(160, value);\n }\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 function toInt152(int256 value) internal pure returns (int152 downcasted) {\n downcasted = int152(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(152, value);\n }\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 function toInt144(int256 value) internal pure returns (int144 downcasted) {\n downcasted = int144(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(144, value);\n }\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 function toInt136(int256 value) internal pure returns (int136 downcasted) {\n downcasted = int136(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(136, value);\n }\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 function toInt128(int256 value) internal pure returns (int128 downcasted) {\n downcasted = int128(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(128, value);\n }\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 function toInt120(int256 value) internal pure returns (int120 downcasted) {\n downcasted = int120(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(120, value);\n }\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 function toInt112(int256 value) internal pure returns (int112 downcasted) {\n downcasted = int112(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(112, value);\n }\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 function toInt104(int256 value) internal pure returns (int104 downcasted) {\n downcasted = int104(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(104, value);\n }\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 function toInt96(int256 value) internal pure returns (int96 downcasted) {\n downcasted = int96(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(96, value);\n }\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 function toInt88(int256 value) internal pure returns (int88 downcasted) {\n downcasted = int88(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(88, value);\n }\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 function toInt80(int256 value) internal pure returns (int80 downcasted) {\n downcasted = int80(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(80, value);\n }\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 function toInt72(int256 value) internal pure returns (int72 downcasted) {\n downcasted = int72(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(72, value);\n }\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 function toInt64(int256 value) internal pure returns (int64 downcasted) {\n downcasted = int64(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(64, value);\n }\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 function toInt56(int256 value) internal pure returns (int56 downcasted) {\n downcasted = int56(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(56, value);\n }\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 function toInt48(int256 value) internal pure returns (int48 downcasted) {\n downcasted = int48(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(48, value);\n }\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 function toInt40(int256 value) internal pure returns (int40 downcasted) {\n downcasted = int40(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(40, value);\n }\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 function toInt32(int256 value) internal pure returns (int32 downcasted) {\n downcasted = int32(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(32, value);\n }\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 function toInt24(int256 value) internal pure returns (int24 downcasted) {\n downcasted = int24(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(24, value);\n }\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 function toInt16(int256 value) internal pure returns (int16 downcasted) {\n downcasted = int16(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(16, value);\n }\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 function toInt8(int256 value) internal pure returns (int8 downcasted) {\n downcasted = int8(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(8, value);\n }\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 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 if (value > uint256(type(int256).max)) {\n revert SafeCastOverflowedUintToInt(value);\n }\n return int256(value);\n }\n\n /**\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n */\n function toUint(bool b) internal pure returns (uint256 u) {\n assembly (\"memory-safe\") {\n u := iszero(iszero(b))\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));\n }\n }\n\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return ternary(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 ternary(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 // Formula from the \"Bit Twiddling Hacks\" by Sean Eron Anderson.\n // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift,\n // taking advantage of the most significant (or \"sign\" bit) in two's complement representation.\n // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result,\n // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative).\n int256 mask = n >> 255;\n\n // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.\n return uint256((n + mask) ^ mask);\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Panic.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n * using Panic for uint256;\n *\n * // Use any of the declared internal constants\n * function foo() { Panic.GENERIC.panic(); }\n *\n * // Alternatively\n * function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n /// @dev generic / unspecified error\n uint256 internal constant GENERIC = 0x00;\n /// @dev used by the assert() builtin\n uint256 internal constant ASSERT = 0x01;\n /// @dev arithmetic underflow or overflow\n uint256 internal constant UNDER_OVERFLOW = 0x11;\n /// @dev division or modulo by zero\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\n /// @dev enum conversion error\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n /// @dev invalid encoding in storage\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n /// @dev empty array pop\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n /// @dev array out of bounds access\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n /// @dev resource error (too large allocation or too large array)\n uint256 internal constant RESOURCE_ERROR = 0x41;\n /// @dev calling invalid internal function\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n /// @dev Reverts with a panic code. Recommended to use with\n /// the internal constants with predefined codes.\n function panic(uint256 code) internal pure {\n assembly (\"memory-safe\") {\n mstore(0x00, 0x4e487b71)\n mstore(0x20, code)\n revert(0x1c, 0x24)\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\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" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC-1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n * // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(newImplementation.code.length > 0);\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * TIP: Consider using this library along with {SlotDerivation}.\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n struct Int256Slot {\n int256 value;\n }\n\n struct StringSlot {\n string value;\n }\n\n struct BytesSlot {\n bytes value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Int256Slot` with member `value` located at `slot`.\n */\n function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `StringSlot` with member `value` located at `slot`.\n */\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n */\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n\n /**\n * @dev Returns a `BytesSlot` with member `value` located at `slot`.\n */\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n */\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SafeCast} from \"./math/SafeCast.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n using SafeCast for *;\n\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n uint256 private constant SPECIAL_CHARS_LOOKUP =\n (1 << 0x08) | // backspace\n (1 << 0x09) | // tab\n (1 << 0x0a) | // newline\n (1 << 0x0c) | // form feed\n (1 << 0x0d) | // carriage return\n (1 << 0x22) | // double quote\n (1 << 0x5c); // backslash\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n /**\n * @dev The string being parsed contains characters that are not in scope of the given base.\n */\n error StringsInvalidChar();\n\n /**\n * @dev The string being parsed is not a properly formatted address.\n */\n error StringsInvalidAddressFormat();\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n assembly (\"memory-safe\") {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n assembly (\"memory-safe\") {\n mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n uint256 localValue = value;\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n * representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal\n * representation, according to EIP-55.\n */\n function toChecksumHexString(address addr) internal pure returns (string memory) {\n bytes memory buffer = bytes(toHexString(addr));\n\n // hash the hex part of buffer (skip length + 2 bytes, length 40)\n uint256 hashValue;\n assembly (\"memory-safe\") {\n hashValue := shr(96, keccak256(add(buffer, 0x22), 40))\n }\n\n for (uint256 i = 41; i > 1; --i) {\n // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f)\n if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) {\n // case shift by xoring with 0x20\n buffer[i] ^= 0x20;\n }\n hashValue >>= 4;\n }\n return string(buffer);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input) internal pure returns (uint256) {\n return parseUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n uint256 result = 0;\n for (uint256 i = begin; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 9) return (false, 0);\n result *= 10;\n result += chr;\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `int256`.\n *\n * Requirements:\n * - The string must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input) internal pure returns (int256) {\n return parseInt(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) {\n (bool success, int256 value) = tryParseInt(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if\n * the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(string memory input) internal pure returns (bool success, int256 value) {\n return _tryParseIntUncheckedBounds(input, 0, bytes(input).length);\n }\n\n uint256 private constant ABS_MIN_INT256 = 2 ** 255;\n\n /**\n * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character or if the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, int256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseIntUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseIntUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, int256 value) {\n bytes memory buffer = bytes(input);\n\n // Check presence of a negative sign.\n bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n bool positiveSign = sign == bytes1(\"+\");\n bool negativeSign = sign == bytes1(\"-\");\n uint256 offset = (positiveSign || negativeSign).toUint();\n\n (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end);\n\n if (absSuccess && absValue < ABS_MIN_INT256) {\n return (true, negativeSign ? -int256(absValue) : int256(absValue));\n } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) {\n return (true, type(int256).min);\n } else return (false, 0);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input) internal pure returns (uint256) {\n return parseHexUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseHexUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an\n * invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseHexUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseHexUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n // skip 0x prefix if present\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 offset = hasPrefix.toUint() * 2;\n\n uint256 result = 0;\n for (uint256 i = begin + offset; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 15) return (false, 0);\n result *= 16;\n unchecked {\n // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check).\n // This guarantees that adding a value < 16 will not cause an overflow, hence the unchecked.\n result += chr;\n }\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as an `address`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input) internal pure returns (address) {\n return parseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) {\n (bool success, address value) = tryParseAddress(input, begin, end);\n if (!success) revert StringsInvalidAddressFormat();\n return value;\n }\n\n /**\n * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly\n * formatted address. See {parseAddress-string} requirements.\n */\n function tryParseAddress(string memory input) internal pure returns (bool success, address value) {\n return tryParseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly\n * formatted address. See {parseAddress-string-uint256-uint256} requirements.\n */\n function tryParseAddress(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, address value) {\n if (end > bytes(input).length || begin > end) return (false, address(0));\n\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 expectedLength = 40 + hasPrefix.toUint() * 2;\n\n // check that input is the correct length\n if (end - begin == expectedLength) {\n // length guarantees that this does not overflow, and value is at most type(uint160).max\n (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end);\n return (s, address(uint160(v)));\n } else {\n return (false, address(0));\n }\n }\n\n function _tryParseChr(bytes1 chr) private pure returns (uint8) {\n uint8 value = uint8(chr);\n\n // Try to parse `chr`:\n // - Case 1: [0-9]\n // - Case 2: [a-f]\n // - Case 3: [A-F]\n // - otherwise not supported\n unchecked {\n if (value > 47 && value < 58) value -= 48;\n else if (value > 96 && value < 103) value -= 87;\n else if (value > 64 && value < 71) value -= 55;\n else return type(uint8).max;\n }\n\n return value;\n }\n\n /**\n * @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.\n *\n * WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.\n *\n * NOTE: This function escapes all unicode characters, and not just the ones in ranges defined in section 2.5 of\n * RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). ECMAScript's `JSON.parse` does recover escaped unicode\n * characters that are not in this range, but other tooling may provide different results.\n */\n function escapeJSON(string memory input) internal pure returns (string memory) {\n bytes memory buffer = bytes(input);\n bytes memory output = new bytes(2 * buffer.length); // worst case scenario\n uint256 outputLength = 0;\n\n for (uint256 i; i < buffer.length; ++i) {\n bytes1 char = bytes1(_unsafeReadBytesOffset(buffer, i));\n if (((SPECIAL_CHARS_LOOKUP & (1 << uint8(char))) != 0)) {\n output[outputLength++] = \"\\\\\";\n if (char == 0x08) output[outputLength++] = \"b\";\n else if (char == 0x09) output[outputLength++] = \"t\";\n else if (char == 0x0a) output[outputLength++] = \"n\";\n else if (char == 0x0c) output[outputLength++] = \"f\";\n else if (char == 0x0d) output[outputLength++] = \"r\";\n else if (char == 0x5c) output[outputLength++] = \"\\\\\";\n else if (char == 0x22) {\n // solhint-disable-next-line quotes\n output[outputLength++] = '\"';\n }\n } else {\n output[outputLength++] = char;\n }\n }\n // write the actual length and deallocate unused memory\n assembly (\"memory-safe\") {\n mstore(output, outputLength)\n mstore(0x40, add(output, shl(5, shr(5, add(outputLength, 63)))))\n }\n\n return string(output);\n }\n\n /**\n * @dev Reads a bytes32 from a bytes array without bounds checking.\n *\n * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n * assembly block as such would prevent some optimizations.\n */\n function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n // This is not memory safe in the general case, but all calls to this private function are within bounds.\n assembly (\"memory-safe\") {\n value := mload(add(buffer, add(0x20, offset)))\n }\n }\n}\n" + }, + "project/contracts/Controller.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\n\nimport './interfaces/IController.sol';\n\n/**\n * @title Controller\n * @dev Manages allow lists for solvers, executors, proposal signers and validators\n */\ncontract Controller is IController, Ownable {\n // List of allowed solvers\n mapping (address => bool) public override isSolverAllowed;\n\n // List of allowed executors\n mapping (address => bool) public override isExecutorAllowed;\n\n // List of allowed proposal signers\n mapping (address => bool) public override isProposalSignerAllowed;\n\n // List of allowed validators\n mapping (address => bool) public override isValidatorAllowed;\n\n // Minimum number of validations allowed\n uint8 public override minValidations;\n\n /**\n * @dev Creates a new Controller contract\n * @param owner Address that will own the contract\n * @param solvers List of allowed solvers\n * @param executors List of allowed executors\n * @param proposalSigners List of allowed proposal signers\n * @param validators List of allowed validators\n * @param _minValidations Minimum number of validations allowed\n */\n constructor(\n address owner,\n address[] memory solvers,\n address[] memory executors,\n address[] memory proposalSigners,\n address[] memory validators,\n uint8 _minValidations\n ) Ownable(owner) {\n for (uint256 i = 0; i < solvers.length; i++) _setAllowedSolver(solvers[i], true);\n for (uint256 i = 0; i < executors.length; i++) _setAllowedExecutor(executors[i], true);\n for (uint256 i = 0; i < proposalSigners.length; i++) _setAllowedProposalSigner(proposalSigners[i], true);\n for (uint256 i = 0; i < validators.length; i++) _setAllowedValidator(validators[i], true);\n _setMinValidations(_minValidations);\n }\n\n /**\n * @dev Sets permissions for multiple solvers\n * @param solvers List of solver addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedSolvers(address[] memory solvers, bool[] memory alloweds) external override onlyOwner {\n if (solvers.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < solvers.length; i++) _setAllowedSolver(solvers[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple executors\n * @param executors List of executor addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedExecutors(address[] memory executors, bool[] memory alloweds) external override onlyOwner {\n if (executors.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < executors.length; i++) _setAllowedExecutor(executors[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple proposal signers\n * @param signers List of proposal signer addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedProposalSigners(address[] memory signers, bool[] memory alloweds) external override onlyOwner {\n if (signers.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < signers.length; i++) _setAllowedProposalSigner(signers[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple validators\n * @param validators List of validator addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedValidators(address[] memory validators, bool[] memory alloweds) external override onlyOwner {\n if (validators.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < validators.length; i++) _setAllowedValidator(validators[i], alloweds[i]);\n }\n\n /**\n * @dev Sets the minimum number of validations allowed\n * @param newMinValidations minimum number of validations allowed\n */\n function setMinValidations(uint8 newMinValidations) external override onlyOwner {\n _setMinValidations(newMinValidations);\n }\n\n /**\n * @dev Sets a solver permission\n */\n function _setAllowedSolver(address solver, bool allowed) internal {\n isSolverAllowed[solver] = allowed;\n emit SolverAllowedSet(solver, allowed);\n }\n\n /**\n * @dev Sets an executor permission\n */\n function _setAllowedExecutor(address executor, bool allowed) internal {\n isExecutorAllowed[executor] = allowed;\n emit ExecutorAllowedSet(executor, allowed);\n }\n\n /**\n * @dev Sets a proposal signer permission\n */\n function _setAllowedProposalSigner(address signer, bool allowed) internal {\n isProposalSignerAllowed[signer] = allowed;\n emit ProposalSignerAllowedSet(signer, allowed);\n }\n\n /**\n * @dev Sets a validator permission\n */\n function _setAllowedValidator(address validator, bool allowed) internal {\n isValidatorAllowed[validator] = allowed;\n emit ValidatorAllowedSet(validator, allowed);\n }\n\n /**\n * @dev Sets the minimum number of validations allowed\n */\n function _setMinValidations(uint8 newMinValidations) internal {\n minValidations = newMinValidations;\n emit MinValidationSet(newMinValidations);\n }\n}\n" + }, + "project/contracts/dynamic-calls/DynamicCallEncoder.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport './DynamicCallTypes.sol';\nimport '../interfaces/IDynamicCallEncoder.sol';\nimport '../utils/BytesHelpers.sol';\n\n/**\n * @title DynamicCallEncoder\n * @dev Builds calldata for arbitrary contract calls from structured arguments.\n *\n * This encoder supports:\n * - Literal ABI-encoded arguments\n * - Variable references resolved from previous execution results\n *\n * The encoder follows standard ABI encoding rules, reconstructing\n * the calldata heads and tails dynamically based on argument types.\n */\ncontract DynamicCallEncoder is IDynamicCallEncoder {\n using BytesHelpers for bytes;\n\n /**\n * @dev Internal representation of a fully-encoded argument\n * @param data ABI-encoded argument payload\n * @param isDynamic Whether this argument requires a head offset\n */\n struct EncodedArg {\n bytes data;\n bool isDynamic;\n }\n\n /**\n * @dev Encodes a dynamic call into calldata\n * @param dynamicCall Dynamic call specification\n * @param variables List of resolved variable values\n * @param variablesLength Number of resolved variables\n * @return data Fully ABI-encoded calldata\n */\n function encode(DynamicCall memory dynamicCall, bytes[][] memory variables, uint256 variablesLength)\n external\n pure\n override\n returns (bytes memory data)\n {\n if (variablesLength > variables.length) revert DynamicCallEncoderVariablesLengthOutOfBounds();\n data = _buildCalldata(dynamicCall.selector, dynamicCall.arguments, variables, variablesLength);\n }\n\n /**\n * @dev Builds calldata from a selector and a list of dynamic arguments\n * This function performs standard ABI aggregation:\n * - static arguments are inlined in the head\n * - dynamic arguments place offsets in the head and append data to the tail\n */\n function _buildCalldata(\n bytes4 selector,\n DynamicArg[] memory args,\n bytes[][] memory variables,\n uint256 variablesLength\n ) internal pure returns (bytes memory data) {\n uint256 n = args.length;\n bytes[] memory encodedArgs = new bytes[](n);\n bool[] memory isDynamic = new bool[](n);\n uint256 headLength = 0;\n\n for (uint256 i = 0; i < n; i++) {\n EncodedArg memory enc = _encodeArg(args[i], variables, variablesLength);\n encodedArgs[i] = enc.data;\n isDynamic[i] = enc.isDynamic;\n headLength += enc.isDynamic ? 32 : enc.data.length;\n }\n\n bytes memory heads;\n bytes memory tails;\n uint256 nextDynamicHead = headLength;\n\n for (uint256 i = 0; i < n; i++) {\n if (isDynamic[i]) {\n heads = bytes.concat(heads, bytes32(nextDynamicHead));\n tails = bytes.concat(tails, encodedArgs[i]);\n nextDynamicHead += encodedArgs[i].length;\n } else {\n heads = bytes.concat(heads, encodedArgs[i]);\n }\n }\n\n data = bytes.concat(selector, heads, tails);\n }\n\n /**\n * @dev Encodes a single dynamic argument based on its kind\n */\n function _encodeArg(DynamicArg memory arg, bytes[][] memory variables, uint256 variablesLength)\n internal\n pure\n returns (EncodedArg memory out)\n {\n if (arg.kind == DynamicArgKind.Literal) return _encodeLiteral(arg);\n if (arg.kind == DynamicArgKind.Variable) return _encodeVariable(arg, variables, variablesLength);\n revert DynamicCallEncoderInvalidArgKind();\n }\n\n /**\n * @dev Encodes a literal argument\n */\n function _encodeLiteral(DynamicArg memory arg) internal pure returns (EncodedArg memory) {\n return _encodeAbiValue(arg.data, arg.isDynamic);\n }\n\n /**\n * @dev Encodes a variable argument by resolving it from the variables list\n */\n function _encodeVariable(DynamicArg memory arg, bytes[][] memory variables, uint256 variablesLength)\n internal\n pure\n returns (EncodedArg memory)\n {\n if (arg.data.length != 64) revert DynamicCallEncoderVariableRefBadLength();\n uint256 opIndex = arg.data.readWord0();\n uint256 subIndex = arg.data.readWord1();\n if (opIndex >= variablesLength) revert DynamicCallEncoderVariableOutOfBounds();\n if (subIndex >= variables[opIndex].length) revert DynamicCallEncoderVariableOutOfBounds();\n\n return _encodeAbiValue(variables[opIndex][subIndex], arg.isDynamic);\n }\n\n /**\n * @dev Interprets ABI-like bytes as either a static or dynamic value. Used for variable resolution.\n */\n function _encodeAbiValue(bytes memory data, bool isDynamic) internal pure returns (EncodedArg memory out) {\n if (data.length == 0 || data.length % 32 != 0) revert DynamicCallEncoderBadLength();\n\n if (isDynamic) {\n if (data.length < 64) revert DynamicCallEncoderEmptyDynamic();\n if (data.readWord0() != 0x20) revert DynamicCallEncoderBadLength();\n\n out.data = data.sliceFrom(32);\n out.isDynamic = true;\n } else {\n out.data = data;\n out.isDynamic = false;\n }\n }\n}\n" + }, + "project/contracts/dynamic-calls/DynamicCallTypes.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Kind of dynamic argument to be encoded\n * @param Literal ABI-encoded literal value provided by the resolver\n * @param Variable Reference to a previously resolved variable value\n */\nenum DynamicArgKind {\n Literal,\n Variable\n}\n\n/**\n * @dev Represents a single dynamic argument\n * @param kind Type of argument resolution strategy\n * @param data Encoded argument data, interpreted based on `kind`\n * @param isDynamic Whether the resolved argument is ABI-dynamic\n */\nstruct DynamicArg {\n DynamicArgKind kind;\n bytes data;\n bool isDynamic;\n}\n\n/**\n * @dev Represents a dynamic contract call intent\n * @param target Contract address to be called\n * @param value ETH value to be sent with the call\n * @param selector Function selector to invoke\n * @param arguments List of dynamically resolved arguments\n */\nstruct DynamicCall {\n address target;\n uint256 value;\n bytes4 selector;\n DynamicArg[] arguments;\n}\n" + }, + "project/contracts/Intents.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Enum representing the operation type.\n * - Swap: Swap tokens in the same chain.\n * - Transfer: Transfer tokens to one or more recipients.\n * - Call: Execute arbitrary contract calls.\n * - CrossChainSwap: Swap tokens between chains.\n * - DynamicCall: Execute arbitrary dynamic contract calls.\n */\nenum OpType {\n Swap,\n Transfer,\n Call,\n CrossChainSwap,\n DynamicCall\n}\n\n/**\n * @dev EIP-712 typed data struct representing a validator's approval of an intent.\n * @param intent The hash of the intent being validated.\n */\nstruct Validation {\n bytes32 intent;\n}\n\n/**\n * @dev General intent structure with different operations.\n * @param feePayer The payer of the intent.\n * @param settler The address responsible for executing the intent on-chain.\n * @param nonce A unique value used to prevent replay attacks and distinguish intents.\n * @param deadline The timestamp by which the intent must be executed.\n * @param maxFees List of max fees the feePayer is willing to pay for the intent.\n * @param triggerSig The signature of the trigger that this intent belongs to\n * @param minValidations The minimum number of validator approvals required for this intent to be considered valid.\n * @param validations The list validator signatures attesting to this intent.\n * @param operations List of operations of the intent.\n */\nstruct Intent {\n address feePayer;\n address settler;\n bytes32 nonce;\n uint256 deadline;\n MaxFee[] maxFees;\n bytes triggerSig;\n uint256 minValidations;\n bytes[] validations;\n Operation[] operations;\n}\n\n/**\n * @dev Operation structure used to abstract over different operation types.\n * @param opType The type of operation this operation represents.\n * @param user The user of the operation.\n * @param data ABI-encoded data representing a specific operation type (e.g. SwapOperation, TransferOperation, CallOperation).\n * @param events List of custom operation events to be emitted.\n */\nstruct Operation {\n uint8 opType;\n address user;\n bytes data;\n OperationEvent[] events;\n}\n\n/**\n * @dev Max fee representation\n * @param token Token used to pay for the execution fee.\n * @param amount Max amount of fee token to be paid for settling this intent.\n */\nstruct MaxFee {\n address token;\n uint256 amount;\n}\n\n/**\n * @dev Operation event representation.\n * @param topic Event topic to be emitted.\n * @param data Event data to be emitted.\n */\nstruct OperationEvent {\n bytes32 topic;\n bytes data;\n}\n\n/**\n * @dev Represents a swap operation between two chains.\n * @param sourceChain Chain ID where tokens will be sent from.\n * @param destinationChain Chain ID where tokens will be received.\n * @param tokensIn List of input tokens and amounts to swap.\n * @param tokensOut List of expected output tokens, minimum amounts, and recipients.\n */\nstruct SwapOperation {\n uint256 sourceChain;\n uint256 destinationChain;\n TokenIn[] tokensIn;\n TokenOut[] tokensOut;\n}\n\n/**\n * @dev Token in representation.\n * @param token Address of a token to be sent.\n * @param amount Amount of tokens to be sent.\n */\nstruct TokenIn {\n address token;\n uint256 amount;\n}\n\n/**\n * @dev Token out representation.\n * @param token Address of a token to be received.\n * @param minAmount Minimum amount of tokens to be received.\n * @param recipient Recipient address that will receive the token out.\n */\nstruct TokenOut {\n address token;\n uint256 minAmount;\n address recipient;\n}\n\n/**\n * @dev Represents a transfer operation containing multiple token transfers.\n * @param chainId Chain ID where the transfers should be executed.\n * @param transfers List of token transfers to be performed.\n */\nstruct TransferOperation {\n uint256 chainId;\n TransferData[] transfers;\n}\n\n/**\n * @dev Transfer data for a single token transfer.\n * @param token Address of the token to transfer.\n * @param amount Amount of the token to transfer.\n * @param recipient Recipient of the token transfer.\n */\nstruct TransferData {\n address token;\n uint256 amount;\n address recipient;\n}\n\n/**\n * @dev Represents a generic call operation consisting of one or more contract calls.\n * @param chainId Chain ID where the calls should be executed.\n * @param calls List of low-level contract calls to be executed.\n */\nstruct CallOperation {\n uint256 chainId;\n CallData[] calls;\n}\n\n/**\n * @dev Low-level call data for a target contract interaction.\n * @param target Target contract address.\n * @param data Calldata to be sent to the target.\n * @param value ETH value to send along with the call.\n */\nstruct CallData {\n address target;\n bytes data;\n uint256 value;\n}\n\n/**\n * @dev Represents a generic dynamic call operation consisting of one or more dynamic contract calls.\n * @param chainId Chain ID where the calls should be executed.\n * @param calls List of ABI-encoded low-level dynamic contract calls to be executed.\n */\nstruct DynamicCallOperation {\n uint256 chainId;\n bytes[] calls;\n}\n\n/**\n * @dev Generic proposal structure representing a solver’s response to an intent.\n * @param deadline Timestamp until when the proposal is valid.\n * @param datas List of ABI-encoded proposal-specific data (e.g. SwapProposal).\n * @param fees List of fee amounts the solver requires for execution.\n */\nstruct Proposal {\n uint256 deadline;\n bytes[] datas;\n uint256[] fees;\n}\n\n/**\n * @dev Swap proposal representation for a swap operation.\n * @param executor Address of the executor contract that should be called during operation execution.\n * @param data Arbitrary data used to call the executor contract.\n * @param amountsOut List of amounts of tokens out proposed by the solver.\n */\nstruct SwapProposal {\n address executor;\n bytes data;\n uint256[] amountsOut;\n}\n\nlibrary IntentsHelpers {\n bytes32 internal constant INTENT_TYPE_HASH =\n keccak256(\n 'Intent(address feePayer,address settler,bytes32 nonce,uint256 deadline,MaxFee[] maxFees,bytes triggerSig,uint256 minValidations,Operation[] operations)MaxFee(address token,uint256 amount)Operation(uint8 opType,address user,bytes data,OperationEvent[] events)OperationEvent(bytes32 topic,bytes data)'\n );\n\n bytes32 internal constant PROPOSAL_TYPE_HASH =\n keccak256('Proposal(bytes32 intent,address solver,uint256 deadline,bytes[] datas,uint256[] fees)');\n\n bytes32 internal constant VALIDATION_TYPE_HASH = keccak256('Validation(bytes32 intent)');\n\n bytes32 internal constant MAX_FEE_TYPE_HASH = keccak256('MaxFee(address token,uint256 amount)');\n\n bytes32 internal constant OPERATION_TYPE_HASH =\n keccak256('Operation(uint8 opType,address user,bytes data,OperationEvent[] events)');\n\n bytes32 internal constant OPERATION_EVENT_TYPE_HASH = keccak256('OperationEvent(bytes32 topic,bytes data)');\n\n function hash(Intent memory intent) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n INTENT_TYPE_HASH,\n intent.feePayer,\n intent.settler,\n intent.nonce,\n intent.deadline,\n hash(intent.maxFees),\n intent.triggerSig,\n intent.minValidations,\n hash(intent.operations)\n )\n );\n }\n\n function hash(Proposal memory proposal, Intent memory intent, address solver) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n PROPOSAL_TYPE_HASH,\n hash(intent),\n solver,\n proposal.deadline,\n hash(proposal.datas),\n hash(proposal.fees)\n )\n );\n }\n\n function hash(MaxFee[] memory fees) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](fees.length);\n for (uint256 i = 0; i < fees.length; i++) {\n hashes[i] = keccak256(abi.encode(MAX_FEE_TYPE_HASH, fees[i].token, fees[i].amount));\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Operation[] memory operations) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](operations.length);\n for (uint256 i = 0; i < operations.length; i++) hashes[i] = hash(operations[i]);\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Operation memory operation) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n OPERATION_TYPE_HASH,\n operation.opType,\n operation.user,\n keccak256(operation.data),\n hash(operation.events)\n )\n );\n }\n\n function hash(OperationEvent[] memory events) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](events.length);\n for (uint256 i = 0; i < events.length; i++) {\n hashes[i] = keccak256(abi.encode(OPERATION_EVENT_TYPE_HASH, events[i].topic, keccak256(events[i].data)));\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(uint256[] memory fees) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(fees));\n }\n\n function hash(bytes[] memory datas) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](datas.length);\n for (uint256 i = 0; i < datas.length; i++) {\n hashes[i] = keccak256(datas[i]);\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Validation memory validation) internal pure returns (bytes32) {\n return keccak256(abi.encode(VALIDATION_TYPE_HASH, validation.intent));\n }\n}\n" + }, + "project/contracts/interfaces/IController.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @title Controller interface\n */\ninterface IController {\n /**\n * @dev The input arrays are not of equal length\n */\n error ControllerInputInvalidLength();\n\n /**\n * @dev Emitted every time a solver permission is set\n */\n event SolverAllowedSet(address indexed solver, bool allowed);\n\n /**\n * @dev Emitted every time an executor permission is set\n */\n event ExecutorAllowedSet(address indexed executor, bool allowed);\n\n /**\n * @dev Emitted every time a proposal signer permission is set\n */\n event ProposalSignerAllowedSet(address indexed proposalSigner, bool allowed);\n\n /**\n * @dev Emitted every time a validator permission is set\n */\n event ValidatorAllowedSet(address indexed validator, bool allowed);\n\n /**\n * @dev Emitted when the minimum validations changes\n */\n event MinValidationSet(uint8 indexed newMinValidation);\n\n /**\n * @dev Tells whether a solver is allowed\n * @param solver Address of the solver being queried\n */\n function isSolverAllowed(address solver) external view returns (bool);\n\n /**\n * @dev Tells whether an executor is allowed\n * @param executor Address of the executor being queried\n */\n function isExecutorAllowed(address executor) external view returns (bool);\n\n /**\n * @dev Tells whether a proposal signer is allowed\n * @param signer Address of the proposal signer being queried\n */\n function isProposalSignerAllowed(address signer) external view returns (bool);\n\n /**\n * @dev Tells whether a validator is allowed\n * @param validator Address of the validator being queried\n */\n function isValidatorAllowed(address validator) external view returns (bool);\n\n /**\n * @dev Tells the minimum number of validations allowed\n */\n function minValidations() external view returns (uint8);\n\n /**\n * @dev Sets permissions for multiple solvers\n * @param solvers List of solver addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedSolvers(address[] memory solvers, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple executors\n * @param executors List of executor addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedExecutors(address[] memory executors, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple proposal signers\n * @param signers List of proposal signer addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedProposalSigners(address[] memory signers, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple validators\n * @param validators List of validator addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedValidators(address[] memory validators, bool[] memory alloweds) external;\n\n /**\n * @dev Sets the minimum number of validations allowed\n * @param newMinValidations minimum number of validations allowed\n */\n function setMinValidations(uint8 newMinValidations) external;\n}\n" + }, + "project/contracts/interfaces/ICreateX.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity ^0.8.4;\n\n/**\n * @title CreateX Factory Interface Definition\n * @author pcaversaccio (https://web.archive.org/web/20230921103111/https://pcaversaccio.com/)\n * @custom:coauthor Matt Solomon (https://web.archive.org/web/20230921103335/https://mattsolomon.dev/)\n */\ninterface ICreateX {\n event ContractCreation(address indexed newContract);\n\n function deployCreate3(bytes32 salt, bytes memory initCode) external payable returns (address newContract);\n}\n" + }, + "project/contracts/interfaces/IDynamicCallEncoder.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../dynamic-calls/DynamicCallTypes.sol';\n\ninterface IDynamicCallEncoder {\n /**\n * @dev The argument is not word-aligned\n */\n error DynamicCallEncoderBadLength();\n\n /**\n * @dev The dynamic value resolves to empty data\n */\n error DynamicCallEncoderEmptyDynamic();\n\n /**\n * @dev The variable reference is not exactly one word\n */\n error DynamicCallEncoderVariableRefBadLength();\n\n /**\n * @dev The variable index is outside the variables array\n */\n error DynamicCallEncoderVariableOutOfBounds();\n\n /**\n * @dev The declared variables length exceeds the variables array length\n */\n error DynamicCallEncoderVariablesLengthOutOfBounds();\n\n /**\n * @dev The argument kind is not valid\n */\n error DynamicCallEncoderInvalidArgKind();\n\n /**\n * @dev Encodes a dynamic call into calldata.\n * @param dynamicCall Dynamic call specification.\n * @param variables List of resolved variable values.\n * @param variablesLength Number of resolved variables.\n */\n function encode(DynamicCall memory dynamicCall, bytes[][] memory variables, uint256 variablesLength)\n external\n pure\n returns (bytes memory);\n}\n" + }, + "project/contracts/interfaces/IExecutor.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\n\n/**\n * @title Executor interface\n */\ninterface IExecutor {\n /**\n * @dev Executes an operation proposal\n * @param operation Operation to be executed\n * @param operationHash unique hash of the operation\n * @param proposalData data of the proposal to be executed to fulfill the operation\n */\n function execute(Operation memory operation, bytes32 operationHash, bytes memory proposalData) external;\n}\n" + }, + "project/contracts/interfaces/IOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\nimport '../safeguards/Safeguards.sol';\n\n/**\n * @title OperationsValidator\n * @dev Performs operations validations based on safeguards\n */\ninterface IOperationsValidator {\n /**\n * @dev Validates an operation for a safeguard\n * @param operation Operation to be validated\n * @param config Safeguard config to validate the operation with\n */\n function validate(Operation memory operation, bytes memory config) external pure;\n}\n" + }, + "project/contracts/interfaces/IPaymentsReceiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @title PaymentsReceiver interface\n */\ninterface IPaymentsReceiver {\n /**\n * @dev The token address is zero\n */\n error PaymentsReceiverTokenZero();\n\n /**\n * @dev The recipient address is zero\n */\n error PaymentsReceiverRecipientZero();\n\n /**\n * @dev The amount is zero\n */\n error PaymentsReceiverAmountZero();\n\n /**\n * @dev The user address is zero\n */\n error PaymentsReceiverUserZero();\n\n /**\n * @dev The input arrays are not of equal length\n */\n error PaymentsReceiverInputInvalidLength();\n\n /**\n * @dev The token is not allowed\n */\n error PaymentsReceiverTokenNotAllowed(address token);\n\n /**\n * @dev Emitted every time a deposit is made\n */\n event Deposited(\n address indexed token,\n address indexed depositor,\n address indexed user,\n uint256 amount,\n uint8 decimals\n );\n\n /**\n * @dev Emitted every time a withdrawal is made\n */\n event Withdrawn(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time a token permission is set\n */\n event TokenAllowedSet(address indexed token, bool allowed);\n\n /**\n * @dev Tells whether a token is allowed\n * @param token Address of the token being queried\n */\n function isTokenAllowed(address token) external view returns (bool);\n\n /**\n * @dev Sets permissions for multiple tokens\n * @param tokens List of token addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedTokens(address[] memory tokens, bool[] memory alloweds) external;\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param amount Amount to deposit\n */\n function deposit(address token, uint256 amount) external;\n\n /**\n * @dev Deposits ERC20 tokens on behalf of a user\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function depositOnBehalf(address token, address user, uint256 amount) external;\n\n /**\n * @dev Withdraws ERC20 tokens to a recipient\n * @param token Address of the token to withdraw\n * @param recipient Address of the recipient\n * @param amount Amount to withdraw\n */\n function withdraw(address token, address recipient, uint256 amount) external;\n}\n" + }, + "project/contracts/interfaces/ISafe.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nenum SafeOperation {\n Call,\n DelegateCall\n}\n\ninterface ISafe {\n function getThreshold() external view returns (uint256);\n\n function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, SafeOperation operation)\n external\n returns (bool success, bytes memory returnData);\n}\n" + }, + "project/contracts/interfaces/ISettler.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\nimport '../safeguards/Safeguards.sol';\n\n/**\n * @title Settler interface\n */\ninterface ISettler {\n /**\n * @dev The requested operation type is unknown\n */\n error SettlerUnknownOperationType(uint8 opType);\n\n /**\n * @dev The simulation has been successful\n */\n error SettlerSimulationSuccess(uint256 gasUsed);\n\n /**\n * @dev The solver is not allowed\n */\n error SettlerSolverNotAllowed(address solver);\n\n /**\n * @dev The executor is not allowed\n */\n error SettlerExecutorNotAllowed(address executor);\n\n /**\n * @dev The proposal signer is not allowed\n */\n error SettlerProposalSignerNotAllowed(address signer);\n\n /**\n * @dev The validator is not allowed\n */\n error SettlerValidatorNotAllowed(address validator);\n\n /**\n * @dev The validator is duplicated\n */\n error SettlerValidatorDuplicatedOrUnsorted(address previous, address current);\n\n /**\n * @dev The settler is not the current contract\n */\n error SettlerInvalidSettler(address settler);\n\n /**\n * @dev The nonce is zero\n */\n error SettlerNonceZero();\n\n /**\n * @dev The intent has already been executed\n */\n error SettlerIntentAlreadyExecuted(bytes32 hash);\n\n /**\n * @dev The intent deadline is in the past\n */\n error SettlerIntentPastDeadline(uint256 deadline, uint256 timestamp);\n\n /**\n * @dev The current chain is not valid\n */\n error SettlerInvalidChain(uint256 chainId);\n\n /**\n * @dev The recipient is the settler contract\n */\n error SettlerInvalidRecipient(address to);\n\n /**\n * @dev The user is not a smart account\n */\n error SettlerUserNotSmartAccount(address user);\n\n /**\n * @dev The amount out is lower than the proposed amount\n */\n error SettlerAmountOutLtProposed(uint256 index, uint256 amountOut, uint256 proposed);\n\n /**\n * @dev The proposed amount is lower than the minimum amount\n */\n error SettlerProposedAmountLtMinAmount(uint256 index, uint256 proposed, uint256 minAmount);\n\n /**\n * @dev The proposed amounts array and the tokens out array are not of equal length\n */\n error SettlerInvalidProposedAmounts();\n\n /**\n * @dev The balance after the proposal execution is lower than the balance before\n */\n error SettlerPostBalanceOutLtPre(uint256 index, uint256 post, uint256 pre);\n\n /**\n * @dev The solver fees length does not match the requested by the user\n */\n error SettlerSolverFeeInvalidLength();\n\n /**\n * @dev The intent operations array is empty\n */\n error SettlerIntentOperationsEmpty();\n\n /**\n * @dev The proposal datas length does not match the intent operations length\n */\n error SettlerProposalDataInvalidLength();\n\n /**\n * @dev The solver fee is too high\n */\n error SettlerSolverFeeTooHigh(uint256 fee, uint256 max);\n\n /**\n * @dev The intent validations are not enough\n */\n error SettlerIntentValidationsNotEnough(uint256 min, uint256 current);\n\n /**\n * @dev The proposal deadline is in the past\n */\n error SettlerProposalPastDeadline(uint256 deadline, uint256 timestamp);\n\n /**\n * @dev The proposal data is not empty\n */\n error SettlerProposalDataNotEmpty();\n\n /**\n * @dev The rescue funds recipient is zero\n */\n error SettlerRescueFundsRecipientZero();\n\n /**\n * @dev The list of safeguards exceed the maximum allowed\n */\n error SettlerTooManySafeguards(uint256 lengthRequested);\n\n /**\n * @dev The chains of a swap operation do not match the swap type (single or cross chain)\n */\n error SettlerOperationChainsMismatch();\n\n /**\n * @dev A CrossChainSwap operation must be the only operation in the intent\n */\n error SettlerCrossChainSwapMustBeOnlyOperation();\n\n /**\n * @dev The new smart accounts handler is zero\n */\n error SmartAccountsHandlerZero();\n\n /**\n * @dev The new dynamic call encoder is zero\n */\n error SettlerDynamicCallEncoderZero();\n\n /**\n * @dev Custom events emitted for each operation\n */\n event OperationExecuted(\n address indexed user,\n bytes32 indexed topic,\n uint8 indexed opType,\n Operation operation,\n Proposal proposal,\n bytes32 intentHash,\n uint256 index,\n bytes output,\n bytes data\n );\n\n /**\n * @dev Emitted every time an intent is fulfilled\n */\n event ProposalExecuted(bytes32 indexed proposal);\n\n /**\n * @dev Emitted every time tokens are withdrawn from the contract balance\n */\n event FundsRescued(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time the smart accounts handler is set\n */\n event SmartAccountsHandlerSet(address indexed smartAccountsHandler);\n\n /**\n * @dev Emitted every time the operations validator is set\n */\n event OperationsValidatorSet(address indexed operationsValidator);\n\n /**\n * @dev Emitted every time the dynamic call encoder is set\n */\n event DynamicCallEncoderSet(address indexed dynamicCallEncoder);\n\n /**\n * @dev Emitted every time a safeguard is set\n */\n event SafeguardSet(address indexed user);\n\n /**\n * @dev Tells the reference to the Mimic controller\n */\n function controller() external view returns (address);\n\n /**\n * @dev Tells the reference to the smart accounts handler\n */\n function smartAccountsHandler() external view returns (address);\n\n /**\n * @dev Tells the reference to the operations validator\n */\n function operationsValidator() external view returns (address);\n\n /**\n * @dev Tells the reference to the dynamic call encoder\n */\n function dynamicCallEncoder() external view returns (address);\n\n /**\n * @dev Tells the block at which an intent was executed. Returns 0 if unexecuted.\n * @param hash Hash of the intent being queried\n */\n function getIntentBlock(bytes32 hash) external view returns (uint256);\n\n /**\n * @dev Tells the safeguard set for a user\n * @param user Address of the user being queried\n */\n function getUserSafeguard(address user) external view returns (bytes memory);\n\n /**\n * @dev Tells the hash of an intent\n * @param intent Intent to get the hash of\n */\n function getIntentHash(Intent memory intent) external pure returns (bytes32);\n\n /**\n * @dev Tells the hash of a proposal\n * @param proposal Proposal to be hashed\n * @param intent Intent being fulfilled by the requested proposal\n * @param solver Address of the solver that made the proposal\n */\n function getProposalHash(Proposal memory proposal, Intent memory intent, address solver)\n external\n pure\n returns (bytes32);\n\n /**\n * @dev Withdraws ERC20 or native tokens from the contract\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function rescueFunds(address token, address recipient, uint256 amount) external;\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function setSmartAccountsHandler(address newSmartAccountsHandler) external;\n\n /**\n * @dev Sets a new operations validator address\n * @param newOperationsValidator New operations validator to be set\n */\n function setOperationsValidator(address newOperationsValidator) external;\n\n /**\n * @dev Sets a new dynamic call encoder address\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function setDynamicCallEncoder(address newDynamicCallEncoder) external;\n\n /**\n * @dev Sets a safeguard for a user\n * @param safeguard Safeguard to be set\n */\n function setSafeguard(bytes memory safeguard) external;\n\n /**\n * @dev Executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function execute(Intent memory intent, Proposal memory proposal, bytes memory signature) external;\n\n /**\n * @dev Simulates an execution. It will always revert. Successful executions are returned as\n * `SettlerSimulationSuccess` errors. Any other error should be treated as failure.\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function simulate(Intent memory intent, Proposal memory proposal, bytes memory signature) external;\n}\n" + }, + "project/contracts/interfaces/ISmartAccount.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/introspection/IERC165.sol';\n\n/**\n * @title SmartAccount interface\n */\ninterface ISmartAccount is IERC165 {\n /**\n * @dev Emitted every time tokens are transferred\n */\n event Transferred(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time `call` is called\n */\n event Called(address indexed target, bytes data, uint256 value, bytes result);\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the owner or the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) external;\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the owner or the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n */\n function call(address target, bytes memory data, uint256 value) external returns (bytes memory result);\n}\n" + }, + "project/contracts/interfaces/ISmartAccountContract.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/interfaces/IERC1271.sol';\n\nimport './ISmartAccount.sol';\n\n/**\n * @title SmartAccountContract interface\n */\ninterface ISmartAccountContract is ISmartAccount, IERC1271 {\n // solhint-disable-previous-line no-empty-blocks\n}\n" + }, + "project/contracts/interfaces/ISmartAccountsHandler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\ninterface ISmartAccountsHandler {\n /**\n * @dev The smart account given is not supported\n */\n error SmartAccountsHandlerUnsupportedAccount(address account);\n\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address account) external view returns (bool);\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address account, address token, address to, uint256 amount) external;\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address account, address target, bytes memory data, uint256 value) external returns (bytes memory);\n}\n" + }, + "project/contracts/payments/PaymentsReceiver.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\n\nimport '../interfaces/IPaymentsReceiver.sol';\n\n/**\n * @title PaymentsReceiver\n * @dev Receives ERC20 deposits and lets the owner withdraw them\n */\ncontract PaymentsReceiver is IPaymentsReceiver, Ownable {\n using SafeERC20 for IERC20;\n\n // List of allowed tokens\n mapping (address => bool) public override isTokenAllowed;\n\n /**\n * @dev Creates a new PaymentsReceiver contract\n * @param owner Address that will own the contract\n * @param tokens List of allowed tokens\n */\n constructor(address owner, address[] memory tokens) Ownable(owner) {\n for (uint256 i = 0; i < tokens.length; i++) _setAllowedToken(tokens[i], true);\n }\n\n /**\n * @dev Sets permissions for multiple tokens\n * @param tokens List of token addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedTokens(address[] memory tokens, bool[] memory alloweds) external override onlyOwner {\n if (tokens.length != alloweds.length) revert PaymentsReceiverInputInvalidLength();\n for (uint256 i = 0; i < tokens.length; i++) _setAllowedToken(tokens[i], alloweds[i]);\n }\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param amount Amount to deposit\n */\n function deposit(address token, uint256 amount) external override {\n _deposit(token, _msgSender(), amount);\n }\n\n /**\n * @dev Deposits ERC20 tokens on behalf of a user\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function depositOnBehalf(address token, address user, uint256 amount) external override {\n if (user == address(0)) revert PaymentsReceiverUserZero();\n _deposit(token, user, amount);\n }\n\n /**\n * @dev Withdraws ERC20 tokens to a recipient\n * @param token Address of the token to withdraw\n * @param recipient Address of the recipient\n * @param amount Amount to withdraw\n */\n function withdraw(address token, address recipient, uint256 amount) external override onlyOwner {\n if (token == address(0)) revert PaymentsReceiverTokenZero();\n if (recipient == address(0)) revert PaymentsReceiverRecipientZero();\n if (amount == 0) revert PaymentsReceiverAmountZero();\n\n IERC20(token).safeTransfer(recipient, amount);\n\n emit Withdrawn(token, recipient, amount);\n }\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function _deposit(address token, address user, uint256 amount) internal {\n if (token == address(0)) revert PaymentsReceiverTokenZero();\n if (amount == 0) revert PaymentsReceiverAmountZero();\n if (!isTokenAllowed[token]) revert PaymentsReceiverTokenNotAllowed(token);\n\n address depositor = _msgSender();\n IERC20(token).safeTransferFrom(depositor, address(this), amount);\n\n uint8 decimals = IERC20Metadata(token).decimals();\n emit Deposited(token, depositor, user, amount, decimals);\n }\n\n /**\n * @dev Sets a token permission\n */\n function _setAllowedToken(address token, bool allowed) internal {\n isTokenAllowed[token] = allowed;\n emit TokenAllowedSet(token, allowed);\n }\n}\n" + }, + "project/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol';\n\ncontract Proxy is TransparentUpgradeableProxy {\n constructor(address implementation, address initialOwner, bytes memory data)\n TransparentUpgradeableProxy(implementation, initialOwner, data)\n {}\n}\n" + }, + "project/contracts/safeguards/BaseOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @title BaseOperationsValidator\n */\ncontract BaseOperationsValidator {\n /**\n * @dev No operations allowed\n */\n error OperationsValidatorNoneAllowed();\n\n /**\n * @dev Operation type unknown\n */\n error OperationsValidatorUnknownOperationType(uint8 opType);\n\n /**\n * @dev Invalid safeguard mode\n */\n error OperationsValidatorInvalidSafeguardMode(uint8 mode);\n\n /**\n * @dev Tells whether a chain is allowed\n */\n function _isChainAllowed(uint256 chainId, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, uint256[] memory values) = abi.decode(config, (bool, uint256[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (chainId == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (chainId == values[i]) return true;\n }\n return false;\n }\n }\n\n /**\n * @dev Tells whether an account is allowed\n */\n function _isAccountAllowed(address account, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, address[] memory values) = abi.decode(config, (bool, address[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (account == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (account == values[i]) return true;\n }\n return false;\n }\n }\n\n /**\n * @dev Tells whether a selector is allowed\n */\n function _isSelectorAllowed(bytes4 selector, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, bytes4[] memory values) = abi.decode(config, (bool, bytes4[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (selector == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (selector == values[i]) return true;\n }\n return false;\n }\n }\n}\n" + }, + "project/contracts/safeguards/CallOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './Safeguards.sol';\nimport './BaseOperationsValidator.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Call safeguard modes to validate call operations\n * @param None To ensure no calls are allowed\n * @param Chain To validate that the chain where calls execute is allowed\n * @param Target To validate that the call targets (contract addresses) are allowed\n * @param Selector To validate that the function selectors being called are allowed\n */\nenum CallSafeguardMode {\n None,\n Chain,\n Target,\n Selector\n}\n\n/**\n * @title CallOperationsValidator\n * @dev Performs call operations validations based on safeguards\n */\ncontract CallOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a call operation is valid for a safeguard\n * @param operation Call operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isCallOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n CallOperation memory callOperation = abi.decode(operation.data, (CallOperation));\n if (safeguard.mode == uint8(CallSafeguardMode.Chain))\n return _isChainAllowed(callOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Target))\n return _areCallTargetsValid(callOperation.calls, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Selector))\n return _areCallSelectorsValid(callOperation.calls, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the call targets are allowed\n */\n function _areCallTargetsValid(CallData[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n if (!_isAccountAllowed(calls[i].target, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the call selectors are allowed\n */\n function _areCallSelectorsValid(CallData[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n if (!_isSelectorAllowed(bytes4(calls[i].data), config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/DynamicCallOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './CallOperationsValidator.sol';\nimport './Safeguards.sol';\nimport './BaseOperationsValidator.sol';\nimport '../Intents.sol';\nimport '../dynamic-calls/DynamicCallTypes.sol';\n\n/**\n * @title DynamicCallOperationsValidator\n * @dev Performs dynamic call operations validations based on call safeguards\n */\ncontract DynamicCallOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a dynamic call operation is valid for a safeguard\n * @param operation Dynamic call operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isDynamicCallOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n DynamicCallOperation memory dynamicCallOperation = abi.decode(operation.data, (DynamicCallOperation));\n if (safeguard.mode == uint8(CallSafeguardMode.Chain))\n return _isChainAllowed(dynamicCallOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Target))\n return _areDynamicCallTargetsValid(dynamicCallOperation.calls, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Selector))\n return _areDynamicCallSelectorsValid(dynamicCallOperation.calls, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the dynamic call targets are allowed\n */\n function _areDynamicCallTargetsValid(bytes[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n DynamicCall memory call = abi.decode(calls[i], (DynamicCall));\n if (!_isAccountAllowed(call.target, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the dynamic call selectors are allowed\n */\n function _areDynamicCallSelectorsValid(bytes[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n DynamicCall memory call = abi.decode(calls[i], (DynamicCall));\n if (!_isSelectorAllowed(call.selector, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/OperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './CallOperationsValidator.sol';\nimport './DynamicCallOperationsValidator.sol';\nimport './TransferOperationsValidator.sol';\nimport './Safeguards.sol';\nimport './SwapOperationsValidator.sol';\nimport '../Intents.sol';\nimport '../interfaces/IOperationsValidator.sol';\n\n/**\n * @title OperationsValidator\n * @dev Performs operations validations based on safeguards\n */\ncontract OperationsValidator is\n IOperationsValidator,\n SwapOperationsValidator,\n TransferOperationsValidator,\n CallOperationsValidator,\n DynamicCallOperationsValidator\n{\n /**\n * @dev Safeguard validation failed\n */\n error OperationsValidatorSafeguardFailed();\n\n /**\n * @dev Invalid safeguard config mode\n */\n error OperationsValidatorInvalidSafeguardConfigMode(uint8 mode);\n\n /**\n * @dev Invalid safeguard group logic mode\n */\n error OperationsValidatorInvalidSafeguardGroupLogicMode(uint8 mode);\n\n /**\n * @dev Tells whether an operation is valid for a safeguard\n * @param operation Operation to be validated\n * @param config Safeguard config to validate the operation with\n */\n function validate(Operation memory operation, bytes memory config) external pure override {\n (uint8 mode, bytes memory safeguard) = abi.decode(config, (uint8, bytes));\n if (mode == uint8(SafeguardConfigMode.List)) _validate(operation, abi.decode(safeguard, (Safeguard[])));\n else if (mode == uint8(SafeguardConfigMode.Tree)) _validate(operation, _decodeSafeguardTree(safeguard));\n else revert OperationsValidatorInvalidSafeguardConfigMode(mode);\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguards list\n * @param operation Operation to be validated\n * @param safeguards Safeguard list to validate the operation with\n */\n function _validate(Operation memory operation, Safeguard[] memory safeguards) internal pure {\n if (safeguards.length == 0) revert OperationsValidatorSafeguardFailed();\n for (uint256 i = 0; i < safeguards.length; i++) {\n if (!_isSafeguardValid(operation, safeguards[i])) revert OperationsValidatorSafeguardFailed();\n }\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard tree\n * @param operation Operation to be validated\n * @param tree Safeguard tree to validate the operation with\n */\n function _validate(Operation memory operation, SafeguardTree memory tree) internal pure {\n if (tree.nodes.length == 0) revert OperationsValidatorSafeguardFailed();\n if (!_isSafeguardGroupValid(operation, tree, 0)) revert OperationsValidatorSafeguardFailed();\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard tree at a certain level\n * @param operation Operation to be validated\n * @param tree Safeguard tree to validate the operation with\n * @param index Index of the group node to evaluate\n */\n function _isSafeguardGroupValid(Operation memory operation, SafeguardTree memory tree, uint16 index)\n internal\n pure\n returns (bool)\n {\n SafeguardGroup memory group = tree.nodes[index];\n\n if (group.logic == uint8(SafeguardGroupLogic.NOT)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i])) return false;\n }\n return true;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.AND)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (!_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (!_isSafeguardGroupValid(operation, tree, group.children[i])) return false;\n }\n return true;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.OR)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return true;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i])) return true;\n }\n return false;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.XOR)) {\n uint256 hits = 0;\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]]))\n if (++hits > 1) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i]))\n if (++hits > 1) return false;\n }\n return hits == 1;\n }\n\n revert OperationsValidatorInvalidSafeguardGroupLogicMode(group.logic);\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard\n * @param operation Operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isSafeguardValid(Operation memory operation, Safeguard memory safeguard) internal pure returns (bool) {\n if (safeguard.mode == uint8(0)) revert OperationsValidatorNoneAllowed();\n if (operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap)) {\n return _isSwapOperationValid(operation, safeguard);\n }\n if (operation.opType == uint8(OpType.Transfer)) return _isTransferOperationValid(operation, safeguard);\n if (operation.opType == uint8(OpType.Call)) return _isCallOperationValid(operation, safeguard);\n if (operation.opType == uint8(OpType.DynamicCall)) return _isDynamicCallOperationValid(operation, safeguard);\n revert OperationsValidatorUnknownOperationType(uint8(operation.opType));\n }\n\n /**\n * @dev Safely decodes a safeguard tree avoiding compiler issues with dynamic arrays\n * @param data Safeguard tree data to be decoded\n */\n function _decodeSafeguardTree(bytes memory data) private pure returns (SafeguardTree memory) {\n (SafeguardGroup[] memory nodes, Safeguard[] memory leaves) = abi.decode(data, (SafeguardGroup[], Safeguard[]));\n return SafeguardTree(nodes, leaves);\n }\n}\n" + }, + "project/contracts/safeguards/Safeguards.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Safeguard config modes\n * - List: Safeguard lists\n * - Tree: Safeguard groups\n */\nenum SafeguardConfigMode {\n List,\n Tree\n}\n\n/**\n * @dev Logical operators for safeguard groups\n * - AND: every child must pass\n * - OR: at least one child must pass\n * - XOR: exactly one child must pass\n * - NOT: every child must fail\n */\nenum SafeguardGroupLogic {\n AND,\n OR,\n XOR,\n NOT\n}\n\n/**\n * @dev Flat node in the safeguard tree\n * @param logic Group operator (AND/OR/XOR/NOT)\n * @param leaves Indices into `SafeguardTree.leaves`\n * @param children Indices into `SafeguardTree.nodes`\n */\nstruct SafeguardGroup {\n uint8 logic;\n uint16[] leaves;\n uint16[] children;\n}\n\n/**\n * @dev Safeguard tree representation\n * @param nodes List of all the nodes in the tree\n * @param leaves List of all the leaves in the tree\n */\nstruct SafeguardTree {\n SafeguardGroup[] nodes;\n Safeguard[] leaves;\n}\n\n/**\n * @dev Safeguard representation\n * @param mode Safeguard mode\n * @param config Safeguard configuration settings or parameters\n */\nstruct Safeguard {\n uint8 mode;\n bytes config;\n}\n" + }, + "project/contracts/safeguards/SwapOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './BaseOperationsValidator.sol';\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Swap safeguard modes to validate swap operations\n * @param None To ensure no swaps are allowed\n * @param SourceChain To validate that the source chain is allowed\n * @param DestinationChain To validate that the destination chain is allowed\n * @param TokenIn To validate that the tokens to be sent are allowed\n * @param TokenOut To validate that the tokens to be received are allowed\n * @param Recipient To validate that the recipients that will receive the tokens are allowed\n */\nenum SwapSafeguardMode {\n None,\n SourceChain,\n DestinationChain,\n TokenIn,\n TokenOut,\n Recipient\n}\n\n/**\n * @title SwapOperationsValidator\n * @dev Performs swap operations validations based on safeguards\n */\ncontract SwapOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a swap operation is valid for a safeguard\n * @param operation Swap operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isSwapOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n SwapOperation memory swapOperation = abi.decode(operation.data, (SwapOperation));\n if (safeguard.mode == uint8(SwapSafeguardMode.SourceChain))\n return _isChainAllowed(swapOperation.sourceChain, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.DestinationChain))\n return _isChainAllowed(swapOperation.destinationChain, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.TokenIn))\n return _areSwapTokensInValid(swapOperation.tokensIn, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.TokenOut))\n return _areSwapTokensOutValid(swapOperation.tokensOut, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.Recipient))\n return _areSwapRecipientsValid(swapOperation.tokensOut, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the tokens to be sent are allowed\n */\n function _areSwapTokensInValid(TokenIn[] memory tokensIn, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensIn.length; i++) {\n if (!_isAccountAllowed(tokensIn[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the tokens to be received are allowed\n */\n function _areSwapTokensOutValid(TokenOut[] memory tokensOut, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensOut.length; i++) {\n if (!_isAccountAllowed(tokensOut[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the recipients to be received are allowed\n */\n function _areSwapRecipientsValid(TokenOut[] memory tokensOut, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensOut.length; i++) {\n if (!_isAccountAllowed(tokensOut[i].recipient, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/TransferOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './BaseOperationsValidator.sol';\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Transfer safeguard modes to validate transfer operations\n * @param None To ensure no transfers are allowed\n * @param Chain To validate that the chain where transfers execute is allowed\n * @param Token To validate that the tokens being transferred are allowed\n * @param Recipient To validate that the recipients of the transfers are allowed\n */\nenum TransferSafeguardMode {\n None,\n Chain,\n Token,\n Recipient\n}\n\n/**\n * @title TransferOperationsValidator\n * @dev Performs transfer operations validations based on safeguards\n */\ncontract TransferOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a transfer operation is valid for a safeguard\n * @param operation Transfer operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isTransferOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n TransferOperation memory transferOperation = abi.decode(operation.data, (TransferOperation));\n if (safeguard.mode == uint8(TransferSafeguardMode.Chain))\n return _isChainAllowed(transferOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(TransferSafeguardMode.Token))\n return _areTransferTokensValid(transferOperation.transfers, safeguard.config);\n if (safeguard.mode == uint8(TransferSafeguardMode.Recipient))\n return _areTransferRecipientsValid(transferOperation.transfers, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the tokens being transferred are allowed\n */\n function _areTransferTokensValid(TransferData[] memory transfers, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < transfers.length; i++) {\n if (!_isAccountAllowed(transfers[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the recipients of the transfers are allowed\n */\n function _areTransferRecipientsValid(TransferData[] memory transfers, bytes memory config)\n private\n pure\n returns (bool)\n {\n for (uint256 i = 0; i < transfers.length; i++) {\n if (!_isAccountAllowed(transfers[i].recipient, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/Settler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';\nimport '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\nimport '@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol';\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\nimport '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';\n\nimport './Intents.sol';\nimport './interfaces/IController.sol';\nimport './interfaces/IDynamicCallEncoder.sol';\nimport './interfaces/IOperationsValidator.sol';\nimport './interfaces/IExecutor.sol';\nimport './interfaces/ISettler.sol';\nimport './utils/Denominations.sol';\nimport './utils/ERC20Helpers.sol';\nimport './smart-accounts/SmartAccountsHandler.sol';\nimport './smart-accounts/SmartAccountsHandlerHelpers.sol';\n\n/**\n * @title Settler\n * @dev Contract that provides the appropriate context for solvers to execute proposals that fulfill user intents\n */\ncontract Settler is ISettler, Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, EIP712Upgradeable {\n using SafeERC20 for IERC20;\n using IntentsHelpers for Intent;\n using IntentsHelpers for Proposal;\n using IntentsHelpers for Validation;\n using SmartAccountsHandlerHelpers for address;\n\n // Mimic controller reference\n address public override controller;\n\n // Smart accounts handler reference\n address public override smartAccountsHandler;\n\n // Operations validator reference\n address public override operationsValidator;\n\n // Dynamic call encoder reference\n address public dynamicCallEncoder;\n\n // List of block numbers at which an intent was executed\n mapping (bytes32 => uint256) public override getIntentBlock;\n\n // Safeguard config per user\n mapping (address => bytes) internal _userSafeguard;\n\n /**\n * @dev Modifier to tag settler functions in order to check if the sender is an allowed solver\n */\n modifier onlySolver() {\n address sender = _msgSender();\n if (!IController(controller).isSolverAllowed(sender)) revert SettlerSolverNotAllowed(sender);\n _;\n }\n\n /**\n * @dev Disables initializers to prevent implementation contract from being initialized directly\n */\n constructor() {\n _disableInitializers();\n }\n\n /**\n * @dev Initializes a new Settler contract\n * @param _controller Address of the Settler controller\n * @param _owner Address that will own the contract\n * @param _dynamicCallEncoder Address of the dynamic call encoder\n */\n function initialize(address _controller, address _owner, address _dynamicCallEncoder) external initializer {\n __Ownable_init(_owner);\n __ReentrancyGuard_init();\n __EIP712_init('Mimic Protocol Settler', '1');\n\n controller = _controller;\n smartAccountsHandler = address(new SmartAccountsHandler());\n _setDynamicCallEncoder(_dynamicCallEncoder);\n }\n\n /**\n * @dev Tells the hash of an intent\n * @param intent Intent to get the hash of\n */\n function getIntentHash(Intent memory intent) external pure override returns (bytes32) {\n return intent.hash();\n }\n\n /**\n * @dev Tells the hash of a proposal\n * @param proposal Proposal to be hashed\n * @param intent Intent being fulfilled by the requested proposal\n * @param solver Address of the solver that made the proposal\n */\n function getProposalHash(Proposal memory proposal, Intent memory intent, address solver)\n external\n pure\n override\n returns (bytes32)\n {\n return proposal.hash(intent, solver);\n }\n\n /**\n * @dev Tells the safeguard set for a user\n * @param user Address of the user being queried\n */\n function getUserSafeguard(address user) external view override returns (bytes memory) {\n return _userSafeguard[user];\n }\n\n /**\n * @dev It allows receiving native token transfers\n * Note: This method mainly allows supporting native tokens for swaps\n */\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n /**\n * @dev Withdraws ERC20 or native tokens from the contract\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function rescueFunds(address token, address recipient, uint256 amount) external override onlyOwner nonReentrant {\n if (recipient == address(0)) revert SettlerRescueFundsRecipientZero();\n ERC20Helpers.transfer(token, recipient, amount);\n emit FundsRescued(token, recipient, amount);\n }\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function setSmartAccountsHandler(address newSmartAccountsHandler) external override onlyOwner {\n _setSmartAccountsHandler(newSmartAccountsHandler);\n }\n\n /**\n * @dev Sets a new operations validator address\n * @param newOperationsValidator New operations validator to be set\n */\n function setOperationsValidator(address newOperationsValidator) external override onlyOwner {\n _setOperationsValidator(newOperationsValidator);\n }\n\n /**\n * @dev Sets a new dynamic call encoder address\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function setDynamicCallEncoder(address newDynamicCallEncoder) external override onlyOwner {\n _setDynamicCallEncoder(newDynamicCallEncoder);\n }\n\n /**\n * @dev Sets a safeguard for a user\n * @param safeguard Safeguard to be set\n */\n function setSafeguard(bytes memory safeguard) external override {\n _setSafeguard(msg.sender, safeguard);\n }\n\n /**\n * @dev Executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function execute(Intent memory intent, Proposal memory proposal, bytes memory signature)\n external\n override\n onlySolver\n {\n _execute(intent, proposal, signature, false);\n }\n\n /**\n * @dev Simulates an execution. It will always revert. Successful executions are returned as\n * `SettlerSimulationSuccess` errors. Any other error should be treated as failure.\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function simulate(Intent memory intent, Proposal memory proposal, bytes memory signature)\n external\n override\n onlySolver\n {\n uint256 initialGas = gasleft();\n _execute(intent, proposal, signature, true);\n uint256 gasUsed = initialGas - gasleft();\n revert SettlerSimulationSuccess(gasUsed);\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n * @param simulated Whether the execution is a simulation\n */\n function _execute(Intent memory intent, Proposal memory proposal, bytes memory signature, bool simulated)\n internal\n nonReentrant\n {\n _validateIntent(intent, proposal, signature, simulated);\n getIntentBlock[intent.hash()] = block.number;\n\n bytes[][] memory outputs = new bytes[][](intent.operations.length);\n for (uint256 i = 0; i < intent.operations.length; i++) {\n outputs[i] = _executeOperation(intent, proposal, i, outputs);\n }\n\n _payFees(intent, proposal);\n emit ProposalExecuted(proposal.hash(intent, _msgSender()));\n }\n\n /**\n * @dev Executes proposal to fulfill an operation\n * @param intent Intent being fulfilled\n * @param proposal Proposal being executed\n * @param index Position where the operation and its corresponding proposal data are located\n * @param outputs List of operations outputs\n */\n function _executeOperation(Intent memory intent, Proposal memory proposal, uint256 index, bytes[][] memory outputs)\n internal\n returns (bytes[] memory)\n {\n uint8 opType = intent.operations[index].opType;\n if (opType == uint8(OpType.Swap) || opType == uint8(OpType.CrossChainSwap)) {\n return _executeSwap(intent, proposal, index);\n }\n if (opType == uint8(OpType.Transfer)) return _executeTransfer(intent, proposal, index);\n if (opType == uint8(OpType.Call)) return _executeCall(intent, proposal, index);\n if (opType == uint8(OpType.DynamicCall)) return _executeDynamicCall(intent, proposal, index, outputs);\n revert SettlerUnknownOperationType(opType);\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a swap operation\n * @param intent Intent that contains swap operation to be fulfilled\n * @param proposal Proposal with swap data to be executed\n * @param index Position where the swap proposal data and operation are located\n */\n function _executeSwap(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n SwapOperation memory swapOperation = abi.decode(operation.data, (SwapOperation));\n SwapProposal memory swapProposal = abi.decode(proposal.datas[index], (SwapProposal));\n if (operation.opType == uint8(OpType.CrossChainSwap)) {\n if (intent.operations.length > 1) revert SettlerCrossChainSwapMustBeOnlyOperation();\n _validateCrossChainSwapOperation(swapOperation, swapProposal);\n } else _validateSingleChainSwapOperation(swapOperation, swapProposal);\n\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(operation.user);\n if (swapOperation.sourceChain == block.chainid) {\n for (uint256 i = 0; i < swapOperation.tokensIn.length; i++) {\n TokenIn memory tokenIn = swapOperation.tokensIn[i];\n _transferFrom(tokenIn.token, operation.user, swapProposal.executor, tokenIn.amount, isSmartAccount);\n }\n }\n\n uint256[] memory preBalancesOut = _getTokensOutBalance(swapOperation);\n // Using the intent hash as the unique operation hash because cross-chain swap has only one operation per intent and the single swap executor does not use it\n bytes32 operationHash = intent.hash();\n IExecutor(swapProposal.executor).execute(operation, operationHash, proposal.datas[index]);\n\n outputs = new bytes[](swapOperation.tokensOut.length);\n if (swapOperation.destinationChain == block.chainid) {\n uint256[] memory amounts = new uint256[](swapOperation.tokensOut.length);\n for (uint256 i = 0; i < swapOperation.tokensOut.length; i++) {\n TokenOut memory tokenOut = swapOperation.tokensOut[i];\n uint256 postBalanceOut = ERC20Helpers.balanceOf(tokenOut.token, address(this));\n uint256 preBalanceOut = preBalancesOut[i];\n if (postBalanceOut < preBalanceOut) revert SettlerPostBalanceOutLtPre(i, postBalanceOut, preBalanceOut);\n\n amounts[i] = postBalanceOut - preBalanceOut;\n uint256 proposedAmount = swapProposal.amountsOut[i];\n if (amounts[i] < proposedAmount) revert SettlerAmountOutLtProposed(i, amounts[i], proposedAmount);\n\n ERC20Helpers.transfer(tokenOut.token, tokenOut.recipient, amounts[i]);\n outputs[i] = abi.encode(amounts[i]);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(amounts));\n }\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a transfer operation\n * @param intent Intent that contains transfer operation to be fulfilled\n * @param proposal Transfer proposal to be executed\n * @param index Position where the transfer proposal data and operation are located\n */\n function _executeTransfer(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n TransferOperation memory transferOperation = abi.decode(operation.data, (TransferOperation));\n _validateTransferOperation(transferOperation, proposal.datas[index]);\n\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(operation.user);\n for (uint256 i = 0; i < transferOperation.transfers.length; i++) {\n TransferData memory transfer = transferOperation.transfers[i];\n _transferFrom(transfer.token, operation.user, transfer.recipient, transfer.amount, isSmartAccount);\n }\n\n outputs = new bytes[](0);\n _emitOperationEvents(operation, proposal, intent.hash(), index, new bytes(0));\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a call operation\n * @param intent Intent that contains call operation to be fulfilled\n * @param proposal Call proposal to be executed\n * @param index Position where the call proposal data and operation are located\n */\n function _executeCall(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n CallOperation memory callOperation = abi.decode(operation.data, (CallOperation));\n _validateCallOperation(callOperation, proposal.datas[index], operation.user);\n\n outputs = new bytes[](callOperation.calls.length);\n for (uint256 i = 0; i < callOperation.calls.length; i++) {\n CallData memory call = callOperation.calls[i];\n // solhint-disable-next-line avoid-low-level-calls\n outputs[i] = smartAccountsHandler.call(operation.user, call.target, call.data, call.value);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(outputs));\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a dynamic call operation\n * @param intent Intent that contains dynamic call operation to be fulfilled\n * @param proposal Dynamic call proposal to be executed\n * @param index Position where the dynamic call proposal data and operation are located\n * @param variables List of operations outputs\n */\n function _executeDynamicCall(\n Intent memory intent,\n Proposal memory proposal,\n uint256 index,\n bytes[][] memory variables\n ) internal returns (bytes[] memory outputs) {\n Operation memory operation = intent.operations[index];\n DynamicCallOperation memory dynamicCallOperation = abi.decode(operation.data, (DynamicCallOperation));\n _validateDynamicCallOperation(dynamicCallOperation, proposal.datas[index], operation.user);\n\n outputs = new bytes[](dynamicCallOperation.calls.length);\n for (uint256 i = 0; i < dynamicCallOperation.calls.length; i++) {\n DynamicCall memory dynamicCall = abi.decode(dynamicCallOperation.calls[i], (DynamicCall));\n bytes memory data = IDynamicCallEncoder(dynamicCallEncoder).encode(dynamicCall, variables, index);\n // solhint-disable-next-line avoid-low-level-calls\n outputs[i] = smartAccountsHandler.call(operation.user, dynamicCall.target, data, dynamicCall.value);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(outputs));\n }\n\n /**\n * @dev Validates an intent and its corresponding proposal\n The off-chain validators are assuring that:\n - The trigger signer has authorization over the intent.feePayer and each operations[i].user\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n * @param simulated Whether the execution is a simulation\n */\n function _validateIntent(Intent memory intent, Proposal memory proposal, bytes memory signature, bool simulated)\n internal\n view\n {\n if (intent.settler != address(this)) revert SettlerInvalidSettler(intent.settler);\n if (intent.nonce == bytes32(0)) revert SettlerNonceZero();\n bytes32 intentHash = intent.hash();\n if (getIntentBlock[intentHash] != 0) revert SettlerIntentAlreadyExecuted(intentHash);\n\n if (intent.operations.length == 0) revert SettlerIntentOperationsEmpty();\n if (intent.operations.length != proposal.datas.length) revert SettlerProposalDataInvalidLength();\n\n if (operationsValidator != address(0)) {\n for (uint256 i = 0; i < intent.operations.length; i++) {\n Operation memory operation = intent.operations[i];\n bytes memory safeguard = _userSafeguard[operation.user];\n if (safeguard.length > 0) IOperationsValidator(operationsValidator).validate(operation, safeguard);\n }\n }\n\n bool shouldValidateDeadlines = _shouldValidateDeadlines(intent);\n if (shouldValidateDeadlines) {\n if (intent.deadline <= block.timestamp) revert SettlerIntentPastDeadline(intent.deadline, block.timestamp);\n bool isProposalPastDeadline = proposal.deadline <= block.timestamp;\n if (isProposalPastDeadline) revert SettlerProposalPastDeadline(proposal.deadline, block.timestamp);\n }\n\n if (intent.maxFees.length != proposal.fees.length) revert SettlerSolverFeeInvalidLength();\n for (uint256 i = 0; i < intent.maxFees.length; i++) {\n uint256 maxFee = intent.maxFees[i].amount;\n uint256 proposalFee = proposal.fees[i];\n if (proposalFee > maxFee) revert SettlerSolverFeeTooHigh(proposalFee, maxFee);\n }\n\n uint8 minValidations = IController(controller).minValidations();\n uint256 requiredValidations = intent.minValidations > minValidations ? intent.minValidations : minValidations;\n\n if (intent.validations.length < requiredValidations) {\n revert SettlerIntentValidationsNotEnough(requiredValidations, intent.validations.length);\n }\n\n address lastValidator = address(0);\n Validation memory validation = Validation(intentHash);\n bytes32 typedDataHash = _hashTypedDataV4(validation.hash());\n for (uint256 i = 0; i < intent.validations.length; i++) {\n address validator = ECDSA.recover(typedDataHash, intent.validations[i]);\n if (validator <= lastValidator) {\n revert SettlerValidatorDuplicatedOrUnsorted(lastValidator, validator);\n }\n lastValidator = validator;\n bool isValidatorNotAllowed = !IController(controller).isValidatorAllowed(validator);\n if (isValidatorNotAllowed) revert SettlerValidatorNotAllowed(validator);\n }\n\n address signer = ECDSA.recover(_hashTypedDataV4(proposal.hash(intent, _msgSender())), signature);\n bool isProposalSignerNotAllowed = !IController(controller).isProposalSignerAllowed(signer) && !simulated;\n if (isProposalSignerNotAllowed) revert SettlerProposalSignerNotAllowed(signer);\n }\n\n /**\n * @dev Validates a swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateSwapOperation(SwapOperation memory operation, SwapProposal memory proposal) internal view {\n if (proposal.amountsOut.length != operation.tokensOut.length) revert SettlerInvalidProposedAmounts();\n\n for (uint256 i = 0; i < operation.tokensOut.length; i++) {\n TokenOut memory tokenOut = operation.tokensOut[i];\n address recipient = tokenOut.recipient;\n if (recipient == address(this)) revert SettlerInvalidRecipient(recipient);\n\n uint256 minAmount = tokenOut.minAmount;\n uint256 proposedAmount = proposal.amountsOut[i];\n if (proposedAmount < minAmount) revert SettlerProposedAmountLtMinAmount(i, proposedAmount, minAmount);\n }\n }\n\n /**\n * @dev Validates a single-chain swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateSingleChainSwapOperation(SwapOperation memory operation, SwapProposal memory proposal)\n internal\n view\n {\n if (operation.sourceChain != operation.destinationChain) revert SettlerOperationChainsMismatch();\n if (operation.sourceChain != block.chainid) revert SettlerInvalidChain(block.chainid);\n _validateSwapOperation(operation, proposal);\n }\n\n /**\n * @dev Validates a transfer operation and its corresponding proposal\n * @param operation Transfer operation to be fulfilled\n * @param proposalData data of the proposal\n */\n function _validateTransferOperation(TransferOperation memory operation, bytes memory proposalData) internal view {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n for (uint256 i = 0; i < operation.transfers.length; i++) {\n address recipient = operation.transfers[i].recipient;\n if (recipient == address(this)) revert SettlerInvalidRecipient(recipient);\n }\n }\n\n /**\n * @dev Validates a call operation and its corresponding proposal\n * @param operation Call operation to be fulfilled\n * @param proposalData data of the proposal\n * @param user The originator of the operation\n */\n function _validateCallOperation(CallOperation memory operation, bytes memory proposalData, address user)\n internal\n view\n {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n if (!smartAccountsHandler.isSmartAccount(user)) revert SettlerUserNotSmartAccount(user);\n }\n\n /**\n * @dev Validates a dynamic call operation and its corresponding proposal\n * @param operation Dynamic call operation to be fulfilled\n * @param proposalData data of the proposal\n * @param user The originator of the operation\n */\n function _validateDynamicCallOperation(\n DynamicCallOperation memory operation,\n bytes memory proposalData,\n address user\n ) internal view {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n if (!smartAccountsHandler.isSmartAccount(user)) revert SettlerUserNotSmartAccount(user);\n }\n\n /**\n * @dev Validates a cross-chain swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateCrossChainSwapOperation(SwapOperation memory operation, SwapProposal memory proposal)\n internal\n view\n {\n if (operation.sourceChain == operation.destinationChain) revert SettlerOperationChainsMismatch();\n bool isChainInvalid = operation.sourceChain != block.chainid && operation.destinationChain != block.chainid;\n if (isChainInvalid) revert SettlerInvalidChain(block.chainid);\n _validateSwapOperation(operation, proposal);\n bool isExecutorInvalid = !IController(controller).isExecutorAllowed(proposal.executor);\n if (isExecutorInvalid) revert SettlerExecutorNotAllowed(proposal.executor);\n }\n\n /**\n * @dev Tells the contract balance for each token out of a swap operation\n * @param operation Swap operation containing the list of tokens out\n */\n function _getTokensOutBalance(SwapOperation memory operation) internal view returns (uint256[] memory balances) {\n balances = new uint256[](operation.tokensOut.length);\n if (operation.destinationChain == block.chainid) {\n for (uint256 i = 0; i < operation.tokensOut.length; i++) {\n balances[i] = ERC20Helpers.balanceOf(operation.tokensOut[i].token, address(this));\n }\n }\n }\n\n /**\n * @dev Tells if the intent and proposal deadlines should be validated\n In the case the intent is being executed on the destination chain of a cross-chain swap, the deadlines are ignored\n * @param intent Intent to be fulfilled\n */\n function _shouldValidateDeadlines(Intent memory intent) internal view returns (bool) {\n // Cross-chain operation can only be the first (and only) operation\n Operation memory operation = intent.operations[0];\n if (operation.opType != uint8(OpType.CrossChainSwap)) return true;\n SwapOperation memory swapIntent = abi.decode(operation.data, (SwapOperation));\n return swapIntent.sourceChain == block.chainid;\n }\n\n /**\n * @dev Emits operation custom events\n * @param operation Operation to emit the custom events for\n * @param proposal Proposal that fulfills the operation\n * @param intentHash Hash of the intent the operation belongs to\n * @param index Position of the operation on operations\n * @param output Encoded array of outputs\n */\n function _emitOperationEvents(\n Operation memory operation,\n Proposal memory proposal,\n bytes32 intentHash,\n uint256 index,\n bytes memory output\n ) internal {\n for (uint256 i = 0; i < operation.events.length; i++) {\n OperationEvent memory operationEvent = operation.events[i];\n emit OperationExecuted(\n operation.user,\n operationEvent.topic,\n uint8(operation.opType),\n operation,\n proposal,\n intentHash,\n index,\n output,\n operationEvent.data\n );\n }\n }\n\n /**\n * @dev Pays fees from the intent feePayer\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _payFees(Intent memory intent, Proposal memory proposal) internal {\n // A CrossChainSwap only pays fees on destination chain and must be the only operation\n if (intent.operations[0].opType == uint8(OpType.CrossChainSwap)) {\n SwapOperation memory swapOperation = abi.decode(intent.operations[0].data, (SwapOperation));\n if (swapOperation.sourceChain == block.chainid) return;\n }\n address from = intent.feePayer;\n address to = _msgSender();\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(from);\n for (uint256 i = 0; i < intent.maxFees.length; i++) {\n address token = intent.maxFees[i].token;\n if (!Denominations.isUSD(token)) _transferFrom(token, from, to, proposal.fees[i], isSmartAccount);\n }\n }\n\n /**\n * @dev Transfers tokens from one account to another\n * @param token Address of the token to transfer\n * @param from Address of the account sending the tokens\n * @param to Address of the account receiving the tokens\n * @param amount Amount of tokens to transfer\n * @param isSmartAccount Whether the sender is a smart account\n */\n function _transferFrom(address token, address from, address to, uint256 amount, bool isSmartAccount) internal {\n if (isSmartAccount) {\n smartAccountsHandler.transfer(from, token, to, amount);\n } else {\n IERC20(token).safeTransferFrom(from, to, amount);\n }\n }\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function _setSmartAccountsHandler(address newSmartAccountsHandler) internal {\n if (newSmartAccountsHandler == address(0)) revert SmartAccountsHandlerZero();\n smartAccountsHandler = newSmartAccountsHandler;\n emit SmartAccountsHandlerSet(newSmartAccountsHandler);\n }\n\n /**\n * @dev Sets the operations validator\n * @param newOperationsValidator New operations validator to be set\n */\n function _setOperationsValidator(address newOperationsValidator) internal {\n operationsValidator = newOperationsValidator;\n emit OperationsValidatorSet(newOperationsValidator);\n }\n\n /**\n * @dev Sets the dynamic call encoder\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function _setDynamicCallEncoder(address newDynamicCallEncoder) internal {\n if (newDynamicCallEncoder == address(0)) revert SettlerDynamicCallEncoderZero();\n dynamicCallEncoder = newDynamicCallEncoder;\n emit DynamicCallEncoderSet(newDynamicCallEncoder);\n }\n\n /**\n * @dev Sets a safeguard for a user\n * @param user Address of the user to set the safeguard for\n * @param safeguard Safeguard to be set\n */\n function _setSafeguard(address user, bytes memory safeguard) internal {\n delete _userSafeguard[user];\n _userSafeguard[user] = safeguard;\n emit SafeguardSet(user);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccount7702.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/Context.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccount.sol';\nimport '../utils/ERC20Helpers.sol';\nimport './SmartAccountBase.sol';\n\n/**\n * @title SmartAccount7702\n * @dev Provides the smart account logic to use with EIP7702\n */\ncontract SmartAccount7702 is SmartAccountBase {\n // Mimic settler reference\n // solhint-disable-next-line immutable-vars-naming\n address public immutable settler;\n\n /**\n * @dev The sender is not the settler\n */\n error SmartAccount7702SenderNotSettler();\n\n /**\n * @dev Reverts unless the sender is the settler\n */\n modifier onlySettler() {\n if (_msgSender() != settler) revert SmartAccount7702SenderNotSettler();\n _;\n }\n\n /**\n * @dev Creates a new SmartAccount7702 contract\n * @param _settler Address of the Mimic settler\n */\n constructor(address _settler) {\n settler = _settler;\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) public override onlySettler {\n super.transfer(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value) public override onlySettler returns (bytes memory) {\n // solhint-disable-next-line avoid-low-level-calls\n return super.call(target, data, value);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountBase.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/Context.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccount.sol';\nimport '../utils/ERC20Helpers.sol';\n\n/**\n * @title SmartAccountBase\n * @dev Provides the base logic for managing assets and executing arbitrary calls\n */\ncontract SmartAccountBase is ISmartAccount, Context, ERC165, ReentrancyGuard {\n /**\n * @dev Tells whether the contract supports the given interface ID. Overrides ERC165 to declare support for ISmartAccount interface.\n * @param interfaceId Interface ID is defined as the XOR of all function selectors in the interface\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {\n return interfaceId == type(ISmartAccount).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) public virtual override nonReentrant {\n ERC20Helpers.transfer(token, recipient, amount);\n emit Transferred(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value)\n public\n virtual\n override\n nonReentrant\n returns (bytes memory result)\n {\n result = Address.functionCallWithValue(target, data, value);\n emit Called(target, data, value, result);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountContract.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccountContract.sol';\nimport './SmartAccountBase.sol';\n\n/**\n * @title SmartAccountContract\n * @dev Provides the smart account logic to use as a standalone contract\n */\ncontract SmartAccountContract is ISmartAccountContract, Ownable, SmartAccountBase {\n // EIP1271 magic return value\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x1626ba7e;\n\n // EIP1271 invalid signature return value\n bytes4 internal constant EIP1271_INVALID_SIGNATURE = 0xffffffff;\n\n // List of account permissions\n mapping (address => bool) public isSignerAllowed;\n\n // Mimic settler reference\n address public settler;\n\n /**\n * @dev The settler is zero\n */\n error SmartAccountSettlerZero();\n\n /**\n * @dev The input arrays are not of equal length\n */\n error SmartAccountInputInvalidLength();\n\n /**\n * @dev The sender is not the owner or the settler\n */\n error SmartAccountUnauthorizedSender(address sender);\n\n /**\n * @dev Emitted every time the settler is set\n */\n event SettlerSet(address indexed settler);\n\n /**\n * @dev Emitted every time a signer allowance is set\n */\n event SignerAllowedSet(address indexed account, bool allowed);\n\n /**\n * @dev Reverts unless the sender is the owner or the settler\n */\n modifier onlyOwnerOrSettler() {\n address sender = _msgSender();\n bool isAuthorized = sender == owner() || sender == settler;\n if (!isAuthorized) revert SmartAccountUnauthorizedSender(sender);\n _;\n }\n\n /**\n * @dev Creates a new SmartAccount contract\n * @param _settler Address of the Mimic settler\n * @param _owner Address that will own the contract\n */\n constructor(address _settler, address _owner) Ownable(_owner) {\n _setSettler(_settler);\n }\n\n /**\n * @dev Tells whether the signature provided belongs to an allowed account.\n * @param hash Message signed by the account\n * @param signature Signature provided to be verified\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view override returns (bytes4) {\n (address signer, , ) = ECDSA.tryRecover(hash, signature);\n if (signer != address(0) && (signer == owner() || isSignerAllowed[signer])) return EIP1271_MAGIC_VALUE;\n return EIP1271_INVALID_SIGNATURE;\n }\n\n /**\n * @dev It allows receiving native token transfers\n */\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n /**\n * @dev Sets the settler. Sender must be the owner.\n * @param newSettler Address of the new settler to be set\n */\n function setSettler(address newSettler) external onlyOwner {\n _setSettler(newSettler);\n }\n\n /**\n * @dev Sets a list of allowed signers. Sender must be the owner.\n * @param accounts List of account addresses\n * @param allowances List of allowed condition per account\n */\n function setAllowedSigners(address[] memory accounts, bool[] memory allowances) external onlyOwner {\n if (accounts.length != allowances.length) revert SmartAccountInputInvalidLength();\n for (uint256 i = 0; i < accounts.length; i++) {\n address account = accounts[i];\n bool allowed = allowances[i];\n isSignerAllowed[account] = allowed;\n emit SignerAllowedSet(account, allowed);\n }\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the owner or the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount)\n public\n override(ISmartAccount, SmartAccountBase)\n onlyOwnerOrSettler\n {\n super.transfer(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the owner or the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value)\n public\n override(ISmartAccount, SmartAccountBase)\n onlyOwnerOrSettler\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n return super.call(target, data, value);\n }\n\n /**\n * @dev Sets the settler\n * @param newSettler Address of the new settler to be set\n */\n function _setSettler(address newSettler) internal {\n if (newSettler == address(0)) revert SmartAccountSettlerZero();\n settler = newSettler;\n emit SettlerSet(newSettler);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountsHandler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport '../interfaces/ISafe.sol';\nimport '../interfaces/ISmartAccount.sol';\nimport '../interfaces/ISmartAccountsHandler.sol';\nimport '../utils/Denominations.sol';\n\ncontract SmartAccountsHandler is ISmartAccountsHandler {\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address account) external view override returns (bool) {\n if (account.code.length == 0) return false;\n if (_isMimicSmartAccount(account)) return true;\n if (_isSafe(account)) return true;\n return false;\n }\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address account, address token, address to, uint256 amount) external override {\n if (_isMimicSmartAccount(account)) return ISmartAccount(account).transfer(token, to, amount);\n if (_isSafe(account)) return _transferSafe(account, token, to, amount);\n revert SmartAccountsHandlerUnsupportedAccount(account);\n }\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address account, address target, bytes memory data, uint256 value)\n external\n override\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n if (_isMimicSmartAccount(account)) return ISmartAccount(account).call(target, data, value);\n if (_isSafe(account)) return _callSafe(account, target, data, value);\n revert SmartAccountsHandlerUnsupportedAccount(account);\n }\n\n /**\n * @dev Performs a transfer from a safe\n */\n function _transferSafe(address account, address token, address to, uint256 amount) internal {\n Denominations.isNativeToken(token)\n ? _callSafe(account, to, new bytes(0), amount)\n : _callSafe(account, token, abi.encodeWithSelector(IERC20.transfer.selector, to, amount), 0);\n }\n\n /**\n * @dev Performs a call from a safe\n */\n function _callSafe(address account, address target, bytes memory data, uint256 value)\n internal\n returns (bytes memory)\n {\n (bool success, bytes memory result) = ISafe(account).execTransactionFromModuleReturnData(\n target,\n value,\n data,\n SafeOperation.Call\n );\n return\n data.length == 0\n ? Address.verifyCallResult(success, result)\n : Address.verifyCallResultFromTarget(target, success, result);\n }\n\n /**\n * @dev Tells whether an account is a Mimic smart account\n * @param account Address of the account being queried\n */\n function _isMimicSmartAccount(address account) internal view returns (bool) {\n try ISmartAccount(account).supportsInterface(type(ISmartAccount).interfaceId) returns (bool ok) {\n return ok;\n } catch {\n return false;\n }\n }\n\n /**\n * @dev Tells whether an account is a Gnosis Safe\n * @param account Address of the account being queried\n */\n function _isSafe(address account) internal view returns (bool) {\n try ISafe(account).getThreshold() returns (uint256) {\n return true;\n } catch {\n return false;\n }\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountsHandlerHelpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport '../interfaces/ISmartAccountsHandler.sol';\n\nlibrary SmartAccountsHandlerHelpers {\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address handler, address account) internal view returns (bool) {\n return ISmartAccountsHandler(handler).isSmartAccount(account);\n }\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address handler, address account, address token, address to, uint256 amount) internal {\n Address.functionDelegateCall(\n handler,\n abi.encodeWithSelector(ISmartAccountsHandler.transfer.selector, account, token, to, amount)\n );\n }\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address handler, address account, address target, bytes memory data, uint256 value)\n internal\n returns (bytes memory result)\n {\n result = Address.functionDelegateCall(\n handler,\n abi.encodeWithSelector(ISmartAccountsHandler.call.selector, account, target, data, value)\n );\n // Skip the ABI-encoded offset and length of the outer `bytes` to point at the inner payload\n assembly {\n result := add(result, 64)\n }\n }\n}\n" + }, + "project/contracts/test/CallMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\ncontract CallMock {\n event CallReceived(address indexed sender, uint256 value);\n error CallError();\n\n function call() external payable {\n emit CallReceived(msg.sender, msg.value);\n }\n\n function callError() external payable {\n revert CallError();\n }\n}\n" + }, + "project/contracts/test/dynamic-calls/StaticCallMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\ncontract StaticCallMock {\n struct StructMock {\n uint256 a;\n address b;\n }\n\n function returnUint(uint256 value) external pure returns (uint256) {\n return value;\n }\n\n function returnAddress(address value) external payable returns (address) {\n return value;\n }\n\n function returnArray(uint256[] calldata value) external pure returns (uint256[] memory) {\n return value;\n }\n\n function returnFixedArray(uint256[3] calldata value) external pure returns (uint256[3] memory) {\n return value;\n }\n\n function returnStruct(StructMock calldata value) external pure returns (StructMock memory) {\n return value;\n }\n}\n" + }, + "project/contracts/test/executors/EmptyExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\n\ncontract EmptyExecutorMock is IExecutor {\n event Executed();\n\n function execute(Operation memory, bytes32, bytes memory) external override {\n emit Executed();\n }\n}\n" + }, + "project/contracts/test/executors/MintExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../TokenMock.sol';\nimport '../../interfaces/IExecutor.sol';\n\n/* solhint-disable custom-errors */\n\ncontract MintExecutorMock is IExecutor {\n event Minted();\n\n function execute(Operation memory operation, bytes32, bytes memory proposalData) external override {\n require(\n operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap),\n 'Invalid operation type'\n );\n\n SwapProposal memory swapProposal = abi.decode(proposalData, (SwapProposal));\n (address[] memory tokens, uint256[] memory amounts) = abi.decode(swapProposal.data, (address[], uint256[]));\n\n require(tokens.length == amounts.length, 'Invalid inputs');\n\n for (uint256 i = 0; i < tokens.length; i++) {\n TokenMock(tokens[i]).mint(msg.sender, amounts[i]);\n emit Minted();\n }\n }\n}\n" + }, + "project/contracts/test/executors/ReentrantExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\nimport '../../interfaces/ISettler.sol';\n\ncontract ReentrantExecutorMock is IExecutor {\n // solhint-disable-next-line immutable-vars-naming\n address payable public immutable settler;\n\n constructor(address payable _settler) {\n settler = _settler;\n }\n\n function execute(Operation memory, bytes32, bytes memory) external override {\n Intent memory intent;\n Proposal memory proposal;\n ISettler(settler).execute(intent, proposal, new bytes(0));\n }\n}\n" + }, + "project/contracts/test/executors/TransferExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\nimport '../../utils/ERC20Helpers.sol';\n\n/* solhint-disable custom-errors */\n\ncontract TransferExecutorMock is IExecutor {\n event Transferred();\n\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n function execute(Operation memory operation, bytes32, bytes memory proposalData) external override {\n require(\n operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap),\n 'Invalid operation type'\n );\n\n SwapProposal memory swapProposal = abi.decode(proposalData, (SwapProposal));\n (address[] memory tokens, uint256[] memory amounts) = abi.decode(swapProposal.data, (address[], uint256[]));\n\n require(tokens.length == amounts.length, 'Invalid inputs');\n\n for (uint256 i = 0; i < tokens.length; i++) {\n ERC20Helpers.transfer(tokens[i], msg.sender, amounts[i]);\n emit Transferred();\n }\n }\n}\n" + }, + "project/contracts/test/SettlerV2Mock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../Settler.sol';\n\ncontract SettlerV2Mock is Settler {\n function someNewFunction() external pure returns (string memory) {\n return 'Some new function';\n }\n}\n" + }, + "project/contracts/test/smart-accounts/SafeMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/ISafe.sol';\n\ncontract SafeMock is ISafe {\n event ModuleTxExecuted(\n address indexed target,\n bytes data,\n uint256 value,\n SafeOperation operation,\n bool success,\n bytes result\n );\n\n receive() external payable {}\n\n function getThreshold() external pure returns (uint256) {\n return 1;\n }\n\n function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, SafeOperation operation)\n external\n returns (bool success, bytes memory result)\n {\n // solhint-disable-next-line avoid-low-level-calls\n (success, result) = to.call{ value: value }(data);\n emit ModuleTxExecuted(to, data, value, operation, success, result);\n }\n}\n" + }, + "project/contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../smart-accounts/SmartAccountsHandlerHelpers.sol';\n\ncontract SmartAccountsHandlerHelpersMock {\n using SmartAccountsHandlerHelpers for address;\n\n function call(address handler, address account, address target, bytes memory data, uint256 value)\n external\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n return handler.call(account, target, data, value);\n }\n}\n" + }, + "project/contracts/test/TokenMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\n\ncontract TokenMock is ERC20 {\n uint8 internal _decimals;\n\n constructor(string memory symbol, uint8 dec) ERC20(symbol, symbol) {\n _decimals = dec;\n }\n\n function mint(address account, uint256 amount) external {\n _mint(account, amount);\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n}\n" + }, + "project/contracts/test/utils/BytesHelpersMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.24;\n\nimport '../../utils/BytesHelpers.sol';\n\ncontract BytesHelpersMock {\n using BytesHelpers for bytes;\n\n function readWord0(bytes memory data) external pure returns (uint256) {\n return data.readWord0();\n }\n\n function readWord1(bytes memory data) external pure returns (uint256) {\n return data.readWord1();\n }\n\n function slice(bytes memory data, uint256 start, uint256 end) external pure returns (bytes memory) {\n return data.slice(start, end);\n }\n\n function sliceFrom(bytes memory data, uint256 start) external pure returns (bytes memory) {\n return data.sliceFrom(start);\n }\n}\n" + }, + "project/contracts/test/utils/DenominationsMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../../utils/Denominations.sol';\n\n// solhint-disable func-name-mixedcase\n\ncontract DenominationsMock {\n function NATIVE_TOKEN() external pure returns (address) {\n return Denominations.NATIVE_TOKEN;\n }\n\n function USD() external pure returns (address) {\n return Denominations.USD;\n }\n}\n" + }, + "project/contracts/test/utils/ERC20HelpersMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../../utils/ERC20Helpers.sol';\n\ncontract ERC20HelpersMock {\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n function approve(address token, address to, uint256 amount) external {\n ERC20Helpers.approve(token, to, amount);\n }\n\n function transfer(address token, address to, uint256 amount) external {\n ERC20Helpers.transfer(token, to, amount);\n }\n\n function balanceOf(address token, address account) external view returns (uint256) {\n return ERC20Helpers.balanceOf(token, account);\n }\n}\n" + }, + "project/contracts/utils/BytesHelpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.24;\n\n/**\n * @title BytesHelpers\n * @dev Collection of low-level helpers to operate on `bytes` values in memory.\n */\nlibrary BytesHelpers {\n /**\n * @dev Thrown when a slice operation exceeds the bounds of the input bytes\n */\n error BytesLibSliceOutOfBounds();\n\n /**\n * @dev Reads the first 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @return result First ABI word of `data`\n */\n function readWord0(bytes memory data) internal pure returns (uint256) {\n return readWord(data, 0);\n }\n\n /**\n * @dev Reads the second 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @return result Second ABI word of `data`\n */\n function readWord1(bytes memory data) internal pure returns (uint256) {\n return readWord(data, 1);\n }\n\n /**\n * @dev Reads the N-th 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @param index Word index to read (0-based)\n * @return result N-th ABI word of `data`\n */\n function readWord(bytes memory data, uint256 index) private pure returns (uint256 result) {\n assembly {\n result := mload(add(data, add(32, mul(index, 32))))\n }\n }\n\n /**\n * @dev Returns a slice of a bytes array from `start` (inclusive) to `end` (exclusive)\n * @param data Bytes array to slice\n * @param start Starting byte index (inclusive)\n * @param end Ending byte index (exclusive)\n */\n function slice(bytes memory data, uint256 start, uint256 end) internal pure returns (bytes memory out) {\n if (end < start) revert BytesLibSliceOutOfBounds();\n if (end > data.length) revert BytesLibSliceOutOfBounds();\n\n uint256 len = end - start;\n out = new bytes(len);\n\n assembly {\n let src := add(add(data, 32), start)\n let dst := add(out, 32)\n mcopy(dst, src, len)\n }\n }\n\n /**\n * @dev Returns a slice of a bytes array starting at `start` until the end\n * @param data Bytes array to slice\n * @param start Starting byte index (inclusive)\n */\n function sliceFrom(bytes memory data, uint256 start) internal pure returns (bytes memory out) {\n return slice(data, start, data.length);\n }\n}\n" + }, + "project/contracts/utils/Denominations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @title Denominations\n * @dev Provides a list of ground denominations for those tokens that cannot be represented by an ERC20.\n * For now, the only needed is the native token that could be ETH, MATIC, or other depending on the layer being operated.\n */\nlibrary Denominations {\n address internal constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n // Fiat currencies follow https://en.wikipedia.org/wiki/ISO_4217\n address internal constant USD = address(840);\n\n function isUSD(address token) internal pure returns (bool) {\n return token == USD;\n }\n\n function isNativeToken(address token) internal pure returns (bool) {\n return token == NATIVE_TOKEN;\n }\n}\n" + }, + "project/contracts/utils/ERC20Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport './Denominations.sol';\n\n/**\n * @title ERC20Helpers\n * @dev Provides a list of ERC20 helper methods\n */\nlibrary ERC20Helpers {\n function approve(address token, address to, uint256 amount) internal {\n SafeERC20.forceApprove(IERC20(token), to, amount);\n }\n\n function transfer(address token, address to, uint256 amount) internal {\n if (Denominations.isNativeToken(token)) Address.sendValue(payable(to), amount);\n else SafeERC20.safeTransfer(IERC20(token), to, amount);\n }\n\n function balanceOf(address token, address account) internal view returns (uint256) {\n if (Denominations.isNativeToken(token)) return address(account).balance;\n else return IERC20(token).balanceOf(address(account));\n }\n}\n" + }, + "project/contracts/utils/MimicHelper.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @title Mimic Helper\n * @dev Collection of helper functions for the Mimic Protocol\n */\ncontract MimicHelper {\n // Custom byte storage per user and key\n mapping (address => mapping (string => bytes)) internal _customStorage;\n\n /**\n * @dev Emitted every time the storage is set\n */\n event StorageSet(address indexed user, string indexed key, bytes indexed data);\n\n /**\n * @dev Tells the native token balance of an address\n * @param target Address to get native token balance\n */\n function getNativeTokenBalance(address target) external view returns (uint256) {\n return target.balance;\n }\n\n /**\n * @dev Tells the code of an address\n * @param target Address to get code\n */\n function getCode(address target) external view returns (bytes memory) {\n return target.code;\n }\n\n /**\n * @dev Tells the data set for the user and the key\n * @param user Address of the user being queried\n * @param key String of the key being queried\n */\n function getStorage(address user, string calldata key) external view returns (bytes memory) {\n return _customStorage[user][key];\n }\n\n /**\n * @dev Sets a data for the user and a key\n * @param key String of the key to set the data for\n * @param data Bytes to be set\n */\n function setStorage(string calldata key, bytes memory data) external {\n _customStorage[msg.sender][key] = data;\n emit StorageSet(msg.sender, key, data);\n }\n}\n" + } + } + } +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-146/deployed_addresses.json b/packages/evm/ignition/deployments/chain-146/deployed_addresses.json index f6f9d5f..9086ca7 100644 --- a/packages/evm/ignition/deployments/chain-146/deployed_addresses.json +++ b/packages/evm/ignition/deployments/chain-146/deployed_addresses.json @@ -10,5 +10,9 @@ "Create3Proxy#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", "Create3Proxy#Proxy": "0x8be430d29a2c5692f9345a28506b849C6a99eDaA", "Create3SmartAccount7702#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", - "Create3SmartAccount7702#SmartAccount7702": "0x14AE3C251881d2214E376bfa38dD98A4Bd33550c" + "Create3SmartAccount7702#SmartAccount7702": "0x14AE3C251881d2214E376bfa38dD98A4Bd33550c", + "Create3DynamicCallEncoderV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", + "Create3DynamicCallEncoderV1#DynamicCallEncoder": "0x183E61BDE23a80f4D1e003653288d4B4551681ed", + "Create3SettlerV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", + "Create3SettlerV1#Settler": "0x3734D7284f46037688252b13ef6d88E3FFDF5e1B" } \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-146/journal.jsonl b/packages/evm/ignition/deployments/chain-146/journal.jsonl index 180faea..4b4ceac 100644 --- a/packages/evm/ignition/deployments/chain-146/journal.jsonl +++ b/packages/evm/ignition/deployments/chain-146/journal.jsonl @@ -86,4 +86,22 @@ {"futureId":"Create3SmartAccount7702#ICreateX.deployCreate3","hash":"0x707c61ec333beba844d0ee60583a87548307be7668178deb03a88aa3e117c10b","networkInteractionId":1,"receipt":{"blockHash":"0x2c2fc058d0bf0875c4cf4272e0558021a885a56eb791843bbfc6f898bbf2f268","blockNumber":69234439,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":1,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x000000000000000000000000b800ea953426e361efda80da69765895ab3b04da","0x4d548e60a06ca5826dcab93682802743ae2369c7da6162da7a3f4201826a6d33"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":2,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x00000000000000000000000014ae3c251881d2214e376bfa38dd98a4bd33550c"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} {"futureId":"Create3SmartAccount7702#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} {"artifactId":"Create3SmartAccount7702#ICreateX","dependencies":["Create3SmartAccount7702#ICreateX.deployCreate3","Create3SmartAccount7702#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","strategy":"basic","strategyConfig":{},"txToReadFrom":"0x707c61ec333beba844d0ee60583a87548307be7668178deb03a88aa3e117c10b","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} -{"artifactId":"Create3SmartAccount7702#SmartAccount7702","contractAddress":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","contractName":"SmartAccount7702","dependencies":["Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SmartAccount7702#SmartAccount7702","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} \ No newline at end of file +{"artifactId":"Create3SmartAccount7702#SmartAccount7702","contractAddress":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","contractName":"SmartAccount7702","dependencies":["Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SmartAccount7702#SmartAccount7702","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3DynamicCallEncoderV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","contractName":"ICreateX","dependencies":[],"futureId":"Create3DynamicCallEncoderV1#ICreateX","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"args":["0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b000000000000000004302606","0x6080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033"],"artifactId":"Create3DynamicCallEncoderV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","dependencies":["Create3DynamicCallEncoderV1#ICreateX"],"from":"0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b","functionName":"deployCreate3","futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","strategy":"basic","strategyConfig":{},"type":"CALL_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000c586080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c00330000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":18,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":18,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"100000000001"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"1"}},"hash":"0x157b6d2c76c79686b06849d35958de5cabd085c46d68f256dbac16a036ae11c8"},"type":"TRANSACTION_SEND"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","hash":"0x157b6d2c76c79686b06849d35958de5cabd085c46d68f256dbac16a036ae11c8","networkInteractionId":1,"receipt":{"blockHash":"0x78b8d6541093e80fff199dfaeb52f26aa51ac8821d5b166ab39f93a48fef727c","blockNumber":69250591,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":0,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x0000000000000000000000001d9bd3390aaef5bbcf3beb4f60e0ee28805f6779","0xa13cc826172bbf7683ce89033f741800ae55529a93ee495908820a8471d913b0"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":1,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x000000000000000000000000183e61bde23a80f4d1e003653288d4b4551681ed"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} +{"artifactId":"Create3DynamicCallEncoderV1#ICreateX","dependencies":["Create3DynamicCallEncoderV1#ICreateX.deployCreate3","Create3DynamicCallEncoderV1#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3DynamicCallEncoderV1#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x183E61BDE23a80f4D1e003653288d4B4551681ed","strategy":"basic","strategyConfig":{},"txToReadFrom":"0x157b6d2c76c79686b06849d35958de5cabd085c46d68f256dbac16a036ae11c8","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","contractAddress":"0x183E61BDE23a80f4D1e003653288d4B4551681ed","contractName":"DynamicCallEncoder","dependencies":["Create3DynamicCallEncoderV1#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","contractName":"ICreateX","dependencies":[],"futureId":"Create3SettlerV1#ICreateX","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"args":["0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b000000000000000004302605","0x6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033"],"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","dependencies":["Create3SettlerV1#ICreateX"],"from":"0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b","functionName":"deployCreate3","futureId":"Create3SettlerV1#ICreateX.deployCreate3","strategy":"basic","strategyConfig":{},"type":"CALL_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000005d166080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c003300000000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":20,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":20,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"100000000001"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"1"}},"hash":"0x11f1d2c8d9f9b4ec0443042c203e21f6c3fbf57872bd6c1912b2ecbb7cc70fed"},"type":"TRANSACTION_SEND"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","hash":"0x11f1d2c8d9f9b4ec0443042c203e21f6c3fbf57872bd6c1912b2ecbb7cc70fed","networkInteractionId":1,"receipt":{"blockHash":"0x002329fded71131133d93c99cd6b87c5fb3cbb4e71eec694b358398420c8a33d","blockNumber":69250902,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":0,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x000000000000000000000000b5439ac30ce4daeb02b265d758436e65087047ab","0x660e7900ab9b67f261d92573714530e140aa4f3b2855e1dd677cfa672309b2ee"]},{"address":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","data":"0x000000000000000000000000000000000000000000000000ffffffffffffffff","logIndex":1,"topics":["0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":2,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x0000000000000000000000003734d7284f46037688252b13ef6d88e3ffdf5e1b"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} +{"artifactId":"Create3SettlerV1#ICreateX","dependencies":["Create3SettlerV1#ICreateX.deployCreate3","Create3SettlerV1#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3SettlerV1#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","strategy":"basic","strategyConfig":{},"txToReadFrom":"0x11f1d2c8d9f9b4ec0443042c203e21f6c3fbf57872bd6c1912b2ecbb7cc70fed","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3SettlerV1#Settler","contractAddress":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","contractName":"Settler","dependencies":["Create3SettlerV1#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SettlerV1#Settler","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-42161/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json b/packages/evm/ignition/deployments/chain-42161/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-42161/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-42161/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json b/packages/evm/ignition/deployments/chain-42161/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json new file mode 100644 index 0000000..aa424ed --- /dev/null +++ b/packages/evm/ignition/deployments/chain-42161/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json @@ -0,0 +1,117 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "DynamicCallEncoder", + "sourceName": "contracts/dynamic-calls/DynamicCallEncoder.sol", + "abi": [ + { + "inputs": [], + "name": "BytesLibSliceOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderBadLength", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderEmptyDynamic", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderInvalidArgKind", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariableOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariableRefBadLength", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariablesLengthOutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum DynamicArgKind", + "name": "kind", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "isDynamic", + "type": "bool" + } + ], + "internalType": "struct DynamicArg[]", + "name": "arguments", + "type": "tuple[]" + } + ], + "internalType": "struct DynamicCall", + "name": "dynamicCall", + "type": "tuple" + }, + { + "internalType": "bytes[][]", + "name": "variables", + "type": "bytes[][]" + }, + { + "internalType": "uint256", + "name": "variablesLength", + "type": "uint256" + } + ], + "name": "encode", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/dynamic-calls/DynamicCallEncoder.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-42161/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json b/packages/evm/ignition/deployments/chain-42161/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-42161/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-42161/artifacts/Create3DynamicCallEncoderV1#ICreateX.json b/packages/evm/ignition/deployments/chain-42161/artifacts/Create3DynamicCallEncoderV1#ICreateX.json new file mode 100644 index 0000000..837192d --- /dev/null +++ b/packages/evm/ignition/deployments/chain-42161/artifacts/Create3DynamicCallEncoderV1#ICreateX.json @@ -0,0 +1,51 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "ICreateX", + "sourceName": "contracts/interfaces/ICreateX.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "name": "ContractCreation", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + } + ], + "name": "deployCreate3", + "outputs": [ + { + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/interfaces/ICreateX.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-42161/artifacts/Create3SettlerV1#ICreateX.dbg.json b/packages/evm/ignition/deployments/chain-42161/artifacts/Create3SettlerV1#ICreateX.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-42161/artifacts/Create3SettlerV1#ICreateX.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-42161/artifacts/Create3SettlerV1#ICreateX.json b/packages/evm/ignition/deployments/chain-42161/artifacts/Create3SettlerV1#ICreateX.json new file mode 100644 index 0000000..837192d --- /dev/null +++ b/packages/evm/ignition/deployments/chain-42161/artifacts/Create3SettlerV1#ICreateX.json @@ -0,0 +1,51 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "ICreateX", + "sourceName": "contracts/interfaces/ICreateX.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "name": "ContractCreation", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + } + ], + "name": "deployCreate3", + "outputs": [ + { + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/interfaces/ICreateX.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-42161/artifacts/Create3SettlerV1#Settler.dbg.json b/packages/evm/ignition/deployments/chain-42161/artifacts/Create3SettlerV1#Settler.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-42161/artifacts/Create3SettlerV1#Settler.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-42161/artifacts/Create3SettlerV1#Settler.json b/packages/evm/ignition/deployments/chain-42161/artifacts/Create3SettlerV1#Settler.json new file mode 100644 index 0000000..cd9fdca --- /dev/null +++ b/packages/evm/ignition/deployments/chain-42161/artifacts/Create3SettlerV1#Settler.json @@ -0,0 +1,1481 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "Settler", + "sourceName": "contracts/Settler.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposed", + "type": "uint256" + } + ], + "name": "SettlerAmountOutLtProposed", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerCrossChainSwapMustBeOnlyOperation", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerDynamicCallEncoderZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "executor", + "type": "address" + } + ], + "name": "SettlerExecutorNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "SettlerIntentAlreadyExecuted", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerIntentOperationsEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SettlerIntentPastDeadline", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "current", + "type": "uint256" + } + ], + "name": "SettlerIntentValidationsNotEnough", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "name": "SettlerInvalidChain", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerInvalidProposedAmounts", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "SettlerInvalidRecipient", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "settler", + "type": "address" + } + ], + "name": "SettlerInvalidSettler", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerNonceZero", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerOperationChainsMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "post", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pre", + "type": "uint256" + } + ], + "name": "SettlerPostBalanceOutLtPre", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerProposalDataInvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerProposalDataNotEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SettlerProposalPastDeadline", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + } + ], + "name": "SettlerProposalSignerNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minAmount", + "type": "uint256" + } + ], + "name": "SettlerProposedAmountLtMinAmount", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerRescueFundsRecipientZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gasUsed", + "type": "uint256" + } + ], + "name": "SettlerSimulationSuccess", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerSolverFeeInvalidLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "SettlerSolverFeeTooHigh", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "solver", + "type": "address" + } + ], + "name": "SettlerSolverNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "lengthRequested", + "type": "uint256" + } + ], + "name": "SettlerTooManySafeguards", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + } + ], + "name": "SettlerUnknownOperationType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "SettlerUserNotSmartAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "previous", + "type": "address" + }, + { + "internalType": "address", + "name": "current", + "type": "address" + } + ], + "name": "SettlerValidatorDuplicatedOrUnsorted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "validator", + "type": "address" + } + ], + "name": "SettlerValidatorNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "SmartAccountsHandlerZero", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dynamicCallEncoder", + "type": "address" + } + ], + "name": "DynamicCallEncoderSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "FundsRescued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "indexed": false, + "internalType": "struct Operation", + "name": "operation", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "indexed": false, + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "intentHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "output", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "OperationExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operationsValidator", + "type": "address" + } + ], + "name": "OperationsValidatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "proposal", + "type": "bytes32" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "SafeguardSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "smartAccountsHandler", + "type": "address" + } + ], + "name": "SmartAccountsHandlerSet", + "type": "event" + }, + { + "inputs": [], + "name": "controller", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dynamicCallEncoder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "getIntentBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + } + ], + "name": "getIntentHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "internalType": "address", + "name": "solver", + "type": "address" + } + ], + "name": "getProposalHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getUserSafeguard", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controller", + "type": "address" + }, + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_dynamicCallEncoder", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "operationsValidator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "rescueFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newDynamicCallEncoder", + "type": "address" + } + ], + "name": "setDynamicCallEncoder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOperationsValidator", + "type": "address" + } + ], + "name": "setOperationsValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "safeguard", + "type": "bytes" + } + ], + "name": "setSafeguard", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newSmartAccountsHandler", + "type": "address" + } + ], + "name": "setSmartAccountsHandler", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "simulate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "smartAccountsHandler", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033", + "deployedBytecode": "0x60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/Settler.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-42161/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json b/packages/evm/ignition/deployments/chain-42161/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json new file mode 100644 index 0000000..dc33803 --- /dev/null +++ b/packages/evm/ignition/deployments/chain-42161/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json @@ -0,0 +1,373 @@ +{ + "_format": "hh3-sol-build-info-1", + "id": "167571dafa48e7ff636310c6c9f0fc8e202e44bc", + "solcVersion": "0.8.28", + "solcLongVersion": "0.8.28+commit.7893614a", + "userSourceNameMap": { + "contracts/Controller.sol": "project/contracts/Controller.sol", + "contracts/Intents.sol": "project/contracts/Intents.sol", + "contracts/Settler.sol": "project/contracts/Settler.sol", + "contracts/dynamic-calls/DynamicCallEncoder.sol": "project/contracts/dynamic-calls/DynamicCallEncoder.sol", + "contracts/dynamic-calls/DynamicCallTypes.sol": "project/contracts/dynamic-calls/DynamicCallTypes.sol", + "contracts/interfaces/IController.sol": "project/contracts/interfaces/IController.sol", + "contracts/interfaces/ICreateX.sol": "project/contracts/interfaces/ICreateX.sol", + "contracts/interfaces/IDynamicCallEncoder.sol": "project/contracts/interfaces/IDynamicCallEncoder.sol", + "contracts/interfaces/IExecutor.sol": "project/contracts/interfaces/IExecutor.sol", + "contracts/interfaces/IOperationsValidator.sol": "project/contracts/interfaces/IOperationsValidator.sol", + "contracts/interfaces/IPaymentsReceiver.sol": "project/contracts/interfaces/IPaymentsReceiver.sol", + "contracts/interfaces/ISafe.sol": "project/contracts/interfaces/ISafe.sol", + "contracts/interfaces/ISettler.sol": "project/contracts/interfaces/ISettler.sol", + "contracts/interfaces/ISmartAccount.sol": "project/contracts/interfaces/ISmartAccount.sol", + "contracts/interfaces/ISmartAccountContract.sol": "project/contracts/interfaces/ISmartAccountContract.sol", + "contracts/interfaces/ISmartAccountsHandler.sol": "project/contracts/interfaces/ISmartAccountsHandler.sol", + "contracts/payments/PaymentsReceiver.sol": "project/contracts/payments/PaymentsReceiver.sol", + "contracts/proxy/Proxy.sol": "project/contracts/proxy/Proxy.sol", + "contracts/safeguards/BaseOperationsValidator.sol": "project/contracts/safeguards/BaseOperationsValidator.sol", + "contracts/safeguards/CallOperationsValidator.sol": "project/contracts/safeguards/CallOperationsValidator.sol", + "contracts/safeguards/DynamicCallOperationsValidator.sol": "project/contracts/safeguards/DynamicCallOperationsValidator.sol", + "contracts/safeguards/OperationsValidator.sol": "project/contracts/safeguards/OperationsValidator.sol", + "contracts/safeguards/Safeguards.sol": "project/contracts/safeguards/Safeguards.sol", + "contracts/safeguards/SwapOperationsValidator.sol": "project/contracts/safeguards/SwapOperationsValidator.sol", + "contracts/safeguards/TransferOperationsValidator.sol": "project/contracts/safeguards/TransferOperationsValidator.sol", + "contracts/smart-accounts/SmartAccount7702.sol": "project/contracts/smart-accounts/SmartAccount7702.sol", + "contracts/smart-accounts/SmartAccountBase.sol": "project/contracts/smart-accounts/SmartAccountBase.sol", + "contracts/smart-accounts/SmartAccountContract.sol": "project/contracts/smart-accounts/SmartAccountContract.sol", + "contracts/smart-accounts/SmartAccountsHandler.sol": "project/contracts/smart-accounts/SmartAccountsHandler.sol", + "contracts/smart-accounts/SmartAccountsHandlerHelpers.sol": "project/contracts/smart-accounts/SmartAccountsHandlerHelpers.sol", + "contracts/test/CallMock.sol": "project/contracts/test/CallMock.sol", + "contracts/test/SettlerV2Mock.sol": "project/contracts/test/SettlerV2Mock.sol", + "contracts/test/TokenMock.sol": "project/contracts/test/TokenMock.sol", + "contracts/test/dynamic-calls/StaticCallMock.sol": "project/contracts/test/dynamic-calls/StaticCallMock.sol", + "contracts/test/executors/EmptyExecutorMock.sol": "project/contracts/test/executors/EmptyExecutorMock.sol", + "contracts/test/executors/MintExecutorMock.sol": "project/contracts/test/executors/MintExecutorMock.sol", + "contracts/test/executors/ReentrantExecutorMock.sol": "project/contracts/test/executors/ReentrantExecutorMock.sol", + "contracts/test/executors/TransferExecutorMock.sol": "project/contracts/test/executors/TransferExecutorMock.sol", + "contracts/test/smart-accounts/SafeMock.sol": "project/contracts/test/smart-accounts/SafeMock.sol", + "contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol": "project/contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol", + "contracts/test/utils/BytesHelpersMock.sol": "project/contracts/test/utils/BytesHelpersMock.sol", + "contracts/test/utils/DenominationsMock.sol": "project/contracts/test/utils/DenominationsMock.sol", + "contracts/test/utils/ERC20HelpersMock.sol": "project/contracts/test/utils/ERC20HelpersMock.sol", + "contracts/utils/BytesHelpers.sol": "project/contracts/utils/BytesHelpers.sol", + "contracts/utils/Denominations.sol": "project/contracts/utils/Denominations.sol", + "contracts/utils/ERC20Helpers.sol": "project/contracts/utils/ERC20Helpers.sol", + "contracts/utils/MimicHelper.sol": "project/contracts/utils/MimicHelper.sol", + "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol": "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/ProxyAdmin.sol" + }, + "input": { + "language": "Solidity", + "settings": { + "optimizer": { + "enabled": true, + "runs": 1000 + }, + "evmVersion": "cancun", + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "remappings": [ + "npm/@openzeppelin/contracts-upgradeable@5.3.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "npm/@openzeppelin/contracts-upgradeable@5.3.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/" + ] + }, + "sources": { + "npm/@openzeppelin/contracts-upgradeable@5.3.0/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\n struct OwnableStorage {\n address _owner;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Ownable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\n\n function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\n assembly {\n $.slot := OwnableStorageLocation\n }\n }\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n function __Ownable_init(address initialOwner) internal onlyInitializing {\n __Ownable_init_unchained(initialOwner);\n }\n\n function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n OwnableStorage storage $ = _getOwnableStorage();\n return $._owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n OwnableStorage storage $ = _getOwnableStorage();\n address oldOwner = $._owner;\n $._owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Storage of the initializable contract.\n *\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\n * when using with upgradeable contracts.\n *\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\n */\n struct InitializableStorage {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n uint64 _initialized;\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool _initializing;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Initializable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\n\n /**\n * @dev The contract is already initialized.\n */\n error InvalidInitialization();\n\n /**\n * @dev The contract is not initializing.\n */\n error NotInitializing();\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint64 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\n * production.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n // Cache values to avoid duplicated sloads\n bool isTopLevelCall = !$._initializing;\n uint64 initialized = $._initialized;\n\n // Allowed calls:\n // - initialSetup: the contract is not in the initializing state and no previous version was\n // initialized\n // - construction: the contract is initialized at version 1 (no reinitialization) and the\n // current contract is just being deployed\n bool initialSetup = initialized == 0 && isTopLevelCall;\n bool construction = initialized == 1 && address(this).code.length == 0;\n\n if (!initialSetup && !construction) {\n revert InvalidInitialization();\n }\n $._initialized = 1;\n if (isTopLevelCall) {\n $._initializing = true;\n }\n _;\n if (isTopLevelCall) {\n $._initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint64 version) {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing || $._initialized >= version) {\n revert InvalidInitialization();\n }\n $._initialized = version;\n $._initializing = true;\n _;\n $._initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n _checkInitializing();\n _;\n }\n\n /**\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\n */\n function _checkInitializing() internal view virtual {\n if (!_isInitializing()) {\n revert NotInitializing();\n }\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing) {\n revert InvalidInitialization();\n }\n if ($._initialized != type(uint64).max) {\n $._initialized = type(uint64).max;\n emit Initialized(type(uint64).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint64) {\n return _getInitializableStorage()._initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _getInitializableStorage()._initializing;\n }\n\n /**\n * @dev Pointer to storage slot. Allows integrators to override it with a custom storage location.\n *\n * NOTE: Consider following the ERC-7201 formula to derive storage locations.\n */\n function _initializableStorageSlot() internal pure virtual returns (bytes32) {\n return INITIALIZABLE_STORAGE;\n }\n\n /**\n * @dev Returns a pointer to the storage namespace.\n */\n // solhint-disable-next-line var-name-mixedcase\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\n bytes32 slot = _initializableStorageSlot();\n assembly {\n $.slot := slot\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/cryptography/EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.20;\n\nimport {MessageHashUtils} from \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\nimport {IERC5267} from \"@openzeppelin/contracts/interfaces/IERC5267.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose\n * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract\n * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to\n * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\n * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\n */\nabstract contract EIP712Upgradeable is Initializable, IERC5267 {\n bytes32 private constant TYPE_HASH =\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /// @custom:storage-location erc7201:openzeppelin.storage.EIP712\n struct EIP712Storage {\n /// @custom:oz-renamed-from _HASHED_NAME\n bytes32 _hashedName;\n /// @custom:oz-renamed-from _HASHED_VERSION\n bytes32 _hashedVersion;\n\n string _name;\n string _version;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.EIP712\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant EIP712StorageLocation = 0xa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100;\n\n function _getEIP712Storage() private pure returns (EIP712Storage storage $) {\n assembly {\n $.slot := EIP712StorageLocation\n }\n }\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n __EIP712_init_unchained(name, version);\n }\n\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n EIP712Storage storage $ = _getEIP712Storage();\n $._name = name;\n $._version = version;\n\n // Reset prior values in storage if upgrading\n $._hashedName = 0;\n $._hashedVersion = 0;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n return _buildDomainSeparator();\n }\n\n function _buildDomainSeparator() private view returns (bytes32) {\n return keccak256(abi.encode(TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n\n /**\n * @inheritdoc IERC5267\n */\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n EIP712Storage storage $ = _getEIP712Storage();\n // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized\n // and the EIP712 domain is not reliable, as it will be missing name and version.\n require($._hashedName == 0 && $._hashedVersion == 0, \"EIP712: Uninitialized\");\n\n return (\n hex\"0f\", // 01111\n _EIP712Name(),\n _EIP712Version(),\n block.chainid,\n address(this),\n bytes32(0),\n new uint256[](0)\n );\n }\n\n /**\n * @dev The name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712Name() internal view virtual returns (string memory) {\n EIP712Storage storage $ = _getEIP712Storage();\n return $._name;\n }\n\n /**\n * @dev The version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712Version() internal view virtual returns (string memory) {\n EIP712Storage storage $ = _getEIP712Storage();\n return $._version;\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead.\n */\n function _EIP712NameHash() internal view returns (bytes32) {\n EIP712Storage storage $ = _getEIP712Storage();\n string memory name = _EIP712Name();\n if (bytes(name).length > 0) {\n return keccak256(bytes(name));\n } else {\n // If the name is empty, the contract may have been upgraded without initializing the new storage.\n // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design.\n bytes32 hashedName = $._hashedName;\n if (hashedName != 0) {\n return hashedName;\n } else {\n return keccak256(\"\");\n }\n }\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead.\n */\n function _EIP712VersionHash() internal view returns (bytes32) {\n EIP712Storage storage $ = _getEIP712Storage();\n string memory version = _EIP712Version();\n if (bytes(version).length > 0) {\n return keccak256(bytes(version));\n } else {\n // If the version is empty, the contract may have been upgraded without initializing the new storage.\n // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design.\n bytes32 hashedVersion = $._hashedVersion;\n if (hashedVersion != 0) {\n return hashedVersion;\n } else {\n return keccak256(\"\");\n }\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/ReentrancyGuardUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\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 EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\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 ReentrancyGuardUpgradeable is Initializable {\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 /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard\n struct ReentrancyGuardStorage {\n uint256 _status;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.ReentrancyGuard\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;\n\n function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) {\n assembly {\n $.slot := ReentrancyGuardStorageLocation\n }\n }\n\n /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\n\n function __ReentrancyGuard_init() internal onlyInitializing {\n __ReentrancyGuard_init_unchained();\n }\n\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\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 ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n // On the first call to nonReentrant, _status will be NOT_ENTERED\n if ($._status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n $._status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\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 ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n return $._status == ENTERED;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC-20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC-721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC-1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n */\ninterface IERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with `hash`\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1363.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n /*\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n * 0xb0202a11 ===\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n */\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @param data Additional data with no specified format, sent in call to `spender`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1967.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1967.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n */\ninterface IERC1967 {\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Emitted when the beacon is changed.\n */\n event BeaconUpgraded(address indexed beacon);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC5267.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)\n\npragma solidity ^0.8.20;\n\ninterface IERC5267 {\n /**\n * @dev MAY be emitted to signal that the domain could have changed.\n */\n event EIP712DomainChanged();\n\n /**\n * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\n * signature.\n */\n function eip712Domain()\n external\n view\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n );\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {UpgradeableBeacon} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.22;\n\nimport {Proxy} from \"../Proxy.sol\";\nimport {ERC1967Utils} from \"./ERC1967Utils.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `implementation`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `implementation`. This will typically be an\n * encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\n *\n * Requirements:\n *\n * - If `data` is empty, `msg.value` must be zero.\n */\n constructor(address implementation, bytes memory _data) payable {\n ERC1967Utils.upgradeToAndCall(implementation, _data);\n }\n\n /**\n * @dev Returns the current implementation address.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using\n * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function _implementation() internal view virtual override returns (address) {\n return ERC1967Utils.getImplementation();\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/ERC1967/ERC1967Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Utils.sol)\n\npragma solidity ^0.8.22;\n\nimport {IBeacon} from \"../beacon/IBeacon.sol\";\nimport {IERC1967} from \"../../interfaces/IERC1967.sol\";\nimport {Address} from \"../../utils/Address.sol\";\nimport {StorageSlot} from \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This library provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] slots.\n */\nlibrary ERC1967Utils {\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev The `implementation` of the proxy is invalid.\n */\n error ERC1967InvalidImplementation(address implementation);\n\n /**\n * @dev The `admin` of the proxy is invalid.\n */\n error ERC1967InvalidAdmin(address admin);\n\n /**\n * @dev The `beacon` of the proxy is invalid.\n */\n error ERC1967InvalidBeacon(address beacon);\n\n /**\n * @dev An upgrade function sees `msg.value > 0` that may be lost.\n */\n error ERC1967NonPayable();\n\n /**\n * @dev Returns the current implementation address.\n */\n function getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the ERC-1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n if (newImplementation.code.length == 0) {\n revert ERC1967InvalidImplementation(newImplementation);\n }\n StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Performs implementation upgrade with additional setup call if data is nonempty.\n * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n * to avoid stuck value in the contract.\n *\n * Emits an {IERC1967-Upgraded} event.\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) internal {\n _setImplementation(newImplementation);\n emit IERC1967.Upgraded(newImplementation);\n\n if (data.length > 0) {\n Address.functionDelegateCall(newImplementation, data);\n } else {\n _checkNonPayable();\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Returns the current admin.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using\n * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the ERC-1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n if (newAdmin == address(0)) {\n revert ERC1967InvalidAdmin(address(0));\n }\n StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {IERC1967-AdminChanged} event.\n */\n function changeAdmin(address newAdmin) internal {\n emit IERC1967.AdminChanged(getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is the keccak-256 hash of \"eip1967.proxy.beacon\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Returns the current beacon.\n */\n function getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the ERC-1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n if (newBeacon.code.length == 0) {\n revert ERC1967InvalidBeacon(newBeacon);\n }\n\n StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;\n\n address beaconImplementation = IBeacon(newBeacon).implementation();\n if (beaconImplementation.code.length == 0) {\n revert ERC1967InvalidImplementation(beaconImplementation);\n }\n }\n\n /**\n * @dev Change the beacon and trigger a setup call if data is nonempty.\n * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n * to avoid stuck value in the contract.\n *\n * Emits an {IERC1967-BeaconUpgraded} event.\n *\n * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since\n * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for\n * efficiency.\n */\n function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {\n _setBeacon(newBeacon);\n emit IERC1967.BeaconUpgraded(newBeacon);\n\n if (data.length > 0) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n } else {\n _checkNonPayable();\n }\n }\n\n /**\n * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract\n * if an upgrade doesn't perform an initialization call.\n */\n function _checkNonPayable() private {\n if (msg.value > 0) {\n revert ERC1967NonPayable();\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback\n * function and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/ProxyAdmin.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/transparent/ProxyAdmin.sol)\n\npragma solidity ^0.8.22;\n\nimport {ITransparentUpgradeableProxy} from \"./TransparentUpgradeableProxy.sol\";\nimport {Ownable} from \"../../access/Ownable.sol\";\n\n/**\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\n */\ncontract ProxyAdmin is Ownable {\n /**\n * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgrade(address,address)`\n * and `upgradeAndCall(address,address,bytes)` are present, and `upgrade` must be used if no function should be called,\n * while `upgradeAndCall` will invoke the `receive` function if the third argument is the empty byte string.\n * If the getter returns `\"5.0.0\"`, only `upgradeAndCall(address,address,bytes)` is present, and the third argument must\n * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function\n * during an upgrade.\n */\n string public constant UPGRADE_INTERFACE_VERSION = \"5.0.0\";\n\n /**\n * @dev Sets the initial owner who can perform upgrades.\n */\n constructor(address initialOwner) Ownable(initialOwner) {}\n\n /**\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation.\n * See {TransparentUpgradeableProxy-_dispatchUpgradeToAndCall}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n * - If `data` is empty, `msg.value` must be zero.\n */\n function upgradeAndCall(\n ITransparentUpgradeableProxy proxy,\n address implementation,\n bytes memory data\n ) public payable virtual onlyOwner {\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/TransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.22;\n\nimport {ERC1967Utils} from \"../ERC1967/ERC1967Utils.sol\";\nimport {ERC1967Proxy} from \"../ERC1967/ERC1967Proxy.sol\";\nimport {IERC1967} from \"../../interfaces/IERC1967.sol\";\nimport {ProxyAdmin} from \"./ProxyAdmin.sol\";\n\n/**\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\n * does not implement this interface directly, and its upgradeability mechanism is implemented by an internal dispatch\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\n * include them in the ABI so this interface must be used to interact with it.\n */\ninterface ITransparentUpgradeableProxy is IERC1967 {\n /// @dev See {UUPSUpgradeable-upgradeToAndCall}\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable;\n}\n\n/**\n * @dev This contract implements a proxy that is upgradeable through an associated {ProxyAdmin} instance.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches the {ITransparentUpgradeableProxy-upgradeToAndCall} function exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can call the `upgradeToAndCall` function but any other call won't be forwarded to\n * the implementation. If the admin tries to call a function on the implementation it will fail with an error indicating\n * the proxy admin cannot fallback to the target implementation.\n *\n * These properties mean that the admin account can only be used for upgrading the proxy, so it's best if it's a\n * dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to\n * call a function from the proxy implementation. For this reason, the proxy deploys an instance of {ProxyAdmin} and\n * allows upgrades only if they come through it. You should think of the `ProxyAdmin` instance as the administrative\n * interface of the proxy, including the ability to change who can trigger upgrades by transferring ownership.\n *\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\n * inherit from that interface, and instead `upgradeToAndCall` is implicitly implemented using a custom dispatch\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\n * implementation.\n *\n * NOTE: This proxy does not inherit from {Context} deliberately. The {ProxyAdmin} of this contract won't send a\n * meta-transaction in any way, and any other meta-transaction setup should be made in the implementation contract.\n *\n * IMPORTANT: This contract avoids unnecessary storage reads by setting the admin only during construction as an\n * immutable variable, preventing any changes thereafter. However, the admin slot defined in ERC-1967 can still be\n * overwritten by the implementation logic pointed to by this proxy. In such cases, the contract may end up in an\n * undesirable state where the admin slot is different from the actual admin. Relying on the value of the admin slot\n * is generally fine if the implementation is trusted.\n *\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the\n * compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new\n * function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This\n * could render the `upgradeToAndCall` function inaccessible, preventing upgradeability and compromising transparency.\n */\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\n // An immutable address for the admin to avoid unnecessary SLOADs before each call\n // at the expense of removing the ability to change the admin once it's set.\n // This is acceptable if the admin is always a ProxyAdmin instance or similar contract\n // with its own ability to transfer the permissions to another account.\n address private immutable _admin;\n\n /**\n * @dev The proxy caller is the current admin, and can't fallback to the proxy target.\n */\n error ProxyDeniedAdminAccess();\n\n /**\n * @dev Initializes an upgradeable proxy managed by an instance of a {ProxyAdmin} with an `initialOwner`,\n * backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in\n * {ERC1967Proxy-constructor}.\n */\n constructor(address _logic, address initialOwner, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\n _admin = address(new ProxyAdmin(initialOwner));\n // Set the storage value and emit an event for ERC-1967 compatibility\n ERC1967Utils.changeAdmin(_proxyAdmin());\n }\n\n /**\n * @dev Returns the admin of this proxy.\n */\n function _proxyAdmin() internal view virtual returns (address) {\n return _admin;\n }\n\n /**\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior.\n */\n function _fallback() internal virtual override {\n if (msg.sender == _proxyAdmin()) {\n if (msg.sig != ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\n revert ProxyDeniedAdminAccess();\n } else {\n _dispatchUpgradeToAndCall();\n }\n } else {\n super._fallback();\n }\n }\n\n /**\n * @dev Upgrade the implementation of the proxy. See {ERC1967Utils-upgradeToAndCall}.\n *\n * Requirements:\n *\n * - If `data` is empty, `msg.value` must be zero.\n */\n function _dispatchUpgradeToAndCall() private {\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\n ERC1967Utils.upgradeToAndCall(newImplementation, data);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC-20\n * applications.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * Both values are immutable: they can only be set once during construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Skips emitting an {Approval} event indicating an allowance update. This is not\n * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n *\n * ```solidity\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner`'s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance < type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC-20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\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 value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens as the allowance of `spender` over the\n * 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 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` 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 value) external returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 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 /**\n * @dev An operation with an ERC-20 token failed.\n */\n error SafeERC20FailedOperation(address token);\n\n /**\n * @dev Indicates a failed `decreaseAllowance` request.\n */\n error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\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.encodeCall(token.transfer, (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.encodeCall(token.transferFrom, (from, to, value)));\n }\n\n /**\n * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\n }\n\n /**\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\n return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, 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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n forceApprove(token, spender, oldAllowance + value);\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n * value, non-reverting calls are assumed to be successful.\n *\n * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n unchecked {\n uint256 currentAllowance = token.allowance(address(this), spender);\n if (currentAllowance < requestedDecrease) {\n revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n }\n forceApprove(token, spender, currentAllowance - requestedDecrease);\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n * set here.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n safeTransfer(token, to, value);\n } else if (!token.transferAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferFromAndCallRelaxed(\n IERC1363 token,\n address from,\n address to,\n uint256 value,\n bytes memory data\n ) internal {\n if (to.code.length == 0) {\n safeTransferFrom(token, from, to, value);\n } else if (!token.transferFromAndCall(from, to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n * once without retrying, and relies on the returned value to be true.\n *\n * Reverts if the returned value is other than `true`.\n */\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n forceApprove(token, to, value);\n } else if (!token.approveAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n uint256 returnSize;\n uint256 returnValue;\n assembly (\"memory-safe\") {\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n // bubble errors\n if iszero(success) {\n let ptr := mload(0x40)\n returndatacopy(ptr, 0, returndatasize())\n revert(ptr, returndatasize())\n }\n returnSize := returndatasize()\n returnValue := mload(0)\n }\n\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\n revert SafeERC20FailedOperation(address(token));\n }\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 silently catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n bool success;\n uint256 returnSize;\n uint256 returnValue;\n assembly (\"memory-safe\") {\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n returnSize := returndatasize()\n returnValue := mload(0)\n }\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (utils/Address.sol)\n\npragma solidity ^0.8.20;\n\nimport {Errors} from \"./Errors.sol\";\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev There's no code at `target` (it is not a contract).\n */\n error AddressEmptyCode(address target);\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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n if (address(this).balance < amount) {\n revert Errors.InsufficientBalance(address(this).balance, amount);\n }\n\n (bool success, bytes memory returndata) = recipient.call{value: amount}(\"\");\n if (!success) {\n _revert(returndata);\n }\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 or custom error, it is bubbled\n * up by this function (like regular Solidity function calls). However, if\n * the call reverted with no returned reason, this function reverts with a\n * {Errors.FailedCall} error.\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 function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0);\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 function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n if (address(this).balance < value) {\n revert Errors.InsufficientBalance(address(this).balance, value);\n }\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\n * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case\n * of an unsuccessful call.\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata\n ) internal view returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n // only check if target is a contract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n if (returndata.length == 0 && target.code.length == 0) {\n revert AddressEmptyCode(target);\n }\n return returndata;\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\n * revert reason or with a default {Errors.FailedCall} error.\n */\n function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n return returndata;\n }\n }\n\n /**\n * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.\n */\n function _revert(bytes memory returndata) 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 assembly (\"memory-safe\") {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert Errors.FailedCall();\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS\n }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n */\n function tryRecover(\n bytes32 hash,\n bytes memory signature\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly (\"memory-safe\") {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32.\n */\n function toDataWithIntendedValidatorHash(\n address validator,\n bytes32 messageHash\n ) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, hex\"19_00\")\n mstore(0x02, shl(96, validator))\n mstore(0x16, messageHash)\n digest := keccak256(0x00, 0x36)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Errors.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Collection of common custom errors used in multiple contracts\n *\n * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.\n * It is recommended to avoid relying on the error API for critical functionality.\n *\n * _Available since v5.1._\n */\nlibrary Errors {\n /**\n * @dev The ETH balance of the account is not enough to perform the operation.\n */\n error InsufficientBalance(uint256 balance, uint256 needed);\n\n /**\n * @dev A call to an address target failed. The target may have reverted.\n */\n error FailedCall();\n\n /**\n * @dev The deployment failed.\n */\n error FailedDeployment();\n\n /**\n * @dev A necessary precompile is missing.\n */\n error MissingPrecompile(address);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Return the 512-bit addition of two uint256.\n *\n * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.\n */\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n assembly (\"memory-safe\") {\n low := add(a, b)\n high := lt(low, a)\n }\n }\n\n /**\n * @dev Return the 512-bit multiplication of two uint256.\n *\n * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.\n */\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = high * 2²⁵⁶ + low.\n assembly (\"memory-safe\") {\n let mm := mulmod(a, b, not(0))\n low := mul(a, b)\n high := sub(sub(mm, low), lt(mm, low))\n }\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a + b;\n success = c >= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a - b;\n success = c <= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a * b;\n assembly (\"memory-safe\") {\n // Only true when the multiplication doesn't overflow\n // (c / a == b) || (a == 0)\n success := or(eq(div(c, a), b), iszero(a))\n }\n // equivalent to: success ? c : 0\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `DIV` opcode returns zero when the denominator is 0.\n result := div(a, b)\n }\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `MOD` opcode returns zero when the denominator is 0.\n result := mod(a, b)\n }\n }\n }\n\n /**\n * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryAdd(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\n */\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\n (, uint256 result) = trySub(a, b);\n return result;\n }\n\n /**\n * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryMul(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\n }\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a > b, a, b);\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a < b, a, b);\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n\n // The following calculation ensures accurate ceiling division without overflow.\n // Since a is non-zero, (a - 1) / b will not overflow.\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n // but the largest value we can obtain is type(uint256).max - 1, which happens\n // when a = type(uint256).max and b = 1.\n unchecked {\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n }\n }\n\n /**\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n * denominator == 0.\n *\n * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n\n // Handle non-overflow cases, 256 by 256 division.\n if (high == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return low / denominator;\n }\n\n // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n if (denominator <= high) {\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n }\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [high low].\n uint256 remainder;\n assembly (\"memory-safe\") {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n high := sub(high, gt(remainder, low))\n low := sub(low, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\n assembly (\"memory-safe\") {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [high low] by twos.\n low := div(low, twos)\n\n // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from high into low.\n low |= high * twos;\n\n // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n // works in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n inverse *= 2 - denominator * inverse; // inverse mod 2³²\n inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high\n // is no longer required.\n result = low * inverse;\n return result;\n }\n }\n\n /**\n * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n }\n\n /**\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\n */\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n if (high >= 1 << n) {\n Panic.panic(Panic.UNDER_OVERFLOW);\n }\n return (high << (256 - n)) | (low >> n);\n }\n }\n\n /**\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\n */\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\n }\n\n /**\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n *\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n *\n * If the input value is not inversible, 0 is returned.\n *\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n */\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n unchecked {\n if (n == 0) return 0;\n\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n // ax + ny = 1\n // ax = 1 + (-y)n\n // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n // If the remainder is 0 the gcd is n right away.\n uint256 remainder = a % n;\n uint256 gcd = n;\n\n // Therefore the initial coefficients are:\n // ax + ny = gcd(a, n) = n\n // 0a + 1n = n\n int256 x = 0;\n int256 y = 1;\n\n while (remainder != 0) {\n uint256 quotient = gcd / remainder;\n\n (gcd, remainder) = (\n // The old remainder is the next gcd to try.\n remainder,\n // Compute the next remainder.\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n // where gcd is at most n (capped to type(uint256).max)\n gcd - remainder * quotient\n );\n\n (x, y) = (\n // Increment the coefficient of a.\n y,\n // Decrement the coefficient of n.\n // Can overflow, but the result is casted to uint256 so that the\n // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n x - y * int256(quotient)\n );\n }\n\n if (gcd != 1) return 0; // No inverse exists.\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n }\n }\n\n /**\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n *\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n *\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n */\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n unchecked {\n return Math.modExp(a, p - 2, p);\n }\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n *\n * Requirements:\n * - modulus can't be zero\n * - underlying staticcall to precompile must succeed\n *\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n * interpreted as 0.\n */\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n (bool success, uint256 result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n * to operate modulo 0 or if the underlying precompile reverted.\n *\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n * of a revert, but the result may be incorrectly interpreted as 0.\n */\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n if (m == 0) return (false, 0);\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n // | Offset | Content | Content (Hex) |\n // |-----------|------------|--------------------------------------------------------------------|\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n mstore(ptr, 0x20)\n mstore(add(ptr, 0x20), 0x20)\n mstore(add(ptr, 0x40), 0x20)\n mstore(add(ptr, 0x60), b)\n mstore(add(ptr, 0x80), e)\n mstore(add(ptr, 0xa0), m)\n\n // Given the result < m, it's guaranteed to fit in 32 bytes,\n // so we can use the memory scratch space located at offset 0.\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n result := mload(0x00)\n }\n }\n\n /**\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\n */\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n (bool success, bytes memory result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n */\n function tryModExp(\n bytes memory b,\n bytes memory e,\n bytes memory m\n ) internal view returns (bool success, bytes memory result) {\n if (_zeroBytes(m)) return (false, new bytes(0));\n\n uint256 mLen = m.length;\n\n // Encode call args in result and move the free memory pointer\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n assembly (\"memory-safe\") {\n let dataPtr := add(result, 0x20)\n // Write result on top of args to avoid allocating extra memory.\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n // Overwrite the length.\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n mstore(result, mLen)\n // Set the memory pointer after the returned data.\n mstore(0x40, add(dataPtr, mLen))\n }\n }\n\n /**\n * @dev Returns whether the provided byte array is zero.\n */\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\n for (uint256 i = 0; i < byteArray.length; ++i) {\n if (byteArray[i] != 0) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n * towards zero.\n *\n * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n * using integer operations.\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n unchecked {\n // Take care of easy edge cases when a == 0 or a == 1\n if (a <= 1) {\n return a;\n }\n\n // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n // the current value as `ε_n = | x_n - sqrt(a) |`.\n //\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n // bigger than any uint256.\n //\n // By noticing that\n // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n // to the msb function.\n uint256 aa = a;\n uint256 xn = 1;\n\n if (aa >= (1 << 128)) {\n aa >>= 128;\n xn <<= 64;\n }\n if (aa >= (1 << 64)) {\n aa >>= 64;\n xn <<= 32;\n }\n if (aa >= (1 << 32)) {\n aa >>= 32;\n xn <<= 16;\n }\n if (aa >= (1 << 16)) {\n aa >>= 16;\n xn <<= 8;\n }\n if (aa >= (1 << 8)) {\n aa >>= 8;\n xn <<= 4;\n }\n if (aa >= (1 << 4)) {\n aa >>= 4;\n xn <<= 2;\n }\n if (aa >= (1 << 2)) {\n xn <<= 1;\n }\n\n // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n //\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n // This is going to be our x_0 (and ε_0)\n xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n // From here, Newton's method give us:\n // x_{n+1} = (x_n + a / x_n) / 2\n //\n // One should note that:\n // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n // = ((x_n² + a) / (2 * x_n))² - a\n // = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n // = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n // = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n // = (x_n² - a)² / (2 * x_n)²\n // = ((x_n² - a) / (2 * x_n))²\n // ≥ 0\n // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n //\n // This gives us the proof of quadratic convergence of the sequence:\n // ε_{n+1} = | x_{n+1} - sqrt(a) |\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\n // = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n // = | (x_n - sqrt(a))² / (2 * x_n) |\n // = | ε_n² / (2 * x_n) |\n // = ε_n² / | (2 * x_n) |\n //\n // For the first iteration, we have a special case where x_0 is known:\n // ε_1 = ε_0² / | (2 * x_0) |\n // ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n // ≤ 2**(2*e-4) / (3 * 2**(e-1))\n // ≤ 2**(e-3) / 3\n // ≤ 2**(e-3-log2(3))\n // ≤ 2**(e-4.5)\n //\n // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n // ε_{n+1} = ε_n² / | (2 * x_n) |\n // ≤ (2**(e-k))² / (2 * 2**(e-1))\n // ≤ 2**(2*e-2*k) / 2**e\n // ≤ 2**(e-2*k)\n xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5) -- special case, see above\n xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9) -- general case with k = 4.5\n xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18) -- general case with k = 9\n xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36) -- general case with k = 18\n xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72) -- general case with k = 36\n xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144) -- general case with k = 72\n\n // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n // sqrt(a) or sqrt(a) + 1.\n return xn - SafeCast.toUint(xn > a / xn);\n }\n }\n\n /**\n * @dev Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log2(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // If upper 8 bits of 16-bit half set, add 8 to result\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\n // If upper 4 bits of 8-bit half set, add 4 to result\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\n\n // Shifts value right by the current result and use it as an index into this lookup table:\n //\n // | x (4 bits) | index | table[index] = MSB position |\n // |------------|---------|-----------------------------|\n // | 0000 | 0 | table[0] = 0 |\n // | 0001 | 1 | table[1] = 0 |\n // | 0010 | 2 | table[2] = 1 |\n // | 0011 | 3 | table[3] = 1 |\n // | 0100 | 4 | table[4] = 2 |\n // | 0101 | 5 | table[5] = 2 |\n // | 0110 | 6 | table[6] = 2 |\n // | 0111 | 7 | table[7] = 2 |\n // | 1000 | 8 | table[8] = 3 |\n // | 1001 | 9 | table[9] = 3 |\n // | 1010 | 10 | table[10] = 3 |\n // | 1011 | 11 | table[11] = 3 |\n // | 1100 | 12 | table[12] = 3 |\n // | 1101 | 13 | table[13] = 3 |\n // | 1110 | 14 | table[14] = 3 |\n // | 1111 | 15 | table[15] = 3 |\n //\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\n assembly (\"memory-safe\") {\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\n }\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/SafeCast.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool 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 */\nlibrary SafeCast {\n /**\n * @dev Value doesn't fit in an uint of `bits` size.\n */\n error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n /**\n * @dev An int value doesn't fit in an uint of `bits` size.\n */\n error SafeCastOverflowedIntToUint(int256 value);\n\n /**\n * @dev Value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n /**\n * @dev An uint value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedUintToInt(uint256 value);\n\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 function toUint248(uint256 value) internal pure returns (uint248) {\n if (value > type(uint248).max) {\n revert SafeCastOverflowedUintDowncast(248, value);\n }\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 function toUint240(uint256 value) internal pure returns (uint240) {\n if (value > type(uint240).max) {\n revert SafeCastOverflowedUintDowncast(240, value);\n }\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 function toUint232(uint256 value) internal pure returns (uint232) {\n if (value > type(uint232).max) {\n revert SafeCastOverflowedUintDowncast(232, value);\n }\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 function toUint224(uint256 value) internal pure returns (uint224) {\n if (value > type(uint224).max) {\n revert SafeCastOverflowedUintDowncast(224, value);\n }\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 function toUint216(uint256 value) internal pure returns (uint216) {\n if (value > type(uint216).max) {\n revert SafeCastOverflowedUintDowncast(216, value);\n }\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 function toUint208(uint256 value) internal pure returns (uint208) {\n if (value > type(uint208).max) {\n revert SafeCastOverflowedUintDowncast(208, value);\n }\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 function toUint200(uint256 value) internal pure returns (uint200) {\n if (value > type(uint200).max) {\n revert SafeCastOverflowedUintDowncast(200, value);\n }\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 function toUint192(uint256 value) internal pure returns (uint192) {\n if (value > type(uint192).max) {\n revert SafeCastOverflowedUintDowncast(192, value);\n }\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 function toUint184(uint256 value) internal pure returns (uint184) {\n if (value > type(uint184).max) {\n revert SafeCastOverflowedUintDowncast(184, value);\n }\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 function toUint176(uint256 value) internal pure returns (uint176) {\n if (value > type(uint176).max) {\n revert SafeCastOverflowedUintDowncast(176, value);\n }\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 function toUint168(uint256 value) internal pure returns (uint168) {\n if (value > type(uint168).max) {\n revert SafeCastOverflowedUintDowncast(168, value);\n }\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 function toUint160(uint256 value) internal pure returns (uint160) {\n if (value > type(uint160).max) {\n revert SafeCastOverflowedUintDowncast(160, value);\n }\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 function toUint152(uint256 value) internal pure returns (uint152) {\n if (value > type(uint152).max) {\n revert SafeCastOverflowedUintDowncast(152, value);\n }\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 function toUint144(uint256 value) internal pure returns (uint144) {\n if (value > type(uint144).max) {\n revert SafeCastOverflowedUintDowncast(144, value);\n }\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 function toUint136(uint256 value) internal pure returns (uint136) {\n if (value > type(uint136).max) {\n revert SafeCastOverflowedUintDowncast(136, value);\n }\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 function toUint128(uint256 value) internal pure returns (uint128) {\n if (value > type(uint128).max) {\n revert SafeCastOverflowedUintDowncast(128, value);\n }\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 function toUint120(uint256 value) internal pure returns (uint120) {\n if (value > type(uint120).max) {\n revert SafeCastOverflowedUintDowncast(120, value);\n }\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 function toUint112(uint256 value) internal pure returns (uint112) {\n if (value > type(uint112).max) {\n revert SafeCastOverflowedUintDowncast(112, value);\n }\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 function toUint104(uint256 value) internal pure returns (uint104) {\n if (value > type(uint104).max) {\n revert SafeCastOverflowedUintDowncast(104, value);\n }\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 function toUint96(uint256 value) internal pure returns (uint96) {\n if (value > type(uint96).max) {\n revert SafeCastOverflowedUintDowncast(96, value);\n }\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 function toUint88(uint256 value) internal pure returns (uint88) {\n if (value > type(uint88).max) {\n revert SafeCastOverflowedUintDowncast(88, value);\n }\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 function toUint80(uint256 value) internal pure returns (uint80) {\n if (value > type(uint80).max) {\n revert SafeCastOverflowedUintDowncast(80, value);\n }\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 function toUint72(uint256 value) internal pure returns (uint72) {\n if (value > type(uint72).max) {\n revert SafeCastOverflowedUintDowncast(72, value);\n }\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 function toUint64(uint256 value) internal pure returns (uint64) {\n if (value > type(uint64).max) {\n revert SafeCastOverflowedUintDowncast(64, value);\n }\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 function toUint56(uint256 value) internal pure returns (uint56) {\n if (value > type(uint56).max) {\n revert SafeCastOverflowedUintDowncast(56, value);\n }\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 function toUint48(uint256 value) internal pure returns (uint48) {\n if (value > type(uint48).max) {\n revert SafeCastOverflowedUintDowncast(48, value);\n }\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 function toUint40(uint256 value) internal pure returns (uint40) {\n if (value > type(uint40).max) {\n revert SafeCastOverflowedUintDowncast(40, value);\n }\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 function toUint32(uint256 value) internal pure returns (uint32) {\n if (value > type(uint32).max) {\n revert SafeCastOverflowedUintDowncast(32, value);\n }\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 function toUint24(uint256 value) internal pure returns (uint24) {\n if (value > type(uint24).max) {\n revert SafeCastOverflowedUintDowncast(24, value);\n }\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 function toUint16(uint256 value) internal pure returns (uint16) {\n if (value > type(uint16).max) {\n revert SafeCastOverflowedUintDowncast(16, value);\n }\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 function toUint8(uint256 value) internal pure returns (uint8) {\n if (value > type(uint8).max) {\n revert SafeCastOverflowedUintDowncast(8, value);\n }\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 function toUint256(int256 value) internal pure returns (uint256) {\n if (value < 0) {\n revert SafeCastOverflowedIntToUint(value);\n }\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 function toInt248(int256 value) internal pure returns (int248 downcasted) {\n downcasted = int248(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(248, value);\n }\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 function toInt240(int256 value) internal pure returns (int240 downcasted) {\n downcasted = int240(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(240, value);\n }\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 function toInt232(int256 value) internal pure returns (int232 downcasted) {\n downcasted = int232(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(232, value);\n }\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 function toInt224(int256 value) internal pure returns (int224 downcasted) {\n downcasted = int224(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(224, value);\n }\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 function toInt216(int256 value) internal pure returns (int216 downcasted) {\n downcasted = int216(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(216, value);\n }\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 function toInt208(int256 value) internal pure returns (int208 downcasted) {\n downcasted = int208(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(208, value);\n }\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 function toInt200(int256 value) internal pure returns (int200 downcasted) {\n downcasted = int200(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(200, value);\n }\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 function toInt192(int256 value) internal pure returns (int192 downcasted) {\n downcasted = int192(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(192, value);\n }\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 function toInt184(int256 value) internal pure returns (int184 downcasted) {\n downcasted = int184(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(184, value);\n }\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 function toInt176(int256 value) internal pure returns (int176 downcasted) {\n downcasted = int176(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(176, value);\n }\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 function toInt168(int256 value) internal pure returns (int168 downcasted) {\n downcasted = int168(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(168, value);\n }\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 function toInt160(int256 value) internal pure returns (int160 downcasted) {\n downcasted = int160(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(160, value);\n }\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 function toInt152(int256 value) internal pure returns (int152 downcasted) {\n downcasted = int152(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(152, value);\n }\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 function toInt144(int256 value) internal pure returns (int144 downcasted) {\n downcasted = int144(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(144, value);\n }\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 function toInt136(int256 value) internal pure returns (int136 downcasted) {\n downcasted = int136(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(136, value);\n }\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 function toInt128(int256 value) internal pure returns (int128 downcasted) {\n downcasted = int128(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(128, value);\n }\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 function toInt120(int256 value) internal pure returns (int120 downcasted) {\n downcasted = int120(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(120, value);\n }\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 function toInt112(int256 value) internal pure returns (int112 downcasted) {\n downcasted = int112(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(112, value);\n }\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 function toInt104(int256 value) internal pure returns (int104 downcasted) {\n downcasted = int104(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(104, value);\n }\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 function toInt96(int256 value) internal pure returns (int96 downcasted) {\n downcasted = int96(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(96, value);\n }\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 function toInt88(int256 value) internal pure returns (int88 downcasted) {\n downcasted = int88(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(88, value);\n }\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 function toInt80(int256 value) internal pure returns (int80 downcasted) {\n downcasted = int80(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(80, value);\n }\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 function toInt72(int256 value) internal pure returns (int72 downcasted) {\n downcasted = int72(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(72, value);\n }\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 function toInt64(int256 value) internal pure returns (int64 downcasted) {\n downcasted = int64(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(64, value);\n }\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 function toInt56(int256 value) internal pure returns (int56 downcasted) {\n downcasted = int56(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(56, value);\n }\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 function toInt48(int256 value) internal pure returns (int48 downcasted) {\n downcasted = int48(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(48, value);\n }\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 function toInt40(int256 value) internal pure returns (int40 downcasted) {\n downcasted = int40(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(40, value);\n }\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 function toInt32(int256 value) internal pure returns (int32 downcasted) {\n downcasted = int32(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(32, value);\n }\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 function toInt24(int256 value) internal pure returns (int24 downcasted) {\n downcasted = int24(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(24, value);\n }\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 function toInt16(int256 value) internal pure returns (int16 downcasted) {\n downcasted = int16(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(16, value);\n }\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 function toInt8(int256 value) internal pure returns (int8 downcasted) {\n downcasted = int8(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(8, value);\n }\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 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 if (value > uint256(type(int256).max)) {\n revert SafeCastOverflowedUintToInt(value);\n }\n return int256(value);\n }\n\n /**\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n */\n function toUint(bool b) internal pure returns (uint256 u) {\n assembly (\"memory-safe\") {\n u := iszero(iszero(b))\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));\n }\n }\n\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return ternary(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 ternary(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 // Formula from the \"Bit Twiddling Hacks\" by Sean Eron Anderson.\n // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift,\n // taking advantage of the most significant (or \"sign\" bit) in two's complement representation.\n // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result,\n // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative).\n int256 mask = n >> 255;\n\n // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.\n return uint256((n + mask) ^ mask);\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Panic.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n * using Panic for uint256;\n *\n * // Use any of the declared internal constants\n * function foo() { Panic.GENERIC.panic(); }\n *\n * // Alternatively\n * function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n /// @dev generic / unspecified error\n uint256 internal constant GENERIC = 0x00;\n /// @dev used by the assert() builtin\n uint256 internal constant ASSERT = 0x01;\n /// @dev arithmetic underflow or overflow\n uint256 internal constant UNDER_OVERFLOW = 0x11;\n /// @dev division or modulo by zero\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\n /// @dev enum conversion error\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n /// @dev invalid encoding in storage\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n /// @dev empty array pop\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n /// @dev array out of bounds access\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n /// @dev resource error (too large allocation or too large array)\n uint256 internal constant RESOURCE_ERROR = 0x41;\n /// @dev calling invalid internal function\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n /// @dev Reverts with a panic code. Recommended to use with\n /// the internal constants with predefined codes.\n function panic(uint256 code) internal pure {\n assembly (\"memory-safe\") {\n mstore(0x00, 0x4e487b71)\n mstore(0x20, code)\n revert(0x1c, 0x24)\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\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" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC-1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n * // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(newImplementation.code.length > 0);\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * TIP: Consider using this library along with {SlotDerivation}.\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n struct Int256Slot {\n int256 value;\n }\n\n struct StringSlot {\n string value;\n }\n\n struct BytesSlot {\n bytes value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Int256Slot` with member `value` located at `slot`.\n */\n function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `StringSlot` with member `value` located at `slot`.\n */\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n */\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n\n /**\n * @dev Returns a `BytesSlot` with member `value` located at `slot`.\n */\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n */\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SafeCast} from \"./math/SafeCast.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n using SafeCast for *;\n\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n uint256 private constant SPECIAL_CHARS_LOOKUP =\n (1 << 0x08) | // backspace\n (1 << 0x09) | // tab\n (1 << 0x0a) | // newline\n (1 << 0x0c) | // form feed\n (1 << 0x0d) | // carriage return\n (1 << 0x22) | // double quote\n (1 << 0x5c); // backslash\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n /**\n * @dev The string being parsed contains characters that are not in scope of the given base.\n */\n error StringsInvalidChar();\n\n /**\n * @dev The string being parsed is not a properly formatted address.\n */\n error StringsInvalidAddressFormat();\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n assembly (\"memory-safe\") {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n assembly (\"memory-safe\") {\n mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n uint256 localValue = value;\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n * representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal\n * representation, according to EIP-55.\n */\n function toChecksumHexString(address addr) internal pure returns (string memory) {\n bytes memory buffer = bytes(toHexString(addr));\n\n // hash the hex part of buffer (skip length + 2 bytes, length 40)\n uint256 hashValue;\n assembly (\"memory-safe\") {\n hashValue := shr(96, keccak256(add(buffer, 0x22), 40))\n }\n\n for (uint256 i = 41; i > 1; --i) {\n // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f)\n if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) {\n // case shift by xoring with 0x20\n buffer[i] ^= 0x20;\n }\n hashValue >>= 4;\n }\n return string(buffer);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input) internal pure returns (uint256) {\n return parseUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n uint256 result = 0;\n for (uint256 i = begin; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 9) return (false, 0);\n result *= 10;\n result += chr;\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `int256`.\n *\n * Requirements:\n * - The string must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input) internal pure returns (int256) {\n return parseInt(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) {\n (bool success, int256 value) = tryParseInt(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if\n * the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(string memory input) internal pure returns (bool success, int256 value) {\n return _tryParseIntUncheckedBounds(input, 0, bytes(input).length);\n }\n\n uint256 private constant ABS_MIN_INT256 = 2 ** 255;\n\n /**\n * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character or if the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, int256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseIntUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseIntUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, int256 value) {\n bytes memory buffer = bytes(input);\n\n // Check presence of a negative sign.\n bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n bool positiveSign = sign == bytes1(\"+\");\n bool negativeSign = sign == bytes1(\"-\");\n uint256 offset = (positiveSign || negativeSign).toUint();\n\n (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end);\n\n if (absSuccess && absValue < ABS_MIN_INT256) {\n return (true, negativeSign ? -int256(absValue) : int256(absValue));\n } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) {\n return (true, type(int256).min);\n } else return (false, 0);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input) internal pure returns (uint256) {\n return parseHexUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseHexUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an\n * invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseHexUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseHexUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n // skip 0x prefix if present\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 offset = hasPrefix.toUint() * 2;\n\n uint256 result = 0;\n for (uint256 i = begin + offset; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 15) return (false, 0);\n result *= 16;\n unchecked {\n // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check).\n // This guarantees that adding a value < 16 will not cause an overflow, hence the unchecked.\n result += chr;\n }\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as an `address`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input) internal pure returns (address) {\n return parseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) {\n (bool success, address value) = tryParseAddress(input, begin, end);\n if (!success) revert StringsInvalidAddressFormat();\n return value;\n }\n\n /**\n * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly\n * formatted address. See {parseAddress-string} requirements.\n */\n function tryParseAddress(string memory input) internal pure returns (bool success, address value) {\n return tryParseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly\n * formatted address. See {parseAddress-string-uint256-uint256} requirements.\n */\n function tryParseAddress(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, address value) {\n if (end > bytes(input).length || begin > end) return (false, address(0));\n\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 expectedLength = 40 + hasPrefix.toUint() * 2;\n\n // check that input is the correct length\n if (end - begin == expectedLength) {\n // length guarantees that this does not overflow, and value is at most type(uint160).max\n (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end);\n return (s, address(uint160(v)));\n } else {\n return (false, address(0));\n }\n }\n\n function _tryParseChr(bytes1 chr) private pure returns (uint8) {\n uint8 value = uint8(chr);\n\n // Try to parse `chr`:\n // - Case 1: [0-9]\n // - Case 2: [a-f]\n // - Case 3: [A-F]\n // - otherwise not supported\n unchecked {\n if (value > 47 && value < 58) value -= 48;\n else if (value > 96 && value < 103) value -= 87;\n else if (value > 64 && value < 71) value -= 55;\n else return type(uint8).max;\n }\n\n return value;\n }\n\n /**\n * @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.\n *\n * WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.\n *\n * NOTE: This function escapes all unicode characters, and not just the ones in ranges defined in section 2.5 of\n * RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). ECMAScript's `JSON.parse` does recover escaped unicode\n * characters that are not in this range, but other tooling may provide different results.\n */\n function escapeJSON(string memory input) internal pure returns (string memory) {\n bytes memory buffer = bytes(input);\n bytes memory output = new bytes(2 * buffer.length); // worst case scenario\n uint256 outputLength = 0;\n\n for (uint256 i; i < buffer.length; ++i) {\n bytes1 char = bytes1(_unsafeReadBytesOffset(buffer, i));\n if (((SPECIAL_CHARS_LOOKUP & (1 << uint8(char))) != 0)) {\n output[outputLength++] = \"\\\\\";\n if (char == 0x08) output[outputLength++] = \"b\";\n else if (char == 0x09) output[outputLength++] = \"t\";\n else if (char == 0x0a) output[outputLength++] = \"n\";\n else if (char == 0x0c) output[outputLength++] = \"f\";\n else if (char == 0x0d) output[outputLength++] = \"r\";\n else if (char == 0x5c) output[outputLength++] = \"\\\\\";\n else if (char == 0x22) {\n // solhint-disable-next-line quotes\n output[outputLength++] = '\"';\n }\n } else {\n output[outputLength++] = char;\n }\n }\n // write the actual length and deallocate unused memory\n assembly (\"memory-safe\") {\n mstore(output, outputLength)\n mstore(0x40, add(output, shl(5, shr(5, add(outputLength, 63)))))\n }\n\n return string(output);\n }\n\n /**\n * @dev Reads a bytes32 from a bytes array without bounds checking.\n *\n * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n * assembly block as such would prevent some optimizations.\n */\n function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n // This is not memory safe in the general case, but all calls to this private function are within bounds.\n assembly (\"memory-safe\") {\n value := mload(add(buffer, add(0x20, offset)))\n }\n }\n}\n" + }, + "project/contracts/Controller.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\n\nimport './interfaces/IController.sol';\n\n/**\n * @title Controller\n * @dev Manages allow lists for solvers, executors, proposal signers and validators\n */\ncontract Controller is IController, Ownable {\n // List of allowed solvers\n mapping (address => bool) public override isSolverAllowed;\n\n // List of allowed executors\n mapping (address => bool) public override isExecutorAllowed;\n\n // List of allowed proposal signers\n mapping (address => bool) public override isProposalSignerAllowed;\n\n // List of allowed validators\n mapping (address => bool) public override isValidatorAllowed;\n\n // Minimum number of validations allowed\n uint8 public override minValidations;\n\n /**\n * @dev Creates a new Controller contract\n * @param owner Address that will own the contract\n * @param solvers List of allowed solvers\n * @param executors List of allowed executors\n * @param proposalSigners List of allowed proposal signers\n * @param validators List of allowed validators\n * @param _minValidations Minimum number of validations allowed\n */\n constructor(\n address owner,\n address[] memory solvers,\n address[] memory executors,\n address[] memory proposalSigners,\n address[] memory validators,\n uint8 _minValidations\n ) Ownable(owner) {\n for (uint256 i = 0; i < solvers.length; i++) _setAllowedSolver(solvers[i], true);\n for (uint256 i = 0; i < executors.length; i++) _setAllowedExecutor(executors[i], true);\n for (uint256 i = 0; i < proposalSigners.length; i++) _setAllowedProposalSigner(proposalSigners[i], true);\n for (uint256 i = 0; i < validators.length; i++) _setAllowedValidator(validators[i], true);\n _setMinValidations(_minValidations);\n }\n\n /**\n * @dev Sets permissions for multiple solvers\n * @param solvers List of solver addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedSolvers(address[] memory solvers, bool[] memory alloweds) external override onlyOwner {\n if (solvers.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < solvers.length; i++) _setAllowedSolver(solvers[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple executors\n * @param executors List of executor addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedExecutors(address[] memory executors, bool[] memory alloweds) external override onlyOwner {\n if (executors.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < executors.length; i++) _setAllowedExecutor(executors[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple proposal signers\n * @param signers List of proposal signer addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedProposalSigners(address[] memory signers, bool[] memory alloweds) external override onlyOwner {\n if (signers.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < signers.length; i++) _setAllowedProposalSigner(signers[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple validators\n * @param validators List of validator addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedValidators(address[] memory validators, bool[] memory alloweds) external override onlyOwner {\n if (validators.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < validators.length; i++) _setAllowedValidator(validators[i], alloweds[i]);\n }\n\n /**\n * @dev Sets the minimum number of validations allowed\n * @param newMinValidations minimum number of validations allowed\n */\n function setMinValidations(uint8 newMinValidations) external override onlyOwner {\n _setMinValidations(newMinValidations);\n }\n\n /**\n * @dev Sets a solver permission\n */\n function _setAllowedSolver(address solver, bool allowed) internal {\n isSolverAllowed[solver] = allowed;\n emit SolverAllowedSet(solver, allowed);\n }\n\n /**\n * @dev Sets an executor permission\n */\n function _setAllowedExecutor(address executor, bool allowed) internal {\n isExecutorAllowed[executor] = allowed;\n emit ExecutorAllowedSet(executor, allowed);\n }\n\n /**\n * @dev Sets a proposal signer permission\n */\n function _setAllowedProposalSigner(address signer, bool allowed) internal {\n isProposalSignerAllowed[signer] = allowed;\n emit ProposalSignerAllowedSet(signer, allowed);\n }\n\n /**\n * @dev Sets a validator permission\n */\n function _setAllowedValidator(address validator, bool allowed) internal {\n isValidatorAllowed[validator] = allowed;\n emit ValidatorAllowedSet(validator, allowed);\n }\n\n /**\n * @dev Sets the minimum number of validations allowed\n */\n function _setMinValidations(uint8 newMinValidations) internal {\n minValidations = newMinValidations;\n emit MinValidationSet(newMinValidations);\n }\n}\n" + }, + "project/contracts/dynamic-calls/DynamicCallEncoder.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport './DynamicCallTypes.sol';\nimport '../interfaces/IDynamicCallEncoder.sol';\nimport '../utils/BytesHelpers.sol';\n\n/**\n * @title DynamicCallEncoder\n * @dev Builds calldata for arbitrary contract calls from structured arguments.\n *\n * This encoder supports:\n * - Literal ABI-encoded arguments\n * - Variable references resolved from previous execution results\n *\n * The encoder follows standard ABI encoding rules, reconstructing\n * the calldata heads and tails dynamically based on argument types.\n */\ncontract DynamicCallEncoder is IDynamicCallEncoder {\n using BytesHelpers for bytes;\n\n /**\n * @dev Internal representation of a fully-encoded argument\n * @param data ABI-encoded argument payload\n * @param isDynamic Whether this argument requires a head offset\n */\n struct EncodedArg {\n bytes data;\n bool isDynamic;\n }\n\n /**\n * @dev Encodes a dynamic call into calldata\n * @param dynamicCall Dynamic call specification\n * @param variables List of resolved variable values\n * @param variablesLength Number of resolved variables\n * @return data Fully ABI-encoded calldata\n */\n function encode(DynamicCall memory dynamicCall, bytes[][] memory variables, uint256 variablesLength)\n external\n pure\n override\n returns (bytes memory data)\n {\n if (variablesLength > variables.length) revert DynamicCallEncoderVariablesLengthOutOfBounds();\n data = _buildCalldata(dynamicCall.selector, dynamicCall.arguments, variables, variablesLength);\n }\n\n /**\n * @dev Builds calldata from a selector and a list of dynamic arguments\n * This function performs standard ABI aggregation:\n * - static arguments are inlined in the head\n * - dynamic arguments place offsets in the head and append data to the tail\n */\n function _buildCalldata(\n bytes4 selector,\n DynamicArg[] memory args,\n bytes[][] memory variables,\n uint256 variablesLength\n ) internal pure returns (bytes memory data) {\n uint256 n = args.length;\n bytes[] memory encodedArgs = new bytes[](n);\n bool[] memory isDynamic = new bool[](n);\n uint256 headLength = 0;\n\n for (uint256 i = 0; i < n; i++) {\n EncodedArg memory enc = _encodeArg(args[i], variables, variablesLength);\n encodedArgs[i] = enc.data;\n isDynamic[i] = enc.isDynamic;\n headLength += enc.isDynamic ? 32 : enc.data.length;\n }\n\n bytes memory heads;\n bytes memory tails;\n uint256 nextDynamicHead = headLength;\n\n for (uint256 i = 0; i < n; i++) {\n if (isDynamic[i]) {\n heads = bytes.concat(heads, bytes32(nextDynamicHead));\n tails = bytes.concat(tails, encodedArgs[i]);\n nextDynamicHead += encodedArgs[i].length;\n } else {\n heads = bytes.concat(heads, encodedArgs[i]);\n }\n }\n\n data = bytes.concat(selector, heads, tails);\n }\n\n /**\n * @dev Encodes a single dynamic argument based on its kind\n */\n function _encodeArg(DynamicArg memory arg, bytes[][] memory variables, uint256 variablesLength)\n internal\n pure\n returns (EncodedArg memory out)\n {\n if (arg.kind == DynamicArgKind.Literal) return _encodeLiteral(arg);\n if (arg.kind == DynamicArgKind.Variable) return _encodeVariable(arg, variables, variablesLength);\n revert DynamicCallEncoderInvalidArgKind();\n }\n\n /**\n * @dev Encodes a literal argument\n */\n function _encodeLiteral(DynamicArg memory arg) internal pure returns (EncodedArg memory) {\n return _encodeAbiValue(arg.data, arg.isDynamic);\n }\n\n /**\n * @dev Encodes a variable argument by resolving it from the variables list\n */\n function _encodeVariable(DynamicArg memory arg, bytes[][] memory variables, uint256 variablesLength)\n internal\n pure\n returns (EncodedArg memory)\n {\n if (arg.data.length != 64) revert DynamicCallEncoderVariableRefBadLength();\n uint256 opIndex = arg.data.readWord0();\n uint256 subIndex = arg.data.readWord1();\n if (opIndex >= variablesLength) revert DynamicCallEncoderVariableOutOfBounds();\n if (subIndex >= variables[opIndex].length) revert DynamicCallEncoderVariableOutOfBounds();\n\n return _encodeAbiValue(variables[opIndex][subIndex], arg.isDynamic);\n }\n\n /**\n * @dev Interprets ABI-like bytes as either a static or dynamic value. Used for variable resolution.\n */\n function _encodeAbiValue(bytes memory data, bool isDynamic) internal pure returns (EncodedArg memory out) {\n if (data.length == 0 || data.length % 32 != 0) revert DynamicCallEncoderBadLength();\n\n if (isDynamic) {\n if (data.length < 64) revert DynamicCallEncoderEmptyDynamic();\n if (data.readWord0() != 0x20) revert DynamicCallEncoderBadLength();\n\n out.data = data.sliceFrom(32);\n out.isDynamic = true;\n } else {\n out.data = data;\n out.isDynamic = false;\n }\n }\n}\n" + }, + "project/contracts/dynamic-calls/DynamicCallTypes.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Kind of dynamic argument to be encoded\n * @param Literal ABI-encoded literal value provided by the resolver\n * @param Variable Reference to a previously resolved variable value\n */\nenum DynamicArgKind {\n Literal,\n Variable\n}\n\n/**\n * @dev Represents a single dynamic argument\n * @param kind Type of argument resolution strategy\n * @param data Encoded argument data, interpreted based on `kind`\n * @param isDynamic Whether the resolved argument is ABI-dynamic\n */\nstruct DynamicArg {\n DynamicArgKind kind;\n bytes data;\n bool isDynamic;\n}\n\n/**\n * @dev Represents a dynamic contract call intent\n * @param target Contract address to be called\n * @param value ETH value to be sent with the call\n * @param selector Function selector to invoke\n * @param arguments List of dynamically resolved arguments\n */\nstruct DynamicCall {\n address target;\n uint256 value;\n bytes4 selector;\n DynamicArg[] arguments;\n}\n" + }, + "project/contracts/Intents.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Enum representing the operation type.\n * - Swap: Swap tokens in the same chain.\n * - Transfer: Transfer tokens to one or more recipients.\n * - Call: Execute arbitrary contract calls.\n * - CrossChainSwap: Swap tokens between chains.\n * - DynamicCall: Execute arbitrary dynamic contract calls.\n */\nenum OpType {\n Swap,\n Transfer,\n Call,\n CrossChainSwap,\n DynamicCall\n}\n\n/**\n * @dev EIP-712 typed data struct representing a validator's approval of an intent.\n * @param intent The hash of the intent being validated.\n */\nstruct Validation {\n bytes32 intent;\n}\n\n/**\n * @dev General intent structure with different operations.\n * @param feePayer The payer of the intent.\n * @param settler The address responsible for executing the intent on-chain.\n * @param nonce A unique value used to prevent replay attacks and distinguish intents.\n * @param deadline The timestamp by which the intent must be executed.\n * @param maxFees List of max fees the feePayer is willing to pay for the intent.\n * @param triggerSig The signature of the trigger that this intent belongs to\n * @param minValidations The minimum number of validator approvals required for this intent to be considered valid.\n * @param validations The list validator signatures attesting to this intent.\n * @param operations List of operations of the intent.\n */\nstruct Intent {\n address feePayer;\n address settler;\n bytes32 nonce;\n uint256 deadline;\n MaxFee[] maxFees;\n bytes triggerSig;\n uint256 minValidations;\n bytes[] validations;\n Operation[] operations;\n}\n\n/**\n * @dev Operation structure used to abstract over different operation types.\n * @param opType The type of operation this operation represents.\n * @param user The user of the operation.\n * @param data ABI-encoded data representing a specific operation type (e.g. SwapOperation, TransferOperation, CallOperation).\n * @param events List of custom operation events to be emitted.\n */\nstruct Operation {\n uint8 opType;\n address user;\n bytes data;\n OperationEvent[] events;\n}\n\n/**\n * @dev Max fee representation\n * @param token Token used to pay for the execution fee.\n * @param amount Max amount of fee token to be paid for settling this intent.\n */\nstruct MaxFee {\n address token;\n uint256 amount;\n}\n\n/**\n * @dev Operation event representation.\n * @param topic Event topic to be emitted.\n * @param data Event data to be emitted.\n */\nstruct OperationEvent {\n bytes32 topic;\n bytes data;\n}\n\n/**\n * @dev Represents a swap operation between two chains.\n * @param sourceChain Chain ID where tokens will be sent from.\n * @param destinationChain Chain ID where tokens will be received.\n * @param tokensIn List of input tokens and amounts to swap.\n * @param tokensOut List of expected output tokens, minimum amounts, and recipients.\n */\nstruct SwapOperation {\n uint256 sourceChain;\n uint256 destinationChain;\n TokenIn[] tokensIn;\n TokenOut[] tokensOut;\n}\n\n/**\n * @dev Token in representation.\n * @param token Address of a token to be sent.\n * @param amount Amount of tokens to be sent.\n */\nstruct TokenIn {\n address token;\n uint256 amount;\n}\n\n/**\n * @dev Token out representation.\n * @param token Address of a token to be received.\n * @param minAmount Minimum amount of tokens to be received.\n * @param recipient Recipient address that will receive the token out.\n */\nstruct TokenOut {\n address token;\n uint256 minAmount;\n address recipient;\n}\n\n/**\n * @dev Represents a transfer operation containing multiple token transfers.\n * @param chainId Chain ID where the transfers should be executed.\n * @param transfers List of token transfers to be performed.\n */\nstruct TransferOperation {\n uint256 chainId;\n TransferData[] transfers;\n}\n\n/**\n * @dev Transfer data for a single token transfer.\n * @param token Address of the token to transfer.\n * @param amount Amount of the token to transfer.\n * @param recipient Recipient of the token transfer.\n */\nstruct TransferData {\n address token;\n uint256 amount;\n address recipient;\n}\n\n/**\n * @dev Represents a generic call operation consisting of one or more contract calls.\n * @param chainId Chain ID where the calls should be executed.\n * @param calls List of low-level contract calls to be executed.\n */\nstruct CallOperation {\n uint256 chainId;\n CallData[] calls;\n}\n\n/**\n * @dev Low-level call data for a target contract interaction.\n * @param target Target contract address.\n * @param data Calldata to be sent to the target.\n * @param value ETH value to send along with the call.\n */\nstruct CallData {\n address target;\n bytes data;\n uint256 value;\n}\n\n/**\n * @dev Represents a generic dynamic call operation consisting of one or more dynamic contract calls.\n * @param chainId Chain ID where the calls should be executed.\n * @param calls List of ABI-encoded low-level dynamic contract calls to be executed.\n */\nstruct DynamicCallOperation {\n uint256 chainId;\n bytes[] calls;\n}\n\n/**\n * @dev Generic proposal structure representing a solver’s response to an intent.\n * @param deadline Timestamp until when the proposal is valid.\n * @param datas List of ABI-encoded proposal-specific data (e.g. SwapProposal).\n * @param fees List of fee amounts the solver requires for execution.\n */\nstruct Proposal {\n uint256 deadline;\n bytes[] datas;\n uint256[] fees;\n}\n\n/**\n * @dev Swap proposal representation for a swap operation.\n * @param executor Address of the executor contract that should be called during operation execution.\n * @param data Arbitrary data used to call the executor contract.\n * @param amountsOut List of amounts of tokens out proposed by the solver.\n */\nstruct SwapProposal {\n address executor;\n bytes data;\n uint256[] amountsOut;\n}\n\nlibrary IntentsHelpers {\n bytes32 internal constant INTENT_TYPE_HASH =\n keccak256(\n 'Intent(address feePayer,address settler,bytes32 nonce,uint256 deadline,MaxFee[] maxFees,bytes triggerSig,uint256 minValidations,Operation[] operations)MaxFee(address token,uint256 amount)Operation(uint8 opType,address user,bytes data,OperationEvent[] events)OperationEvent(bytes32 topic,bytes data)'\n );\n\n bytes32 internal constant PROPOSAL_TYPE_HASH =\n keccak256('Proposal(bytes32 intent,address solver,uint256 deadline,bytes[] datas,uint256[] fees)');\n\n bytes32 internal constant VALIDATION_TYPE_HASH = keccak256('Validation(bytes32 intent)');\n\n bytes32 internal constant MAX_FEE_TYPE_HASH = keccak256('MaxFee(address token,uint256 amount)');\n\n bytes32 internal constant OPERATION_TYPE_HASH =\n keccak256('Operation(uint8 opType,address user,bytes data,OperationEvent[] events)');\n\n bytes32 internal constant OPERATION_EVENT_TYPE_HASH = keccak256('OperationEvent(bytes32 topic,bytes data)');\n\n function hash(Intent memory intent) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n INTENT_TYPE_HASH,\n intent.feePayer,\n intent.settler,\n intent.nonce,\n intent.deadline,\n hash(intent.maxFees),\n intent.triggerSig,\n intent.minValidations,\n hash(intent.operations)\n )\n );\n }\n\n function hash(Proposal memory proposal, Intent memory intent, address solver) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n PROPOSAL_TYPE_HASH,\n hash(intent),\n solver,\n proposal.deadline,\n hash(proposal.datas),\n hash(proposal.fees)\n )\n );\n }\n\n function hash(MaxFee[] memory fees) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](fees.length);\n for (uint256 i = 0; i < fees.length; i++) {\n hashes[i] = keccak256(abi.encode(MAX_FEE_TYPE_HASH, fees[i].token, fees[i].amount));\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Operation[] memory operations) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](operations.length);\n for (uint256 i = 0; i < operations.length; i++) hashes[i] = hash(operations[i]);\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Operation memory operation) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n OPERATION_TYPE_HASH,\n operation.opType,\n operation.user,\n keccak256(operation.data),\n hash(operation.events)\n )\n );\n }\n\n function hash(OperationEvent[] memory events) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](events.length);\n for (uint256 i = 0; i < events.length; i++) {\n hashes[i] = keccak256(abi.encode(OPERATION_EVENT_TYPE_HASH, events[i].topic, keccak256(events[i].data)));\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(uint256[] memory fees) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(fees));\n }\n\n function hash(bytes[] memory datas) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](datas.length);\n for (uint256 i = 0; i < datas.length; i++) {\n hashes[i] = keccak256(datas[i]);\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Validation memory validation) internal pure returns (bytes32) {\n return keccak256(abi.encode(VALIDATION_TYPE_HASH, validation.intent));\n }\n}\n" + }, + "project/contracts/interfaces/IController.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @title Controller interface\n */\ninterface IController {\n /**\n * @dev The input arrays are not of equal length\n */\n error ControllerInputInvalidLength();\n\n /**\n * @dev Emitted every time a solver permission is set\n */\n event SolverAllowedSet(address indexed solver, bool allowed);\n\n /**\n * @dev Emitted every time an executor permission is set\n */\n event ExecutorAllowedSet(address indexed executor, bool allowed);\n\n /**\n * @dev Emitted every time a proposal signer permission is set\n */\n event ProposalSignerAllowedSet(address indexed proposalSigner, bool allowed);\n\n /**\n * @dev Emitted every time a validator permission is set\n */\n event ValidatorAllowedSet(address indexed validator, bool allowed);\n\n /**\n * @dev Emitted when the minimum validations changes\n */\n event MinValidationSet(uint8 indexed newMinValidation);\n\n /**\n * @dev Tells whether a solver is allowed\n * @param solver Address of the solver being queried\n */\n function isSolverAllowed(address solver) external view returns (bool);\n\n /**\n * @dev Tells whether an executor is allowed\n * @param executor Address of the executor being queried\n */\n function isExecutorAllowed(address executor) external view returns (bool);\n\n /**\n * @dev Tells whether a proposal signer is allowed\n * @param signer Address of the proposal signer being queried\n */\n function isProposalSignerAllowed(address signer) external view returns (bool);\n\n /**\n * @dev Tells whether a validator is allowed\n * @param validator Address of the validator being queried\n */\n function isValidatorAllowed(address validator) external view returns (bool);\n\n /**\n * @dev Tells the minimum number of validations allowed\n */\n function minValidations() external view returns (uint8);\n\n /**\n * @dev Sets permissions for multiple solvers\n * @param solvers List of solver addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedSolvers(address[] memory solvers, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple executors\n * @param executors List of executor addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedExecutors(address[] memory executors, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple proposal signers\n * @param signers List of proposal signer addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedProposalSigners(address[] memory signers, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple validators\n * @param validators List of validator addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedValidators(address[] memory validators, bool[] memory alloweds) external;\n\n /**\n * @dev Sets the minimum number of validations allowed\n * @param newMinValidations minimum number of validations allowed\n */\n function setMinValidations(uint8 newMinValidations) external;\n}\n" + }, + "project/contracts/interfaces/ICreateX.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity ^0.8.4;\n\n/**\n * @title CreateX Factory Interface Definition\n * @author pcaversaccio (https://web.archive.org/web/20230921103111/https://pcaversaccio.com/)\n * @custom:coauthor Matt Solomon (https://web.archive.org/web/20230921103335/https://mattsolomon.dev/)\n */\ninterface ICreateX {\n event ContractCreation(address indexed newContract);\n\n function deployCreate3(bytes32 salt, bytes memory initCode) external payable returns (address newContract);\n}\n" + }, + "project/contracts/interfaces/IDynamicCallEncoder.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../dynamic-calls/DynamicCallTypes.sol';\n\ninterface IDynamicCallEncoder {\n /**\n * @dev The argument is not word-aligned\n */\n error DynamicCallEncoderBadLength();\n\n /**\n * @dev The dynamic value resolves to empty data\n */\n error DynamicCallEncoderEmptyDynamic();\n\n /**\n * @dev The variable reference is not exactly one word\n */\n error DynamicCallEncoderVariableRefBadLength();\n\n /**\n * @dev The variable index is outside the variables array\n */\n error DynamicCallEncoderVariableOutOfBounds();\n\n /**\n * @dev The declared variables length exceeds the variables array length\n */\n error DynamicCallEncoderVariablesLengthOutOfBounds();\n\n /**\n * @dev The argument kind is not valid\n */\n error DynamicCallEncoderInvalidArgKind();\n\n /**\n * @dev Encodes a dynamic call into calldata.\n * @param dynamicCall Dynamic call specification.\n * @param variables List of resolved variable values.\n * @param variablesLength Number of resolved variables.\n */\n function encode(DynamicCall memory dynamicCall, bytes[][] memory variables, uint256 variablesLength)\n external\n pure\n returns (bytes memory);\n}\n" + }, + "project/contracts/interfaces/IExecutor.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\n\n/**\n * @title Executor interface\n */\ninterface IExecutor {\n /**\n * @dev Executes an operation proposal\n * @param operation Operation to be executed\n * @param operationHash unique hash of the operation\n * @param proposalData data of the proposal to be executed to fulfill the operation\n */\n function execute(Operation memory operation, bytes32 operationHash, bytes memory proposalData) external;\n}\n" + }, + "project/contracts/interfaces/IOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\nimport '../safeguards/Safeguards.sol';\n\n/**\n * @title OperationsValidator\n * @dev Performs operations validations based on safeguards\n */\ninterface IOperationsValidator {\n /**\n * @dev Validates an operation for a safeguard\n * @param operation Operation to be validated\n * @param config Safeguard config to validate the operation with\n */\n function validate(Operation memory operation, bytes memory config) external pure;\n}\n" + }, + "project/contracts/interfaces/IPaymentsReceiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @title PaymentsReceiver interface\n */\ninterface IPaymentsReceiver {\n /**\n * @dev The token address is zero\n */\n error PaymentsReceiverTokenZero();\n\n /**\n * @dev The recipient address is zero\n */\n error PaymentsReceiverRecipientZero();\n\n /**\n * @dev The amount is zero\n */\n error PaymentsReceiverAmountZero();\n\n /**\n * @dev The user address is zero\n */\n error PaymentsReceiverUserZero();\n\n /**\n * @dev The input arrays are not of equal length\n */\n error PaymentsReceiverInputInvalidLength();\n\n /**\n * @dev The token is not allowed\n */\n error PaymentsReceiverTokenNotAllowed(address token);\n\n /**\n * @dev Emitted every time a deposit is made\n */\n event Deposited(\n address indexed token,\n address indexed depositor,\n address indexed user,\n uint256 amount,\n uint8 decimals\n );\n\n /**\n * @dev Emitted every time a withdrawal is made\n */\n event Withdrawn(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time a token permission is set\n */\n event TokenAllowedSet(address indexed token, bool allowed);\n\n /**\n * @dev Tells whether a token is allowed\n * @param token Address of the token being queried\n */\n function isTokenAllowed(address token) external view returns (bool);\n\n /**\n * @dev Sets permissions for multiple tokens\n * @param tokens List of token addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedTokens(address[] memory tokens, bool[] memory alloweds) external;\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param amount Amount to deposit\n */\n function deposit(address token, uint256 amount) external;\n\n /**\n * @dev Deposits ERC20 tokens on behalf of a user\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function depositOnBehalf(address token, address user, uint256 amount) external;\n\n /**\n * @dev Withdraws ERC20 tokens to a recipient\n * @param token Address of the token to withdraw\n * @param recipient Address of the recipient\n * @param amount Amount to withdraw\n */\n function withdraw(address token, address recipient, uint256 amount) external;\n}\n" + }, + "project/contracts/interfaces/ISafe.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nenum SafeOperation {\n Call,\n DelegateCall\n}\n\ninterface ISafe {\n function getThreshold() external view returns (uint256);\n\n function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, SafeOperation operation)\n external\n returns (bool success, bytes memory returnData);\n}\n" + }, + "project/contracts/interfaces/ISettler.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\nimport '../safeguards/Safeguards.sol';\n\n/**\n * @title Settler interface\n */\ninterface ISettler {\n /**\n * @dev The requested operation type is unknown\n */\n error SettlerUnknownOperationType(uint8 opType);\n\n /**\n * @dev The simulation has been successful\n */\n error SettlerSimulationSuccess(uint256 gasUsed);\n\n /**\n * @dev The solver is not allowed\n */\n error SettlerSolverNotAllowed(address solver);\n\n /**\n * @dev The executor is not allowed\n */\n error SettlerExecutorNotAllowed(address executor);\n\n /**\n * @dev The proposal signer is not allowed\n */\n error SettlerProposalSignerNotAllowed(address signer);\n\n /**\n * @dev The validator is not allowed\n */\n error SettlerValidatorNotAllowed(address validator);\n\n /**\n * @dev The validator is duplicated\n */\n error SettlerValidatorDuplicatedOrUnsorted(address previous, address current);\n\n /**\n * @dev The settler is not the current contract\n */\n error SettlerInvalidSettler(address settler);\n\n /**\n * @dev The nonce is zero\n */\n error SettlerNonceZero();\n\n /**\n * @dev The intent has already been executed\n */\n error SettlerIntentAlreadyExecuted(bytes32 hash);\n\n /**\n * @dev The intent deadline is in the past\n */\n error SettlerIntentPastDeadline(uint256 deadline, uint256 timestamp);\n\n /**\n * @dev The current chain is not valid\n */\n error SettlerInvalidChain(uint256 chainId);\n\n /**\n * @dev The recipient is the settler contract\n */\n error SettlerInvalidRecipient(address to);\n\n /**\n * @dev The user is not a smart account\n */\n error SettlerUserNotSmartAccount(address user);\n\n /**\n * @dev The amount out is lower than the proposed amount\n */\n error SettlerAmountOutLtProposed(uint256 index, uint256 amountOut, uint256 proposed);\n\n /**\n * @dev The proposed amount is lower than the minimum amount\n */\n error SettlerProposedAmountLtMinAmount(uint256 index, uint256 proposed, uint256 minAmount);\n\n /**\n * @dev The proposed amounts array and the tokens out array are not of equal length\n */\n error SettlerInvalidProposedAmounts();\n\n /**\n * @dev The balance after the proposal execution is lower than the balance before\n */\n error SettlerPostBalanceOutLtPre(uint256 index, uint256 post, uint256 pre);\n\n /**\n * @dev The solver fees length does not match the requested by the user\n */\n error SettlerSolverFeeInvalidLength();\n\n /**\n * @dev The intent operations array is empty\n */\n error SettlerIntentOperationsEmpty();\n\n /**\n * @dev The proposal datas length does not match the intent operations length\n */\n error SettlerProposalDataInvalidLength();\n\n /**\n * @dev The solver fee is too high\n */\n error SettlerSolverFeeTooHigh(uint256 fee, uint256 max);\n\n /**\n * @dev The intent validations are not enough\n */\n error SettlerIntentValidationsNotEnough(uint256 min, uint256 current);\n\n /**\n * @dev The proposal deadline is in the past\n */\n error SettlerProposalPastDeadline(uint256 deadline, uint256 timestamp);\n\n /**\n * @dev The proposal data is not empty\n */\n error SettlerProposalDataNotEmpty();\n\n /**\n * @dev The rescue funds recipient is zero\n */\n error SettlerRescueFundsRecipientZero();\n\n /**\n * @dev The list of safeguards exceed the maximum allowed\n */\n error SettlerTooManySafeguards(uint256 lengthRequested);\n\n /**\n * @dev The chains of a swap operation do not match the swap type (single or cross chain)\n */\n error SettlerOperationChainsMismatch();\n\n /**\n * @dev A CrossChainSwap operation must be the only operation in the intent\n */\n error SettlerCrossChainSwapMustBeOnlyOperation();\n\n /**\n * @dev The new smart accounts handler is zero\n */\n error SmartAccountsHandlerZero();\n\n /**\n * @dev The new dynamic call encoder is zero\n */\n error SettlerDynamicCallEncoderZero();\n\n /**\n * @dev Custom events emitted for each operation\n */\n event OperationExecuted(\n address indexed user,\n bytes32 indexed topic,\n uint8 indexed opType,\n Operation operation,\n Proposal proposal,\n bytes32 intentHash,\n uint256 index,\n bytes output,\n bytes data\n );\n\n /**\n * @dev Emitted every time an intent is fulfilled\n */\n event ProposalExecuted(bytes32 indexed proposal);\n\n /**\n * @dev Emitted every time tokens are withdrawn from the contract balance\n */\n event FundsRescued(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time the smart accounts handler is set\n */\n event SmartAccountsHandlerSet(address indexed smartAccountsHandler);\n\n /**\n * @dev Emitted every time the operations validator is set\n */\n event OperationsValidatorSet(address indexed operationsValidator);\n\n /**\n * @dev Emitted every time the dynamic call encoder is set\n */\n event DynamicCallEncoderSet(address indexed dynamicCallEncoder);\n\n /**\n * @dev Emitted every time a safeguard is set\n */\n event SafeguardSet(address indexed user);\n\n /**\n * @dev Tells the reference to the Mimic controller\n */\n function controller() external view returns (address);\n\n /**\n * @dev Tells the reference to the smart accounts handler\n */\n function smartAccountsHandler() external view returns (address);\n\n /**\n * @dev Tells the reference to the operations validator\n */\n function operationsValidator() external view returns (address);\n\n /**\n * @dev Tells the reference to the dynamic call encoder\n */\n function dynamicCallEncoder() external view returns (address);\n\n /**\n * @dev Tells the block at which an intent was executed. Returns 0 if unexecuted.\n * @param hash Hash of the intent being queried\n */\n function getIntentBlock(bytes32 hash) external view returns (uint256);\n\n /**\n * @dev Tells the safeguard set for a user\n * @param user Address of the user being queried\n */\n function getUserSafeguard(address user) external view returns (bytes memory);\n\n /**\n * @dev Tells the hash of an intent\n * @param intent Intent to get the hash of\n */\n function getIntentHash(Intent memory intent) external pure returns (bytes32);\n\n /**\n * @dev Tells the hash of a proposal\n * @param proposal Proposal to be hashed\n * @param intent Intent being fulfilled by the requested proposal\n * @param solver Address of the solver that made the proposal\n */\n function getProposalHash(Proposal memory proposal, Intent memory intent, address solver)\n external\n pure\n returns (bytes32);\n\n /**\n * @dev Withdraws ERC20 or native tokens from the contract\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function rescueFunds(address token, address recipient, uint256 amount) external;\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function setSmartAccountsHandler(address newSmartAccountsHandler) external;\n\n /**\n * @dev Sets a new operations validator address\n * @param newOperationsValidator New operations validator to be set\n */\n function setOperationsValidator(address newOperationsValidator) external;\n\n /**\n * @dev Sets a new dynamic call encoder address\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function setDynamicCallEncoder(address newDynamicCallEncoder) external;\n\n /**\n * @dev Sets a safeguard for a user\n * @param safeguard Safeguard to be set\n */\n function setSafeguard(bytes memory safeguard) external;\n\n /**\n * @dev Executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function execute(Intent memory intent, Proposal memory proposal, bytes memory signature) external;\n\n /**\n * @dev Simulates an execution. It will always revert. Successful executions are returned as\n * `SettlerSimulationSuccess` errors. Any other error should be treated as failure.\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function simulate(Intent memory intent, Proposal memory proposal, bytes memory signature) external;\n}\n" + }, + "project/contracts/interfaces/ISmartAccount.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/introspection/IERC165.sol';\n\n/**\n * @title SmartAccount interface\n */\ninterface ISmartAccount is IERC165 {\n /**\n * @dev Emitted every time tokens are transferred\n */\n event Transferred(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time `call` is called\n */\n event Called(address indexed target, bytes data, uint256 value, bytes result);\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the owner or the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) external;\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the owner or the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n */\n function call(address target, bytes memory data, uint256 value) external returns (bytes memory result);\n}\n" + }, + "project/contracts/interfaces/ISmartAccountContract.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/interfaces/IERC1271.sol';\n\nimport './ISmartAccount.sol';\n\n/**\n * @title SmartAccountContract interface\n */\ninterface ISmartAccountContract is ISmartAccount, IERC1271 {\n // solhint-disable-previous-line no-empty-blocks\n}\n" + }, + "project/contracts/interfaces/ISmartAccountsHandler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\ninterface ISmartAccountsHandler {\n /**\n * @dev The smart account given is not supported\n */\n error SmartAccountsHandlerUnsupportedAccount(address account);\n\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address account) external view returns (bool);\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address account, address token, address to, uint256 amount) external;\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address account, address target, bytes memory data, uint256 value) external returns (bytes memory);\n}\n" + }, + "project/contracts/payments/PaymentsReceiver.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\n\nimport '../interfaces/IPaymentsReceiver.sol';\n\n/**\n * @title PaymentsReceiver\n * @dev Receives ERC20 deposits and lets the owner withdraw them\n */\ncontract PaymentsReceiver is IPaymentsReceiver, Ownable {\n using SafeERC20 for IERC20;\n\n // List of allowed tokens\n mapping (address => bool) public override isTokenAllowed;\n\n /**\n * @dev Creates a new PaymentsReceiver contract\n * @param owner Address that will own the contract\n * @param tokens List of allowed tokens\n */\n constructor(address owner, address[] memory tokens) Ownable(owner) {\n for (uint256 i = 0; i < tokens.length; i++) _setAllowedToken(tokens[i], true);\n }\n\n /**\n * @dev Sets permissions for multiple tokens\n * @param tokens List of token addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedTokens(address[] memory tokens, bool[] memory alloweds) external override onlyOwner {\n if (tokens.length != alloweds.length) revert PaymentsReceiverInputInvalidLength();\n for (uint256 i = 0; i < tokens.length; i++) _setAllowedToken(tokens[i], alloweds[i]);\n }\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param amount Amount to deposit\n */\n function deposit(address token, uint256 amount) external override {\n _deposit(token, _msgSender(), amount);\n }\n\n /**\n * @dev Deposits ERC20 tokens on behalf of a user\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function depositOnBehalf(address token, address user, uint256 amount) external override {\n if (user == address(0)) revert PaymentsReceiverUserZero();\n _deposit(token, user, amount);\n }\n\n /**\n * @dev Withdraws ERC20 tokens to a recipient\n * @param token Address of the token to withdraw\n * @param recipient Address of the recipient\n * @param amount Amount to withdraw\n */\n function withdraw(address token, address recipient, uint256 amount) external override onlyOwner {\n if (token == address(0)) revert PaymentsReceiverTokenZero();\n if (recipient == address(0)) revert PaymentsReceiverRecipientZero();\n if (amount == 0) revert PaymentsReceiverAmountZero();\n\n IERC20(token).safeTransfer(recipient, amount);\n\n emit Withdrawn(token, recipient, amount);\n }\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function _deposit(address token, address user, uint256 amount) internal {\n if (token == address(0)) revert PaymentsReceiverTokenZero();\n if (amount == 0) revert PaymentsReceiverAmountZero();\n if (!isTokenAllowed[token]) revert PaymentsReceiverTokenNotAllowed(token);\n\n address depositor = _msgSender();\n IERC20(token).safeTransferFrom(depositor, address(this), amount);\n\n uint8 decimals = IERC20Metadata(token).decimals();\n emit Deposited(token, depositor, user, amount, decimals);\n }\n\n /**\n * @dev Sets a token permission\n */\n function _setAllowedToken(address token, bool allowed) internal {\n isTokenAllowed[token] = allowed;\n emit TokenAllowedSet(token, allowed);\n }\n}\n" + }, + "project/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol';\n\ncontract Proxy is TransparentUpgradeableProxy {\n constructor(address implementation, address initialOwner, bytes memory data)\n TransparentUpgradeableProxy(implementation, initialOwner, data)\n {}\n}\n" + }, + "project/contracts/safeguards/BaseOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @title BaseOperationsValidator\n */\ncontract BaseOperationsValidator {\n /**\n * @dev No operations allowed\n */\n error OperationsValidatorNoneAllowed();\n\n /**\n * @dev Operation type unknown\n */\n error OperationsValidatorUnknownOperationType(uint8 opType);\n\n /**\n * @dev Invalid safeguard mode\n */\n error OperationsValidatorInvalidSafeguardMode(uint8 mode);\n\n /**\n * @dev Tells whether a chain is allowed\n */\n function _isChainAllowed(uint256 chainId, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, uint256[] memory values) = abi.decode(config, (bool, uint256[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (chainId == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (chainId == values[i]) return true;\n }\n return false;\n }\n }\n\n /**\n * @dev Tells whether an account is allowed\n */\n function _isAccountAllowed(address account, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, address[] memory values) = abi.decode(config, (bool, address[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (account == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (account == values[i]) return true;\n }\n return false;\n }\n }\n\n /**\n * @dev Tells whether a selector is allowed\n */\n function _isSelectorAllowed(bytes4 selector, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, bytes4[] memory values) = abi.decode(config, (bool, bytes4[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (selector == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (selector == values[i]) return true;\n }\n return false;\n }\n }\n}\n" + }, + "project/contracts/safeguards/CallOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './Safeguards.sol';\nimport './BaseOperationsValidator.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Call safeguard modes to validate call operations\n * @param None To ensure no calls are allowed\n * @param Chain To validate that the chain where calls execute is allowed\n * @param Target To validate that the call targets (contract addresses) are allowed\n * @param Selector To validate that the function selectors being called are allowed\n */\nenum CallSafeguardMode {\n None,\n Chain,\n Target,\n Selector\n}\n\n/**\n * @title CallOperationsValidator\n * @dev Performs call operations validations based on safeguards\n */\ncontract CallOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a call operation is valid for a safeguard\n * @param operation Call operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isCallOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n CallOperation memory callOperation = abi.decode(operation.data, (CallOperation));\n if (safeguard.mode == uint8(CallSafeguardMode.Chain))\n return _isChainAllowed(callOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Target))\n return _areCallTargetsValid(callOperation.calls, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Selector))\n return _areCallSelectorsValid(callOperation.calls, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the call targets are allowed\n */\n function _areCallTargetsValid(CallData[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n if (!_isAccountAllowed(calls[i].target, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the call selectors are allowed\n */\n function _areCallSelectorsValid(CallData[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n if (!_isSelectorAllowed(bytes4(calls[i].data), config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/DynamicCallOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './CallOperationsValidator.sol';\nimport './Safeguards.sol';\nimport './BaseOperationsValidator.sol';\nimport '../Intents.sol';\nimport '../dynamic-calls/DynamicCallTypes.sol';\n\n/**\n * @title DynamicCallOperationsValidator\n * @dev Performs dynamic call operations validations based on call safeguards\n */\ncontract DynamicCallOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a dynamic call operation is valid for a safeguard\n * @param operation Dynamic call operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isDynamicCallOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n DynamicCallOperation memory dynamicCallOperation = abi.decode(operation.data, (DynamicCallOperation));\n if (safeguard.mode == uint8(CallSafeguardMode.Chain))\n return _isChainAllowed(dynamicCallOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Target))\n return _areDynamicCallTargetsValid(dynamicCallOperation.calls, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Selector))\n return _areDynamicCallSelectorsValid(dynamicCallOperation.calls, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the dynamic call targets are allowed\n */\n function _areDynamicCallTargetsValid(bytes[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n DynamicCall memory call = abi.decode(calls[i], (DynamicCall));\n if (!_isAccountAllowed(call.target, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the dynamic call selectors are allowed\n */\n function _areDynamicCallSelectorsValid(bytes[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n DynamicCall memory call = abi.decode(calls[i], (DynamicCall));\n if (!_isSelectorAllowed(call.selector, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/OperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './CallOperationsValidator.sol';\nimport './DynamicCallOperationsValidator.sol';\nimport './TransferOperationsValidator.sol';\nimport './Safeguards.sol';\nimport './SwapOperationsValidator.sol';\nimport '../Intents.sol';\nimport '../interfaces/IOperationsValidator.sol';\n\n/**\n * @title OperationsValidator\n * @dev Performs operations validations based on safeguards\n */\ncontract OperationsValidator is\n IOperationsValidator,\n SwapOperationsValidator,\n TransferOperationsValidator,\n CallOperationsValidator,\n DynamicCallOperationsValidator\n{\n /**\n * @dev Safeguard validation failed\n */\n error OperationsValidatorSafeguardFailed();\n\n /**\n * @dev Invalid safeguard config mode\n */\n error OperationsValidatorInvalidSafeguardConfigMode(uint8 mode);\n\n /**\n * @dev Invalid safeguard group logic mode\n */\n error OperationsValidatorInvalidSafeguardGroupLogicMode(uint8 mode);\n\n /**\n * @dev Tells whether an operation is valid for a safeguard\n * @param operation Operation to be validated\n * @param config Safeguard config to validate the operation with\n */\n function validate(Operation memory operation, bytes memory config) external pure override {\n (uint8 mode, bytes memory safeguard) = abi.decode(config, (uint8, bytes));\n if (mode == uint8(SafeguardConfigMode.List)) _validate(operation, abi.decode(safeguard, (Safeguard[])));\n else if (mode == uint8(SafeguardConfigMode.Tree)) _validate(operation, _decodeSafeguardTree(safeguard));\n else revert OperationsValidatorInvalidSafeguardConfigMode(mode);\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguards list\n * @param operation Operation to be validated\n * @param safeguards Safeguard list to validate the operation with\n */\n function _validate(Operation memory operation, Safeguard[] memory safeguards) internal pure {\n if (safeguards.length == 0) revert OperationsValidatorSafeguardFailed();\n for (uint256 i = 0; i < safeguards.length; i++) {\n if (!_isSafeguardValid(operation, safeguards[i])) revert OperationsValidatorSafeguardFailed();\n }\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard tree\n * @param operation Operation to be validated\n * @param tree Safeguard tree to validate the operation with\n */\n function _validate(Operation memory operation, SafeguardTree memory tree) internal pure {\n if (tree.nodes.length == 0) revert OperationsValidatorSafeguardFailed();\n if (!_isSafeguardGroupValid(operation, tree, 0)) revert OperationsValidatorSafeguardFailed();\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard tree at a certain level\n * @param operation Operation to be validated\n * @param tree Safeguard tree to validate the operation with\n * @param index Index of the group node to evaluate\n */\n function _isSafeguardGroupValid(Operation memory operation, SafeguardTree memory tree, uint16 index)\n internal\n pure\n returns (bool)\n {\n SafeguardGroup memory group = tree.nodes[index];\n\n if (group.logic == uint8(SafeguardGroupLogic.NOT)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i])) return false;\n }\n return true;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.AND)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (!_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (!_isSafeguardGroupValid(operation, tree, group.children[i])) return false;\n }\n return true;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.OR)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return true;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i])) return true;\n }\n return false;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.XOR)) {\n uint256 hits = 0;\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]]))\n if (++hits > 1) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i]))\n if (++hits > 1) return false;\n }\n return hits == 1;\n }\n\n revert OperationsValidatorInvalidSafeguardGroupLogicMode(group.logic);\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard\n * @param operation Operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isSafeguardValid(Operation memory operation, Safeguard memory safeguard) internal pure returns (bool) {\n if (safeguard.mode == uint8(0)) revert OperationsValidatorNoneAllowed();\n if (operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap)) {\n return _isSwapOperationValid(operation, safeguard);\n }\n if (operation.opType == uint8(OpType.Transfer)) return _isTransferOperationValid(operation, safeguard);\n if (operation.opType == uint8(OpType.Call)) return _isCallOperationValid(operation, safeguard);\n if (operation.opType == uint8(OpType.DynamicCall)) return _isDynamicCallOperationValid(operation, safeguard);\n revert OperationsValidatorUnknownOperationType(uint8(operation.opType));\n }\n\n /**\n * @dev Safely decodes a safeguard tree avoiding compiler issues with dynamic arrays\n * @param data Safeguard tree data to be decoded\n */\n function _decodeSafeguardTree(bytes memory data) private pure returns (SafeguardTree memory) {\n (SafeguardGroup[] memory nodes, Safeguard[] memory leaves) = abi.decode(data, (SafeguardGroup[], Safeguard[]));\n return SafeguardTree(nodes, leaves);\n }\n}\n" + }, + "project/contracts/safeguards/Safeguards.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Safeguard config modes\n * - List: Safeguard lists\n * - Tree: Safeguard groups\n */\nenum SafeguardConfigMode {\n List,\n Tree\n}\n\n/**\n * @dev Logical operators for safeguard groups\n * - AND: every child must pass\n * - OR: at least one child must pass\n * - XOR: exactly one child must pass\n * - NOT: every child must fail\n */\nenum SafeguardGroupLogic {\n AND,\n OR,\n XOR,\n NOT\n}\n\n/**\n * @dev Flat node in the safeguard tree\n * @param logic Group operator (AND/OR/XOR/NOT)\n * @param leaves Indices into `SafeguardTree.leaves`\n * @param children Indices into `SafeguardTree.nodes`\n */\nstruct SafeguardGroup {\n uint8 logic;\n uint16[] leaves;\n uint16[] children;\n}\n\n/**\n * @dev Safeguard tree representation\n * @param nodes List of all the nodes in the tree\n * @param leaves List of all the leaves in the tree\n */\nstruct SafeguardTree {\n SafeguardGroup[] nodes;\n Safeguard[] leaves;\n}\n\n/**\n * @dev Safeguard representation\n * @param mode Safeguard mode\n * @param config Safeguard configuration settings or parameters\n */\nstruct Safeguard {\n uint8 mode;\n bytes config;\n}\n" + }, + "project/contracts/safeguards/SwapOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './BaseOperationsValidator.sol';\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Swap safeguard modes to validate swap operations\n * @param None To ensure no swaps are allowed\n * @param SourceChain To validate that the source chain is allowed\n * @param DestinationChain To validate that the destination chain is allowed\n * @param TokenIn To validate that the tokens to be sent are allowed\n * @param TokenOut To validate that the tokens to be received are allowed\n * @param Recipient To validate that the recipients that will receive the tokens are allowed\n */\nenum SwapSafeguardMode {\n None,\n SourceChain,\n DestinationChain,\n TokenIn,\n TokenOut,\n Recipient\n}\n\n/**\n * @title SwapOperationsValidator\n * @dev Performs swap operations validations based on safeguards\n */\ncontract SwapOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a swap operation is valid for a safeguard\n * @param operation Swap operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isSwapOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n SwapOperation memory swapOperation = abi.decode(operation.data, (SwapOperation));\n if (safeguard.mode == uint8(SwapSafeguardMode.SourceChain))\n return _isChainAllowed(swapOperation.sourceChain, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.DestinationChain))\n return _isChainAllowed(swapOperation.destinationChain, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.TokenIn))\n return _areSwapTokensInValid(swapOperation.tokensIn, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.TokenOut))\n return _areSwapTokensOutValid(swapOperation.tokensOut, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.Recipient))\n return _areSwapRecipientsValid(swapOperation.tokensOut, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the tokens to be sent are allowed\n */\n function _areSwapTokensInValid(TokenIn[] memory tokensIn, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensIn.length; i++) {\n if (!_isAccountAllowed(tokensIn[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the tokens to be received are allowed\n */\n function _areSwapTokensOutValid(TokenOut[] memory tokensOut, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensOut.length; i++) {\n if (!_isAccountAllowed(tokensOut[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the recipients to be received are allowed\n */\n function _areSwapRecipientsValid(TokenOut[] memory tokensOut, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensOut.length; i++) {\n if (!_isAccountAllowed(tokensOut[i].recipient, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/TransferOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './BaseOperationsValidator.sol';\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Transfer safeguard modes to validate transfer operations\n * @param None To ensure no transfers are allowed\n * @param Chain To validate that the chain where transfers execute is allowed\n * @param Token To validate that the tokens being transferred are allowed\n * @param Recipient To validate that the recipients of the transfers are allowed\n */\nenum TransferSafeguardMode {\n None,\n Chain,\n Token,\n Recipient\n}\n\n/**\n * @title TransferOperationsValidator\n * @dev Performs transfer operations validations based on safeguards\n */\ncontract TransferOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a transfer operation is valid for a safeguard\n * @param operation Transfer operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isTransferOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n TransferOperation memory transferOperation = abi.decode(operation.data, (TransferOperation));\n if (safeguard.mode == uint8(TransferSafeguardMode.Chain))\n return _isChainAllowed(transferOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(TransferSafeguardMode.Token))\n return _areTransferTokensValid(transferOperation.transfers, safeguard.config);\n if (safeguard.mode == uint8(TransferSafeguardMode.Recipient))\n return _areTransferRecipientsValid(transferOperation.transfers, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the tokens being transferred are allowed\n */\n function _areTransferTokensValid(TransferData[] memory transfers, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < transfers.length; i++) {\n if (!_isAccountAllowed(transfers[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the recipients of the transfers are allowed\n */\n function _areTransferRecipientsValid(TransferData[] memory transfers, bytes memory config)\n private\n pure\n returns (bool)\n {\n for (uint256 i = 0; i < transfers.length; i++) {\n if (!_isAccountAllowed(transfers[i].recipient, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/Settler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';\nimport '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\nimport '@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol';\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\nimport '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';\n\nimport './Intents.sol';\nimport './interfaces/IController.sol';\nimport './interfaces/IDynamicCallEncoder.sol';\nimport './interfaces/IOperationsValidator.sol';\nimport './interfaces/IExecutor.sol';\nimport './interfaces/ISettler.sol';\nimport './utils/Denominations.sol';\nimport './utils/ERC20Helpers.sol';\nimport './smart-accounts/SmartAccountsHandler.sol';\nimport './smart-accounts/SmartAccountsHandlerHelpers.sol';\n\n/**\n * @title Settler\n * @dev Contract that provides the appropriate context for solvers to execute proposals that fulfill user intents\n */\ncontract Settler is ISettler, Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, EIP712Upgradeable {\n using SafeERC20 for IERC20;\n using IntentsHelpers for Intent;\n using IntentsHelpers for Proposal;\n using IntentsHelpers for Validation;\n using SmartAccountsHandlerHelpers for address;\n\n // Mimic controller reference\n address public override controller;\n\n // Smart accounts handler reference\n address public override smartAccountsHandler;\n\n // Operations validator reference\n address public override operationsValidator;\n\n // Dynamic call encoder reference\n address public dynamicCallEncoder;\n\n // List of block numbers at which an intent was executed\n mapping (bytes32 => uint256) public override getIntentBlock;\n\n // Safeguard config per user\n mapping (address => bytes) internal _userSafeguard;\n\n /**\n * @dev Modifier to tag settler functions in order to check if the sender is an allowed solver\n */\n modifier onlySolver() {\n address sender = _msgSender();\n if (!IController(controller).isSolverAllowed(sender)) revert SettlerSolverNotAllowed(sender);\n _;\n }\n\n /**\n * @dev Disables initializers to prevent implementation contract from being initialized directly\n */\n constructor() {\n _disableInitializers();\n }\n\n /**\n * @dev Initializes a new Settler contract\n * @param _controller Address of the Settler controller\n * @param _owner Address that will own the contract\n * @param _dynamicCallEncoder Address of the dynamic call encoder\n */\n function initialize(address _controller, address _owner, address _dynamicCallEncoder) external initializer {\n __Ownable_init(_owner);\n __ReentrancyGuard_init();\n __EIP712_init('Mimic Protocol Settler', '1');\n\n controller = _controller;\n smartAccountsHandler = address(new SmartAccountsHandler());\n _setDynamicCallEncoder(_dynamicCallEncoder);\n }\n\n /**\n * @dev Tells the hash of an intent\n * @param intent Intent to get the hash of\n */\n function getIntentHash(Intent memory intent) external pure override returns (bytes32) {\n return intent.hash();\n }\n\n /**\n * @dev Tells the hash of a proposal\n * @param proposal Proposal to be hashed\n * @param intent Intent being fulfilled by the requested proposal\n * @param solver Address of the solver that made the proposal\n */\n function getProposalHash(Proposal memory proposal, Intent memory intent, address solver)\n external\n pure\n override\n returns (bytes32)\n {\n return proposal.hash(intent, solver);\n }\n\n /**\n * @dev Tells the safeguard set for a user\n * @param user Address of the user being queried\n */\n function getUserSafeguard(address user) external view override returns (bytes memory) {\n return _userSafeguard[user];\n }\n\n /**\n * @dev It allows receiving native token transfers\n * Note: This method mainly allows supporting native tokens for swaps\n */\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n /**\n * @dev Withdraws ERC20 or native tokens from the contract\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function rescueFunds(address token, address recipient, uint256 amount) external override onlyOwner nonReentrant {\n if (recipient == address(0)) revert SettlerRescueFundsRecipientZero();\n ERC20Helpers.transfer(token, recipient, amount);\n emit FundsRescued(token, recipient, amount);\n }\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function setSmartAccountsHandler(address newSmartAccountsHandler) external override onlyOwner {\n _setSmartAccountsHandler(newSmartAccountsHandler);\n }\n\n /**\n * @dev Sets a new operations validator address\n * @param newOperationsValidator New operations validator to be set\n */\n function setOperationsValidator(address newOperationsValidator) external override onlyOwner {\n _setOperationsValidator(newOperationsValidator);\n }\n\n /**\n * @dev Sets a new dynamic call encoder address\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function setDynamicCallEncoder(address newDynamicCallEncoder) external override onlyOwner {\n _setDynamicCallEncoder(newDynamicCallEncoder);\n }\n\n /**\n * @dev Sets a safeguard for a user\n * @param safeguard Safeguard to be set\n */\n function setSafeguard(bytes memory safeguard) external override {\n _setSafeguard(msg.sender, safeguard);\n }\n\n /**\n * @dev Executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function execute(Intent memory intent, Proposal memory proposal, bytes memory signature)\n external\n override\n onlySolver\n {\n _execute(intent, proposal, signature, false);\n }\n\n /**\n * @dev Simulates an execution. It will always revert. Successful executions are returned as\n * `SettlerSimulationSuccess` errors. Any other error should be treated as failure.\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function simulate(Intent memory intent, Proposal memory proposal, bytes memory signature)\n external\n override\n onlySolver\n {\n uint256 initialGas = gasleft();\n _execute(intent, proposal, signature, true);\n uint256 gasUsed = initialGas - gasleft();\n revert SettlerSimulationSuccess(gasUsed);\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n * @param simulated Whether the execution is a simulation\n */\n function _execute(Intent memory intent, Proposal memory proposal, bytes memory signature, bool simulated)\n internal\n nonReentrant\n {\n _validateIntent(intent, proposal, signature, simulated);\n getIntentBlock[intent.hash()] = block.number;\n\n bytes[][] memory outputs = new bytes[][](intent.operations.length);\n for (uint256 i = 0; i < intent.operations.length; i++) {\n outputs[i] = _executeOperation(intent, proposal, i, outputs);\n }\n\n _payFees(intent, proposal);\n emit ProposalExecuted(proposal.hash(intent, _msgSender()));\n }\n\n /**\n * @dev Executes proposal to fulfill an operation\n * @param intent Intent being fulfilled\n * @param proposal Proposal being executed\n * @param index Position where the operation and its corresponding proposal data are located\n * @param outputs List of operations outputs\n */\n function _executeOperation(Intent memory intent, Proposal memory proposal, uint256 index, bytes[][] memory outputs)\n internal\n returns (bytes[] memory)\n {\n uint8 opType = intent.operations[index].opType;\n if (opType == uint8(OpType.Swap) || opType == uint8(OpType.CrossChainSwap)) {\n return _executeSwap(intent, proposal, index);\n }\n if (opType == uint8(OpType.Transfer)) return _executeTransfer(intent, proposal, index);\n if (opType == uint8(OpType.Call)) return _executeCall(intent, proposal, index);\n if (opType == uint8(OpType.DynamicCall)) return _executeDynamicCall(intent, proposal, index, outputs);\n revert SettlerUnknownOperationType(opType);\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a swap operation\n * @param intent Intent that contains swap operation to be fulfilled\n * @param proposal Proposal with swap data to be executed\n * @param index Position where the swap proposal data and operation are located\n */\n function _executeSwap(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n SwapOperation memory swapOperation = abi.decode(operation.data, (SwapOperation));\n SwapProposal memory swapProposal = abi.decode(proposal.datas[index], (SwapProposal));\n if (operation.opType == uint8(OpType.CrossChainSwap)) {\n if (intent.operations.length > 1) revert SettlerCrossChainSwapMustBeOnlyOperation();\n _validateCrossChainSwapOperation(swapOperation, swapProposal);\n } else _validateSingleChainSwapOperation(swapOperation, swapProposal);\n\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(operation.user);\n if (swapOperation.sourceChain == block.chainid) {\n for (uint256 i = 0; i < swapOperation.tokensIn.length; i++) {\n TokenIn memory tokenIn = swapOperation.tokensIn[i];\n _transferFrom(tokenIn.token, operation.user, swapProposal.executor, tokenIn.amount, isSmartAccount);\n }\n }\n\n uint256[] memory preBalancesOut = _getTokensOutBalance(swapOperation);\n // Using the intent hash as the unique operation hash because cross-chain swap has only one operation per intent and the single swap executor does not use it\n bytes32 operationHash = intent.hash();\n IExecutor(swapProposal.executor).execute(operation, operationHash, proposal.datas[index]);\n\n outputs = new bytes[](swapOperation.tokensOut.length);\n if (swapOperation.destinationChain == block.chainid) {\n uint256[] memory amounts = new uint256[](swapOperation.tokensOut.length);\n for (uint256 i = 0; i < swapOperation.tokensOut.length; i++) {\n TokenOut memory tokenOut = swapOperation.tokensOut[i];\n uint256 postBalanceOut = ERC20Helpers.balanceOf(tokenOut.token, address(this));\n uint256 preBalanceOut = preBalancesOut[i];\n if (postBalanceOut < preBalanceOut) revert SettlerPostBalanceOutLtPre(i, postBalanceOut, preBalanceOut);\n\n amounts[i] = postBalanceOut - preBalanceOut;\n uint256 proposedAmount = swapProposal.amountsOut[i];\n if (amounts[i] < proposedAmount) revert SettlerAmountOutLtProposed(i, amounts[i], proposedAmount);\n\n ERC20Helpers.transfer(tokenOut.token, tokenOut.recipient, amounts[i]);\n outputs[i] = abi.encode(amounts[i]);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(amounts));\n }\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a transfer operation\n * @param intent Intent that contains transfer operation to be fulfilled\n * @param proposal Transfer proposal to be executed\n * @param index Position where the transfer proposal data and operation are located\n */\n function _executeTransfer(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n TransferOperation memory transferOperation = abi.decode(operation.data, (TransferOperation));\n _validateTransferOperation(transferOperation, proposal.datas[index]);\n\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(operation.user);\n for (uint256 i = 0; i < transferOperation.transfers.length; i++) {\n TransferData memory transfer = transferOperation.transfers[i];\n _transferFrom(transfer.token, operation.user, transfer.recipient, transfer.amount, isSmartAccount);\n }\n\n outputs = new bytes[](0);\n _emitOperationEvents(operation, proposal, intent.hash(), index, new bytes(0));\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a call operation\n * @param intent Intent that contains call operation to be fulfilled\n * @param proposal Call proposal to be executed\n * @param index Position where the call proposal data and operation are located\n */\n function _executeCall(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n CallOperation memory callOperation = abi.decode(operation.data, (CallOperation));\n _validateCallOperation(callOperation, proposal.datas[index], operation.user);\n\n outputs = new bytes[](callOperation.calls.length);\n for (uint256 i = 0; i < callOperation.calls.length; i++) {\n CallData memory call = callOperation.calls[i];\n // solhint-disable-next-line avoid-low-level-calls\n outputs[i] = smartAccountsHandler.call(operation.user, call.target, call.data, call.value);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(outputs));\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a dynamic call operation\n * @param intent Intent that contains dynamic call operation to be fulfilled\n * @param proposal Dynamic call proposal to be executed\n * @param index Position where the dynamic call proposal data and operation are located\n * @param variables List of operations outputs\n */\n function _executeDynamicCall(\n Intent memory intent,\n Proposal memory proposal,\n uint256 index,\n bytes[][] memory variables\n ) internal returns (bytes[] memory outputs) {\n Operation memory operation = intent.operations[index];\n DynamicCallOperation memory dynamicCallOperation = abi.decode(operation.data, (DynamicCallOperation));\n _validateDynamicCallOperation(dynamicCallOperation, proposal.datas[index], operation.user);\n\n outputs = new bytes[](dynamicCallOperation.calls.length);\n for (uint256 i = 0; i < dynamicCallOperation.calls.length; i++) {\n DynamicCall memory dynamicCall = abi.decode(dynamicCallOperation.calls[i], (DynamicCall));\n bytes memory data = IDynamicCallEncoder(dynamicCallEncoder).encode(dynamicCall, variables, index);\n // solhint-disable-next-line avoid-low-level-calls\n outputs[i] = smartAccountsHandler.call(operation.user, dynamicCall.target, data, dynamicCall.value);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(outputs));\n }\n\n /**\n * @dev Validates an intent and its corresponding proposal\n The off-chain validators are assuring that:\n - The trigger signer has authorization over the intent.feePayer and each operations[i].user\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n * @param simulated Whether the execution is a simulation\n */\n function _validateIntent(Intent memory intent, Proposal memory proposal, bytes memory signature, bool simulated)\n internal\n view\n {\n if (intent.settler != address(this)) revert SettlerInvalidSettler(intent.settler);\n if (intent.nonce == bytes32(0)) revert SettlerNonceZero();\n bytes32 intentHash = intent.hash();\n if (getIntentBlock[intentHash] != 0) revert SettlerIntentAlreadyExecuted(intentHash);\n\n if (intent.operations.length == 0) revert SettlerIntentOperationsEmpty();\n if (intent.operations.length != proposal.datas.length) revert SettlerProposalDataInvalidLength();\n\n if (operationsValidator != address(0)) {\n for (uint256 i = 0; i < intent.operations.length; i++) {\n Operation memory operation = intent.operations[i];\n bytes memory safeguard = _userSafeguard[operation.user];\n if (safeguard.length > 0) IOperationsValidator(operationsValidator).validate(operation, safeguard);\n }\n }\n\n bool shouldValidateDeadlines = _shouldValidateDeadlines(intent);\n if (shouldValidateDeadlines) {\n if (intent.deadline <= block.timestamp) revert SettlerIntentPastDeadline(intent.deadline, block.timestamp);\n bool isProposalPastDeadline = proposal.deadline <= block.timestamp;\n if (isProposalPastDeadline) revert SettlerProposalPastDeadline(proposal.deadline, block.timestamp);\n }\n\n if (intent.maxFees.length != proposal.fees.length) revert SettlerSolverFeeInvalidLength();\n for (uint256 i = 0; i < intent.maxFees.length; i++) {\n uint256 maxFee = intent.maxFees[i].amount;\n uint256 proposalFee = proposal.fees[i];\n if (proposalFee > maxFee) revert SettlerSolverFeeTooHigh(proposalFee, maxFee);\n }\n\n uint8 minValidations = IController(controller).minValidations();\n uint256 requiredValidations = intent.minValidations > minValidations ? intent.minValidations : minValidations;\n\n if (intent.validations.length < requiredValidations) {\n revert SettlerIntentValidationsNotEnough(requiredValidations, intent.validations.length);\n }\n\n address lastValidator = address(0);\n Validation memory validation = Validation(intentHash);\n bytes32 typedDataHash = _hashTypedDataV4(validation.hash());\n for (uint256 i = 0; i < intent.validations.length; i++) {\n address validator = ECDSA.recover(typedDataHash, intent.validations[i]);\n if (validator <= lastValidator) {\n revert SettlerValidatorDuplicatedOrUnsorted(lastValidator, validator);\n }\n lastValidator = validator;\n bool isValidatorNotAllowed = !IController(controller).isValidatorAllowed(validator);\n if (isValidatorNotAllowed) revert SettlerValidatorNotAllowed(validator);\n }\n\n address signer = ECDSA.recover(_hashTypedDataV4(proposal.hash(intent, _msgSender())), signature);\n bool isProposalSignerNotAllowed = !IController(controller).isProposalSignerAllowed(signer) && !simulated;\n if (isProposalSignerNotAllowed) revert SettlerProposalSignerNotAllowed(signer);\n }\n\n /**\n * @dev Validates a swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateSwapOperation(SwapOperation memory operation, SwapProposal memory proposal) internal view {\n if (proposal.amountsOut.length != operation.tokensOut.length) revert SettlerInvalidProposedAmounts();\n\n for (uint256 i = 0; i < operation.tokensOut.length; i++) {\n TokenOut memory tokenOut = operation.tokensOut[i];\n address recipient = tokenOut.recipient;\n if (recipient == address(this)) revert SettlerInvalidRecipient(recipient);\n\n uint256 minAmount = tokenOut.minAmount;\n uint256 proposedAmount = proposal.amountsOut[i];\n if (proposedAmount < minAmount) revert SettlerProposedAmountLtMinAmount(i, proposedAmount, minAmount);\n }\n }\n\n /**\n * @dev Validates a single-chain swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateSingleChainSwapOperation(SwapOperation memory operation, SwapProposal memory proposal)\n internal\n view\n {\n if (operation.sourceChain != operation.destinationChain) revert SettlerOperationChainsMismatch();\n if (operation.sourceChain != block.chainid) revert SettlerInvalidChain(block.chainid);\n _validateSwapOperation(operation, proposal);\n }\n\n /**\n * @dev Validates a transfer operation and its corresponding proposal\n * @param operation Transfer operation to be fulfilled\n * @param proposalData data of the proposal\n */\n function _validateTransferOperation(TransferOperation memory operation, bytes memory proposalData) internal view {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n for (uint256 i = 0; i < operation.transfers.length; i++) {\n address recipient = operation.transfers[i].recipient;\n if (recipient == address(this)) revert SettlerInvalidRecipient(recipient);\n }\n }\n\n /**\n * @dev Validates a call operation and its corresponding proposal\n * @param operation Call operation to be fulfilled\n * @param proposalData data of the proposal\n * @param user The originator of the operation\n */\n function _validateCallOperation(CallOperation memory operation, bytes memory proposalData, address user)\n internal\n view\n {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n if (!smartAccountsHandler.isSmartAccount(user)) revert SettlerUserNotSmartAccount(user);\n }\n\n /**\n * @dev Validates a dynamic call operation and its corresponding proposal\n * @param operation Dynamic call operation to be fulfilled\n * @param proposalData data of the proposal\n * @param user The originator of the operation\n */\n function _validateDynamicCallOperation(\n DynamicCallOperation memory operation,\n bytes memory proposalData,\n address user\n ) internal view {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n if (!smartAccountsHandler.isSmartAccount(user)) revert SettlerUserNotSmartAccount(user);\n }\n\n /**\n * @dev Validates a cross-chain swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateCrossChainSwapOperation(SwapOperation memory operation, SwapProposal memory proposal)\n internal\n view\n {\n if (operation.sourceChain == operation.destinationChain) revert SettlerOperationChainsMismatch();\n bool isChainInvalid = operation.sourceChain != block.chainid && operation.destinationChain != block.chainid;\n if (isChainInvalid) revert SettlerInvalidChain(block.chainid);\n _validateSwapOperation(operation, proposal);\n bool isExecutorInvalid = !IController(controller).isExecutorAllowed(proposal.executor);\n if (isExecutorInvalid) revert SettlerExecutorNotAllowed(proposal.executor);\n }\n\n /**\n * @dev Tells the contract balance for each token out of a swap operation\n * @param operation Swap operation containing the list of tokens out\n */\n function _getTokensOutBalance(SwapOperation memory operation) internal view returns (uint256[] memory balances) {\n balances = new uint256[](operation.tokensOut.length);\n if (operation.destinationChain == block.chainid) {\n for (uint256 i = 0; i < operation.tokensOut.length; i++) {\n balances[i] = ERC20Helpers.balanceOf(operation.tokensOut[i].token, address(this));\n }\n }\n }\n\n /**\n * @dev Tells if the intent and proposal deadlines should be validated\n In the case the intent is being executed on the destination chain of a cross-chain swap, the deadlines are ignored\n * @param intent Intent to be fulfilled\n */\n function _shouldValidateDeadlines(Intent memory intent) internal view returns (bool) {\n // Cross-chain operation can only be the first (and only) operation\n Operation memory operation = intent.operations[0];\n if (operation.opType != uint8(OpType.CrossChainSwap)) return true;\n SwapOperation memory swapIntent = abi.decode(operation.data, (SwapOperation));\n return swapIntent.sourceChain == block.chainid;\n }\n\n /**\n * @dev Emits operation custom events\n * @param operation Operation to emit the custom events for\n * @param proposal Proposal that fulfills the operation\n * @param intentHash Hash of the intent the operation belongs to\n * @param index Position of the operation on operations\n * @param output Encoded array of outputs\n */\n function _emitOperationEvents(\n Operation memory operation,\n Proposal memory proposal,\n bytes32 intentHash,\n uint256 index,\n bytes memory output\n ) internal {\n for (uint256 i = 0; i < operation.events.length; i++) {\n OperationEvent memory operationEvent = operation.events[i];\n emit OperationExecuted(\n operation.user,\n operationEvent.topic,\n uint8(operation.opType),\n operation,\n proposal,\n intentHash,\n index,\n output,\n operationEvent.data\n );\n }\n }\n\n /**\n * @dev Pays fees from the intent feePayer\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _payFees(Intent memory intent, Proposal memory proposal) internal {\n // A CrossChainSwap only pays fees on destination chain and must be the only operation\n if (intent.operations[0].opType == uint8(OpType.CrossChainSwap)) {\n SwapOperation memory swapOperation = abi.decode(intent.operations[0].data, (SwapOperation));\n if (swapOperation.sourceChain == block.chainid) return;\n }\n address from = intent.feePayer;\n address to = _msgSender();\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(from);\n for (uint256 i = 0; i < intent.maxFees.length; i++) {\n address token = intent.maxFees[i].token;\n if (!Denominations.isUSD(token)) _transferFrom(token, from, to, proposal.fees[i], isSmartAccount);\n }\n }\n\n /**\n * @dev Transfers tokens from one account to another\n * @param token Address of the token to transfer\n * @param from Address of the account sending the tokens\n * @param to Address of the account receiving the tokens\n * @param amount Amount of tokens to transfer\n * @param isSmartAccount Whether the sender is a smart account\n */\n function _transferFrom(address token, address from, address to, uint256 amount, bool isSmartAccount) internal {\n if (isSmartAccount) {\n smartAccountsHandler.transfer(from, token, to, amount);\n } else {\n IERC20(token).safeTransferFrom(from, to, amount);\n }\n }\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function _setSmartAccountsHandler(address newSmartAccountsHandler) internal {\n if (newSmartAccountsHandler == address(0)) revert SmartAccountsHandlerZero();\n smartAccountsHandler = newSmartAccountsHandler;\n emit SmartAccountsHandlerSet(newSmartAccountsHandler);\n }\n\n /**\n * @dev Sets the operations validator\n * @param newOperationsValidator New operations validator to be set\n */\n function _setOperationsValidator(address newOperationsValidator) internal {\n operationsValidator = newOperationsValidator;\n emit OperationsValidatorSet(newOperationsValidator);\n }\n\n /**\n * @dev Sets the dynamic call encoder\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function _setDynamicCallEncoder(address newDynamicCallEncoder) internal {\n if (newDynamicCallEncoder == address(0)) revert SettlerDynamicCallEncoderZero();\n dynamicCallEncoder = newDynamicCallEncoder;\n emit DynamicCallEncoderSet(newDynamicCallEncoder);\n }\n\n /**\n * @dev Sets a safeguard for a user\n * @param user Address of the user to set the safeguard for\n * @param safeguard Safeguard to be set\n */\n function _setSafeguard(address user, bytes memory safeguard) internal {\n delete _userSafeguard[user];\n _userSafeguard[user] = safeguard;\n emit SafeguardSet(user);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccount7702.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/Context.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccount.sol';\nimport '../utils/ERC20Helpers.sol';\nimport './SmartAccountBase.sol';\n\n/**\n * @title SmartAccount7702\n * @dev Provides the smart account logic to use with EIP7702\n */\ncontract SmartAccount7702 is SmartAccountBase {\n // Mimic settler reference\n // solhint-disable-next-line immutable-vars-naming\n address public immutable settler;\n\n /**\n * @dev The sender is not the settler\n */\n error SmartAccount7702SenderNotSettler();\n\n /**\n * @dev Reverts unless the sender is the settler\n */\n modifier onlySettler() {\n if (_msgSender() != settler) revert SmartAccount7702SenderNotSettler();\n _;\n }\n\n /**\n * @dev Creates a new SmartAccount7702 contract\n * @param _settler Address of the Mimic settler\n */\n constructor(address _settler) {\n settler = _settler;\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) public override onlySettler {\n super.transfer(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value) public override onlySettler returns (bytes memory) {\n // solhint-disable-next-line avoid-low-level-calls\n return super.call(target, data, value);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountBase.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/Context.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccount.sol';\nimport '../utils/ERC20Helpers.sol';\n\n/**\n * @title SmartAccountBase\n * @dev Provides the base logic for managing assets and executing arbitrary calls\n */\ncontract SmartAccountBase is ISmartAccount, Context, ERC165, ReentrancyGuard {\n /**\n * @dev Tells whether the contract supports the given interface ID. Overrides ERC165 to declare support for ISmartAccount interface.\n * @param interfaceId Interface ID is defined as the XOR of all function selectors in the interface\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {\n return interfaceId == type(ISmartAccount).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) public virtual override nonReentrant {\n ERC20Helpers.transfer(token, recipient, amount);\n emit Transferred(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value)\n public\n virtual\n override\n nonReentrant\n returns (bytes memory result)\n {\n result = Address.functionCallWithValue(target, data, value);\n emit Called(target, data, value, result);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountContract.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccountContract.sol';\nimport './SmartAccountBase.sol';\n\n/**\n * @title SmartAccountContract\n * @dev Provides the smart account logic to use as a standalone contract\n */\ncontract SmartAccountContract is ISmartAccountContract, Ownable, SmartAccountBase {\n // EIP1271 magic return value\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x1626ba7e;\n\n // EIP1271 invalid signature return value\n bytes4 internal constant EIP1271_INVALID_SIGNATURE = 0xffffffff;\n\n // List of account permissions\n mapping (address => bool) public isSignerAllowed;\n\n // Mimic settler reference\n address public settler;\n\n /**\n * @dev The settler is zero\n */\n error SmartAccountSettlerZero();\n\n /**\n * @dev The input arrays are not of equal length\n */\n error SmartAccountInputInvalidLength();\n\n /**\n * @dev The sender is not the owner or the settler\n */\n error SmartAccountUnauthorizedSender(address sender);\n\n /**\n * @dev Emitted every time the settler is set\n */\n event SettlerSet(address indexed settler);\n\n /**\n * @dev Emitted every time a signer allowance is set\n */\n event SignerAllowedSet(address indexed account, bool allowed);\n\n /**\n * @dev Reverts unless the sender is the owner or the settler\n */\n modifier onlyOwnerOrSettler() {\n address sender = _msgSender();\n bool isAuthorized = sender == owner() || sender == settler;\n if (!isAuthorized) revert SmartAccountUnauthorizedSender(sender);\n _;\n }\n\n /**\n * @dev Creates a new SmartAccount contract\n * @param _settler Address of the Mimic settler\n * @param _owner Address that will own the contract\n */\n constructor(address _settler, address _owner) Ownable(_owner) {\n _setSettler(_settler);\n }\n\n /**\n * @dev Tells whether the signature provided belongs to an allowed account.\n * @param hash Message signed by the account\n * @param signature Signature provided to be verified\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view override returns (bytes4) {\n (address signer, , ) = ECDSA.tryRecover(hash, signature);\n if (signer != address(0) && (signer == owner() || isSignerAllowed[signer])) return EIP1271_MAGIC_VALUE;\n return EIP1271_INVALID_SIGNATURE;\n }\n\n /**\n * @dev It allows receiving native token transfers\n */\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n /**\n * @dev Sets the settler. Sender must be the owner.\n * @param newSettler Address of the new settler to be set\n */\n function setSettler(address newSettler) external onlyOwner {\n _setSettler(newSettler);\n }\n\n /**\n * @dev Sets a list of allowed signers. Sender must be the owner.\n * @param accounts List of account addresses\n * @param allowances List of allowed condition per account\n */\n function setAllowedSigners(address[] memory accounts, bool[] memory allowances) external onlyOwner {\n if (accounts.length != allowances.length) revert SmartAccountInputInvalidLength();\n for (uint256 i = 0; i < accounts.length; i++) {\n address account = accounts[i];\n bool allowed = allowances[i];\n isSignerAllowed[account] = allowed;\n emit SignerAllowedSet(account, allowed);\n }\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the owner or the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount)\n public\n override(ISmartAccount, SmartAccountBase)\n onlyOwnerOrSettler\n {\n super.transfer(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the owner or the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value)\n public\n override(ISmartAccount, SmartAccountBase)\n onlyOwnerOrSettler\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n return super.call(target, data, value);\n }\n\n /**\n * @dev Sets the settler\n * @param newSettler Address of the new settler to be set\n */\n function _setSettler(address newSettler) internal {\n if (newSettler == address(0)) revert SmartAccountSettlerZero();\n settler = newSettler;\n emit SettlerSet(newSettler);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountsHandler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport '../interfaces/ISafe.sol';\nimport '../interfaces/ISmartAccount.sol';\nimport '../interfaces/ISmartAccountsHandler.sol';\nimport '../utils/Denominations.sol';\n\ncontract SmartAccountsHandler is ISmartAccountsHandler {\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address account) external view override returns (bool) {\n if (account.code.length == 0) return false;\n if (_isMimicSmartAccount(account)) return true;\n if (_isSafe(account)) return true;\n return false;\n }\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address account, address token, address to, uint256 amount) external override {\n if (_isMimicSmartAccount(account)) return ISmartAccount(account).transfer(token, to, amount);\n if (_isSafe(account)) return _transferSafe(account, token, to, amount);\n revert SmartAccountsHandlerUnsupportedAccount(account);\n }\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address account, address target, bytes memory data, uint256 value)\n external\n override\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n if (_isMimicSmartAccount(account)) return ISmartAccount(account).call(target, data, value);\n if (_isSafe(account)) return _callSafe(account, target, data, value);\n revert SmartAccountsHandlerUnsupportedAccount(account);\n }\n\n /**\n * @dev Performs a transfer from a safe\n */\n function _transferSafe(address account, address token, address to, uint256 amount) internal {\n Denominations.isNativeToken(token)\n ? _callSafe(account, to, new bytes(0), amount)\n : _callSafe(account, token, abi.encodeWithSelector(IERC20.transfer.selector, to, amount), 0);\n }\n\n /**\n * @dev Performs a call from a safe\n */\n function _callSafe(address account, address target, bytes memory data, uint256 value)\n internal\n returns (bytes memory)\n {\n (bool success, bytes memory result) = ISafe(account).execTransactionFromModuleReturnData(\n target,\n value,\n data,\n SafeOperation.Call\n );\n return\n data.length == 0\n ? Address.verifyCallResult(success, result)\n : Address.verifyCallResultFromTarget(target, success, result);\n }\n\n /**\n * @dev Tells whether an account is a Mimic smart account\n * @param account Address of the account being queried\n */\n function _isMimicSmartAccount(address account) internal view returns (bool) {\n try ISmartAccount(account).supportsInterface(type(ISmartAccount).interfaceId) returns (bool ok) {\n return ok;\n } catch {\n return false;\n }\n }\n\n /**\n * @dev Tells whether an account is a Gnosis Safe\n * @param account Address of the account being queried\n */\n function _isSafe(address account) internal view returns (bool) {\n try ISafe(account).getThreshold() returns (uint256) {\n return true;\n } catch {\n return false;\n }\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountsHandlerHelpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport '../interfaces/ISmartAccountsHandler.sol';\n\nlibrary SmartAccountsHandlerHelpers {\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address handler, address account) internal view returns (bool) {\n return ISmartAccountsHandler(handler).isSmartAccount(account);\n }\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address handler, address account, address token, address to, uint256 amount) internal {\n Address.functionDelegateCall(\n handler,\n abi.encodeWithSelector(ISmartAccountsHandler.transfer.selector, account, token, to, amount)\n );\n }\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address handler, address account, address target, bytes memory data, uint256 value)\n internal\n returns (bytes memory result)\n {\n result = Address.functionDelegateCall(\n handler,\n abi.encodeWithSelector(ISmartAccountsHandler.call.selector, account, target, data, value)\n );\n // Skip the ABI-encoded offset and length of the outer `bytes` to point at the inner payload\n assembly {\n result := add(result, 64)\n }\n }\n}\n" + }, + "project/contracts/test/CallMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\ncontract CallMock {\n event CallReceived(address indexed sender, uint256 value);\n error CallError();\n\n function call() external payable {\n emit CallReceived(msg.sender, msg.value);\n }\n\n function callError() external payable {\n revert CallError();\n }\n}\n" + }, + "project/contracts/test/dynamic-calls/StaticCallMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\ncontract StaticCallMock {\n struct StructMock {\n uint256 a;\n address b;\n }\n\n function returnUint(uint256 value) external pure returns (uint256) {\n return value;\n }\n\n function returnAddress(address value) external payable returns (address) {\n return value;\n }\n\n function returnArray(uint256[] calldata value) external pure returns (uint256[] memory) {\n return value;\n }\n\n function returnFixedArray(uint256[3] calldata value) external pure returns (uint256[3] memory) {\n return value;\n }\n\n function returnStruct(StructMock calldata value) external pure returns (StructMock memory) {\n return value;\n }\n}\n" + }, + "project/contracts/test/executors/EmptyExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\n\ncontract EmptyExecutorMock is IExecutor {\n event Executed();\n\n function execute(Operation memory, bytes32, bytes memory) external override {\n emit Executed();\n }\n}\n" + }, + "project/contracts/test/executors/MintExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../TokenMock.sol';\nimport '../../interfaces/IExecutor.sol';\n\n/* solhint-disable custom-errors */\n\ncontract MintExecutorMock is IExecutor {\n event Minted();\n\n function execute(Operation memory operation, bytes32, bytes memory proposalData) external override {\n require(\n operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap),\n 'Invalid operation type'\n );\n\n SwapProposal memory swapProposal = abi.decode(proposalData, (SwapProposal));\n (address[] memory tokens, uint256[] memory amounts) = abi.decode(swapProposal.data, (address[], uint256[]));\n\n require(tokens.length == amounts.length, 'Invalid inputs');\n\n for (uint256 i = 0; i < tokens.length; i++) {\n TokenMock(tokens[i]).mint(msg.sender, amounts[i]);\n emit Minted();\n }\n }\n}\n" + }, + "project/contracts/test/executors/ReentrantExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\nimport '../../interfaces/ISettler.sol';\n\ncontract ReentrantExecutorMock is IExecutor {\n // solhint-disable-next-line immutable-vars-naming\n address payable public immutable settler;\n\n constructor(address payable _settler) {\n settler = _settler;\n }\n\n function execute(Operation memory, bytes32, bytes memory) external override {\n Intent memory intent;\n Proposal memory proposal;\n ISettler(settler).execute(intent, proposal, new bytes(0));\n }\n}\n" + }, + "project/contracts/test/executors/TransferExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\nimport '../../utils/ERC20Helpers.sol';\n\n/* solhint-disable custom-errors */\n\ncontract TransferExecutorMock is IExecutor {\n event Transferred();\n\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n function execute(Operation memory operation, bytes32, bytes memory proposalData) external override {\n require(\n operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap),\n 'Invalid operation type'\n );\n\n SwapProposal memory swapProposal = abi.decode(proposalData, (SwapProposal));\n (address[] memory tokens, uint256[] memory amounts) = abi.decode(swapProposal.data, (address[], uint256[]));\n\n require(tokens.length == amounts.length, 'Invalid inputs');\n\n for (uint256 i = 0; i < tokens.length; i++) {\n ERC20Helpers.transfer(tokens[i], msg.sender, amounts[i]);\n emit Transferred();\n }\n }\n}\n" + }, + "project/contracts/test/SettlerV2Mock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../Settler.sol';\n\ncontract SettlerV2Mock is Settler {\n function someNewFunction() external pure returns (string memory) {\n return 'Some new function';\n }\n}\n" + }, + "project/contracts/test/smart-accounts/SafeMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/ISafe.sol';\n\ncontract SafeMock is ISafe {\n event ModuleTxExecuted(\n address indexed target,\n bytes data,\n uint256 value,\n SafeOperation operation,\n bool success,\n bytes result\n );\n\n receive() external payable {}\n\n function getThreshold() external pure returns (uint256) {\n return 1;\n }\n\n function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, SafeOperation operation)\n external\n returns (bool success, bytes memory result)\n {\n // solhint-disable-next-line avoid-low-level-calls\n (success, result) = to.call{ value: value }(data);\n emit ModuleTxExecuted(to, data, value, operation, success, result);\n }\n}\n" + }, + "project/contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../smart-accounts/SmartAccountsHandlerHelpers.sol';\n\ncontract SmartAccountsHandlerHelpersMock {\n using SmartAccountsHandlerHelpers for address;\n\n function call(address handler, address account, address target, bytes memory data, uint256 value)\n external\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n return handler.call(account, target, data, value);\n }\n}\n" + }, + "project/contracts/test/TokenMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\n\ncontract TokenMock is ERC20 {\n uint8 internal _decimals;\n\n constructor(string memory symbol, uint8 dec) ERC20(symbol, symbol) {\n _decimals = dec;\n }\n\n function mint(address account, uint256 amount) external {\n _mint(account, amount);\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n}\n" + }, + "project/contracts/test/utils/BytesHelpersMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.24;\n\nimport '../../utils/BytesHelpers.sol';\n\ncontract BytesHelpersMock {\n using BytesHelpers for bytes;\n\n function readWord0(bytes memory data) external pure returns (uint256) {\n return data.readWord0();\n }\n\n function readWord1(bytes memory data) external pure returns (uint256) {\n return data.readWord1();\n }\n\n function slice(bytes memory data, uint256 start, uint256 end) external pure returns (bytes memory) {\n return data.slice(start, end);\n }\n\n function sliceFrom(bytes memory data, uint256 start) external pure returns (bytes memory) {\n return data.sliceFrom(start);\n }\n}\n" + }, + "project/contracts/test/utils/DenominationsMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../../utils/Denominations.sol';\n\n// solhint-disable func-name-mixedcase\n\ncontract DenominationsMock {\n function NATIVE_TOKEN() external pure returns (address) {\n return Denominations.NATIVE_TOKEN;\n }\n\n function USD() external pure returns (address) {\n return Denominations.USD;\n }\n}\n" + }, + "project/contracts/test/utils/ERC20HelpersMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../../utils/ERC20Helpers.sol';\n\ncontract ERC20HelpersMock {\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n function approve(address token, address to, uint256 amount) external {\n ERC20Helpers.approve(token, to, amount);\n }\n\n function transfer(address token, address to, uint256 amount) external {\n ERC20Helpers.transfer(token, to, amount);\n }\n\n function balanceOf(address token, address account) external view returns (uint256) {\n return ERC20Helpers.balanceOf(token, account);\n }\n}\n" + }, + "project/contracts/utils/BytesHelpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.24;\n\n/**\n * @title BytesHelpers\n * @dev Collection of low-level helpers to operate on `bytes` values in memory.\n */\nlibrary BytesHelpers {\n /**\n * @dev Thrown when a slice operation exceeds the bounds of the input bytes\n */\n error BytesLibSliceOutOfBounds();\n\n /**\n * @dev Reads the first 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @return result First ABI word of `data`\n */\n function readWord0(bytes memory data) internal pure returns (uint256) {\n return readWord(data, 0);\n }\n\n /**\n * @dev Reads the second 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @return result Second ABI word of `data`\n */\n function readWord1(bytes memory data) internal pure returns (uint256) {\n return readWord(data, 1);\n }\n\n /**\n * @dev Reads the N-th 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @param index Word index to read (0-based)\n * @return result N-th ABI word of `data`\n */\n function readWord(bytes memory data, uint256 index) private pure returns (uint256 result) {\n assembly {\n result := mload(add(data, add(32, mul(index, 32))))\n }\n }\n\n /**\n * @dev Returns a slice of a bytes array from `start` (inclusive) to `end` (exclusive)\n * @param data Bytes array to slice\n * @param start Starting byte index (inclusive)\n * @param end Ending byte index (exclusive)\n */\n function slice(bytes memory data, uint256 start, uint256 end) internal pure returns (bytes memory out) {\n if (end < start) revert BytesLibSliceOutOfBounds();\n if (end > data.length) revert BytesLibSliceOutOfBounds();\n\n uint256 len = end - start;\n out = new bytes(len);\n\n assembly {\n let src := add(add(data, 32), start)\n let dst := add(out, 32)\n mcopy(dst, src, len)\n }\n }\n\n /**\n * @dev Returns a slice of a bytes array starting at `start` until the end\n * @param data Bytes array to slice\n * @param start Starting byte index (inclusive)\n */\n function sliceFrom(bytes memory data, uint256 start) internal pure returns (bytes memory out) {\n return slice(data, start, data.length);\n }\n}\n" + }, + "project/contracts/utils/Denominations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @title Denominations\n * @dev Provides a list of ground denominations for those tokens that cannot be represented by an ERC20.\n * For now, the only needed is the native token that could be ETH, MATIC, or other depending on the layer being operated.\n */\nlibrary Denominations {\n address internal constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n // Fiat currencies follow https://en.wikipedia.org/wiki/ISO_4217\n address internal constant USD = address(840);\n\n function isUSD(address token) internal pure returns (bool) {\n return token == USD;\n }\n\n function isNativeToken(address token) internal pure returns (bool) {\n return token == NATIVE_TOKEN;\n }\n}\n" + }, + "project/contracts/utils/ERC20Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport './Denominations.sol';\n\n/**\n * @title ERC20Helpers\n * @dev Provides a list of ERC20 helper methods\n */\nlibrary ERC20Helpers {\n function approve(address token, address to, uint256 amount) internal {\n SafeERC20.forceApprove(IERC20(token), to, amount);\n }\n\n function transfer(address token, address to, uint256 amount) internal {\n if (Denominations.isNativeToken(token)) Address.sendValue(payable(to), amount);\n else SafeERC20.safeTransfer(IERC20(token), to, amount);\n }\n\n function balanceOf(address token, address account) internal view returns (uint256) {\n if (Denominations.isNativeToken(token)) return address(account).balance;\n else return IERC20(token).balanceOf(address(account));\n }\n}\n" + }, + "project/contracts/utils/MimicHelper.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @title Mimic Helper\n * @dev Collection of helper functions for the Mimic Protocol\n */\ncontract MimicHelper {\n // Custom byte storage per user and key\n mapping (address => mapping (string => bytes)) internal _customStorage;\n\n /**\n * @dev Emitted every time the storage is set\n */\n event StorageSet(address indexed user, string indexed key, bytes indexed data);\n\n /**\n * @dev Tells the native token balance of an address\n * @param target Address to get native token balance\n */\n function getNativeTokenBalance(address target) external view returns (uint256) {\n return target.balance;\n }\n\n /**\n * @dev Tells the code of an address\n * @param target Address to get code\n */\n function getCode(address target) external view returns (bytes memory) {\n return target.code;\n }\n\n /**\n * @dev Tells the data set for the user and the key\n * @param user Address of the user being queried\n * @param key String of the key being queried\n */\n function getStorage(address user, string calldata key) external view returns (bytes memory) {\n return _customStorage[user][key];\n }\n\n /**\n * @dev Sets a data for the user and a key\n * @param key String of the key to set the data for\n * @param data Bytes to be set\n */\n function setStorage(string calldata key, bytes memory data) external {\n _customStorage[msg.sender][key] = data;\n emit StorageSet(msg.sender, key, data);\n }\n}\n" + } + } + } +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-42161/deployed_addresses.json b/packages/evm/ignition/deployments/chain-42161/deployed_addresses.json index 5bb6950..70484e3 100644 --- a/packages/evm/ignition/deployments/chain-42161/deployed_addresses.json +++ b/packages/evm/ignition/deployments/chain-42161/deployed_addresses.json @@ -12,5 +12,9 @@ "Create3DynamicCallEncoder#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", "Create3DynamicCallEncoder#DynamicCallEncoder": "0xb3F0F65FA3f94890B7a5Bd17843a6fdfB9407dbD", "Create3Proxy#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", - "Create3Proxy#Proxy": "0x8be430d29a2c5692f9345a28506b849C6a99eDaA" + "Create3Proxy#Proxy": "0x8be430d29a2c5692f9345a28506b849C6a99eDaA", + "Create3SettlerV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", + "Create3SettlerV1#Settler": "0x3734D7284f46037688252b13ef6d88E3FFDF5e1B", + "Create3DynamicCallEncoderV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", + "Create3DynamicCallEncoderV1#DynamicCallEncoder": "0x183E61BDE23a80f4D1e003653288d4B4551681ed" } \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-42161/journal.jsonl b/packages/evm/ignition/deployments/chain-42161/journal.jsonl index cbf4d9e..3c045c0 100644 --- a/packages/evm/ignition/deployments/chain-42161/journal.jsonl +++ b/packages/evm/ignition/deployments/chain-42161/journal.jsonl @@ -106,4 +106,22 @@ {"futureId":"Create3SmartAccount7702#ICreateX.deployCreate3","hash":"0xa960be3f59ecee185c65fdb07e53ee8832c7eec229c2f9222dab50fa4f2f2e2b","networkInteractionId":1,"receipt":{"blockHash":"0x2ab5f383f12a08819e491f758a0f2cefa3ee471bcdf14a91ab5bdc15c37f7f4c","blockNumber":457948140,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":0,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x000000000000000000000000b800ea953426e361efda80da69765895ab3b04da","0x4d548e60a06ca5826dcab93682802743ae2369c7da6162da7a3f4201826a6d33"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":1,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x00000000000000000000000014ae3c251881d2214e376bfa38dd98a4bd33550c"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} {"futureId":"Create3SmartAccount7702#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} {"artifactId":"Create3SmartAccount7702#ICreateX","dependencies":["Create3SmartAccount7702#ICreateX.deployCreate3","Create3SmartAccount7702#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","strategy":"basic","strategyConfig":{},"txToReadFrom":"0xa960be3f59ecee185c65fdb07e53ee8832c7eec229c2f9222dab50fa4f2f2e2b","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} -{"artifactId":"Create3SmartAccount7702#SmartAccount7702","contractAddress":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","contractName":"SmartAccount7702","dependencies":["Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SmartAccount7702#SmartAccount7702","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} \ No newline at end of file +{"artifactId":"Create3SmartAccount7702#SmartAccount7702","contractAddress":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","contractName":"SmartAccount7702","dependencies":["Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SmartAccount7702#SmartAccount7702","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","contractName":"ICreateX","dependencies":[],"futureId":"Create3SettlerV1#ICreateX","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"args":["0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b000000000000000004302605","0x6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033"],"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","dependencies":["Create3SettlerV1#ICreateX"],"from":"0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b","functionName":"deployCreate3","futureId":"Create3SettlerV1#ICreateX.deployCreate3","strategy":"basic","strategyConfig":{},"type":"CALL_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000005d166080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c003300000000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":66,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":66,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"40244000"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"0"}},"hash":"0xb6ad6e524baa173259021613b068588d0c1db34bab1f493d620b4aa1fd873ce8"},"type":"TRANSACTION_SEND"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","hash":"0xb6ad6e524baa173259021613b068588d0c1db34bab1f493d620b4aa1fd873ce8","networkInteractionId":1,"receipt":{"blockHash":"0x249fc4febecfd1c085d28d15e4f3af56721844a9f236a29930d42f876a987b4b","blockNumber":457995010,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":6,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x000000000000000000000000b5439ac30ce4daeb02b265d758436e65087047ab","0x660e7900ab9b67f261d92573714530e140aa4f3b2855e1dd677cfa672309b2ee"]},{"address":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","data":"0x000000000000000000000000000000000000000000000000ffffffffffffffff","logIndex":7,"topics":["0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":8,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x0000000000000000000000003734d7284f46037688252b13ef6d88e3ffdf5e1b"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} +{"artifactId":"Create3SettlerV1#ICreateX","dependencies":["Create3SettlerV1#ICreateX.deployCreate3","Create3SettlerV1#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3SettlerV1#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","strategy":"basic","strategyConfig":{},"txToReadFrom":"0xb6ad6e524baa173259021613b068588d0c1db34bab1f493d620b4aa1fd873ce8","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3SettlerV1#Settler","contractAddress":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","contractName":"Settler","dependencies":["Create3SettlerV1#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SettlerV1#Settler","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3DynamicCallEncoderV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","contractName":"ICreateX","dependencies":[],"futureId":"Create3DynamicCallEncoderV1#ICreateX","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"args":["0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b000000000000000004302606","0x6080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033"],"artifactId":"Create3DynamicCallEncoderV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","dependencies":["Create3DynamicCallEncoderV1#ICreateX"],"from":"0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b","functionName":"deployCreate3","futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","strategy":"basic","strategyConfig":{},"type":"CALL_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000c586080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c00330000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":68,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":68,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"40000000"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"0"}},"hash":"0xbe05367d809429cb458261b1dad5481f3fba466bc8534ec7c53357544ac57bd8"},"type":"TRANSACTION_SEND"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","hash":"0xbe05367d809429cb458261b1dad5481f3fba466bc8534ec7c53357544ac57bd8","networkInteractionId":1,"receipt":{"blockHash":"0x591f5f93f95fd3b697042fbe8fa617e19db70cd3f5d5c81cc294d7489a7a3d4c","blockNumber":458000023,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":0,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x0000000000000000000000001d9bd3390aaef5bbcf3beb4f60e0ee28805f6779","0xa13cc826172bbf7683ce89033f741800ae55529a93ee495908820a8471d913b0"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":1,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x000000000000000000000000183e61bde23a80f4d1e003653288d4b4551681ed"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} +{"artifactId":"Create3DynamicCallEncoderV1#ICreateX","dependencies":["Create3DynamicCallEncoderV1#ICreateX.deployCreate3","Create3DynamicCallEncoderV1#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3DynamicCallEncoderV1#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x183E61BDE23a80f4D1e003653288d4B4551681ed","strategy":"basic","strategyConfig":{},"txToReadFrom":"0xbe05367d809429cb458261b1dad5481f3fba466bc8534ec7c53357544ac57bd8","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","contractAddress":"0x183E61BDE23a80f4D1e003653288d4B4551681ed","contractName":"DynamicCallEncoder","dependencies":["Create3DynamicCallEncoderV1#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-43114/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json b/packages/evm/ignition/deployments/chain-43114/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-43114/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-43114/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json b/packages/evm/ignition/deployments/chain-43114/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json new file mode 100644 index 0000000..aa424ed --- /dev/null +++ b/packages/evm/ignition/deployments/chain-43114/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json @@ -0,0 +1,117 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "DynamicCallEncoder", + "sourceName": "contracts/dynamic-calls/DynamicCallEncoder.sol", + "abi": [ + { + "inputs": [], + "name": "BytesLibSliceOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderBadLength", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderEmptyDynamic", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderInvalidArgKind", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariableOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariableRefBadLength", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariablesLengthOutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum DynamicArgKind", + "name": "kind", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "isDynamic", + "type": "bool" + } + ], + "internalType": "struct DynamicArg[]", + "name": "arguments", + "type": "tuple[]" + } + ], + "internalType": "struct DynamicCall", + "name": "dynamicCall", + "type": "tuple" + }, + { + "internalType": "bytes[][]", + "name": "variables", + "type": "bytes[][]" + }, + { + "internalType": "uint256", + "name": "variablesLength", + "type": "uint256" + } + ], + "name": "encode", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/dynamic-calls/DynamicCallEncoder.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-43114/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json b/packages/evm/ignition/deployments/chain-43114/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-43114/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-43114/artifacts/Create3DynamicCallEncoderV1#ICreateX.json b/packages/evm/ignition/deployments/chain-43114/artifacts/Create3DynamicCallEncoderV1#ICreateX.json new file mode 100644 index 0000000..837192d --- /dev/null +++ b/packages/evm/ignition/deployments/chain-43114/artifacts/Create3DynamicCallEncoderV1#ICreateX.json @@ -0,0 +1,51 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "ICreateX", + "sourceName": "contracts/interfaces/ICreateX.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "name": "ContractCreation", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + } + ], + "name": "deployCreate3", + "outputs": [ + { + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/interfaces/ICreateX.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-43114/artifacts/Create3SettlerV1#ICreateX.dbg.json b/packages/evm/ignition/deployments/chain-43114/artifacts/Create3SettlerV1#ICreateX.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-43114/artifacts/Create3SettlerV1#ICreateX.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-43114/artifacts/Create3SettlerV1#ICreateX.json b/packages/evm/ignition/deployments/chain-43114/artifacts/Create3SettlerV1#ICreateX.json new file mode 100644 index 0000000..837192d --- /dev/null +++ b/packages/evm/ignition/deployments/chain-43114/artifacts/Create3SettlerV1#ICreateX.json @@ -0,0 +1,51 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "ICreateX", + "sourceName": "contracts/interfaces/ICreateX.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "name": "ContractCreation", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + } + ], + "name": "deployCreate3", + "outputs": [ + { + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/interfaces/ICreateX.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-43114/artifacts/Create3SettlerV1#Settler.dbg.json b/packages/evm/ignition/deployments/chain-43114/artifacts/Create3SettlerV1#Settler.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-43114/artifacts/Create3SettlerV1#Settler.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-43114/artifacts/Create3SettlerV1#Settler.json b/packages/evm/ignition/deployments/chain-43114/artifacts/Create3SettlerV1#Settler.json new file mode 100644 index 0000000..cd9fdca --- /dev/null +++ b/packages/evm/ignition/deployments/chain-43114/artifacts/Create3SettlerV1#Settler.json @@ -0,0 +1,1481 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "Settler", + "sourceName": "contracts/Settler.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposed", + "type": "uint256" + } + ], + "name": "SettlerAmountOutLtProposed", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerCrossChainSwapMustBeOnlyOperation", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerDynamicCallEncoderZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "executor", + "type": "address" + } + ], + "name": "SettlerExecutorNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "SettlerIntentAlreadyExecuted", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerIntentOperationsEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SettlerIntentPastDeadline", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "current", + "type": "uint256" + } + ], + "name": "SettlerIntentValidationsNotEnough", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "name": "SettlerInvalidChain", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerInvalidProposedAmounts", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "SettlerInvalidRecipient", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "settler", + "type": "address" + } + ], + "name": "SettlerInvalidSettler", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerNonceZero", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerOperationChainsMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "post", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pre", + "type": "uint256" + } + ], + "name": "SettlerPostBalanceOutLtPre", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerProposalDataInvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerProposalDataNotEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SettlerProposalPastDeadline", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + } + ], + "name": "SettlerProposalSignerNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minAmount", + "type": "uint256" + } + ], + "name": "SettlerProposedAmountLtMinAmount", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerRescueFundsRecipientZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gasUsed", + "type": "uint256" + } + ], + "name": "SettlerSimulationSuccess", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerSolverFeeInvalidLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "SettlerSolverFeeTooHigh", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "solver", + "type": "address" + } + ], + "name": "SettlerSolverNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "lengthRequested", + "type": "uint256" + } + ], + "name": "SettlerTooManySafeguards", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + } + ], + "name": "SettlerUnknownOperationType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "SettlerUserNotSmartAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "previous", + "type": "address" + }, + { + "internalType": "address", + "name": "current", + "type": "address" + } + ], + "name": "SettlerValidatorDuplicatedOrUnsorted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "validator", + "type": "address" + } + ], + "name": "SettlerValidatorNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "SmartAccountsHandlerZero", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dynamicCallEncoder", + "type": "address" + } + ], + "name": "DynamicCallEncoderSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "FundsRescued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "indexed": false, + "internalType": "struct Operation", + "name": "operation", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "indexed": false, + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "intentHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "output", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "OperationExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operationsValidator", + "type": "address" + } + ], + "name": "OperationsValidatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "proposal", + "type": "bytes32" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "SafeguardSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "smartAccountsHandler", + "type": "address" + } + ], + "name": "SmartAccountsHandlerSet", + "type": "event" + }, + { + "inputs": [], + "name": "controller", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dynamicCallEncoder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "getIntentBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + } + ], + "name": "getIntentHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "internalType": "address", + "name": "solver", + "type": "address" + } + ], + "name": "getProposalHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getUserSafeguard", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controller", + "type": "address" + }, + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_dynamicCallEncoder", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "operationsValidator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "rescueFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newDynamicCallEncoder", + "type": "address" + } + ], + "name": "setDynamicCallEncoder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOperationsValidator", + "type": "address" + } + ], + "name": "setOperationsValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "safeguard", + "type": "bytes" + } + ], + "name": "setSafeguard", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newSmartAccountsHandler", + "type": "address" + } + ], + "name": "setSmartAccountsHandler", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "simulate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "smartAccountsHandler", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033", + "deployedBytecode": "0x60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/Settler.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-43114/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json b/packages/evm/ignition/deployments/chain-43114/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json new file mode 100644 index 0000000..dc33803 --- /dev/null +++ b/packages/evm/ignition/deployments/chain-43114/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json @@ -0,0 +1,373 @@ +{ + "_format": "hh3-sol-build-info-1", + "id": "167571dafa48e7ff636310c6c9f0fc8e202e44bc", + "solcVersion": "0.8.28", + "solcLongVersion": "0.8.28+commit.7893614a", + "userSourceNameMap": { + "contracts/Controller.sol": "project/contracts/Controller.sol", + "contracts/Intents.sol": "project/contracts/Intents.sol", + "contracts/Settler.sol": "project/contracts/Settler.sol", + "contracts/dynamic-calls/DynamicCallEncoder.sol": "project/contracts/dynamic-calls/DynamicCallEncoder.sol", + "contracts/dynamic-calls/DynamicCallTypes.sol": "project/contracts/dynamic-calls/DynamicCallTypes.sol", + "contracts/interfaces/IController.sol": "project/contracts/interfaces/IController.sol", + "contracts/interfaces/ICreateX.sol": "project/contracts/interfaces/ICreateX.sol", + "contracts/interfaces/IDynamicCallEncoder.sol": "project/contracts/interfaces/IDynamicCallEncoder.sol", + "contracts/interfaces/IExecutor.sol": "project/contracts/interfaces/IExecutor.sol", + "contracts/interfaces/IOperationsValidator.sol": "project/contracts/interfaces/IOperationsValidator.sol", + "contracts/interfaces/IPaymentsReceiver.sol": "project/contracts/interfaces/IPaymentsReceiver.sol", + "contracts/interfaces/ISafe.sol": "project/contracts/interfaces/ISafe.sol", + "contracts/interfaces/ISettler.sol": "project/contracts/interfaces/ISettler.sol", + "contracts/interfaces/ISmartAccount.sol": "project/contracts/interfaces/ISmartAccount.sol", + "contracts/interfaces/ISmartAccountContract.sol": "project/contracts/interfaces/ISmartAccountContract.sol", + "contracts/interfaces/ISmartAccountsHandler.sol": "project/contracts/interfaces/ISmartAccountsHandler.sol", + "contracts/payments/PaymentsReceiver.sol": "project/contracts/payments/PaymentsReceiver.sol", + "contracts/proxy/Proxy.sol": "project/contracts/proxy/Proxy.sol", + "contracts/safeguards/BaseOperationsValidator.sol": "project/contracts/safeguards/BaseOperationsValidator.sol", + "contracts/safeguards/CallOperationsValidator.sol": "project/contracts/safeguards/CallOperationsValidator.sol", + "contracts/safeguards/DynamicCallOperationsValidator.sol": "project/contracts/safeguards/DynamicCallOperationsValidator.sol", + "contracts/safeguards/OperationsValidator.sol": "project/contracts/safeguards/OperationsValidator.sol", + "contracts/safeguards/Safeguards.sol": "project/contracts/safeguards/Safeguards.sol", + "contracts/safeguards/SwapOperationsValidator.sol": "project/contracts/safeguards/SwapOperationsValidator.sol", + "contracts/safeguards/TransferOperationsValidator.sol": "project/contracts/safeguards/TransferOperationsValidator.sol", + "contracts/smart-accounts/SmartAccount7702.sol": "project/contracts/smart-accounts/SmartAccount7702.sol", + "contracts/smart-accounts/SmartAccountBase.sol": "project/contracts/smart-accounts/SmartAccountBase.sol", + "contracts/smart-accounts/SmartAccountContract.sol": "project/contracts/smart-accounts/SmartAccountContract.sol", + "contracts/smart-accounts/SmartAccountsHandler.sol": "project/contracts/smart-accounts/SmartAccountsHandler.sol", + "contracts/smart-accounts/SmartAccountsHandlerHelpers.sol": "project/contracts/smart-accounts/SmartAccountsHandlerHelpers.sol", + "contracts/test/CallMock.sol": "project/contracts/test/CallMock.sol", + "contracts/test/SettlerV2Mock.sol": "project/contracts/test/SettlerV2Mock.sol", + "contracts/test/TokenMock.sol": "project/contracts/test/TokenMock.sol", + "contracts/test/dynamic-calls/StaticCallMock.sol": "project/contracts/test/dynamic-calls/StaticCallMock.sol", + "contracts/test/executors/EmptyExecutorMock.sol": "project/contracts/test/executors/EmptyExecutorMock.sol", + "contracts/test/executors/MintExecutorMock.sol": "project/contracts/test/executors/MintExecutorMock.sol", + "contracts/test/executors/ReentrantExecutorMock.sol": "project/contracts/test/executors/ReentrantExecutorMock.sol", + "contracts/test/executors/TransferExecutorMock.sol": "project/contracts/test/executors/TransferExecutorMock.sol", + "contracts/test/smart-accounts/SafeMock.sol": "project/contracts/test/smart-accounts/SafeMock.sol", + "contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol": "project/contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol", + "contracts/test/utils/BytesHelpersMock.sol": "project/contracts/test/utils/BytesHelpersMock.sol", + "contracts/test/utils/DenominationsMock.sol": "project/contracts/test/utils/DenominationsMock.sol", + "contracts/test/utils/ERC20HelpersMock.sol": "project/contracts/test/utils/ERC20HelpersMock.sol", + "contracts/utils/BytesHelpers.sol": "project/contracts/utils/BytesHelpers.sol", + "contracts/utils/Denominations.sol": "project/contracts/utils/Denominations.sol", + "contracts/utils/ERC20Helpers.sol": "project/contracts/utils/ERC20Helpers.sol", + "contracts/utils/MimicHelper.sol": "project/contracts/utils/MimicHelper.sol", + "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol": "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/ProxyAdmin.sol" + }, + "input": { + "language": "Solidity", + "settings": { + "optimizer": { + "enabled": true, + "runs": 1000 + }, + "evmVersion": "cancun", + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "remappings": [ + "npm/@openzeppelin/contracts-upgradeable@5.3.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "npm/@openzeppelin/contracts-upgradeable@5.3.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/" + ] + }, + "sources": { + "npm/@openzeppelin/contracts-upgradeable@5.3.0/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\n struct OwnableStorage {\n address _owner;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Ownable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\n\n function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\n assembly {\n $.slot := OwnableStorageLocation\n }\n }\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n function __Ownable_init(address initialOwner) internal onlyInitializing {\n __Ownable_init_unchained(initialOwner);\n }\n\n function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n OwnableStorage storage $ = _getOwnableStorage();\n return $._owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n OwnableStorage storage $ = _getOwnableStorage();\n address oldOwner = $._owner;\n $._owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Storage of the initializable contract.\n *\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\n * when using with upgradeable contracts.\n *\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\n */\n struct InitializableStorage {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n uint64 _initialized;\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool _initializing;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Initializable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\n\n /**\n * @dev The contract is already initialized.\n */\n error InvalidInitialization();\n\n /**\n * @dev The contract is not initializing.\n */\n error NotInitializing();\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint64 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\n * production.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n // Cache values to avoid duplicated sloads\n bool isTopLevelCall = !$._initializing;\n uint64 initialized = $._initialized;\n\n // Allowed calls:\n // - initialSetup: the contract is not in the initializing state and no previous version was\n // initialized\n // - construction: the contract is initialized at version 1 (no reinitialization) and the\n // current contract is just being deployed\n bool initialSetup = initialized == 0 && isTopLevelCall;\n bool construction = initialized == 1 && address(this).code.length == 0;\n\n if (!initialSetup && !construction) {\n revert InvalidInitialization();\n }\n $._initialized = 1;\n if (isTopLevelCall) {\n $._initializing = true;\n }\n _;\n if (isTopLevelCall) {\n $._initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint64 version) {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing || $._initialized >= version) {\n revert InvalidInitialization();\n }\n $._initialized = version;\n $._initializing = true;\n _;\n $._initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n _checkInitializing();\n _;\n }\n\n /**\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\n */\n function _checkInitializing() internal view virtual {\n if (!_isInitializing()) {\n revert NotInitializing();\n }\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing) {\n revert InvalidInitialization();\n }\n if ($._initialized != type(uint64).max) {\n $._initialized = type(uint64).max;\n emit Initialized(type(uint64).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint64) {\n return _getInitializableStorage()._initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _getInitializableStorage()._initializing;\n }\n\n /**\n * @dev Pointer to storage slot. Allows integrators to override it with a custom storage location.\n *\n * NOTE: Consider following the ERC-7201 formula to derive storage locations.\n */\n function _initializableStorageSlot() internal pure virtual returns (bytes32) {\n return INITIALIZABLE_STORAGE;\n }\n\n /**\n * @dev Returns a pointer to the storage namespace.\n */\n // solhint-disable-next-line var-name-mixedcase\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\n bytes32 slot = _initializableStorageSlot();\n assembly {\n $.slot := slot\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/cryptography/EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.20;\n\nimport {MessageHashUtils} from \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\nimport {IERC5267} from \"@openzeppelin/contracts/interfaces/IERC5267.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose\n * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract\n * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to\n * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\n * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\n */\nabstract contract EIP712Upgradeable is Initializable, IERC5267 {\n bytes32 private constant TYPE_HASH =\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /// @custom:storage-location erc7201:openzeppelin.storage.EIP712\n struct EIP712Storage {\n /// @custom:oz-renamed-from _HASHED_NAME\n bytes32 _hashedName;\n /// @custom:oz-renamed-from _HASHED_VERSION\n bytes32 _hashedVersion;\n\n string _name;\n string _version;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.EIP712\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant EIP712StorageLocation = 0xa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100;\n\n function _getEIP712Storage() private pure returns (EIP712Storage storage $) {\n assembly {\n $.slot := EIP712StorageLocation\n }\n }\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n __EIP712_init_unchained(name, version);\n }\n\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n EIP712Storage storage $ = _getEIP712Storage();\n $._name = name;\n $._version = version;\n\n // Reset prior values in storage if upgrading\n $._hashedName = 0;\n $._hashedVersion = 0;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n return _buildDomainSeparator();\n }\n\n function _buildDomainSeparator() private view returns (bytes32) {\n return keccak256(abi.encode(TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n\n /**\n * @inheritdoc IERC5267\n */\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n EIP712Storage storage $ = _getEIP712Storage();\n // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized\n // and the EIP712 domain is not reliable, as it will be missing name and version.\n require($._hashedName == 0 && $._hashedVersion == 0, \"EIP712: Uninitialized\");\n\n return (\n hex\"0f\", // 01111\n _EIP712Name(),\n _EIP712Version(),\n block.chainid,\n address(this),\n bytes32(0),\n new uint256[](0)\n );\n }\n\n /**\n * @dev The name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712Name() internal view virtual returns (string memory) {\n EIP712Storage storage $ = _getEIP712Storage();\n return $._name;\n }\n\n /**\n * @dev The version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712Version() internal view virtual returns (string memory) {\n EIP712Storage storage $ = _getEIP712Storage();\n return $._version;\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead.\n */\n function _EIP712NameHash() internal view returns (bytes32) {\n EIP712Storage storage $ = _getEIP712Storage();\n string memory name = _EIP712Name();\n if (bytes(name).length > 0) {\n return keccak256(bytes(name));\n } else {\n // If the name is empty, the contract may have been upgraded without initializing the new storage.\n // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design.\n bytes32 hashedName = $._hashedName;\n if (hashedName != 0) {\n return hashedName;\n } else {\n return keccak256(\"\");\n }\n }\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead.\n */\n function _EIP712VersionHash() internal view returns (bytes32) {\n EIP712Storage storage $ = _getEIP712Storage();\n string memory version = _EIP712Version();\n if (bytes(version).length > 0) {\n return keccak256(bytes(version));\n } else {\n // If the version is empty, the contract may have been upgraded without initializing the new storage.\n // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design.\n bytes32 hashedVersion = $._hashedVersion;\n if (hashedVersion != 0) {\n return hashedVersion;\n } else {\n return keccak256(\"\");\n }\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/ReentrancyGuardUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\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 EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\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 ReentrancyGuardUpgradeable is Initializable {\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 /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard\n struct ReentrancyGuardStorage {\n uint256 _status;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.ReentrancyGuard\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;\n\n function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) {\n assembly {\n $.slot := ReentrancyGuardStorageLocation\n }\n }\n\n /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\n\n function __ReentrancyGuard_init() internal onlyInitializing {\n __ReentrancyGuard_init_unchained();\n }\n\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\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 ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n // On the first call to nonReentrant, _status will be NOT_ENTERED\n if ($._status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n $._status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\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 ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n return $._status == ENTERED;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC-20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC-721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC-1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n */\ninterface IERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with `hash`\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1363.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n /*\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n * 0xb0202a11 ===\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n */\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @param data Additional data with no specified format, sent in call to `spender`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1967.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1967.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n */\ninterface IERC1967 {\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Emitted when the beacon is changed.\n */\n event BeaconUpgraded(address indexed beacon);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC5267.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)\n\npragma solidity ^0.8.20;\n\ninterface IERC5267 {\n /**\n * @dev MAY be emitted to signal that the domain could have changed.\n */\n event EIP712DomainChanged();\n\n /**\n * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\n * signature.\n */\n function eip712Domain()\n external\n view\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n );\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {UpgradeableBeacon} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.22;\n\nimport {Proxy} from \"../Proxy.sol\";\nimport {ERC1967Utils} from \"./ERC1967Utils.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `implementation`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `implementation`. This will typically be an\n * encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\n *\n * Requirements:\n *\n * - If `data` is empty, `msg.value` must be zero.\n */\n constructor(address implementation, bytes memory _data) payable {\n ERC1967Utils.upgradeToAndCall(implementation, _data);\n }\n\n /**\n * @dev Returns the current implementation address.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using\n * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function _implementation() internal view virtual override returns (address) {\n return ERC1967Utils.getImplementation();\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/ERC1967/ERC1967Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Utils.sol)\n\npragma solidity ^0.8.22;\n\nimport {IBeacon} from \"../beacon/IBeacon.sol\";\nimport {IERC1967} from \"../../interfaces/IERC1967.sol\";\nimport {Address} from \"../../utils/Address.sol\";\nimport {StorageSlot} from \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This library provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] slots.\n */\nlibrary ERC1967Utils {\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev The `implementation` of the proxy is invalid.\n */\n error ERC1967InvalidImplementation(address implementation);\n\n /**\n * @dev The `admin` of the proxy is invalid.\n */\n error ERC1967InvalidAdmin(address admin);\n\n /**\n * @dev The `beacon` of the proxy is invalid.\n */\n error ERC1967InvalidBeacon(address beacon);\n\n /**\n * @dev An upgrade function sees `msg.value > 0` that may be lost.\n */\n error ERC1967NonPayable();\n\n /**\n * @dev Returns the current implementation address.\n */\n function getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the ERC-1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n if (newImplementation.code.length == 0) {\n revert ERC1967InvalidImplementation(newImplementation);\n }\n StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Performs implementation upgrade with additional setup call if data is nonempty.\n * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n * to avoid stuck value in the contract.\n *\n * Emits an {IERC1967-Upgraded} event.\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) internal {\n _setImplementation(newImplementation);\n emit IERC1967.Upgraded(newImplementation);\n\n if (data.length > 0) {\n Address.functionDelegateCall(newImplementation, data);\n } else {\n _checkNonPayable();\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Returns the current admin.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using\n * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the ERC-1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n if (newAdmin == address(0)) {\n revert ERC1967InvalidAdmin(address(0));\n }\n StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {IERC1967-AdminChanged} event.\n */\n function changeAdmin(address newAdmin) internal {\n emit IERC1967.AdminChanged(getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is the keccak-256 hash of \"eip1967.proxy.beacon\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Returns the current beacon.\n */\n function getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the ERC-1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n if (newBeacon.code.length == 0) {\n revert ERC1967InvalidBeacon(newBeacon);\n }\n\n StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;\n\n address beaconImplementation = IBeacon(newBeacon).implementation();\n if (beaconImplementation.code.length == 0) {\n revert ERC1967InvalidImplementation(beaconImplementation);\n }\n }\n\n /**\n * @dev Change the beacon and trigger a setup call if data is nonempty.\n * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n * to avoid stuck value in the contract.\n *\n * Emits an {IERC1967-BeaconUpgraded} event.\n *\n * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since\n * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for\n * efficiency.\n */\n function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {\n _setBeacon(newBeacon);\n emit IERC1967.BeaconUpgraded(newBeacon);\n\n if (data.length > 0) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n } else {\n _checkNonPayable();\n }\n }\n\n /**\n * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract\n * if an upgrade doesn't perform an initialization call.\n */\n function _checkNonPayable() private {\n if (msg.value > 0) {\n revert ERC1967NonPayable();\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback\n * function and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/ProxyAdmin.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/transparent/ProxyAdmin.sol)\n\npragma solidity ^0.8.22;\n\nimport {ITransparentUpgradeableProxy} from \"./TransparentUpgradeableProxy.sol\";\nimport {Ownable} from \"../../access/Ownable.sol\";\n\n/**\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\n */\ncontract ProxyAdmin is Ownable {\n /**\n * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgrade(address,address)`\n * and `upgradeAndCall(address,address,bytes)` are present, and `upgrade` must be used if no function should be called,\n * while `upgradeAndCall` will invoke the `receive` function if the third argument is the empty byte string.\n * If the getter returns `\"5.0.0\"`, only `upgradeAndCall(address,address,bytes)` is present, and the third argument must\n * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function\n * during an upgrade.\n */\n string public constant UPGRADE_INTERFACE_VERSION = \"5.0.0\";\n\n /**\n * @dev Sets the initial owner who can perform upgrades.\n */\n constructor(address initialOwner) Ownable(initialOwner) {}\n\n /**\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation.\n * See {TransparentUpgradeableProxy-_dispatchUpgradeToAndCall}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n * - If `data` is empty, `msg.value` must be zero.\n */\n function upgradeAndCall(\n ITransparentUpgradeableProxy proxy,\n address implementation,\n bytes memory data\n ) public payable virtual onlyOwner {\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/TransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.22;\n\nimport {ERC1967Utils} from \"../ERC1967/ERC1967Utils.sol\";\nimport {ERC1967Proxy} from \"../ERC1967/ERC1967Proxy.sol\";\nimport {IERC1967} from \"../../interfaces/IERC1967.sol\";\nimport {ProxyAdmin} from \"./ProxyAdmin.sol\";\n\n/**\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\n * does not implement this interface directly, and its upgradeability mechanism is implemented by an internal dispatch\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\n * include them in the ABI so this interface must be used to interact with it.\n */\ninterface ITransparentUpgradeableProxy is IERC1967 {\n /// @dev See {UUPSUpgradeable-upgradeToAndCall}\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable;\n}\n\n/**\n * @dev This contract implements a proxy that is upgradeable through an associated {ProxyAdmin} instance.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches the {ITransparentUpgradeableProxy-upgradeToAndCall} function exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can call the `upgradeToAndCall` function but any other call won't be forwarded to\n * the implementation. If the admin tries to call a function on the implementation it will fail with an error indicating\n * the proxy admin cannot fallback to the target implementation.\n *\n * These properties mean that the admin account can only be used for upgrading the proxy, so it's best if it's a\n * dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to\n * call a function from the proxy implementation. For this reason, the proxy deploys an instance of {ProxyAdmin} and\n * allows upgrades only if they come through it. You should think of the `ProxyAdmin` instance as the administrative\n * interface of the proxy, including the ability to change who can trigger upgrades by transferring ownership.\n *\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\n * inherit from that interface, and instead `upgradeToAndCall` is implicitly implemented using a custom dispatch\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\n * implementation.\n *\n * NOTE: This proxy does not inherit from {Context} deliberately. The {ProxyAdmin} of this contract won't send a\n * meta-transaction in any way, and any other meta-transaction setup should be made in the implementation contract.\n *\n * IMPORTANT: This contract avoids unnecessary storage reads by setting the admin only during construction as an\n * immutable variable, preventing any changes thereafter. However, the admin slot defined in ERC-1967 can still be\n * overwritten by the implementation logic pointed to by this proxy. In such cases, the contract may end up in an\n * undesirable state where the admin slot is different from the actual admin. Relying on the value of the admin slot\n * is generally fine if the implementation is trusted.\n *\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the\n * compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new\n * function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This\n * could render the `upgradeToAndCall` function inaccessible, preventing upgradeability and compromising transparency.\n */\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\n // An immutable address for the admin to avoid unnecessary SLOADs before each call\n // at the expense of removing the ability to change the admin once it's set.\n // This is acceptable if the admin is always a ProxyAdmin instance or similar contract\n // with its own ability to transfer the permissions to another account.\n address private immutable _admin;\n\n /**\n * @dev The proxy caller is the current admin, and can't fallback to the proxy target.\n */\n error ProxyDeniedAdminAccess();\n\n /**\n * @dev Initializes an upgradeable proxy managed by an instance of a {ProxyAdmin} with an `initialOwner`,\n * backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in\n * {ERC1967Proxy-constructor}.\n */\n constructor(address _logic, address initialOwner, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\n _admin = address(new ProxyAdmin(initialOwner));\n // Set the storage value and emit an event for ERC-1967 compatibility\n ERC1967Utils.changeAdmin(_proxyAdmin());\n }\n\n /**\n * @dev Returns the admin of this proxy.\n */\n function _proxyAdmin() internal view virtual returns (address) {\n return _admin;\n }\n\n /**\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior.\n */\n function _fallback() internal virtual override {\n if (msg.sender == _proxyAdmin()) {\n if (msg.sig != ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\n revert ProxyDeniedAdminAccess();\n } else {\n _dispatchUpgradeToAndCall();\n }\n } else {\n super._fallback();\n }\n }\n\n /**\n * @dev Upgrade the implementation of the proxy. See {ERC1967Utils-upgradeToAndCall}.\n *\n * Requirements:\n *\n * - If `data` is empty, `msg.value` must be zero.\n */\n function _dispatchUpgradeToAndCall() private {\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\n ERC1967Utils.upgradeToAndCall(newImplementation, data);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC-20\n * applications.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * Both values are immutable: they can only be set once during construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Skips emitting an {Approval} event indicating an allowance update. This is not\n * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n *\n * ```solidity\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner`'s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance < type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC-20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\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 value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens as the allowance of `spender` over the\n * 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 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` 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 value) external returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 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 /**\n * @dev An operation with an ERC-20 token failed.\n */\n error SafeERC20FailedOperation(address token);\n\n /**\n * @dev Indicates a failed `decreaseAllowance` request.\n */\n error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\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.encodeCall(token.transfer, (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.encodeCall(token.transferFrom, (from, to, value)));\n }\n\n /**\n * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\n }\n\n /**\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\n return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, 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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n forceApprove(token, spender, oldAllowance + value);\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n * value, non-reverting calls are assumed to be successful.\n *\n * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n unchecked {\n uint256 currentAllowance = token.allowance(address(this), spender);\n if (currentAllowance < requestedDecrease) {\n revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n }\n forceApprove(token, spender, currentAllowance - requestedDecrease);\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n * set here.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n safeTransfer(token, to, value);\n } else if (!token.transferAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferFromAndCallRelaxed(\n IERC1363 token,\n address from,\n address to,\n uint256 value,\n bytes memory data\n ) internal {\n if (to.code.length == 0) {\n safeTransferFrom(token, from, to, value);\n } else if (!token.transferFromAndCall(from, to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n * once without retrying, and relies on the returned value to be true.\n *\n * Reverts if the returned value is other than `true`.\n */\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n forceApprove(token, to, value);\n } else if (!token.approveAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n uint256 returnSize;\n uint256 returnValue;\n assembly (\"memory-safe\") {\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n // bubble errors\n if iszero(success) {\n let ptr := mload(0x40)\n returndatacopy(ptr, 0, returndatasize())\n revert(ptr, returndatasize())\n }\n returnSize := returndatasize()\n returnValue := mload(0)\n }\n\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\n revert SafeERC20FailedOperation(address(token));\n }\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 silently catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n bool success;\n uint256 returnSize;\n uint256 returnValue;\n assembly (\"memory-safe\") {\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n returnSize := returndatasize()\n returnValue := mload(0)\n }\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (utils/Address.sol)\n\npragma solidity ^0.8.20;\n\nimport {Errors} from \"./Errors.sol\";\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev There's no code at `target` (it is not a contract).\n */\n error AddressEmptyCode(address target);\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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n if (address(this).balance < amount) {\n revert Errors.InsufficientBalance(address(this).balance, amount);\n }\n\n (bool success, bytes memory returndata) = recipient.call{value: amount}(\"\");\n if (!success) {\n _revert(returndata);\n }\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 or custom error, it is bubbled\n * up by this function (like regular Solidity function calls). However, if\n * the call reverted with no returned reason, this function reverts with a\n * {Errors.FailedCall} error.\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 function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0);\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 function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n if (address(this).balance < value) {\n revert Errors.InsufficientBalance(address(this).balance, value);\n }\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\n * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case\n * of an unsuccessful call.\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata\n ) internal view returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n // only check if target is a contract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n if (returndata.length == 0 && target.code.length == 0) {\n revert AddressEmptyCode(target);\n }\n return returndata;\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\n * revert reason or with a default {Errors.FailedCall} error.\n */\n function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n return returndata;\n }\n }\n\n /**\n * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.\n */\n function _revert(bytes memory returndata) 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 assembly (\"memory-safe\") {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert Errors.FailedCall();\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS\n }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n */\n function tryRecover(\n bytes32 hash,\n bytes memory signature\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly (\"memory-safe\") {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32.\n */\n function toDataWithIntendedValidatorHash(\n address validator,\n bytes32 messageHash\n ) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, hex\"19_00\")\n mstore(0x02, shl(96, validator))\n mstore(0x16, messageHash)\n digest := keccak256(0x00, 0x36)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Errors.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Collection of common custom errors used in multiple contracts\n *\n * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.\n * It is recommended to avoid relying on the error API for critical functionality.\n *\n * _Available since v5.1._\n */\nlibrary Errors {\n /**\n * @dev The ETH balance of the account is not enough to perform the operation.\n */\n error InsufficientBalance(uint256 balance, uint256 needed);\n\n /**\n * @dev A call to an address target failed. The target may have reverted.\n */\n error FailedCall();\n\n /**\n * @dev The deployment failed.\n */\n error FailedDeployment();\n\n /**\n * @dev A necessary precompile is missing.\n */\n error MissingPrecompile(address);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Return the 512-bit addition of two uint256.\n *\n * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.\n */\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n assembly (\"memory-safe\") {\n low := add(a, b)\n high := lt(low, a)\n }\n }\n\n /**\n * @dev Return the 512-bit multiplication of two uint256.\n *\n * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.\n */\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = high * 2²⁵⁶ + low.\n assembly (\"memory-safe\") {\n let mm := mulmod(a, b, not(0))\n low := mul(a, b)\n high := sub(sub(mm, low), lt(mm, low))\n }\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a + b;\n success = c >= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a - b;\n success = c <= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a * b;\n assembly (\"memory-safe\") {\n // Only true when the multiplication doesn't overflow\n // (c / a == b) || (a == 0)\n success := or(eq(div(c, a), b), iszero(a))\n }\n // equivalent to: success ? c : 0\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `DIV` opcode returns zero when the denominator is 0.\n result := div(a, b)\n }\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `MOD` opcode returns zero when the denominator is 0.\n result := mod(a, b)\n }\n }\n }\n\n /**\n * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryAdd(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\n */\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\n (, uint256 result) = trySub(a, b);\n return result;\n }\n\n /**\n * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryMul(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\n }\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a > b, a, b);\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a < b, a, b);\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n\n // The following calculation ensures accurate ceiling division without overflow.\n // Since a is non-zero, (a - 1) / b will not overflow.\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n // but the largest value we can obtain is type(uint256).max - 1, which happens\n // when a = type(uint256).max and b = 1.\n unchecked {\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n }\n }\n\n /**\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n * denominator == 0.\n *\n * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n\n // Handle non-overflow cases, 256 by 256 division.\n if (high == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return low / denominator;\n }\n\n // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n if (denominator <= high) {\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n }\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [high low].\n uint256 remainder;\n assembly (\"memory-safe\") {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n high := sub(high, gt(remainder, low))\n low := sub(low, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\n assembly (\"memory-safe\") {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [high low] by twos.\n low := div(low, twos)\n\n // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from high into low.\n low |= high * twos;\n\n // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n // works in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n inverse *= 2 - denominator * inverse; // inverse mod 2³²\n inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high\n // is no longer required.\n result = low * inverse;\n return result;\n }\n }\n\n /**\n * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n }\n\n /**\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\n */\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n if (high >= 1 << n) {\n Panic.panic(Panic.UNDER_OVERFLOW);\n }\n return (high << (256 - n)) | (low >> n);\n }\n }\n\n /**\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\n */\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\n }\n\n /**\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n *\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n *\n * If the input value is not inversible, 0 is returned.\n *\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n */\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n unchecked {\n if (n == 0) return 0;\n\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n // ax + ny = 1\n // ax = 1 + (-y)n\n // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n // If the remainder is 0 the gcd is n right away.\n uint256 remainder = a % n;\n uint256 gcd = n;\n\n // Therefore the initial coefficients are:\n // ax + ny = gcd(a, n) = n\n // 0a + 1n = n\n int256 x = 0;\n int256 y = 1;\n\n while (remainder != 0) {\n uint256 quotient = gcd / remainder;\n\n (gcd, remainder) = (\n // The old remainder is the next gcd to try.\n remainder,\n // Compute the next remainder.\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n // where gcd is at most n (capped to type(uint256).max)\n gcd - remainder * quotient\n );\n\n (x, y) = (\n // Increment the coefficient of a.\n y,\n // Decrement the coefficient of n.\n // Can overflow, but the result is casted to uint256 so that the\n // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n x - y * int256(quotient)\n );\n }\n\n if (gcd != 1) return 0; // No inverse exists.\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n }\n }\n\n /**\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n *\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n *\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n */\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n unchecked {\n return Math.modExp(a, p - 2, p);\n }\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n *\n * Requirements:\n * - modulus can't be zero\n * - underlying staticcall to precompile must succeed\n *\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n * interpreted as 0.\n */\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n (bool success, uint256 result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n * to operate modulo 0 or if the underlying precompile reverted.\n *\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n * of a revert, but the result may be incorrectly interpreted as 0.\n */\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n if (m == 0) return (false, 0);\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n // | Offset | Content | Content (Hex) |\n // |-----------|------------|--------------------------------------------------------------------|\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n mstore(ptr, 0x20)\n mstore(add(ptr, 0x20), 0x20)\n mstore(add(ptr, 0x40), 0x20)\n mstore(add(ptr, 0x60), b)\n mstore(add(ptr, 0x80), e)\n mstore(add(ptr, 0xa0), m)\n\n // Given the result < m, it's guaranteed to fit in 32 bytes,\n // so we can use the memory scratch space located at offset 0.\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n result := mload(0x00)\n }\n }\n\n /**\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\n */\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n (bool success, bytes memory result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n */\n function tryModExp(\n bytes memory b,\n bytes memory e,\n bytes memory m\n ) internal view returns (bool success, bytes memory result) {\n if (_zeroBytes(m)) return (false, new bytes(0));\n\n uint256 mLen = m.length;\n\n // Encode call args in result and move the free memory pointer\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n assembly (\"memory-safe\") {\n let dataPtr := add(result, 0x20)\n // Write result on top of args to avoid allocating extra memory.\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n // Overwrite the length.\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n mstore(result, mLen)\n // Set the memory pointer after the returned data.\n mstore(0x40, add(dataPtr, mLen))\n }\n }\n\n /**\n * @dev Returns whether the provided byte array is zero.\n */\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\n for (uint256 i = 0; i < byteArray.length; ++i) {\n if (byteArray[i] != 0) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n * towards zero.\n *\n * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n * using integer operations.\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n unchecked {\n // Take care of easy edge cases when a == 0 or a == 1\n if (a <= 1) {\n return a;\n }\n\n // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n // the current value as `ε_n = | x_n - sqrt(a) |`.\n //\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n // bigger than any uint256.\n //\n // By noticing that\n // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n // to the msb function.\n uint256 aa = a;\n uint256 xn = 1;\n\n if (aa >= (1 << 128)) {\n aa >>= 128;\n xn <<= 64;\n }\n if (aa >= (1 << 64)) {\n aa >>= 64;\n xn <<= 32;\n }\n if (aa >= (1 << 32)) {\n aa >>= 32;\n xn <<= 16;\n }\n if (aa >= (1 << 16)) {\n aa >>= 16;\n xn <<= 8;\n }\n if (aa >= (1 << 8)) {\n aa >>= 8;\n xn <<= 4;\n }\n if (aa >= (1 << 4)) {\n aa >>= 4;\n xn <<= 2;\n }\n if (aa >= (1 << 2)) {\n xn <<= 1;\n }\n\n // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n //\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n // This is going to be our x_0 (and ε_0)\n xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n // From here, Newton's method give us:\n // x_{n+1} = (x_n + a / x_n) / 2\n //\n // One should note that:\n // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n // = ((x_n² + a) / (2 * x_n))² - a\n // = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n // = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n // = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n // = (x_n² - a)² / (2 * x_n)²\n // = ((x_n² - a) / (2 * x_n))²\n // ≥ 0\n // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n //\n // This gives us the proof of quadratic convergence of the sequence:\n // ε_{n+1} = | x_{n+1} - sqrt(a) |\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\n // = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n // = | (x_n - sqrt(a))² / (2 * x_n) |\n // = | ε_n² / (2 * x_n) |\n // = ε_n² / | (2 * x_n) |\n //\n // For the first iteration, we have a special case where x_0 is known:\n // ε_1 = ε_0² / | (2 * x_0) |\n // ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n // ≤ 2**(2*e-4) / (3 * 2**(e-1))\n // ≤ 2**(e-3) / 3\n // ≤ 2**(e-3-log2(3))\n // ≤ 2**(e-4.5)\n //\n // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n // ε_{n+1} = ε_n² / | (2 * x_n) |\n // ≤ (2**(e-k))² / (2 * 2**(e-1))\n // ≤ 2**(2*e-2*k) / 2**e\n // ≤ 2**(e-2*k)\n xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5) -- special case, see above\n xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9) -- general case with k = 4.5\n xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18) -- general case with k = 9\n xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36) -- general case with k = 18\n xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72) -- general case with k = 36\n xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144) -- general case with k = 72\n\n // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n // sqrt(a) or sqrt(a) + 1.\n return xn - SafeCast.toUint(xn > a / xn);\n }\n }\n\n /**\n * @dev Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log2(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // If upper 8 bits of 16-bit half set, add 8 to result\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\n // If upper 4 bits of 8-bit half set, add 4 to result\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\n\n // Shifts value right by the current result and use it as an index into this lookup table:\n //\n // | x (4 bits) | index | table[index] = MSB position |\n // |------------|---------|-----------------------------|\n // | 0000 | 0 | table[0] = 0 |\n // | 0001 | 1 | table[1] = 0 |\n // | 0010 | 2 | table[2] = 1 |\n // | 0011 | 3 | table[3] = 1 |\n // | 0100 | 4 | table[4] = 2 |\n // | 0101 | 5 | table[5] = 2 |\n // | 0110 | 6 | table[6] = 2 |\n // | 0111 | 7 | table[7] = 2 |\n // | 1000 | 8 | table[8] = 3 |\n // | 1001 | 9 | table[9] = 3 |\n // | 1010 | 10 | table[10] = 3 |\n // | 1011 | 11 | table[11] = 3 |\n // | 1100 | 12 | table[12] = 3 |\n // | 1101 | 13 | table[13] = 3 |\n // | 1110 | 14 | table[14] = 3 |\n // | 1111 | 15 | table[15] = 3 |\n //\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\n assembly (\"memory-safe\") {\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\n }\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/SafeCast.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool 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 */\nlibrary SafeCast {\n /**\n * @dev Value doesn't fit in an uint of `bits` size.\n */\n error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n /**\n * @dev An int value doesn't fit in an uint of `bits` size.\n */\n error SafeCastOverflowedIntToUint(int256 value);\n\n /**\n * @dev Value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n /**\n * @dev An uint value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedUintToInt(uint256 value);\n\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 function toUint248(uint256 value) internal pure returns (uint248) {\n if (value > type(uint248).max) {\n revert SafeCastOverflowedUintDowncast(248, value);\n }\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 function toUint240(uint256 value) internal pure returns (uint240) {\n if (value > type(uint240).max) {\n revert SafeCastOverflowedUintDowncast(240, value);\n }\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 function toUint232(uint256 value) internal pure returns (uint232) {\n if (value > type(uint232).max) {\n revert SafeCastOverflowedUintDowncast(232, value);\n }\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 function toUint224(uint256 value) internal pure returns (uint224) {\n if (value > type(uint224).max) {\n revert SafeCastOverflowedUintDowncast(224, value);\n }\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 function toUint216(uint256 value) internal pure returns (uint216) {\n if (value > type(uint216).max) {\n revert SafeCastOverflowedUintDowncast(216, value);\n }\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 function toUint208(uint256 value) internal pure returns (uint208) {\n if (value > type(uint208).max) {\n revert SafeCastOverflowedUintDowncast(208, value);\n }\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 function toUint200(uint256 value) internal pure returns (uint200) {\n if (value > type(uint200).max) {\n revert SafeCastOverflowedUintDowncast(200, value);\n }\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 function toUint192(uint256 value) internal pure returns (uint192) {\n if (value > type(uint192).max) {\n revert SafeCastOverflowedUintDowncast(192, value);\n }\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 function toUint184(uint256 value) internal pure returns (uint184) {\n if (value > type(uint184).max) {\n revert SafeCastOverflowedUintDowncast(184, value);\n }\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 function toUint176(uint256 value) internal pure returns (uint176) {\n if (value > type(uint176).max) {\n revert SafeCastOverflowedUintDowncast(176, value);\n }\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 function toUint168(uint256 value) internal pure returns (uint168) {\n if (value > type(uint168).max) {\n revert SafeCastOverflowedUintDowncast(168, value);\n }\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 function toUint160(uint256 value) internal pure returns (uint160) {\n if (value > type(uint160).max) {\n revert SafeCastOverflowedUintDowncast(160, value);\n }\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 function toUint152(uint256 value) internal pure returns (uint152) {\n if (value > type(uint152).max) {\n revert SafeCastOverflowedUintDowncast(152, value);\n }\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 function toUint144(uint256 value) internal pure returns (uint144) {\n if (value > type(uint144).max) {\n revert SafeCastOverflowedUintDowncast(144, value);\n }\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 function toUint136(uint256 value) internal pure returns (uint136) {\n if (value > type(uint136).max) {\n revert SafeCastOverflowedUintDowncast(136, value);\n }\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 function toUint128(uint256 value) internal pure returns (uint128) {\n if (value > type(uint128).max) {\n revert SafeCastOverflowedUintDowncast(128, value);\n }\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 function toUint120(uint256 value) internal pure returns (uint120) {\n if (value > type(uint120).max) {\n revert SafeCastOverflowedUintDowncast(120, value);\n }\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 function toUint112(uint256 value) internal pure returns (uint112) {\n if (value > type(uint112).max) {\n revert SafeCastOverflowedUintDowncast(112, value);\n }\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 function toUint104(uint256 value) internal pure returns (uint104) {\n if (value > type(uint104).max) {\n revert SafeCastOverflowedUintDowncast(104, value);\n }\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 function toUint96(uint256 value) internal pure returns (uint96) {\n if (value > type(uint96).max) {\n revert SafeCastOverflowedUintDowncast(96, value);\n }\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 function toUint88(uint256 value) internal pure returns (uint88) {\n if (value > type(uint88).max) {\n revert SafeCastOverflowedUintDowncast(88, value);\n }\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 function toUint80(uint256 value) internal pure returns (uint80) {\n if (value > type(uint80).max) {\n revert SafeCastOverflowedUintDowncast(80, value);\n }\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 function toUint72(uint256 value) internal pure returns (uint72) {\n if (value > type(uint72).max) {\n revert SafeCastOverflowedUintDowncast(72, value);\n }\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 function toUint64(uint256 value) internal pure returns (uint64) {\n if (value > type(uint64).max) {\n revert SafeCastOverflowedUintDowncast(64, value);\n }\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 function toUint56(uint256 value) internal pure returns (uint56) {\n if (value > type(uint56).max) {\n revert SafeCastOverflowedUintDowncast(56, value);\n }\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 function toUint48(uint256 value) internal pure returns (uint48) {\n if (value > type(uint48).max) {\n revert SafeCastOverflowedUintDowncast(48, value);\n }\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 function toUint40(uint256 value) internal pure returns (uint40) {\n if (value > type(uint40).max) {\n revert SafeCastOverflowedUintDowncast(40, value);\n }\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 function toUint32(uint256 value) internal pure returns (uint32) {\n if (value > type(uint32).max) {\n revert SafeCastOverflowedUintDowncast(32, value);\n }\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 function toUint24(uint256 value) internal pure returns (uint24) {\n if (value > type(uint24).max) {\n revert SafeCastOverflowedUintDowncast(24, value);\n }\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 function toUint16(uint256 value) internal pure returns (uint16) {\n if (value > type(uint16).max) {\n revert SafeCastOverflowedUintDowncast(16, value);\n }\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 function toUint8(uint256 value) internal pure returns (uint8) {\n if (value > type(uint8).max) {\n revert SafeCastOverflowedUintDowncast(8, value);\n }\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 function toUint256(int256 value) internal pure returns (uint256) {\n if (value < 0) {\n revert SafeCastOverflowedIntToUint(value);\n }\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 function toInt248(int256 value) internal pure returns (int248 downcasted) {\n downcasted = int248(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(248, value);\n }\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 function toInt240(int256 value) internal pure returns (int240 downcasted) {\n downcasted = int240(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(240, value);\n }\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 function toInt232(int256 value) internal pure returns (int232 downcasted) {\n downcasted = int232(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(232, value);\n }\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 function toInt224(int256 value) internal pure returns (int224 downcasted) {\n downcasted = int224(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(224, value);\n }\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 function toInt216(int256 value) internal pure returns (int216 downcasted) {\n downcasted = int216(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(216, value);\n }\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 function toInt208(int256 value) internal pure returns (int208 downcasted) {\n downcasted = int208(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(208, value);\n }\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 function toInt200(int256 value) internal pure returns (int200 downcasted) {\n downcasted = int200(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(200, value);\n }\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 function toInt192(int256 value) internal pure returns (int192 downcasted) {\n downcasted = int192(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(192, value);\n }\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 function toInt184(int256 value) internal pure returns (int184 downcasted) {\n downcasted = int184(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(184, value);\n }\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 function toInt176(int256 value) internal pure returns (int176 downcasted) {\n downcasted = int176(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(176, value);\n }\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 function toInt168(int256 value) internal pure returns (int168 downcasted) {\n downcasted = int168(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(168, value);\n }\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 function toInt160(int256 value) internal pure returns (int160 downcasted) {\n downcasted = int160(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(160, value);\n }\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 function toInt152(int256 value) internal pure returns (int152 downcasted) {\n downcasted = int152(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(152, value);\n }\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 function toInt144(int256 value) internal pure returns (int144 downcasted) {\n downcasted = int144(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(144, value);\n }\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 function toInt136(int256 value) internal pure returns (int136 downcasted) {\n downcasted = int136(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(136, value);\n }\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 function toInt128(int256 value) internal pure returns (int128 downcasted) {\n downcasted = int128(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(128, value);\n }\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 function toInt120(int256 value) internal pure returns (int120 downcasted) {\n downcasted = int120(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(120, value);\n }\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 function toInt112(int256 value) internal pure returns (int112 downcasted) {\n downcasted = int112(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(112, value);\n }\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 function toInt104(int256 value) internal pure returns (int104 downcasted) {\n downcasted = int104(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(104, value);\n }\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 function toInt96(int256 value) internal pure returns (int96 downcasted) {\n downcasted = int96(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(96, value);\n }\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 function toInt88(int256 value) internal pure returns (int88 downcasted) {\n downcasted = int88(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(88, value);\n }\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 function toInt80(int256 value) internal pure returns (int80 downcasted) {\n downcasted = int80(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(80, value);\n }\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 function toInt72(int256 value) internal pure returns (int72 downcasted) {\n downcasted = int72(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(72, value);\n }\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 function toInt64(int256 value) internal pure returns (int64 downcasted) {\n downcasted = int64(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(64, value);\n }\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 function toInt56(int256 value) internal pure returns (int56 downcasted) {\n downcasted = int56(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(56, value);\n }\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 function toInt48(int256 value) internal pure returns (int48 downcasted) {\n downcasted = int48(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(48, value);\n }\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 function toInt40(int256 value) internal pure returns (int40 downcasted) {\n downcasted = int40(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(40, value);\n }\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 function toInt32(int256 value) internal pure returns (int32 downcasted) {\n downcasted = int32(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(32, value);\n }\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 function toInt24(int256 value) internal pure returns (int24 downcasted) {\n downcasted = int24(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(24, value);\n }\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 function toInt16(int256 value) internal pure returns (int16 downcasted) {\n downcasted = int16(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(16, value);\n }\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 function toInt8(int256 value) internal pure returns (int8 downcasted) {\n downcasted = int8(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(8, value);\n }\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 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 if (value > uint256(type(int256).max)) {\n revert SafeCastOverflowedUintToInt(value);\n }\n return int256(value);\n }\n\n /**\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n */\n function toUint(bool b) internal pure returns (uint256 u) {\n assembly (\"memory-safe\") {\n u := iszero(iszero(b))\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));\n }\n }\n\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return ternary(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 ternary(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 // Formula from the \"Bit Twiddling Hacks\" by Sean Eron Anderson.\n // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift,\n // taking advantage of the most significant (or \"sign\" bit) in two's complement representation.\n // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result,\n // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative).\n int256 mask = n >> 255;\n\n // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.\n return uint256((n + mask) ^ mask);\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Panic.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n * using Panic for uint256;\n *\n * // Use any of the declared internal constants\n * function foo() { Panic.GENERIC.panic(); }\n *\n * // Alternatively\n * function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n /// @dev generic / unspecified error\n uint256 internal constant GENERIC = 0x00;\n /// @dev used by the assert() builtin\n uint256 internal constant ASSERT = 0x01;\n /// @dev arithmetic underflow or overflow\n uint256 internal constant UNDER_OVERFLOW = 0x11;\n /// @dev division or modulo by zero\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\n /// @dev enum conversion error\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n /// @dev invalid encoding in storage\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n /// @dev empty array pop\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n /// @dev array out of bounds access\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n /// @dev resource error (too large allocation or too large array)\n uint256 internal constant RESOURCE_ERROR = 0x41;\n /// @dev calling invalid internal function\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n /// @dev Reverts with a panic code. Recommended to use with\n /// the internal constants with predefined codes.\n function panic(uint256 code) internal pure {\n assembly (\"memory-safe\") {\n mstore(0x00, 0x4e487b71)\n mstore(0x20, code)\n revert(0x1c, 0x24)\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\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" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC-1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n * // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(newImplementation.code.length > 0);\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * TIP: Consider using this library along with {SlotDerivation}.\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n struct Int256Slot {\n int256 value;\n }\n\n struct StringSlot {\n string value;\n }\n\n struct BytesSlot {\n bytes value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Int256Slot` with member `value` located at `slot`.\n */\n function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `StringSlot` with member `value` located at `slot`.\n */\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n */\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n\n /**\n * @dev Returns a `BytesSlot` with member `value` located at `slot`.\n */\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n */\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SafeCast} from \"./math/SafeCast.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n using SafeCast for *;\n\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n uint256 private constant SPECIAL_CHARS_LOOKUP =\n (1 << 0x08) | // backspace\n (1 << 0x09) | // tab\n (1 << 0x0a) | // newline\n (1 << 0x0c) | // form feed\n (1 << 0x0d) | // carriage return\n (1 << 0x22) | // double quote\n (1 << 0x5c); // backslash\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n /**\n * @dev The string being parsed contains characters that are not in scope of the given base.\n */\n error StringsInvalidChar();\n\n /**\n * @dev The string being parsed is not a properly formatted address.\n */\n error StringsInvalidAddressFormat();\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n assembly (\"memory-safe\") {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n assembly (\"memory-safe\") {\n mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n uint256 localValue = value;\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n * representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal\n * representation, according to EIP-55.\n */\n function toChecksumHexString(address addr) internal pure returns (string memory) {\n bytes memory buffer = bytes(toHexString(addr));\n\n // hash the hex part of buffer (skip length + 2 bytes, length 40)\n uint256 hashValue;\n assembly (\"memory-safe\") {\n hashValue := shr(96, keccak256(add(buffer, 0x22), 40))\n }\n\n for (uint256 i = 41; i > 1; --i) {\n // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f)\n if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) {\n // case shift by xoring with 0x20\n buffer[i] ^= 0x20;\n }\n hashValue >>= 4;\n }\n return string(buffer);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input) internal pure returns (uint256) {\n return parseUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n uint256 result = 0;\n for (uint256 i = begin; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 9) return (false, 0);\n result *= 10;\n result += chr;\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `int256`.\n *\n * Requirements:\n * - The string must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input) internal pure returns (int256) {\n return parseInt(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) {\n (bool success, int256 value) = tryParseInt(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if\n * the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(string memory input) internal pure returns (bool success, int256 value) {\n return _tryParseIntUncheckedBounds(input, 0, bytes(input).length);\n }\n\n uint256 private constant ABS_MIN_INT256 = 2 ** 255;\n\n /**\n * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character or if the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, int256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseIntUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseIntUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, int256 value) {\n bytes memory buffer = bytes(input);\n\n // Check presence of a negative sign.\n bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n bool positiveSign = sign == bytes1(\"+\");\n bool negativeSign = sign == bytes1(\"-\");\n uint256 offset = (positiveSign || negativeSign).toUint();\n\n (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end);\n\n if (absSuccess && absValue < ABS_MIN_INT256) {\n return (true, negativeSign ? -int256(absValue) : int256(absValue));\n } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) {\n return (true, type(int256).min);\n } else return (false, 0);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input) internal pure returns (uint256) {\n return parseHexUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseHexUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an\n * invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseHexUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseHexUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n // skip 0x prefix if present\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 offset = hasPrefix.toUint() * 2;\n\n uint256 result = 0;\n for (uint256 i = begin + offset; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 15) return (false, 0);\n result *= 16;\n unchecked {\n // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check).\n // This guarantees that adding a value < 16 will not cause an overflow, hence the unchecked.\n result += chr;\n }\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as an `address`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input) internal pure returns (address) {\n return parseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) {\n (bool success, address value) = tryParseAddress(input, begin, end);\n if (!success) revert StringsInvalidAddressFormat();\n return value;\n }\n\n /**\n * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly\n * formatted address. See {parseAddress-string} requirements.\n */\n function tryParseAddress(string memory input) internal pure returns (bool success, address value) {\n return tryParseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly\n * formatted address. See {parseAddress-string-uint256-uint256} requirements.\n */\n function tryParseAddress(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, address value) {\n if (end > bytes(input).length || begin > end) return (false, address(0));\n\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 expectedLength = 40 + hasPrefix.toUint() * 2;\n\n // check that input is the correct length\n if (end - begin == expectedLength) {\n // length guarantees that this does not overflow, and value is at most type(uint160).max\n (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end);\n return (s, address(uint160(v)));\n } else {\n return (false, address(0));\n }\n }\n\n function _tryParseChr(bytes1 chr) private pure returns (uint8) {\n uint8 value = uint8(chr);\n\n // Try to parse `chr`:\n // - Case 1: [0-9]\n // - Case 2: [a-f]\n // - Case 3: [A-F]\n // - otherwise not supported\n unchecked {\n if (value > 47 && value < 58) value -= 48;\n else if (value > 96 && value < 103) value -= 87;\n else if (value > 64 && value < 71) value -= 55;\n else return type(uint8).max;\n }\n\n return value;\n }\n\n /**\n * @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.\n *\n * WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.\n *\n * NOTE: This function escapes all unicode characters, and not just the ones in ranges defined in section 2.5 of\n * RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). ECMAScript's `JSON.parse` does recover escaped unicode\n * characters that are not in this range, but other tooling may provide different results.\n */\n function escapeJSON(string memory input) internal pure returns (string memory) {\n bytes memory buffer = bytes(input);\n bytes memory output = new bytes(2 * buffer.length); // worst case scenario\n uint256 outputLength = 0;\n\n for (uint256 i; i < buffer.length; ++i) {\n bytes1 char = bytes1(_unsafeReadBytesOffset(buffer, i));\n if (((SPECIAL_CHARS_LOOKUP & (1 << uint8(char))) != 0)) {\n output[outputLength++] = \"\\\\\";\n if (char == 0x08) output[outputLength++] = \"b\";\n else if (char == 0x09) output[outputLength++] = \"t\";\n else if (char == 0x0a) output[outputLength++] = \"n\";\n else if (char == 0x0c) output[outputLength++] = \"f\";\n else if (char == 0x0d) output[outputLength++] = \"r\";\n else if (char == 0x5c) output[outputLength++] = \"\\\\\";\n else if (char == 0x22) {\n // solhint-disable-next-line quotes\n output[outputLength++] = '\"';\n }\n } else {\n output[outputLength++] = char;\n }\n }\n // write the actual length and deallocate unused memory\n assembly (\"memory-safe\") {\n mstore(output, outputLength)\n mstore(0x40, add(output, shl(5, shr(5, add(outputLength, 63)))))\n }\n\n return string(output);\n }\n\n /**\n * @dev Reads a bytes32 from a bytes array without bounds checking.\n *\n * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n * assembly block as such would prevent some optimizations.\n */\n function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n // This is not memory safe in the general case, but all calls to this private function are within bounds.\n assembly (\"memory-safe\") {\n value := mload(add(buffer, add(0x20, offset)))\n }\n }\n}\n" + }, + "project/contracts/Controller.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\n\nimport './interfaces/IController.sol';\n\n/**\n * @title Controller\n * @dev Manages allow lists for solvers, executors, proposal signers and validators\n */\ncontract Controller is IController, Ownable {\n // List of allowed solvers\n mapping (address => bool) public override isSolverAllowed;\n\n // List of allowed executors\n mapping (address => bool) public override isExecutorAllowed;\n\n // List of allowed proposal signers\n mapping (address => bool) public override isProposalSignerAllowed;\n\n // List of allowed validators\n mapping (address => bool) public override isValidatorAllowed;\n\n // Minimum number of validations allowed\n uint8 public override minValidations;\n\n /**\n * @dev Creates a new Controller contract\n * @param owner Address that will own the contract\n * @param solvers List of allowed solvers\n * @param executors List of allowed executors\n * @param proposalSigners List of allowed proposal signers\n * @param validators List of allowed validators\n * @param _minValidations Minimum number of validations allowed\n */\n constructor(\n address owner,\n address[] memory solvers,\n address[] memory executors,\n address[] memory proposalSigners,\n address[] memory validators,\n uint8 _minValidations\n ) Ownable(owner) {\n for (uint256 i = 0; i < solvers.length; i++) _setAllowedSolver(solvers[i], true);\n for (uint256 i = 0; i < executors.length; i++) _setAllowedExecutor(executors[i], true);\n for (uint256 i = 0; i < proposalSigners.length; i++) _setAllowedProposalSigner(proposalSigners[i], true);\n for (uint256 i = 0; i < validators.length; i++) _setAllowedValidator(validators[i], true);\n _setMinValidations(_minValidations);\n }\n\n /**\n * @dev Sets permissions for multiple solvers\n * @param solvers List of solver addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedSolvers(address[] memory solvers, bool[] memory alloweds) external override onlyOwner {\n if (solvers.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < solvers.length; i++) _setAllowedSolver(solvers[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple executors\n * @param executors List of executor addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedExecutors(address[] memory executors, bool[] memory alloweds) external override onlyOwner {\n if (executors.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < executors.length; i++) _setAllowedExecutor(executors[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple proposal signers\n * @param signers List of proposal signer addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedProposalSigners(address[] memory signers, bool[] memory alloweds) external override onlyOwner {\n if (signers.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < signers.length; i++) _setAllowedProposalSigner(signers[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple validators\n * @param validators List of validator addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedValidators(address[] memory validators, bool[] memory alloweds) external override onlyOwner {\n if (validators.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < validators.length; i++) _setAllowedValidator(validators[i], alloweds[i]);\n }\n\n /**\n * @dev Sets the minimum number of validations allowed\n * @param newMinValidations minimum number of validations allowed\n */\n function setMinValidations(uint8 newMinValidations) external override onlyOwner {\n _setMinValidations(newMinValidations);\n }\n\n /**\n * @dev Sets a solver permission\n */\n function _setAllowedSolver(address solver, bool allowed) internal {\n isSolverAllowed[solver] = allowed;\n emit SolverAllowedSet(solver, allowed);\n }\n\n /**\n * @dev Sets an executor permission\n */\n function _setAllowedExecutor(address executor, bool allowed) internal {\n isExecutorAllowed[executor] = allowed;\n emit ExecutorAllowedSet(executor, allowed);\n }\n\n /**\n * @dev Sets a proposal signer permission\n */\n function _setAllowedProposalSigner(address signer, bool allowed) internal {\n isProposalSignerAllowed[signer] = allowed;\n emit ProposalSignerAllowedSet(signer, allowed);\n }\n\n /**\n * @dev Sets a validator permission\n */\n function _setAllowedValidator(address validator, bool allowed) internal {\n isValidatorAllowed[validator] = allowed;\n emit ValidatorAllowedSet(validator, allowed);\n }\n\n /**\n * @dev Sets the minimum number of validations allowed\n */\n function _setMinValidations(uint8 newMinValidations) internal {\n minValidations = newMinValidations;\n emit MinValidationSet(newMinValidations);\n }\n}\n" + }, + "project/contracts/dynamic-calls/DynamicCallEncoder.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport './DynamicCallTypes.sol';\nimport '../interfaces/IDynamicCallEncoder.sol';\nimport '../utils/BytesHelpers.sol';\n\n/**\n * @title DynamicCallEncoder\n * @dev Builds calldata for arbitrary contract calls from structured arguments.\n *\n * This encoder supports:\n * - Literal ABI-encoded arguments\n * - Variable references resolved from previous execution results\n *\n * The encoder follows standard ABI encoding rules, reconstructing\n * the calldata heads and tails dynamically based on argument types.\n */\ncontract DynamicCallEncoder is IDynamicCallEncoder {\n using BytesHelpers for bytes;\n\n /**\n * @dev Internal representation of a fully-encoded argument\n * @param data ABI-encoded argument payload\n * @param isDynamic Whether this argument requires a head offset\n */\n struct EncodedArg {\n bytes data;\n bool isDynamic;\n }\n\n /**\n * @dev Encodes a dynamic call into calldata\n * @param dynamicCall Dynamic call specification\n * @param variables List of resolved variable values\n * @param variablesLength Number of resolved variables\n * @return data Fully ABI-encoded calldata\n */\n function encode(DynamicCall memory dynamicCall, bytes[][] memory variables, uint256 variablesLength)\n external\n pure\n override\n returns (bytes memory data)\n {\n if (variablesLength > variables.length) revert DynamicCallEncoderVariablesLengthOutOfBounds();\n data = _buildCalldata(dynamicCall.selector, dynamicCall.arguments, variables, variablesLength);\n }\n\n /**\n * @dev Builds calldata from a selector and a list of dynamic arguments\n * This function performs standard ABI aggregation:\n * - static arguments are inlined in the head\n * - dynamic arguments place offsets in the head and append data to the tail\n */\n function _buildCalldata(\n bytes4 selector,\n DynamicArg[] memory args,\n bytes[][] memory variables,\n uint256 variablesLength\n ) internal pure returns (bytes memory data) {\n uint256 n = args.length;\n bytes[] memory encodedArgs = new bytes[](n);\n bool[] memory isDynamic = new bool[](n);\n uint256 headLength = 0;\n\n for (uint256 i = 0; i < n; i++) {\n EncodedArg memory enc = _encodeArg(args[i], variables, variablesLength);\n encodedArgs[i] = enc.data;\n isDynamic[i] = enc.isDynamic;\n headLength += enc.isDynamic ? 32 : enc.data.length;\n }\n\n bytes memory heads;\n bytes memory tails;\n uint256 nextDynamicHead = headLength;\n\n for (uint256 i = 0; i < n; i++) {\n if (isDynamic[i]) {\n heads = bytes.concat(heads, bytes32(nextDynamicHead));\n tails = bytes.concat(tails, encodedArgs[i]);\n nextDynamicHead += encodedArgs[i].length;\n } else {\n heads = bytes.concat(heads, encodedArgs[i]);\n }\n }\n\n data = bytes.concat(selector, heads, tails);\n }\n\n /**\n * @dev Encodes a single dynamic argument based on its kind\n */\n function _encodeArg(DynamicArg memory arg, bytes[][] memory variables, uint256 variablesLength)\n internal\n pure\n returns (EncodedArg memory out)\n {\n if (arg.kind == DynamicArgKind.Literal) return _encodeLiteral(arg);\n if (arg.kind == DynamicArgKind.Variable) return _encodeVariable(arg, variables, variablesLength);\n revert DynamicCallEncoderInvalidArgKind();\n }\n\n /**\n * @dev Encodes a literal argument\n */\n function _encodeLiteral(DynamicArg memory arg) internal pure returns (EncodedArg memory) {\n return _encodeAbiValue(arg.data, arg.isDynamic);\n }\n\n /**\n * @dev Encodes a variable argument by resolving it from the variables list\n */\n function _encodeVariable(DynamicArg memory arg, bytes[][] memory variables, uint256 variablesLength)\n internal\n pure\n returns (EncodedArg memory)\n {\n if (arg.data.length != 64) revert DynamicCallEncoderVariableRefBadLength();\n uint256 opIndex = arg.data.readWord0();\n uint256 subIndex = arg.data.readWord1();\n if (opIndex >= variablesLength) revert DynamicCallEncoderVariableOutOfBounds();\n if (subIndex >= variables[opIndex].length) revert DynamicCallEncoderVariableOutOfBounds();\n\n return _encodeAbiValue(variables[opIndex][subIndex], arg.isDynamic);\n }\n\n /**\n * @dev Interprets ABI-like bytes as either a static or dynamic value. Used for variable resolution.\n */\n function _encodeAbiValue(bytes memory data, bool isDynamic) internal pure returns (EncodedArg memory out) {\n if (data.length == 0 || data.length % 32 != 0) revert DynamicCallEncoderBadLength();\n\n if (isDynamic) {\n if (data.length < 64) revert DynamicCallEncoderEmptyDynamic();\n if (data.readWord0() != 0x20) revert DynamicCallEncoderBadLength();\n\n out.data = data.sliceFrom(32);\n out.isDynamic = true;\n } else {\n out.data = data;\n out.isDynamic = false;\n }\n }\n}\n" + }, + "project/contracts/dynamic-calls/DynamicCallTypes.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Kind of dynamic argument to be encoded\n * @param Literal ABI-encoded literal value provided by the resolver\n * @param Variable Reference to a previously resolved variable value\n */\nenum DynamicArgKind {\n Literal,\n Variable\n}\n\n/**\n * @dev Represents a single dynamic argument\n * @param kind Type of argument resolution strategy\n * @param data Encoded argument data, interpreted based on `kind`\n * @param isDynamic Whether the resolved argument is ABI-dynamic\n */\nstruct DynamicArg {\n DynamicArgKind kind;\n bytes data;\n bool isDynamic;\n}\n\n/**\n * @dev Represents a dynamic contract call intent\n * @param target Contract address to be called\n * @param value ETH value to be sent with the call\n * @param selector Function selector to invoke\n * @param arguments List of dynamically resolved arguments\n */\nstruct DynamicCall {\n address target;\n uint256 value;\n bytes4 selector;\n DynamicArg[] arguments;\n}\n" + }, + "project/contracts/Intents.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Enum representing the operation type.\n * - Swap: Swap tokens in the same chain.\n * - Transfer: Transfer tokens to one or more recipients.\n * - Call: Execute arbitrary contract calls.\n * - CrossChainSwap: Swap tokens between chains.\n * - DynamicCall: Execute arbitrary dynamic contract calls.\n */\nenum OpType {\n Swap,\n Transfer,\n Call,\n CrossChainSwap,\n DynamicCall\n}\n\n/**\n * @dev EIP-712 typed data struct representing a validator's approval of an intent.\n * @param intent The hash of the intent being validated.\n */\nstruct Validation {\n bytes32 intent;\n}\n\n/**\n * @dev General intent structure with different operations.\n * @param feePayer The payer of the intent.\n * @param settler The address responsible for executing the intent on-chain.\n * @param nonce A unique value used to prevent replay attacks and distinguish intents.\n * @param deadline The timestamp by which the intent must be executed.\n * @param maxFees List of max fees the feePayer is willing to pay for the intent.\n * @param triggerSig The signature of the trigger that this intent belongs to\n * @param minValidations The minimum number of validator approvals required for this intent to be considered valid.\n * @param validations The list validator signatures attesting to this intent.\n * @param operations List of operations of the intent.\n */\nstruct Intent {\n address feePayer;\n address settler;\n bytes32 nonce;\n uint256 deadline;\n MaxFee[] maxFees;\n bytes triggerSig;\n uint256 minValidations;\n bytes[] validations;\n Operation[] operations;\n}\n\n/**\n * @dev Operation structure used to abstract over different operation types.\n * @param opType The type of operation this operation represents.\n * @param user The user of the operation.\n * @param data ABI-encoded data representing a specific operation type (e.g. SwapOperation, TransferOperation, CallOperation).\n * @param events List of custom operation events to be emitted.\n */\nstruct Operation {\n uint8 opType;\n address user;\n bytes data;\n OperationEvent[] events;\n}\n\n/**\n * @dev Max fee representation\n * @param token Token used to pay for the execution fee.\n * @param amount Max amount of fee token to be paid for settling this intent.\n */\nstruct MaxFee {\n address token;\n uint256 amount;\n}\n\n/**\n * @dev Operation event representation.\n * @param topic Event topic to be emitted.\n * @param data Event data to be emitted.\n */\nstruct OperationEvent {\n bytes32 topic;\n bytes data;\n}\n\n/**\n * @dev Represents a swap operation between two chains.\n * @param sourceChain Chain ID where tokens will be sent from.\n * @param destinationChain Chain ID where tokens will be received.\n * @param tokensIn List of input tokens and amounts to swap.\n * @param tokensOut List of expected output tokens, minimum amounts, and recipients.\n */\nstruct SwapOperation {\n uint256 sourceChain;\n uint256 destinationChain;\n TokenIn[] tokensIn;\n TokenOut[] tokensOut;\n}\n\n/**\n * @dev Token in representation.\n * @param token Address of a token to be sent.\n * @param amount Amount of tokens to be sent.\n */\nstruct TokenIn {\n address token;\n uint256 amount;\n}\n\n/**\n * @dev Token out representation.\n * @param token Address of a token to be received.\n * @param minAmount Minimum amount of tokens to be received.\n * @param recipient Recipient address that will receive the token out.\n */\nstruct TokenOut {\n address token;\n uint256 minAmount;\n address recipient;\n}\n\n/**\n * @dev Represents a transfer operation containing multiple token transfers.\n * @param chainId Chain ID where the transfers should be executed.\n * @param transfers List of token transfers to be performed.\n */\nstruct TransferOperation {\n uint256 chainId;\n TransferData[] transfers;\n}\n\n/**\n * @dev Transfer data for a single token transfer.\n * @param token Address of the token to transfer.\n * @param amount Amount of the token to transfer.\n * @param recipient Recipient of the token transfer.\n */\nstruct TransferData {\n address token;\n uint256 amount;\n address recipient;\n}\n\n/**\n * @dev Represents a generic call operation consisting of one or more contract calls.\n * @param chainId Chain ID where the calls should be executed.\n * @param calls List of low-level contract calls to be executed.\n */\nstruct CallOperation {\n uint256 chainId;\n CallData[] calls;\n}\n\n/**\n * @dev Low-level call data for a target contract interaction.\n * @param target Target contract address.\n * @param data Calldata to be sent to the target.\n * @param value ETH value to send along with the call.\n */\nstruct CallData {\n address target;\n bytes data;\n uint256 value;\n}\n\n/**\n * @dev Represents a generic dynamic call operation consisting of one or more dynamic contract calls.\n * @param chainId Chain ID where the calls should be executed.\n * @param calls List of ABI-encoded low-level dynamic contract calls to be executed.\n */\nstruct DynamicCallOperation {\n uint256 chainId;\n bytes[] calls;\n}\n\n/**\n * @dev Generic proposal structure representing a solver’s response to an intent.\n * @param deadline Timestamp until when the proposal is valid.\n * @param datas List of ABI-encoded proposal-specific data (e.g. SwapProposal).\n * @param fees List of fee amounts the solver requires for execution.\n */\nstruct Proposal {\n uint256 deadline;\n bytes[] datas;\n uint256[] fees;\n}\n\n/**\n * @dev Swap proposal representation for a swap operation.\n * @param executor Address of the executor contract that should be called during operation execution.\n * @param data Arbitrary data used to call the executor contract.\n * @param amountsOut List of amounts of tokens out proposed by the solver.\n */\nstruct SwapProposal {\n address executor;\n bytes data;\n uint256[] amountsOut;\n}\n\nlibrary IntentsHelpers {\n bytes32 internal constant INTENT_TYPE_HASH =\n keccak256(\n 'Intent(address feePayer,address settler,bytes32 nonce,uint256 deadline,MaxFee[] maxFees,bytes triggerSig,uint256 minValidations,Operation[] operations)MaxFee(address token,uint256 amount)Operation(uint8 opType,address user,bytes data,OperationEvent[] events)OperationEvent(bytes32 topic,bytes data)'\n );\n\n bytes32 internal constant PROPOSAL_TYPE_HASH =\n keccak256('Proposal(bytes32 intent,address solver,uint256 deadline,bytes[] datas,uint256[] fees)');\n\n bytes32 internal constant VALIDATION_TYPE_HASH = keccak256('Validation(bytes32 intent)');\n\n bytes32 internal constant MAX_FEE_TYPE_HASH = keccak256('MaxFee(address token,uint256 amount)');\n\n bytes32 internal constant OPERATION_TYPE_HASH =\n keccak256('Operation(uint8 opType,address user,bytes data,OperationEvent[] events)');\n\n bytes32 internal constant OPERATION_EVENT_TYPE_HASH = keccak256('OperationEvent(bytes32 topic,bytes data)');\n\n function hash(Intent memory intent) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n INTENT_TYPE_HASH,\n intent.feePayer,\n intent.settler,\n intent.nonce,\n intent.deadline,\n hash(intent.maxFees),\n intent.triggerSig,\n intent.minValidations,\n hash(intent.operations)\n )\n );\n }\n\n function hash(Proposal memory proposal, Intent memory intent, address solver) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n PROPOSAL_TYPE_HASH,\n hash(intent),\n solver,\n proposal.deadline,\n hash(proposal.datas),\n hash(proposal.fees)\n )\n );\n }\n\n function hash(MaxFee[] memory fees) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](fees.length);\n for (uint256 i = 0; i < fees.length; i++) {\n hashes[i] = keccak256(abi.encode(MAX_FEE_TYPE_HASH, fees[i].token, fees[i].amount));\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Operation[] memory operations) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](operations.length);\n for (uint256 i = 0; i < operations.length; i++) hashes[i] = hash(operations[i]);\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Operation memory operation) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n OPERATION_TYPE_HASH,\n operation.opType,\n operation.user,\n keccak256(operation.data),\n hash(operation.events)\n )\n );\n }\n\n function hash(OperationEvent[] memory events) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](events.length);\n for (uint256 i = 0; i < events.length; i++) {\n hashes[i] = keccak256(abi.encode(OPERATION_EVENT_TYPE_HASH, events[i].topic, keccak256(events[i].data)));\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(uint256[] memory fees) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(fees));\n }\n\n function hash(bytes[] memory datas) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](datas.length);\n for (uint256 i = 0; i < datas.length; i++) {\n hashes[i] = keccak256(datas[i]);\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Validation memory validation) internal pure returns (bytes32) {\n return keccak256(abi.encode(VALIDATION_TYPE_HASH, validation.intent));\n }\n}\n" + }, + "project/contracts/interfaces/IController.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @title Controller interface\n */\ninterface IController {\n /**\n * @dev The input arrays are not of equal length\n */\n error ControllerInputInvalidLength();\n\n /**\n * @dev Emitted every time a solver permission is set\n */\n event SolverAllowedSet(address indexed solver, bool allowed);\n\n /**\n * @dev Emitted every time an executor permission is set\n */\n event ExecutorAllowedSet(address indexed executor, bool allowed);\n\n /**\n * @dev Emitted every time a proposal signer permission is set\n */\n event ProposalSignerAllowedSet(address indexed proposalSigner, bool allowed);\n\n /**\n * @dev Emitted every time a validator permission is set\n */\n event ValidatorAllowedSet(address indexed validator, bool allowed);\n\n /**\n * @dev Emitted when the minimum validations changes\n */\n event MinValidationSet(uint8 indexed newMinValidation);\n\n /**\n * @dev Tells whether a solver is allowed\n * @param solver Address of the solver being queried\n */\n function isSolverAllowed(address solver) external view returns (bool);\n\n /**\n * @dev Tells whether an executor is allowed\n * @param executor Address of the executor being queried\n */\n function isExecutorAllowed(address executor) external view returns (bool);\n\n /**\n * @dev Tells whether a proposal signer is allowed\n * @param signer Address of the proposal signer being queried\n */\n function isProposalSignerAllowed(address signer) external view returns (bool);\n\n /**\n * @dev Tells whether a validator is allowed\n * @param validator Address of the validator being queried\n */\n function isValidatorAllowed(address validator) external view returns (bool);\n\n /**\n * @dev Tells the minimum number of validations allowed\n */\n function minValidations() external view returns (uint8);\n\n /**\n * @dev Sets permissions for multiple solvers\n * @param solvers List of solver addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedSolvers(address[] memory solvers, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple executors\n * @param executors List of executor addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedExecutors(address[] memory executors, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple proposal signers\n * @param signers List of proposal signer addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedProposalSigners(address[] memory signers, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple validators\n * @param validators List of validator addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedValidators(address[] memory validators, bool[] memory alloweds) external;\n\n /**\n * @dev Sets the minimum number of validations allowed\n * @param newMinValidations minimum number of validations allowed\n */\n function setMinValidations(uint8 newMinValidations) external;\n}\n" + }, + "project/contracts/interfaces/ICreateX.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity ^0.8.4;\n\n/**\n * @title CreateX Factory Interface Definition\n * @author pcaversaccio (https://web.archive.org/web/20230921103111/https://pcaversaccio.com/)\n * @custom:coauthor Matt Solomon (https://web.archive.org/web/20230921103335/https://mattsolomon.dev/)\n */\ninterface ICreateX {\n event ContractCreation(address indexed newContract);\n\n function deployCreate3(bytes32 salt, bytes memory initCode) external payable returns (address newContract);\n}\n" + }, + "project/contracts/interfaces/IDynamicCallEncoder.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../dynamic-calls/DynamicCallTypes.sol';\n\ninterface IDynamicCallEncoder {\n /**\n * @dev The argument is not word-aligned\n */\n error DynamicCallEncoderBadLength();\n\n /**\n * @dev The dynamic value resolves to empty data\n */\n error DynamicCallEncoderEmptyDynamic();\n\n /**\n * @dev The variable reference is not exactly one word\n */\n error DynamicCallEncoderVariableRefBadLength();\n\n /**\n * @dev The variable index is outside the variables array\n */\n error DynamicCallEncoderVariableOutOfBounds();\n\n /**\n * @dev The declared variables length exceeds the variables array length\n */\n error DynamicCallEncoderVariablesLengthOutOfBounds();\n\n /**\n * @dev The argument kind is not valid\n */\n error DynamicCallEncoderInvalidArgKind();\n\n /**\n * @dev Encodes a dynamic call into calldata.\n * @param dynamicCall Dynamic call specification.\n * @param variables List of resolved variable values.\n * @param variablesLength Number of resolved variables.\n */\n function encode(DynamicCall memory dynamicCall, bytes[][] memory variables, uint256 variablesLength)\n external\n pure\n returns (bytes memory);\n}\n" + }, + "project/contracts/interfaces/IExecutor.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\n\n/**\n * @title Executor interface\n */\ninterface IExecutor {\n /**\n * @dev Executes an operation proposal\n * @param operation Operation to be executed\n * @param operationHash unique hash of the operation\n * @param proposalData data of the proposal to be executed to fulfill the operation\n */\n function execute(Operation memory operation, bytes32 operationHash, bytes memory proposalData) external;\n}\n" + }, + "project/contracts/interfaces/IOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\nimport '../safeguards/Safeguards.sol';\n\n/**\n * @title OperationsValidator\n * @dev Performs operations validations based on safeguards\n */\ninterface IOperationsValidator {\n /**\n * @dev Validates an operation for a safeguard\n * @param operation Operation to be validated\n * @param config Safeguard config to validate the operation with\n */\n function validate(Operation memory operation, bytes memory config) external pure;\n}\n" + }, + "project/contracts/interfaces/IPaymentsReceiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @title PaymentsReceiver interface\n */\ninterface IPaymentsReceiver {\n /**\n * @dev The token address is zero\n */\n error PaymentsReceiverTokenZero();\n\n /**\n * @dev The recipient address is zero\n */\n error PaymentsReceiverRecipientZero();\n\n /**\n * @dev The amount is zero\n */\n error PaymentsReceiverAmountZero();\n\n /**\n * @dev The user address is zero\n */\n error PaymentsReceiverUserZero();\n\n /**\n * @dev The input arrays are not of equal length\n */\n error PaymentsReceiverInputInvalidLength();\n\n /**\n * @dev The token is not allowed\n */\n error PaymentsReceiverTokenNotAllowed(address token);\n\n /**\n * @dev Emitted every time a deposit is made\n */\n event Deposited(\n address indexed token,\n address indexed depositor,\n address indexed user,\n uint256 amount,\n uint8 decimals\n );\n\n /**\n * @dev Emitted every time a withdrawal is made\n */\n event Withdrawn(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time a token permission is set\n */\n event TokenAllowedSet(address indexed token, bool allowed);\n\n /**\n * @dev Tells whether a token is allowed\n * @param token Address of the token being queried\n */\n function isTokenAllowed(address token) external view returns (bool);\n\n /**\n * @dev Sets permissions for multiple tokens\n * @param tokens List of token addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedTokens(address[] memory tokens, bool[] memory alloweds) external;\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param amount Amount to deposit\n */\n function deposit(address token, uint256 amount) external;\n\n /**\n * @dev Deposits ERC20 tokens on behalf of a user\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function depositOnBehalf(address token, address user, uint256 amount) external;\n\n /**\n * @dev Withdraws ERC20 tokens to a recipient\n * @param token Address of the token to withdraw\n * @param recipient Address of the recipient\n * @param amount Amount to withdraw\n */\n function withdraw(address token, address recipient, uint256 amount) external;\n}\n" + }, + "project/contracts/interfaces/ISafe.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nenum SafeOperation {\n Call,\n DelegateCall\n}\n\ninterface ISafe {\n function getThreshold() external view returns (uint256);\n\n function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, SafeOperation operation)\n external\n returns (bool success, bytes memory returnData);\n}\n" + }, + "project/contracts/interfaces/ISettler.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\nimport '../safeguards/Safeguards.sol';\n\n/**\n * @title Settler interface\n */\ninterface ISettler {\n /**\n * @dev The requested operation type is unknown\n */\n error SettlerUnknownOperationType(uint8 opType);\n\n /**\n * @dev The simulation has been successful\n */\n error SettlerSimulationSuccess(uint256 gasUsed);\n\n /**\n * @dev The solver is not allowed\n */\n error SettlerSolverNotAllowed(address solver);\n\n /**\n * @dev The executor is not allowed\n */\n error SettlerExecutorNotAllowed(address executor);\n\n /**\n * @dev The proposal signer is not allowed\n */\n error SettlerProposalSignerNotAllowed(address signer);\n\n /**\n * @dev The validator is not allowed\n */\n error SettlerValidatorNotAllowed(address validator);\n\n /**\n * @dev The validator is duplicated\n */\n error SettlerValidatorDuplicatedOrUnsorted(address previous, address current);\n\n /**\n * @dev The settler is not the current contract\n */\n error SettlerInvalidSettler(address settler);\n\n /**\n * @dev The nonce is zero\n */\n error SettlerNonceZero();\n\n /**\n * @dev The intent has already been executed\n */\n error SettlerIntentAlreadyExecuted(bytes32 hash);\n\n /**\n * @dev The intent deadline is in the past\n */\n error SettlerIntentPastDeadline(uint256 deadline, uint256 timestamp);\n\n /**\n * @dev The current chain is not valid\n */\n error SettlerInvalidChain(uint256 chainId);\n\n /**\n * @dev The recipient is the settler contract\n */\n error SettlerInvalidRecipient(address to);\n\n /**\n * @dev The user is not a smart account\n */\n error SettlerUserNotSmartAccount(address user);\n\n /**\n * @dev The amount out is lower than the proposed amount\n */\n error SettlerAmountOutLtProposed(uint256 index, uint256 amountOut, uint256 proposed);\n\n /**\n * @dev The proposed amount is lower than the minimum amount\n */\n error SettlerProposedAmountLtMinAmount(uint256 index, uint256 proposed, uint256 minAmount);\n\n /**\n * @dev The proposed amounts array and the tokens out array are not of equal length\n */\n error SettlerInvalidProposedAmounts();\n\n /**\n * @dev The balance after the proposal execution is lower than the balance before\n */\n error SettlerPostBalanceOutLtPre(uint256 index, uint256 post, uint256 pre);\n\n /**\n * @dev The solver fees length does not match the requested by the user\n */\n error SettlerSolverFeeInvalidLength();\n\n /**\n * @dev The intent operations array is empty\n */\n error SettlerIntentOperationsEmpty();\n\n /**\n * @dev The proposal datas length does not match the intent operations length\n */\n error SettlerProposalDataInvalidLength();\n\n /**\n * @dev The solver fee is too high\n */\n error SettlerSolverFeeTooHigh(uint256 fee, uint256 max);\n\n /**\n * @dev The intent validations are not enough\n */\n error SettlerIntentValidationsNotEnough(uint256 min, uint256 current);\n\n /**\n * @dev The proposal deadline is in the past\n */\n error SettlerProposalPastDeadline(uint256 deadline, uint256 timestamp);\n\n /**\n * @dev The proposal data is not empty\n */\n error SettlerProposalDataNotEmpty();\n\n /**\n * @dev The rescue funds recipient is zero\n */\n error SettlerRescueFundsRecipientZero();\n\n /**\n * @dev The list of safeguards exceed the maximum allowed\n */\n error SettlerTooManySafeguards(uint256 lengthRequested);\n\n /**\n * @dev The chains of a swap operation do not match the swap type (single or cross chain)\n */\n error SettlerOperationChainsMismatch();\n\n /**\n * @dev A CrossChainSwap operation must be the only operation in the intent\n */\n error SettlerCrossChainSwapMustBeOnlyOperation();\n\n /**\n * @dev The new smart accounts handler is zero\n */\n error SmartAccountsHandlerZero();\n\n /**\n * @dev The new dynamic call encoder is zero\n */\n error SettlerDynamicCallEncoderZero();\n\n /**\n * @dev Custom events emitted for each operation\n */\n event OperationExecuted(\n address indexed user,\n bytes32 indexed topic,\n uint8 indexed opType,\n Operation operation,\n Proposal proposal,\n bytes32 intentHash,\n uint256 index,\n bytes output,\n bytes data\n );\n\n /**\n * @dev Emitted every time an intent is fulfilled\n */\n event ProposalExecuted(bytes32 indexed proposal);\n\n /**\n * @dev Emitted every time tokens are withdrawn from the contract balance\n */\n event FundsRescued(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time the smart accounts handler is set\n */\n event SmartAccountsHandlerSet(address indexed smartAccountsHandler);\n\n /**\n * @dev Emitted every time the operations validator is set\n */\n event OperationsValidatorSet(address indexed operationsValidator);\n\n /**\n * @dev Emitted every time the dynamic call encoder is set\n */\n event DynamicCallEncoderSet(address indexed dynamicCallEncoder);\n\n /**\n * @dev Emitted every time a safeguard is set\n */\n event SafeguardSet(address indexed user);\n\n /**\n * @dev Tells the reference to the Mimic controller\n */\n function controller() external view returns (address);\n\n /**\n * @dev Tells the reference to the smart accounts handler\n */\n function smartAccountsHandler() external view returns (address);\n\n /**\n * @dev Tells the reference to the operations validator\n */\n function operationsValidator() external view returns (address);\n\n /**\n * @dev Tells the reference to the dynamic call encoder\n */\n function dynamicCallEncoder() external view returns (address);\n\n /**\n * @dev Tells the block at which an intent was executed. Returns 0 if unexecuted.\n * @param hash Hash of the intent being queried\n */\n function getIntentBlock(bytes32 hash) external view returns (uint256);\n\n /**\n * @dev Tells the safeguard set for a user\n * @param user Address of the user being queried\n */\n function getUserSafeguard(address user) external view returns (bytes memory);\n\n /**\n * @dev Tells the hash of an intent\n * @param intent Intent to get the hash of\n */\n function getIntentHash(Intent memory intent) external pure returns (bytes32);\n\n /**\n * @dev Tells the hash of a proposal\n * @param proposal Proposal to be hashed\n * @param intent Intent being fulfilled by the requested proposal\n * @param solver Address of the solver that made the proposal\n */\n function getProposalHash(Proposal memory proposal, Intent memory intent, address solver)\n external\n pure\n returns (bytes32);\n\n /**\n * @dev Withdraws ERC20 or native tokens from the contract\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function rescueFunds(address token, address recipient, uint256 amount) external;\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function setSmartAccountsHandler(address newSmartAccountsHandler) external;\n\n /**\n * @dev Sets a new operations validator address\n * @param newOperationsValidator New operations validator to be set\n */\n function setOperationsValidator(address newOperationsValidator) external;\n\n /**\n * @dev Sets a new dynamic call encoder address\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function setDynamicCallEncoder(address newDynamicCallEncoder) external;\n\n /**\n * @dev Sets a safeguard for a user\n * @param safeguard Safeguard to be set\n */\n function setSafeguard(bytes memory safeguard) external;\n\n /**\n * @dev Executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function execute(Intent memory intent, Proposal memory proposal, bytes memory signature) external;\n\n /**\n * @dev Simulates an execution. It will always revert. Successful executions are returned as\n * `SettlerSimulationSuccess` errors. Any other error should be treated as failure.\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function simulate(Intent memory intent, Proposal memory proposal, bytes memory signature) external;\n}\n" + }, + "project/contracts/interfaces/ISmartAccount.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/introspection/IERC165.sol';\n\n/**\n * @title SmartAccount interface\n */\ninterface ISmartAccount is IERC165 {\n /**\n * @dev Emitted every time tokens are transferred\n */\n event Transferred(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time `call` is called\n */\n event Called(address indexed target, bytes data, uint256 value, bytes result);\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the owner or the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) external;\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the owner or the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n */\n function call(address target, bytes memory data, uint256 value) external returns (bytes memory result);\n}\n" + }, + "project/contracts/interfaces/ISmartAccountContract.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/interfaces/IERC1271.sol';\n\nimport './ISmartAccount.sol';\n\n/**\n * @title SmartAccountContract interface\n */\ninterface ISmartAccountContract is ISmartAccount, IERC1271 {\n // solhint-disable-previous-line no-empty-blocks\n}\n" + }, + "project/contracts/interfaces/ISmartAccountsHandler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\ninterface ISmartAccountsHandler {\n /**\n * @dev The smart account given is not supported\n */\n error SmartAccountsHandlerUnsupportedAccount(address account);\n\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address account) external view returns (bool);\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address account, address token, address to, uint256 amount) external;\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address account, address target, bytes memory data, uint256 value) external returns (bytes memory);\n}\n" + }, + "project/contracts/payments/PaymentsReceiver.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\n\nimport '../interfaces/IPaymentsReceiver.sol';\n\n/**\n * @title PaymentsReceiver\n * @dev Receives ERC20 deposits and lets the owner withdraw them\n */\ncontract PaymentsReceiver is IPaymentsReceiver, Ownable {\n using SafeERC20 for IERC20;\n\n // List of allowed tokens\n mapping (address => bool) public override isTokenAllowed;\n\n /**\n * @dev Creates a new PaymentsReceiver contract\n * @param owner Address that will own the contract\n * @param tokens List of allowed tokens\n */\n constructor(address owner, address[] memory tokens) Ownable(owner) {\n for (uint256 i = 0; i < tokens.length; i++) _setAllowedToken(tokens[i], true);\n }\n\n /**\n * @dev Sets permissions for multiple tokens\n * @param tokens List of token addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedTokens(address[] memory tokens, bool[] memory alloweds) external override onlyOwner {\n if (tokens.length != alloweds.length) revert PaymentsReceiverInputInvalidLength();\n for (uint256 i = 0; i < tokens.length; i++) _setAllowedToken(tokens[i], alloweds[i]);\n }\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param amount Amount to deposit\n */\n function deposit(address token, uint256 amount) external override {\n _deposit(token, _msgSender(), amount);\n }\n\n /**\n * @dev Deposits ERC20 tokens on behalf of a user\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function depositOnBehalf(address token, address user, uint256 amount) external override {\n if (user == address(0)) revert PaymentsReceiverUserZero();\n _deposit(token, user, amount);\n }\n\n /**\n * @dev Withdraws ERC20 tokens to a recipient\n * @param token Address of the token to withdraw\n * @param recipient Address of the recipient\n * @param amount Amount to withdraw\n */\n function withdraw(address token, address recipient, uint256 amount) external override onlyOwner {\n if (token == address(0)) revert PaymentsReceiverTokenZero();\n if (recipient == address(0)) revert PaymentsReceiverRecipientZero();\n if (amount == 0) revert PaymentsReceiverAmountZero();\n\n IERC20(token).safeTransfer(recipient, amount);\n\n emit Withdrawn(token, recipient, amount);\n }\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function _deposit(address token, address user, uint256 amount) internal {\n if (token == address(0)) revert PaymentsReceiverTokenZero();\n if (amount == 0) revert PaymentsReceiverAmountZero();\n if (!isTokenAllowed[token]) revert PaymentsReceiverTokenNotAllowed(token);\n\n address depositor = _msgSender();\n IERC20(token).safeTransferFrom(depositor, address(this), amount);\n\n uint8 decimals = IERC20Metadata(token).decimals();\n emit Deposited(token, depositor, user, amount, decimals);\n }\n\n /**\n * @dev Sets a token permission\n */\n function _setAllowedToken(address token, bool allowed) internal {\n isTokenAllowed[token] = allowed;\n emit TokenAllowedSet(token, allowed);\n }\n}\n" + }, + "project/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol';\n\ncontract Proxy is TransparentUpgradeableProxy {\n constructor(address implementation, address initialOwner, bytes memory data)\n TransparentUpgradeableProxy(implementation, initialOwner, data)\n {}\n}\n" + }, + "project/contracts/safeguards/BaseOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @title BaseOperationsValidator\n */\ncontract BaseOperationsValidator {\n /**\n * @dev No operations allowed\n */\n error OperationsValidatorNoneAllowed();\n\n /**\n * @dev Operation type unknown\n */\n error OperationsValidatorUnknownOperationType(uint8 opType);\n\n /**\n * @dev Invalid safeguard mode\n */\n error OperationsValidatorInvalidSafeguardMode(uint8 mode);\n\n /**\n * @dev Tells whether a chain is allowed\n */\n function _isChainAllowed(uint256 chainId, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, uint256[] memory values) = abi.decode(config, (bool, uint256[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (chainId == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (chainId == values[i]) return true;\n }\n return false;\n }\n }\n\n /**\n * @dev Tells whether an account is allowed\n */\n function _isAccountAllowed(address account, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, address[] memory values) = abi.decode(config, (bool, address[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (account == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (account == values[i]) return true;\n }\n return false;\n }\n }\n\n /**\n * @dev Tells whether a selector is allowed\n */\n function _isSelectorAllowed(bytes4 selector, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, bytes4[] memory values) = abi.decode(config, (bool, bytes4[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (selector == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (selector == values[i]) return true;\n }\n return false;\n }\n }\n}\n" + }, + "project/contracts/safeguards/CallOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './Safeguards.sol';\nimport './BaseOperationsValidator.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Call safeguard modes to validate call operations\n * @param None To ensure no calls are allowed\n * @param Chain To validate that the chain where calls execute is allowed\n * @param Target To validate that the call targets (contract addresses) are allowed\n * @param Selector To validate that the function selectors being called are allowed\n */\nenum CallSafeguardMode {\n None,\n Chain,\n Target,\n Selector\n}\n\n/**\n * @title CallOperationsValidator\n * @dev Performs call operations validations based on safeguards\n */\ncontract CallOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a call operation is valid for a safeguard\n * @param operation Call operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isCallOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n CallOperation memory callOperation = abi.decode(operation.data, (CallOperation));\n if (safeguard.mode == uint8(CallSafeguardMode.Chain))\n return _isChainAllowed(callOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Target))\n return _areCallTargetsValid(callOperation.calls, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Selector))\n return _areCallSelectorsValid(callOperation.calls, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the call targets are allowed\n */\n function _areCallTargetsValid(CallData[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n if (!_isAccountAllowed(calls[i].target, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the call selectors are allowed\n */\n function _areCallSelectorsValid(CallData[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n if (!_isSelectorAllowed(bytes4(calls[i].data), config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/DynamicCallOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './CallOperationsValidator.sol';\nimport './Safeguards.sol';\nimport './BaseOperationsValidator.sol';\nimport '../Intents.sol';\nimport '../dynamic-calls/DynamicCallTypes.sol';\n\n/**\n * @title DynamicCallOperationsValidator\n * @dev Performs dynamic call operations validations based on call safeguards\n */\ncontract DynamicCallOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a dynamic call operation is valid for a safeguard\n * @param operation Dynamic call operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isDynamicCallOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n DynamicCallOperation memory dynamicCallOperation = abi.decode(operation.data, (DynamicCallOperation));\n if (safeguard.mode == uint8(CallSafeguardMode.Chain))\n return _isChainAllowed(dynamicCallOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Target))\n return _areDynamicCallTargetsValid(dynamicCallOperation.calls, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Selector))\n return _areDynamicCallSelectorsValid(dynamicCallOperation.calls, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the dynamic call targets are allowed\n */\n function _areDynamicCallTargetsValid(bytes[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n DynamicCall memory call = abi.decode(calls[i], (DynamicCall));\n if (!_isAccountAllowed(call.target, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the dynamic call selectors are allowed\n */\n function _areDynamicCallSelectorsValid(bytes[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n DynamicCall memory call = abi.decode(calls[i], (DynamicCall));\n if (!_isSelectorAllowed(call.selector, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/OperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './CallOperationsValidator.sol';\nimport './DynamicCallOperationsValidator.sol';\nimport './TransferOperationsValidator.sol';\nimport './Safeguards.sol';\nimport './SwapOperationsValidator.sol';\nimport '../Intents.sol';\nimport '../interfaces/IOperationsValidator.sol';\n\n/**\n * @title OperationsValidator\n * @dev Performs operations validations based on safeguards\n */\ncontract OperationsValidator is\n IOperationsValidator,\n SwapOperationsValidator,\n TransferOperationsValidator,\n CallOperationsValidator,\n DynamicCallOperationsValidator\n{\n /**\n * @dev Safeguard validation failed\n */\n error OperationsValidatorSafeguardFailed();\n\n /**\n * @dev Invalid safeguard config mode\n */\n error OperationsValidatorInvalidSafeguardConfigMode(uint8 mode);\n\n /**\n * @dev Invalid safeguard group logic mode\n */\n error OperationsValidatorInvalidSafeguardGroupLogicMode(uint8 mode);\n\n /**\n * @dev Tells whether an operation is valid for a safeguard\n * @param operation Operation to be validated\n * @param config Safeguard config to validate the operation with\n */\n function validate(Operation memory operation, bytes memory config) external pure override {\n (uint8 mode, bytes memory safeguard) = abi.decode(config, (uint8, bytes));\n if (mode == uint8(SafeguardConfigMode.List)) _validate(operation, abi.decode(safeguard, (Safeguard[])));\n else if (mode == uint8(SafeguardConfigMode.Tree)) _validate(operation, _decodeSafeguardTree(safeguard));\n else revert OperationsValidatorInvalidSafeguardConfigMode(mode);\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguards list\n * @param operation Operation to be validated\n * @param safeguards Safeguard list to validate the operation with\n */\n function _validate(Operation memory operation, Safeguard[] memory safeguards) internal pure {\n if (safeguards.length == 0) revert OperationsValidatorSafeguardFailed();\n for (uint256 i = 0; i < safeguards.length; i++) {\n if (!_isSafeguardValid(operation, safeguards[i])) revert OperationsValidatorSafeguardFailed();\n }\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard tree\n * @param operation Operation to be validated\n * @param tree Safeguard tree to validate the operation with\n */\n function _validate(Operation memory operation, SafeguardTree memory tree) internal pure {\n if (tree.nodes.length == 0) revert OperationsValidatorSafeguardFailed();\n if (!_isSafeguardGroupValid(operation, tree, 0)) revert OperationsValidatorSafeguardFailed();\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard tree at a certain level\n * @param operation Operation to be validated\n * @param tree Safeguard tree to validate the operation with\n * @param index Index of the group node to evaluate\n */\n function _isSafeguardGroupValid(Operation memory operation, SafeguardTree memory tree, uint16 index)\n internal\n pure\n returns (bool)\n {\n SafeguardGroup memory group = tree.nodes[index];\n\n if (group.logic == uint8(SafeguardGroupLogic.NOT)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i])) return false;\n }\n return true;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.AND)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (!_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (!_isSafeguardGroupValid(operation, tree, group.children[i])) return false;\n }\n return true;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.OR)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return true;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i])) return true;\n }\n return false;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.XOR)) {\n uint256 hits = 0;\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]]))\n if (++hits > 1) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i]))\n if (++hits > 1) return false;\n }\n return hits == 1;\n }\n\n revert OperationsValidatorInvalidSafeguardGroupLogicMode(group.logic);\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard\n * @param operation Operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isSafeguardValid(Operation memory operation, Safeguard memory safeguard) internal pure returns (bool) {\n if (safeguard.mode == uint8(0)) revert OperationsValidatorNoneAllowed();\n if (operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap)) {\n return _isSwapOperationValid(operation, safeguard);\n }\n if (operation.opType == uint8(OpType.Transfer)) return _isTransferOperationValid(operation, safeguard);\n if (operation.opType == uint8(OpType.Call)) return _isCallOperationValid(operation, safeguard);\n if (operation.opType == uint8(OpType.DynamicCall)) return _isDynamicCallOperationValid(operation, safeguard);\n revert OperationsValidatorUnknownOperationType(uint8(operation.opType));\n }\n\n /**\n * @dev Safely decodes a safeguard tree avoiding compiler issues with dynamic arrays\n * @param data Safeguard tree data to be decoded\n */\n function _decodeSafeguardTree(bytes memory data) private pure returns (SafeguardTree memory) {\n (SafeguardGroup[] memory nodes, Safeguard[] memory leaves) = abi.decode(data, (SafeguardGroup[], Safeguard[]));\n return SafeguardTree(nodes, leaves);\n }\n}\n" + }, + "project/contracts/safeguards/Safeguards.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Safeguard config modes\n * - List: Safeguard lists\n * - Tree: Safeguard groups\n */\nenum SafeguardConfigMode {\n List,\n Tree\n}\n\n/**\n * @dev Logical operators for safeguard groups\n * - AND: every child must pass\n * - OR: at least one child must pass\n * - XOR: exactly one child must pass\n * - NOT: every child must fail\n */\nenum SafeguardGroupLogic {\n AND,\n OR,\n XOR,\n NOT\n}\n\n/**\n * @dev Flat node in the safeguard tree\n * @param logic Group operator (AND/OR/XOR/NOT)\n * @param leaves Indices into `SafeguardTree.leaves`\n * @param children Indices into `SafeguardTree.nodes`\n */\nstruct SafeguardGroup {\n uint8 logic;\n uint16[] leaves;\n uint16[] children;\n}\n\n/**\n * @dev Safeguard tree representation\n * @param nodes List of all the nodes in the tree\n * @param leaves List of all the leaves in the tree\n */\nstruct SafeguardTree {\n SafeguardGroup[] nodes;\n Safeguard[] leaves;\n}\n\n/**\n * @dev Safeguard representation\n * @param mode Safeguard mode\n * @param config Safeguard configuration settings or parameters\n */\nstruct Safeguard {\n uint8 mode;\n bytes config;\n}\n" + }, + "project/contracts/safeguards/SwapOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './BaseOperationsValidator.sol';\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Swap safeguard modes to validate swap operations\n * @param None To ensure no swaps are allowed\n * @param SourceChain To validate that the source chain is allowed\n * @param DestinationChain To validate that the destination chain is allowed\n * @param TokenIn To validate that the tokens to be sent are allowed\n * @param TokenOut To validate that the tokens to be received are allowed\n * @param Recipient To validate that the recipients that will receive the tokens are allowed\n */\nenum SwapSafeguardMode {\n None,\n SourceChain,\n DestinationChain,\n TokenIn,\n TokenOut,\n Recipient\n}\n\n/**\n * @title SwapOperationsValidator\n * @dev Performs swap operations validations based on safeguards\n */\ncontract SwapOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a swap operation is valid for a safeguard\n * @param operation Swap operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isSwapOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n SwapOperation memory swapOperation = abi.decode(operation.data, (SwapOperation));\n if (safeguard.mode == uint8(SwapSafeguardMode.SourceChain))\n return _isChainAllowed(swapOperation.sourceChain, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.DestinationChain))\n return _isChainAllowed(swapOperation.destinationChain, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.TokenIn))\n return _areSwapTokensInValid(swapOperation.tokensIn, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.TokenOut))\n return _areSwapTokensOutValid(swapOperation.tokensOut, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.Recipient))\n return _areSwapRecipientsValid(swapOperation.tokensOut, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the tokens to be sent are allowed\n */\n function _areSwapTokensInValid(TokenIn[] memory tokensIn, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensIn.length; i++) {\n if (!_isAccountAllowed(tokensIn[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the tokens to be received are allowed\n */\n function _areSwapTokensOutValid(TokenOut[] memory tokensOut, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensOut.length; i++) {\n if (!_isAccountAllowed(tokensOut[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the recipients to be received are allowed\n */\n function _areSwapRecipientsValid(TokenOut[] memory tokensOut, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensOut.length; i++) {\n if (!_isAccountAllowed(tokensOut[i].recipient, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/TransferOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './BaseOperationsValidator.sol';\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Transfer safeguard modes to validate transfer operations\n * @param None To ensure no transfers are allowed\n * @param Chain To validate that the chain where transfers execute is allowed\n * @param Token To validate that the tokens being transferred are allowed\n * @param Recipient To validate that the recipients of the transfers are allowed\n */\nenum TransferSafeguardMode {\n None,\n Chain,\n Token,\n Recipient\n}\n\n/**\n * @title TransferOperationsValidator\n * @dev Performs transfer operations validations based on safeguards\n */\ncontract TransferOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a transfer operation is valid for a safeguard\n * @param operation Transfer operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isTransferOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n TransferOperation memory transferOperation = abi.decode(operation.data, (TransferOperation));\n if (safeguard.mode == uint8(TransferSafeguardMode.Chain))\n return _isChainAllowed(transferOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(TransferSafeguardMode.Token))\n return _areTransferTokensValid(transferOperation.transfers, safeguard.config);\n if (safeguard.mode == uint8(TransferSafeguardMode.Recipient))\n return _areTransferRecipientsValid(transferOperation.transfers, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the tokens being transferred are allowed\n */\n function _areTransferTokensValid(TransferData[] memory transfers, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < transfers.length; i++) {\n if (!_isAccountAllowed(transfers[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the recipients of the transfers are allowed\n */\n function _areTransferRecipientsValid(TransferData[] memory transfers, bytes memory config)\n private\n pure\n returns (bool)\n {\n for (uint256 i = 0; i < transfers.length; i++) {\n if (!_isAccountAllowed(transfers[i].recipient, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/Settler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';\nimport '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\nimport '@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol';\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\nimport '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';\n\nimport './Intents.sol';\nimport './interfaces/IController.sol';\nimport './interfaces/IDynamicCallEncoder.sol';\nimport './interfaces/IOperationsValidator.sol';\nimport './interfaces/IExecutor.sol';\nimport './interfaces/ISettler.sol';\nimport './utils/Denominations.sol';\nimport './utils/ERC20Helpers.sol';\nimport './smart-accounts/SmartAccountsHandler.sol';\nimport './smart-accounts/SmartAccountsHandlerHelpers.sol';\n\n/**\n * @title Settler\n * @dev Contract that provides the appropriate context for solvers to execute proposals that fulfill user intents\n */\ncontract Settler is ISettler, Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, EIP712Upgradeable {\n using SafeERC20 for IERC20;\n using IntentsHelpers for Intent;\n using IntentsHelpers for Proposal;\n using IntentsHelpers for Validation;\n using SmartAccountsHandlerHelpers for address;\n\n // Mimic controller reference\n address public override controller;\n\n // Smart accounts handler reference\n address public override smartAccountsHandler;\n\n // Operations validator reference\n address public override operationsValidator;\n\n // Dynamic call encoder reference\n address public dynamicCallEncoder;\n\n // List of block numbers at which an intent was executed\n mapping (bytes32 => uint256) public override getIntentBlock;\n\n // Safeguard config per user\n mapping (address => bytes) internal _userSafeguard;\n\n /**\n * @dev Modifier to tag settler functions in order to check if the sender is an allowed solver\n */\n modifier onlySolver() {\n address sender = _msgSender();\n if (!IController(controller).isSolverAllowed(sender)) revert SettlerSolverNotAllowed(sender);\n _;\n }\n\n /**\n * @dev Disables initializers to prevent implementation contract from being initialized directly\n */\n constructor() {\n _disableInitializers();\n }\n\n /**\n * @dev Initializes a new Settler contract\n * @param _controller Address of the Settler controller\n * @param _owner Address that will own the contract\n * @param _dynamicCallEncoder Address of the dynamic call encoder\n */\n function initialize(address _controller, address _owner, address _dynamicCallEncoder) external initializer {\n __Ownable_init(_owner);\n __ReentrancyGuard_init();\n __EIP712_init('Mimic Protocol Settler', '1');\n\n controller = _controller;\n smartAccountsHandler = address(new SmartAccountsHandler());\n _setDynamicCallEncoder(_dynamicCallEncoder);\n }\n\n /**\n * @dev Tells the hash of an intent\n * @param intent Intent to get the hash of\n */\n function getIntentHash(Intent memory intent) external pure override returns (bytes32) {\n return intent.hash();\n }\n\n /**\n * @dev Tells the hash of a proposal\n * @param proposal Proposal to be hashed\n * @param intent Intent being fulfilled by the requested proposal\n * @param solver Address of the solver that made the proposal\n */\n function getProposalHash(Proposal memory proposal, Intent memory intent, address solver)\n external\n pure\n override\n returns (bytes32)\n {\n return proposal.hash(intent, solver);\n }\n\n /**\n * @dev Tells the safeguard set for a user\n * @param user Address of the user being queried\n */\n function getUserSafeguard(address user) external view override returns (bytes memory) {\n return _userSafeguard[user];\n }\n\n /**\n * @dev It allows receiving native token transfers\n * Note: This method mainly allows supporting native tokens for swaps\n */\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n /**\n * @dev Withdraws ERC20 or native tokens from the contract\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function rescueFunds(address token, address recipient, uint256 amount) external override onlyOwner nonReentrant {\n if (recipient == address(0)) revert SettlerRescueFundsRecipientZero();\n ERC20Helpers.transfer(token, recipient, amount);\n emit FundsRescued(token, recipient, amount);\n }\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function setSmartAccountsHandler(address newSmartAccountsHandler) external override onlyOwner {\n _setSmartAccountsHandler(newSmartAccountsHandler);\n }\n\n /**\n * @dev Sets a new operations validator address\n * @param newOperationsValidator New operations validator to be set\n */\n function setOperationsValidator(address newOperationsValidator) external override onlyOwner {\n _setOperationsValidator(newOperationsValidator);\n }\n\n /**\n * @dev Sets a new dynamic call encoder address\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function setDynamicCallEncoder(address newDynamicCallEncoder) external override onlyOwner {\n _setDynamicCallEncoder(newDynamicCallEncoder);\n }\n\n /**\n * @dev Sets a safeguard for a user\n * @param safeguard Safeguard to be set\n */\n function setSafeguard(bytes memory safeguard) external override {\n _setSafeguard(msg.sender, safeguard);\n }\n\n /**\n * @dev Executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function execute(Intent memory intent, Proposal memory proposal, bytes memory signature)\n external\n override\n onlySolver\n {\n _execute(intent, proposal, signature, false);\n }\n\n /**\n * @dev Simulates an execution. It will always revert. Successful executions are returned as\n * `SettlerSimulationSuccess` errors. Any other error should be treated as failure.\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function simulate(Intent memory intent, Proposal memory proposal, bytes memory signature)\n external\n override\n onlySolver\n {\n uint256 initialGas = gasleft();\n _execute(intent, proposal, signature, true);\n uint256 gasUsed = initialGas - gasleft();\n revert SettlerSimulationSuccess(gasUsed);\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n * @param simulated Whether the execution is a simulation\n */\n function _execute(Intent memory intent, Proposal memory proposal, bytes memory signature, bool simulated)\n internal\n nonReentrant\n {\n _validateIntent(intent, proposal, signature, simulated);\n getIntentBlock[intent.hash()] = block.number;\n\n bytes[][] memory outputs = new bytes[][](intent.operations.length);\n for (uint256 i = 0; i < intent.operations.length; i++) {\n outputs[i] = _executeOperation(intent, proposal, i, outputs);\n }\n\n _payFees(intent, proposal);\n emit ProposalExecuted(proposal.hash(intent, _msgSender()));\n }\n\n /**\n * @dev Executes proposal to fulfill an operation\n * @param intent Intent being fulfilled\n * @param proposal Proposal being executed\n * @param index Position where the operation and its corresponding proposal data are located\n * @param outputs List of operations outputs\n */\n function _executeOperation(Intent memory intent, Proposal memory proposal, uint256 index, bytes[][] memory outputs)\n internal\n returns (bytes[] memory)\n {\n uint8 opType = intent.operations[index].opType;\n if (opType == uint8(OpType.Swap) || opType == uint8(OpType.CrossChainSwap)) {\n return _executeSwap(intent, proposal, index);\n }\n if (opType == uint8(OpType.Transfer)) return _executeTransfer(intent, proposal, index);\n if (opType == uint8(OpType.Call)) return _executeCall(intent, proposal, index);\n if (opType == uint8(OpType.DynamicCall)) return _executeDynamicCall(intent, proposal, index, outputs);\n revert SettlerUnknownOperationType(opType);\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a swap operation\n * @param intent Intent that contains swap operation to be fulfilled\n * @param proposal Proposal with swap data to be executed\n * @param index Position where the swap proposal data and operation are located\n */\n function _executeSwap(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n SwapOperation memory swapOperation = abi.decode(operation.data, (SwapOperation));\n SwapProposal memory swapProposal = abi.decode(proposal.datas[index], (SwapProposal));\n if (operation.opType == uint8(OpType.CrossChainSwap)) {\n if (intent.operations.length > 1) revert SettlerCrossChainSwapMustBeOnlyOperation();\n _validateCrossChainSwapOperation(swapOperation, swapProposal);\n } else _validateSingleChainSwapOperation(swapOperation, swapProposal);\n\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(operation.user);\n if (swapOperation.sourceChain == block.chainid) {\n for (uint256 i = 0; i < swapOperation.tokensIn.length; i++) {\n TokenIn memory tokenIn = swapOperation.tokensIn[i];\n _transferFrom(tokenIn.token, operation.user, swapProposal.executor, tokenIn.amount, isSmartAccount);\n }\n }\n\n uint256[] memory preBalancesOut = _getTokensOutBalance(swapOperation);\n // Using the intent hash as the unique operation hash because cross-chain swap has only one operation per intent and the single swap executor does not use it\n bytes32 operationHash = intent.hash();\n IExecutor(swapProposal.executor).execute(operation, operationHash, proposal.datas[index]);\n\n outputs = new bytes[](swapOperation.tokensOut.length);\n if (swapOperation.destinationChain == block.chainid) {\n uint256[] memory amounts = new uint256[](swapOperation.tokensOut.length);\n for (uint256 i = 0; i < swapOperation.tokensOut.length; i++) {\n TokenOut memory tokenOut = swapOperation.tokensOut[i];\n uint256 postBalanceOut = ERC20Helpers.balanceOf(tokenOut.token, address(this));\n uint256 preBalanceOut = preBalancesOut[i];\n if (postBalanceOut < preBalanceOut) revert SettlerPostBalanceOutLtPre(i, postBalanceOut, preBalanceOut);\n\n amounts[i] = postBalanceOut - preBalanceOut;\n uint256 proposedAmount = swapProposal.amountsOut[i];\n if (amounts[i] < proposedAmount) revert SettlerAmountOutLtProposed(i, amounts[i], proposedAmount);\n\n ERC20Helpers.transfer(tokenOut.token, tokenOut.recipient, amounts[i]);\n outputs[i] = abi.encode(amounts[i]);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(amounts));\n }\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a transfer operation\n * @param intent Intent that contains transfer operation to be fulfilled\n * @param proposal Transfer proposal to be executed\n * @param index Position where the transfer proposal data and operation are located\n */\n function _executeTransfer(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n TransferOperation memory transferOperation = abi.decode(operation.data, (TransferOperation));\n _validateTransferOperation(transferOperation, proposal.datas[index]);\n\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(operation.user);\n for (uint256 i = 0; i < transferOperation.transfers.length; i++) {\n TransferData memory transfer = transferOperation.transfers[i];\n _transferFrom(transfer.token, operation.user, transfer.recipient, transfer.amount, isSmartAccount);\n }\n\n outputs = new bytes[](0);\n _emitOperationEvents(operation, proposal, intent.hash(), index, new bytes(0));\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a call operation\n * @param intent Intent that contains call operation to be fulfilled\n * @param proposal Call proposal to be executed\n * @param index Position where the call proposal data and operation are located\n */\n function _executeCall(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n CallOperation memory callOperation = abi.decode(operation.data, (CallOperation));\n _validateCallOperation(callOperation, proposal.datas[index], operation.user);\n\n outputs = new bytes[](callOperation.calls.length);\n for (uint256 i = 0; i < callOperation.calls.length; i++) {\n CallData memory call = callOperation.calls[i];\n // solhint-disable-next-line avoid-low-level-calls\n outputs[i] = smartAccountsHandler.call(operation.user, call.target, call.data, call.value);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(outputs));\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a dynamic call operation\n * @param intent Intent that contains dynamic call operation to be fulfilled\n * @param proposal Dynamic call proposal to be executed\n * @param index Position where the dynamic call proposal data and operation are located\n * @param variables List of operations outputs\n */\n function _executeDynamicCall(\n Intent memory intent,\n Proposal memory proposal,\n uint256 index,\n bytes[][] memory variables\n ) internal returns (bytes[] memory outputs) {\n Operation memory operation = intent.operations[index];\n DynamicCallOperation memory dynamicCallOperation = abi.decode(operation.data, (DynamicCallOperation));\n _validateDynamicCallOperation(dynamicCallOperation, proposal.datas[index], operation.user);\n\n outputs = new bytes[](dynamicCallOperation.calls.length);\n for (uint256 i = 0; i < dynamicCallOperation.calls.length; i++) {\n DynamicCall memory dynamicCall = abi.decode(dynamicCallOperation.calls[i], (DynamicCall));\n bytes memory data = IDynamicCallEncoder(dynamicCallEncoder).encode(dynamicCall, variables, index);\n // solhint-disable-next-line avoid-low-level-calls\n outputs[i] = smartAccountsHandler.call(operation.user, dynamicCall.target, data, dynamicCall.value);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(outputs));\n }\n\n /**\n * @dev Validates an intent and its corresponding proposal\n The off-chain validators are assuring that:\n - The trigger signer has authorization over the intent.feePayer and each operations[i].user\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n * @param simulated Whether the execution is a simulation\n */\n function _validateIntent(Intent memory intent, Proposal memory proposal, bytes memory signature, bool simulated)\n internal\n view\n {\n if (intent.settler != address(this)) revert SettlerInvalidSettler(intent.settler);\n if (intent.nonce == bytes32(0)) revert SettlerNonceZero();\n bytes32 intentHash = intent.hash();\n if (getIntentBlock[intentHash] != 0) revert SettlerIntentAlreadyExecuted(intentHash);\n\n if (intent.operations.length == 0) revert SettlerIntentOperationsEmpty();\n if (intent.operations.length != proposal.datas.length) revert SettlerProposalDataInvalidLength();\n\n if (operationsValidator != address(0)) {\n for (uint256 i = 0; i < intent.operations.length; i++) {\n Operation memory operation = intent.operations[i];\n bytes memory safeguard = _userSafeguard[operation.user];\n if (safeguard.length > 0) IOperationsValidator(operationsValidator).validate(operation, safeguard);\n }\n }\n\n bool shouldValidateDeadlines = _shouldValidateDeadlines(intent);\n if (shouldValidateDeadlines) {\n if (intent.deadline <= block.timestamp) revert SettlerIntentPastDeadline(intent.deadline, block.timestamp);\n bool isProposalPastDeadline = proposal.deadline <= block.timestamp;\n if (isProposalPastDeadline) revert SettlerProposalPastDeadline(proposal.deadline, block.timestamp);\n }\n\n if (intent.maxFees.length != proposal.fees.length) revert SettlerSolverFeeInvalidLength();\n for (uint256 i = 0; i < intent.maxFees.length; i++) {\n uint256 maxFee = intent.maxFees[i].amount;\n uint256 proposalFee = proposal.fees[i];\n if (proposalFee > maxFee) revert SettlerSolverFeeTooHigh(proposalFee, maxFee);\n }\n\n uint8 minValidations = IController(controller).minValidations();\n uint256 requiredValidations = intent.minValidations > minValidations ? intent.minValidations : minValidations;\n\n if (intent.validations.length < requiredValidations) {\n revert SettlerIntentValidationsNotEnough(requiredValidations, intent.validations.length);\n }\n\n address lastValidator = address(0);\n Validation memory validation = Validation(intentHash);\n bytes32 typedDataHash = _hashTypedDataV4(validation.hash());\n for (uint256 i = 0; i < intent.validations.length; i++) {\n address validator = ECDSA.recover(typedDataHash, intent.validations[i]);\n if (validator <= lastValidator) {\n revert SettlerValidatorDuplicatedOrUnsorted(lastValidator, validator);\n }\n lastValidator = validator;\n bool isValidatorNotAllowed = !IController(controller).isValidatorAllowed(validator);\n if (isValidatorNotAllowed) revert SettlerValidatorNotAllowed(validator);\n }\n\n address signer = ECDSA.recover(_hashTypedDataV4(proposal.hash(intent, _msgSender())), signature);\n bool isProposalSignerNotAllowed = !IController(controller).isProposalSignerAllowed(signer) && !simulated;\n if (isProposalSignerNotAllowed) revert SettlerProposalSignerNotAllowed(signer);\n }\n\n /**\n * @dev Validates a swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateSwapOperation(SwapOperation memory operation, SwapProposal memory proposal) internal view {\n if (proposal.amountsOut.length != operation.tokensOut.length) revert SettlerInvalidProposedAmounts();\n\n for (uint256 i = 0; i < operation.tokensOut.length; i++) {\n TokenOut memory tokenOut = operation.tokensOut[i];\n address recipient = tokenOut.recipient;\n if (recipient == address(this)) revert SettlerInvalidRecipient(recipient);\n\n uint256 minAmount = tokenOut.minAmount;\n uint256 proposedAmount = proposal.amountsOut[i];\n if (proposedAmount < minAmount) revert SettlerProposedAmountLtMinAmount(i, proposedAmount, minAmount);\n }\n }\n\n /**\n * @dev Validates a single-chain swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateSingleChainSwapOperation(SwapOperation memory operation, SwapProposal memory proposal)\n internal\n view\n {\n if (operation.sourceChain != operation.destinationChain) revert SettlerOperationChainsMismatch();\n if (operation.sourceChain != block.chainid) revert SettlerInvalidChain(block.chainid);\n _validateSwapOperation(operation, proposal);\n }\n\n /**\n * @dev Validates a transfer operation and its corresponding proposal\n * @param operation Transfer operation to be fulfilled\n * @param proposalData data of the proposal\n */\n function _validateTransferOperation(TransferOperation memory operation, bytes memory proposalData) internal view {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n for (uint256 i = 0; i < operation.transfers.length; i++) {\n address recipient = operation.transfers[i].recipient;\n if (recipient == address(this)) revert SettlerInvalidRecipient(recipient);\n }\n }\n\n /**\n * @dev Validates a call operation and its corresponding proposal\n * @param operation Call operation to be fulfilled\n * @param proposalData data of the proposal\n * @param user The originator of the operation\n */\n function _validateCallOperation(CallOperation memory operation, bytes memory proposalData, address user)\n internal\n view\n {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n if (!smartAccountsHandler.isSmartAccount(user)) revert SettlerUserNotSmartAccount(user);\n }\n\n /**\n * @dev Validates a dynamic call operation and its corresponding proposal\n * @param operation Dynamic call operation to be fulfilled\n * @param proposalData data of the proposal\n * @param user The originator of the operation\n */\n function _validateDynamicCallOperation(\n DynamicCallOperation memory operation,\n bytes memory proposalData,\n address user\n ) internal view {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n if (!smartAccountsHandler.isSmartAccount(user)) revert SettlerUserNotSmartAccount(user);\n }\n\n /**\n * @dev Validates a cross-chain swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateCrossChainSwapOperation(SwapOperation memory operation, SwapProposal memory proposal)\n internal\n view\n {\n if (operation.sourceChain == operation.destinationChain) revert SettlerOperationChainsMismatch();\n bool isChainInvalid = operation.sourceChain != block.chainid && operation.destinationChain != block.chainid;\n if (isChainInvalid) revert SettlerInvalidChain(block.chainid);\n _validateSwapOperation(operation, proposal);\n bool isExecutorInvalid = !IController(controller).isExecutorAllowed(proposal.executor);\n if (isExecutorInvalid) revert SettlerExecutorNotAllowed(proposal.executor);\n }\n\n /**\n * @dev Tells the contract balance for each token out of a swap operation\n * @param operation Swap operation containing the list of tokens out\n */\n function _getTokensOutBalance(SwapOperation memory operation) internal view returns (uint256[] memory balances) {\n balances = new uint256[](operation.tokensOut.length);\n if (operation.destinationChain == block.chainid) {\n for (uint256 i = 0; i < operation.tokensOut.length; i++) {\n balances[i] = ERC20Helpers.balanceOf(operation.tokensOut[i].token, address(this));\n }\n }\n }\n\n /**\n * @dev Tells if the intent and proposal deadlines should be validated\n In the case the intent is being executed on the destination chain of a cross-chain swap, the deadlines are ignored\n * @param intent Intent to be fulfilled\n */\n function _shouldValidateDeadlines(Intent memory intent) internal view returns (bool) {\n // Cross-chain operation can only be the first (and only) operation\n Operation memory operation = intent.operations[0];\n if (operation.opType != uint8(OpType.CrossChainSwap)) return true;\n SwapOperation memory swapIntent = abi.decode(operation.data, (SwapOperation));\n return swapIntent.sourceChain == block.chainid;\n }\n\n /**\n * @dev Emits operation custom events\n * @param operation Operation to emit the custom events for\n * @param proposal Proposal that fulfills the operation\n * @param intentHash Hash of the intent the operation belongs to\n * @param index Position of the operation on operations\n * @param output Encoded array of outputs\n */\n function _emitOperationEvents(\n Operation memory operation,\n Proposal memory proposal,\n bytes32 intentHash,\n uint256 index,\n bytes memory output\n ) internal {\n for (uint256 i = 0; i < operation.events.length; i++) {\n OperationEvent memory operationEvent = operation.events[i];\n emit OperationExecuted(\n operation.user,\n operationEvent.topic,\n uint8(operation.opType),\n operation,\n proposal,\n intentHash,\n index,\n output,\n operationEvent.data\n );\n }\n }\n\n /**\n * @dev Pays fees from the intent feePayer\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _payFees(Intent memory intent, Proposal memory proposal) internal {\n // A CrossChainSwap only pays fees on destination chain and must be the only operation\n if (intent.operations[0].opType == uint8(OpType.CrossChainSwap)) {\n SwapOperation memory swapOperation = abi.decode(intent.operations[0].data, (SwapOperation));\n if (swapOperation.sourceChain == block.chainid) return;\n }\n address from = intent.feePayer;\n address to = _msgSender();\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(from);\n for (uint256 i = 0; i < intent.maxFees.length; i++) {\n address token = intent.maxFees[i].token;\n if (!Denominations.isUSD(token)) _transferFrom(token, from, to, proposal.fees[i], isSmartAccount);\n }\n }\n\n /**\n * @dev Transfers tokens from one account to another\n * @param token Address of the token to transfer\n * @param from Address of the account sending the tokens\n * @param to Address of the account receiving the tokens\n * @param amount Amount of tokens to transfer\n * @param isSmartAccount Whether the sender is a smart account\n */\n function _transferFrom(address token, address from, address to, uint256 amount, bool isSmartAccount) internal {\n if (isSmartAccount) {\n smartAccountsHandler.transfer(from, token, to, amount);\n } else {\n IERC20(token).safeTransferFrom(from, to, amount);\n }\n }\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function _setSmartAccountsHandler(address newSmartAccountsHandler) internal {\n if (newSmartAccountsHandler == address(0)) revert SmartAccountsHandlerZero();\n smartAccountsHandler = newSmartAccountsHandler;\n emit SmartAccountsHandlerSet(newSmartAccountsHandler);\n }\n\n /**\n * @dev Sets the operations validator\n * @param newOperationsValidator New operations validator to be set\n */\n function _setOperationsValidator(address newOperationsValidator) internal {\n operationsValidator = newOperationsValidator;\n emit OperationsValidatorSet(newOperationsValidator);\n }\n\n /**\n * @dev Sets the dynamic call encoder\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function _setDynamicCallEncoder(address newDynamicCallEncoder) internal {\n if (newDynamicCallEncoder == address(0)) revert SettlerDynamicCallEncoderZero();\n dynamicCallEncoder = newDynamicCallEncoder;\n emit DynamicCallEncoderSet(newDynamicCallEncoder);\n }\n\n /**\n * @dev Sets a safeguard for a user\n * @param user Address of the user to set the safeguard for\n * @param safeguard Safeguard to be set\n */\n function _setSafeguard(address user, bytes memory safeguard) internal {\n delete _userSafeguard[user];\n _userSafeguard[user] = safeguard;\n emit SafeguardSet(user);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccount7702.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/Context.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccount.sol';\nimport '../utils/ERC20Helpers.sol';\nimport './SmartAccountBase.sol';\n\n/**\n * @title SmartAccount7702\n * @dev Provides the smart account logic to use with EIP7702\n */\ncontract SmartAccount7702 is SmartAccountBase {\n // Mimic settler reference\n // solhint-disable-next-line immutable-vars-naming\n address public immutable settler;\n\n /**\n * @dev The sender is not the settler\n */\n error SmartAccount7702SenderNotSettler();\n\n /**\n * @dev Reverts unless the sender is the settler\n */\n modifier onlySettler() {\n if (_msgSender() != settler) revert SmartAccount7702SenderNotSettler();\n _;\n }\n\n /**\n * @dev Creates a new SmartAccount7702 contract\n * @param _settler Address of the Mimic settler\n */\n constructor(address _settler) {\n settler = _settler;\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) public override onlySettler {\n super.transfer(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value) public override onlySettler returns (bytes memory) {\n // solhint-disable-next-line avoid-low-level-calls\n return super.call(target, data, value);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountBase.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/Context.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccount.sol';\nimport '../utils/ERC20Helpers.sol';\n\n/**\n * @title SmartAccountBase\n * @dev Provides the base logic for managing assets and executing arbitrary calls\n */\ncontract SmartAccountBase is ISmartAccount, Context, ERC165, ReentrancyGuard {\n /**\n * @dev Tells whether the contract supports the given interface ID. Overrides ERC165 to declare support for ISmartAccount interface.\n * @param interfaceId Interface ID is defined as the XOR of all function selectors in the interface\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {\n return interfaceId == type(ISmartAccount).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) public virtual override nonReentrant {\n ERC20Helpers.transfer(token, recipient, amount);\n emit Transferred(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value)\n public\n virtual\n override\n nonReentrant\n returns (bytes memory result)\n {\n result = Address.functionCallWithValue(target, data, value);\n emit Called(target, data, value, result);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountContract.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccountContract.sol';\nimport './SmartAccountBase.sol';\n\n/**\n * @title SmartAccountContract\n * @dev Provides the smart account logic to use as a standalone contract\n */\ncontract SmartAccountContract is ISmartAccountContract, Ownable, SmartAccountBase {\n // EIP1271 magic return value\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x1626ba7e;\n\n // EIP1271 invalid signature return value\n bytes4 internal constant EIP1271_INVALID_SIGNATURE = 0xffffffff;\n\n // List of account permissions\n mapping (address => bool) public isSignerAllowed;\n\n // Mimic settler reference\n address public settler;\n\n /**\n * @dev The settler is zero\n */\n error SmartAccountSettlerZero();\n\n /**\n * @dev The input arrays are not of equal length\n */\n error SmartAccountInputInvalidLength();\n\n /**\n * @dev The sender is not the owner or the settler\n */\n error SmartAccountUnauthorizedSender(address sender);\n\n /**\n * @dev Emitted every time the settler is set\n */\n event SettlerSet(address indexed settler);\n\n /**\n * @dev Emitted every time a signer allowance is set\n */\n event SignerAllowedSet(address indexed account, bool allowed);\n\n /**\n * @dev Reverts unless the sender is the owner or the settler\n */\n modifier onlyOwnerOrSettler() {\n address sender = _msgSender();\n bool isAuthorized = sender == owner() || sender == settler;\n if (!isAuthorized) revert SmartAccountUnauthorizedSender(sender);\n _;\n }\n\n /**\n * @dev Creates a new SmartAccount contract\n * @param _settler Address of the Mimic settler\n * @param _owner Address that will own the contract\n */\n constructor(address _settler, address _owner) Ownable(_owner) {\n _setSettler(_settler);\n }\n\n /**\n * @dev Tells whether the signature provided belongs to an allowed account.\n * @param hash Message signed by the account\n * @param signature Signature provided to be verified\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view override returns (bytes4) {\n (address signer, , ) = ECDSA.tryRecover(hash, signature);\n if (signer != address(0) && (signer == owner() || isSignerAllowed[signer])) return EIP1271_MAGIC_VALUE;\n return EIP1271_INVALID_SIGNATURE;\n }\n\n /**\n * @dev It allows receiving native token transfers\n */\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n /**\n * @dev Sets the settler. Sender must be the owner.\n * @param newSettler Address of the new settler to be set\n */\n function setSettler(address newSettler) external onlyOwner {\n _setSettler(newSettler);\n }\n\n /**\n * @dev Sets a list of allowed signers. Sender must be the owner.\n * @param accounts List of account addresses\n * @param allowances List of allowed condition per account\n */\n function setAllowedSigners(address[] memory accounts, bool[] memory allowances) external onlyOwner {\n if (accounts.length != allowances.length) revert SmartAccountInputInvalidLength();\n for (uint256 i = 0; i < accounts.length; i++) {\n address account = accounts[i];\n bool allowed = allowances[i];\n isSignerAllowed[account] = allowed;\n emit SignerAllowedSet(account, allowed);\n }\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the owner or the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount)\n public\n override(ISmartAccount, SmartAccountBase)\n onlyOwnerOrSettler\n {\n super.transfer(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the owner or the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value)\n public\n override(ISmartAccount, SmartAccountBase)\n onlyOwnerOrSettler\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n return super.call(target, data, value);\n }\n\n /**\n * @dev Sets the settler\n * @param newSettler Address of the new settler to be set\n */\n function _setSettler(address newSettler) internal {\n if (newSettler == address(0)) revert SmartAccountSettlerZero();\n settler = newSettler;\n emit SettlerSet(newSettler);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountsHandler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport '../interfaces/ISafe.sol';\nimport '../interfaces/ISmartAccount.sol';\nimport '../interfaces/ISmartAccountsHandler.sol';\nimport '../utils/Denominations.sol';\n\ncontract SmartAccountsHandler is ISmartAccountsHandler {\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address account) external view override returns (bool) {\n if (account.code.length == 0) return false;\n if (_isMimicSmartAccount(account)) return true;\n if (_isSafe(account)) return true;\n return false;\n }\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address account, address token, address to, uint256 amount) external override {\n if (_isMimicSmartAccount(account)) return ISmartAccount(account).transfer(token, to, amount);\n if (_isSafe(account)) return _transferSafe(account, token, to, amount);\n revert SmartAccountsHandlerUnsupportedAccount(account);\n }\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address account, address target, bytes memory data, uint256 value)\n external\n override\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n if (_isMimicSmartAccount(account)) return ISmartAccount(account).call(target, data, value);\n if (_isSafe(account)) return _callSafe(account, target, data, value);\n revert SmartAccountsHandlerUnsupportedAccount(account);\n }\n\n /**\n * @dev Performs a transfer from a safe\n */\n function _transferSafe(address account, address token, address to, uint256 amount) internal {\n Denominations.isNativeToken(token)\n ? _callSafe(account, to, new bytes(0), amount)\n : _callSafe(account, token, abi.encodeWithSelector(IERC20.transfer.selector, to, amount), 0);\n }\n\n /**\n * @dev Performs a call from a safe\n */\n function _callSafe(address account, address target, bytes memory data, uint256 value)\n internal\n returns (bytes memory)\n {\n (bool success, bytes memory result) = ISafe(account).execTransactionFromModuleReturnData(\n target,\n value,\n data,\n SafeOperation.Call\n );\n return\n data.length == 0\n ? Address.verifyCallResult(success, result)\n : Address.verifyCallResultFromTarget(target, success, result);\n }\n\n /**\n * @dev Tells whether an account is a Mimic smart account\n * @param account Address of the account being queried\n */\n function _isMimicSmartAccount(address account) internal view returns (bool) {\n try ISmartAccount(account).supportsInterface(type(ISmartAccount).interfaceId) returns (bool ok) {\n return ok;\n } catch {\n return false;\n }\n }\n\n /**\n * @dev Tells whether an account is a Gnosis Safe\n * @param account Address of the account being queried\n */\n function _isSafe(address account) internal view returns (bool) {\n try ISafe(account).getThreshold() returns (uint256) {\n return true;\n } catch {\n return false;\n }\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountsHandlerHelpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport '../interfaces/ISmartAccountsHandler.sol';\n\nlibrary SmartAccountsHandlerHelpers {\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address handler, address account) internal view returns (bool) {\n return ISmartAccountsHandler(handler).isSmartAccount(account);\n }\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address handler, address account, address token, address to, uint256 amount) internal {\n Address.functionDelegateCall(\n handler,\n abi.encodeWithSelector(ISmartAccountsHandler.transfer.selector, account, token, to, amount)\n );\n }\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address handler, address account, address target, bytes memory data, uint256 value)\n internal\n returns (bytes memory result)\n {\n result = Address.functionDelegateCall(\n handler,\n abi.encodeWithSelector(ISmartAccountsHandler.call.selector, account, target, data, value)\n );\n // Skip the ABI-encoded offset and length of the outer `bytes` to point at the inner payload\n assembly {\n result := add(result, 64)\n }\n }\n}\n" + }, + "project/contracts/test/CallMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\ncontract CallMock {\n event CallReceived(address indexed sender, uint256 value);\n error CallError();\n\n function call() external payable {\n emit CallReceived(msg.sender, msg.value);\n }\n\n function callError() external payable {\n revert CallError();\n }\n}\n" + }, + "project/contracts/test/dynamic-calls/StaticCallMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\ncontract StaticCallMock {\n struct StructMock {\n uint256 a;\n address b;\n }\n\n function returnUint(uint256 value) external pure returns (uint256) {\n return value;\n }\n\n function returnAddress(address value) external payable returns (address) {\n return value;\n }\n\n function returnArray(uint256[] calldata value) external pure returns (uint256[] memory) {\n return value;\n }\n\n function returnFixedArray(uint256[3] calldata value) external pure returns (uint256[3] memory) {\n return value;\n }\n\n function returnStruct(StructMock calldata value) external pure returns (StructMock memory) {\n return value;\n }\n}\n" + }, + "project/contracts/test/executors/EmptyExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\n\ncontract EmptyExecutorMock is IExecutor {\n event Executed();\n\n function execute(Operation memory, bytes32, bytes memory) external override {\n emit Executed();\n }\n}\n" + }, + "project/contracts/test/executors/MintExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../TokenMock.sol';\nimport '../../interfaces/IExecutor.sol';\n\n/* solhint-disable custom-errors */\n\ncontract MintExecutorMock is IExecutor {\n event Minted();\n\n function execute(Operation memory operation, bytes32, bytes memory proposalData) external override {\n require(\n operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap),\n 'Invalid operation type'\n );\n\n SwapProposal memory swapProposal = abi.decode(proposalData, (SwapProposal));\n (address[] memory tokens, uint256[] memory amounts) = abi.decode(swapProposal.data, (address[], uint256[]));\n\n require(tokens.length == amounts.length, 'Invalid inputs');\n\n for (uint256 i = 0; i < tokens.length; i++) {\n TokenMock(tokens[i]).mint(msg.sender, amounts[i]);\n emit Minted();\n }\n }\n}\n" + }, + "project/contracts/test/executors/ReentrantExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\nimport '../../interfaces/ISettler.sol';\n\ncontract ReentrantExecutorMock is IExecutor {\n // solhint-disable-next-line immutable-vars-naming\n address payable public immutable settler;\n\n constructor(address payable _settler) {\n settler = _settler;\n }\n\n function execute(Operation memory, bytes32, bytes memory) external override {\n Intent memory intent;\n Proposal memory proposal;\n ISettler(settler).execute(intent, proposal, new bytes(0));\n }\n}\n" + }, + "project/contracts/test/executors/TransferExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\nimport '../../utils/ERC20Helpers.sol';\n\n/* solhint-disable custom-errors */\n\ncontract TransferExecutorMock is IExecutor {\n event Transferred();\n\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n function execute(Operation memory operation, bytes32, bytes memory proposalData) external override {\n require(\n operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap),\n 'Invalid operation type'\n );\n\n SwapProposal memory swapProposal = abi.decode(proposalData, (SwapProposal));\n (address[] memory tokens, uint256[] memory amounts) = abi.decode(swapProposal.data, (address[], uint256[]));\n\n require(tokens.length == amounts.length, 'Invalid inputs');\n\n for (uint256 i = 0; i < tokens.length; i++) {\n ERC20Helpers.transfer(tokens[i], msg.sender, amounts[i]);\n emit Transferred();\n }\n }\n}\n" + }, + "project/contracts/test/SettlerV2Mock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../Settler.sol';\n\ncontract SettlerV2Mock is Settler {\n function someNewFunction() external pure returns (string memory) {\n return 'Some new function';\n }\n}\n" + }, + "project/contracts/test/smart-accounts/SafeMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/ISafe.sol';\n\ncontract SafeMock is ISafe {\n event ModuleTxExecuted(\n address indexed target,\n bytes data,\n uint256 value,\n SafeOperation operation,\n bool success,\n bytes result\n );\n\n receive() external payable {}\n\n function getThreshold() external pure returns (uint256) {\n return 1;\n }\n\n function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, SafeOperation operation)\n external\n returns (bool success, bytes memory result)\n {\n // solhint-disable-next-line avoid-low-level-calls\n (success, result) = to.call{ value: value }(data);\n emit ModuleTxExecuted(to, data, value, operation, success, result);\n }\n}\n" + }, + "project/contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../smart-accounts/SmartAccountsHandlerHelpers.sol';\n\ncontract SmartAccountsHandlerHelpersMock {\n using SmartAccountsHandlerHelpers for address;\n\n function call(address handler, address account, address target, bytes memory data, uint256 value)\n external\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n return handler.call(account, target, data, value);\n }\n}\n" + }, + "project/contracts/test/TokenMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\n\ncontract TokenMock is ERC20 {\n uint8 internal _decimals;\n\n constructor(string memory symbol, uint8 dec) ERC20(symbol, symbol) {\n _decimals = dec;\n }\n\n function mint(address account, uint256 amount) external {\n _mint(account, amount);\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n}\n" + }, + "project/contracts/test/utils/BytesHelpersMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.24;\n\nimport '../../utils/BytesHelpers.sol';\n\ncontract BytesHelpersMock {\n using BytesHelpers for bytes;\n\n function readWord0(bytes memory data) external pure returns (uint256) {\n return data.readWord0();\n }\n\n function readWord1(bytes memory data) external pure returns (uint256) {\n return data.readWord1();\n }\n\n function slice(bytes memory data, uint256 start, uint256 end) external pure returns (bytes memory) {\n return data.slice(start, end);\n }\n\n function sliceFrom(bytes memory data, uint256 start) external pure returns (bytes memory) {\n return data.sliceFrom(start);\n }\n}\n" + }, + "project/contracts/test/utils/DenominationsMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../../utils/Denominations.sol';\n\n// solhint-disable func-name-mixedcase\n\ncontract DenominationsMock {\n function NATIVE_TOKEN() external pure returns (address) {\n return Denominations.NATIVE_TOKEN;\n }\n\n function USD() external pure returns (address) {\n return Denominations.USD;\n }\n}\n" + }, + "project/contracts/test/utils/ERC20HelpersMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../../utils/ERC20Helpers.sol';\n\ncontract ERC20HelpersMock {\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n function approve(address token, address to, uint256 amount) external {\n ERC20Helpers.approve(token, to, amount);\n }\n\n function transfer(address token, address to, uint256 amount) external {\n ERC20Helpers.transfer(token, to, amount);\n }\n\n function balanceOf(address token, address account) external view returns (uint256) {\n return ERC20Helpers.balanceOf(token, account);\n }\n}\n" + }, + "project/contracts/utils/BytesHelpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.24;\n\n/**\n * @title BytesHelpers\n * @dev Collection of low-level helpers to operate on `bytes` values in memory.\n */\nlibrary BytesHelpers {\n /**\n * @dev Thrown when a slice operation exceeds the bounds of the input bytes\n */\n error BytesLibSliceOutOfBounds();\n\n /**\n * @dev Reads the first 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @return result First ABI word of `data`\n */\n function readWord0(bytes memory data) internal pure returns (uint256) {\n return readWord(data, 0);\n }\n\n /**\n * @dev Reads the second 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @return result Second ABI word of `data`\n */\n function readWord1(bytes memory data) internal pure returns (uint256) {\n return readWord(data, 1);\n }\n\n /**\n * @dev Reads the N-th 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @param index Word index to read (0-based)\n * @return result N-th ABI word of `data`\n */\n function readWord(bytes memory data, uint256 index) private pure returns (uint256 result) {\n assembly {\n result := mload(add(data, add(32, mul(index, 32))))\n }\n }\n\n /**\n * @dev Returns a slice of a bytes array from `start` (inclusive) to `end` (exclusive)\n * @param data Bytes array to slice\n * @param start Starting byte index (inclusive)\n * @param end Ending byte index (exclusive)\n */\n function slice(bytes memory data, uint256 start, uint256 end) internal pure returns (bytes memory out) {\n if (end < start) revert BytesLibSliceOutOfBounds();\n if (end > data.length) revert BytesLibSliceOutOfBounds();\n\n uint256 len = end - start;\n out = new bytes(len);\n\n assembly {\n let src := add(add(data, 32), start)\n let dst := add(out, 32)\n mcopy(dst, src, len)\n }\n }\n\n /**\n * @dev Returns a slice of a bytes array starting at `start` until the end\n * @param data Bytes array to slice\n * @param start Starting byte index (inclusive)\n */\n function sliceFrom(bytes memory data, uint256 start) internal pure returns (bytes memory out) {\n return slice(data, start, data.length);\n }\n}\n" + }, + "project/contracts/utils/Denominations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @title Denominations\n * @dev Provides a list of ground denominations for those tokens that cannot be represented by an ERC20.\n * For now, the only needed is the native token that could be ETH, MATIC, or other depending on the layer being operated.\n */\nlibrary Denominations {\n address internal constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n // Fiat currencies follow https://en.wikipedia.org/wiki/ISO_4217\n address internal constant USD = address(840);\n\n function isUSD(address token) internal pure returns (bool) {\n return token == USD;\n }\n\n function isNativeToken(address token) internal pure returns (bool) {\n return token == NATIVE_TOKEN;\n }\n}\n" + }, + "project/contracts/utils/ERC20Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport './Denominations.sol';\n\n/**\n * @title ERC20Helpers\n * @dev Provides a list of ERC20 helper methods\n */\nlibrary ERC20Helpers {\n function approve(address token, address to, uint256 amount) internal {\n SafeERC20.forceApprove(IERC20(token), to, amount);\n }\n\n function transfer(address token, address to, uint256 amount) internal {\n if (Denominations.isNativeToken(token)) Address.sendValue(payable(to), amount);\n else SafeERC20.safeTransfer(IERC20(token), to, amount);\n }\n\n function balanceOf(address token, address account) internal view returns (uint256) {\n if (Denominations.isNativeToken(token)) return address(account).balance;\n else return IERC20(token).balanceOf(address(account));\n }\n}\n" + }, + "project/contracts/utils/MimicHelper.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @title Mimic Helper\n * @dev Collection of helper functions for the Mimic Protocol\n */\ncontract MimicHelper {\n // Custom byte storage per user and key\n mapping (address => mapping (string => bytes)) internal _customStorage;\n\n /**\n * @dev Emitted every time the storage is set\n */\n event StorageSet(address indexed user, string indexed key, bytes indexed data);\n\n /**\n * @dev Tells the native token balance of an address\n * @param target Address to get native token balance\n */\n function getNativeTokenBalance(address target) external view returns (uint256) {\n return target.balance;\n }\n\n /**\n * @dev Tells the code of an address\n * @param target Address to get code\n */\n function getCode(address target) external view returns (bytes memory) {\n return target.code;\n }\n\n /**\n * @dev Tells the data set for the user and the key\n * @param user Address of the user being queried\n * @param key String of the key being queried\n */\n function getStorage(address user, string calldata key) external view returns (bytes memory) {\n return _customStorage[user][key];\n }\n\n /**\n * @dev Sets a data for the user and a key\n * @param key String of the key to set the data for\n * @param data Bytes to be set\n */\n function setStorage(string calldata key, bytes memory data) external {\n _customStorage[msg.sender][key] = data;\n emit StorageSet(msg.sender, key, data);\n }\n}\n" + } + } + } +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-43114/deployed_addresses.json b/packages/evm/ignition/deployments/chain-43114/deployed_addresses.json index c18d8fb..c9347ec 100644 --- a/packages/evm/ignition/deployments/chain-43114/deployed_addresses.json +++ b/packages/evm/ignition/deployments/chain-43114/deployed_addresses.json @@ -10,5 +10,9 @@ "Create3DynamicCallEncoder#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", "Create3DynamicCallEncoder#DynamicCallEncoder": "0xb3F0F65FA3f94890B7a5Bd17843a6fdfB9407dbD", "Create3Proxy#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", - "Create3Proxy#Proxy": "0x8be430d29a2c5692f9345a28506b849C6a99eDaA" + "Create3Proxy#Proxy": "0x8be430d29a2c5692f9345a28506b849C6a99eDaA", + "Create3DynamicCallEncoderV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", + "Create3DynamicCallEncoderV1#DynamicCallEncoder": "0x183E61BDE23a80f4D1e003653288d4B4551681ed", + "Create3SettlerV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", + "Create3SettlerV1#Settler": "0x3734D7284f46037688252b13ef6d88E3FFDF5e1B" } \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-43114/journal.jsonl b/packages/evm/ignition/deployments/chain-43114/journal.jsonl index 1da370f..1e6455d 100644 --- a/packages/evm/ignition/deployments/chain-43114/journal.jsonl +++ b/packages/evm/ignition/deployments/chain-43114/journal.jsonl @@ -75,4 +75,22 @@ {"futureId":"Create3SmartAccount7702#ICreateX.deployCreate3","hash":"0x8f411f5dabcdd5375da80ed2efd32fc8de8a595d08e39a5fc10dc23f258fd707","networkInteractionId":1,"receipt":{"blockHash":"0xa0c618353b99918956a80fc1e93a8a1b17c0622cf319196e9aa199e2d2e2a6f0","blockNumber":84267429,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":1,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x000000000000000000000000b800ea953426e361efda80da69765895ab3b04da","0x4d548e60a06ca5826dcab93682802743ae2369c7da6162da7a3f4201826a6d33"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":2,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x00000000000000000000000014ae3c251881d2214e376bfa38dd98a4bd33550c"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} {"futureId":"Create3SmartAccount7702#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} {"artifactId":"Create3SmartAccount7702#ICreateX","dependencies":["Create3SmartAccount7702#ICreateX.deployCreate3","Create3SmartAccount7702#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","strategy":"basic","strategyConfig":{},"txToReadFrom":"0x8f411f5dabcdd5375da80ed2efd32fc8de8a595d08e39a5fc10dc23f258fd707","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} -{"artifactId":"Create3SmartAccount7702#SmartAccount7702","contractAddress":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","contractName":"SmartAccount7702","dependencies":["Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SmartAccount7702#SmartAccount7702","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} \ No newline at end of file +{"artifactId":"Create3SmartAccount7702#SmartAccount7702","contractAddress":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","contractName":"SmartAccount7702","dependencies":["Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SmartAccount7702#SmartAccount7702","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3DynamicCallEncoderV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","contractName":"ICreateX","dependencies":[],"futureId":"Create3DynamicCallEncoderV1#ICreateX","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"args":["0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b000000000000000004302606","0x6080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033"],"artifactId":"Create3DynamicCallEncoderV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","dependencies":["Create3DynamicCallEncoderV1#ICreateX"],"from":"0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b","functionName":"deployCreate3","futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","strategy":"basic","strategyConfig":{},"type":"CALL_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000c586080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c00330000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":11,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":11,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"2670192"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"1000"}},"hash":"0x076be175c1a89aa0af9b9c431766c41e1faa3e4a82ee16dbe67b20fbd9d519c9"},"type":"TRANSACTION_SEND"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","hash":"0x076be175c1a89aa0af9b9c431766c41e1faa3e4a82ee16dbe67b20fbd9d519c9","networkInteractionId":1,"receipt":{"blockHash":"0x9e3c2eb79857ded5570fde2f7c2ecf88faeafd22fc4f3bb0fd5df9fc614e212b","blockNumber":84278766,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":257,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x0000000000000000000000001d9bd3390aaef5bbcf3beb4f60e0ee28805f6779","0xa13cc826172bbf7683ce89033f741800ae55529a93ee495908820a8471d913b0"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":258,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x000000000000000000000000183e61bde23a80f4d1e003653288d4b4551681ed"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} +{"artifactId":"Create3DynamicCallEncoderV1#ICreateX","dependencies":["Create3DynamicCallEncoderV1#ICreateX.deployCreate3","Create3DynamicCallEncoderV1#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3DynamicCallEncoderV1#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x183E61BDE23a80f4D1e003653288d4B4551681ed","strategy":"basic","strategyConfig":{},"txToReadFrom":"0x076be175c1a89aa0af9b9c431766c41e1faa3e4a82ee16dbe67b20fbd9d519c9","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","contractAddress":"0x183E61BDE23a80f4D1e003653288d4B4551681ed","contractName":"DynamicCallEncoder","dependencies":["Create3DynamicCallEncoderV1#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","contractName":"ICreateX","dependencies":[],"futureId":"Create3SettlerV1#ICreateX","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"args":["0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b000000000000000004302605","0x6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033"],"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","dependencies":["Create3SettlerV1#ICreateX"],"from":"0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b","functionName":"deployCreate3","futureId":"Create3SettlerV1#ICreateX.deployCreate3","strategy":"basic","strategyConfig":{},"type":"CALL_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000005d166080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c003300000000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":13,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":13,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"2747702"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"1000"}},"hash":"0xe07d5d7d3ecb7048d8458ddf18ebf6b630ee4a4f449b9be29358ae56bfe96cee"},"type":"TRANSACTION_SEND"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","hash":"0xe07d5d7d3ecb7048d8458ddf18ebf6b630ee4a4f449b9be29358ae56bfe96cee","networkInteractionId":1,"receipt":{"blockHash":"0x707584c1b39fdd3dbd6f4f5615b625722ac83fe3abd9eb80dfea30c284728991","blockNumber":84278968,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":139,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x000000000000000000000000b5439ac30ce4daeb02b265d758436e65087047ab","0x660e7900ab9b67f261d92573714530e140aa4f3b2855e1dd677cfa672309b2ee"]},{"address":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","data":"0x000000000000000000000000000000000000000000000000ffffffffffffffff","logIndex":140,"topics":["0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":141,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x0000000000000000000000003734d7284f46037688252b13ef6d88e3ffdf5e1b"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} +{"artifactId":"Create3SettlerV1#ICreateX","dependencies":["Create3SettlerV1#ICreateX.deployCreate3","Create3SettlerV1#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3SettlerV1#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","strategy":"basic","strategyConfig":{},"txToReadFrom":"0xe07d5d7d3ecb7048d8458ddf18ebf6b630ee4a4f449b9be29358ae56bfe96cee","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3SettlerV1#Settler","contractAddress":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","contractName":"Settler","dependencies":["Create3SettlerV1#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SettlerV1#Settler","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-56/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json b/packages/evm/ignition/deployments/chain-56/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-56/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-56/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json b/packages/evm/ignition/deployments/chain-56/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json new file mode 100644 index 0000000..aa424ed --- /dev/null +++ b/packages/evm/ignition/deployments/chain-56/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json @@ -0,0 +1,117 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "DynamicCallEncoder", + "sourceName": "contracts/dynamic-calls/DynamicCallEncoder.sol", + "abi": [ + { + "inputs": [], + "name": "BytesLibSliceOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderBadLength", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderEmptyDynamic", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderInvalidArgKind", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariableOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariableRefBadLength", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariablesLengthOutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum DynamicArgKind", + "name": "kind", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "isDynamic", + "type": "bool" + } + ], + "internalType": "struct DynamicArg[]", + "name": "arguments", + "type": "tuple[]" + } + ], + "internalType": "struct DynamicCall", + "name": "dynamicCall", + "type": "tuple" + }, + { + "internalType": "bytes[][]", + "name": "variables", + "type": "bytes[][]" + }, + { + "internalType": "uint256", + "name": "variablesLength", + "type": "uint256" + } + ], + "name": "encode", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/dynamic-calls/DynamicCallEncoder.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-56/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json b/packages/evm/ignition/deployments/chain-56/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-56/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-56/artifacts/Create3DynamicCallEncoderV1#ICreateX.json b/packages/evm/ignition/deployments/chain-56/artifacts/Create3DynamicCallEncoderV1#ICreateX.json new file mode 100644 index 0000000..837192d --- /dev/null +++ b/packages/evm/ignition/deployments/chain-56/artifacts/Create3DynamicCallEncoderV1#ICreateX.json @@ -0,0 +1,51 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "ICreateX", + "sourceName": "contracts/interfaces/ICreateX.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "name": "ContractCreation", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + } + ], + "name": "deployCreate3", + "outputs": [ + { + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/interfaces/ICreateX.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-56/artifacts/Create3SettlerV1#ICreateX.dbg.json b/packages/evm/ignition/deployments/chain-56/artifacts/Create3SettlerV1#ICreateX.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-56/artifacts/Create3SettlerV1#ICreateX.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-56/artifacts/Create3SettlerV1#ICreateX.json b/packages/evm/ignition/deployments/chain-56/artifacts/Create3SettlerV1#ICreateX.json new file mode 100644 index 0000000..837192d --- /dev/null +++ b/packages/evm/ignition/deployments/chain-56/artifacts/Create3SettlerV1#ICreateX.json @@ -0,0 +1,51 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "ICreateX", + "sourceName": "contracts/interfaces/ICreateX.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "name": "ContractCreation", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + } + ], + "name": "deployCreate3", + "outputs": [ + { + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/interfaces/ICreateX.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-56/artifacts/Create3SettlerV1#Settler.dbg.json b/packages/evm/ignition/deployments/chain-56/artifacts/Create3SettlerV1#Settler.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-56/artifacts/Create3SettlerV1#Settler.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-56/artifacts/Create3SettlerV1#Settler.json b/packages/evm/ignition/deployments/chain-56/artifacts/Create3SettlerV1#Settler.json new file mode 100644 index 0000000..cd9fdca --- /dev/null +++ b/packages/evm/ignition/deployments/chain-56/artifacts/Create3SettlerV1#Settler.json @@ -0,0 +1,1481 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "Settler", + "sourceName": "contracts/Settler.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposed", + "type": "uint256" + } + ], + "name": "SettlerAmountOutLtProposed", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerCrossChainSwapMustBeOnlyOperation", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerDynamicCallEncoderZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "executor", + "type": "address" + } + ], + "name": "SettlerExecutorNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "SettlerIntentAlreadyExecuted", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerIntentOperationsEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SettlerIntentPastDeadline", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "current", + "type": "uint256" + } + ], + "name": "SettlerIntentValidationsNotEnough", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "name": "SettlerInvalidChain", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerInvalidProposedAmounts", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "SettlerInvalidRecipient", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "settler", + "type": "address" + } + ], + "name": "SettlerInvalidSettler", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerNonceZero", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerOperationChainsMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "post", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pre", + "type": "uint256" + } + ], + "name": "SettlerPostBalanceOutLtPre", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerProposalDataInvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerProposalDataNotEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SettlerProposalPastDeadline", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + } + ], + "name": "SettlerProposalSignerNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minAmount", + "type": "uint256" + } + ], + "name": "SettlerProposedAmountLtMinAmount", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerRescueFundsRecipientZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gasUsed", + "type": "uint256" + } + ], + "name": "SettlerSimulationSuccess", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerSolverFeeInvalidLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "SettlerSolverFeeTooHigh", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "solver", + "type": "address" + } + ], + "name": "SettlerSolverNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "lengthRequested", + "type": "uint256" + } + ], + "name": "SettlerTooManySafeguards", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + } + ], + "name": "SettlerUnknownOperationType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "SettlerUserNotSmartAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "previous", + "type": "address" + }, + { + "internalType": "address", + "name": "current", + "type": "address" + } + ], + "name": "SettlerValidatorDuplicatedOrUnsorted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "validator", + "type": "address" + } + ], + "name": "SettlerValidatorNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "SmartAccountsHandlerZero", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dynamicCallEncoder", + "type": "address" + } + ], + "name": "DynamicCallEncoderSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "FundsRescued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "indexed": false, + "internalType": "struct Operation", + "name": "operation", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "indexed": false, + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "intentHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "output", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "OperationExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operationsValidator", + "type": "address" + } + ], + "name": "OperationsValidatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "proposal", + "type": "bytes32" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "SafeguardSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "smartAccountsHandler", + "type": "address" + } + ], + "name": "SmartAccountsHandlerSet", + "type": "event" + }, + { + "inputs": [], + "name": "controller", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dynamicCallEncoder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "getIntentBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + } + ], + "name": "getIntentHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "internalType": "address", + "name": "solver", + "type": "address" + } + ], + "name": "getProposalHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getUserSafeguard", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controller", + "type": "address" + }, + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_dynamicCallEncoder", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "operationsValidator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "rescueFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newDynamicCallEncoder", + "type": "address" + } + ], + "name": "setDynamicCallEncoder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOperationsValidator", + "type": "address" + } + ], + "name": "setOperationsValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "safeguard", + "type": "bytes" + } + ], + "name": "setSafeguard", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newSmartAccountsHandler", + "type": "address" + } + ], + "name": "setSmartAccountsHandler", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "simulate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "smartAccountsHandler", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033", + "deployedBytecode": "0x60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/Settler.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-56/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json b/packages/evm/ignition/deployments/chain-56/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json new file mode 100644 index 0000000..dc33803 --- /dev/null +++ b/packages/evm/ignition/deployments/chain-56/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json @@ -0,0 +1,373 @@ +{ + "_format": "hh3-sol-build-info-1", + "id": "167571dafa48e7ff636310c6c9f0fc8e202e44bc", + "solcVersion": "0.8.28", + "solcLongVersion": "0.8.28+commit.7893614a", + "userSourceNameMap": { + "contracts/Controller.sol": "project/contracts/Controller.sol", + "contracts/Intents.sol": "project/contracts/Intents.sol", + "contracts/Settler.sol": "project/contracts/Settler.sol", + "contracts/dynamic-calls/DynamicCallEncoder.sol": "project/contracts/dynamic-calls/DynamicCallEncoder.sol", + "contracts/dynamic-calls/DynamicCallTypes.sol": "project/contracts/dynamic-calls/DynamicCallTypes.sol", + "contracts/interfaces/IController.sol": "project/contracts/interfaces/IController.sol", + "contracts/interfaces/ICreateX.sol": "project/contracts/interfaces/ICreateX.sol", + "contracts/interfaces/IDynamicCallEncoder.sol": "project/contracts/interfaces/IDynamicCallEncoder.sol", + "contracts/interfaces/IExecutor.sol": "project/contracts/interfaces/IExecutor.sol", + "contracts/interfaces/IOperationsValidator.sol": "project/contracts/interfaces/IOperationsValidator.sol", + "contracts/interfaces/IPaymentsReceiver.sol": "project/contracts/interfaces/IPaymentsReceiver.sol", + "contracts/interfaces/ISafe.sol": "project/contracts/interfaces/ISafe.sol", + "contracts/interfaces/ISettler.sol": "project/contracts/interfaces/ISettler.sol", + "contracts/interfaces/ISmartAccount.sol": "project/contracts/interfaces/ISmartAccount.sol", + "contracts/interfaces/ISmartAccountContract.sol": "project/contracts/interfaces/ISmartAccountContract.sol", + "contracts/interfaces/ISmartAccountsHandler.sol": "project/contracts/interfaces/ISmartAccountsHandler.sol", + "contracts/payments/PaymentsReceiver.sol": "project/contracts/payments/PaymentsReceiver.sol", + "contracts/proxy/Proxy.sol": "project/contracts/proxy/Proxy.sol", + "contracts/safeguards/BaseOperationsValidator.sol": "project/contracts/safeguards/BaseOperationsValidator.sol", + "contracts/safeguards/CallOperationsValidator.sol": "project/contracts/safeguards/CallOperationsValidator.sol", + "contracts/safeguards/DynamicCallOperationsValidator.sol": "project/contracts/safeguards/DynamicCallOperationsValidator.sol", + "contracts/safeguards/OperationsValidator.sol": "project/contracts/safeguards/OperationsValidator.sol", + "contracts/safeguards/Safeguards.sol": "project/contracts/safeguards/Safeguards.sol", + "contracts/safeguards/SwapOperationsValidator.sol": "project/contracts/safeguards/SwapOperationsValidator.sol", + "contracts/safeguards/TransferOperationsValidator.sol": "project/contracts/safeguards/TransferOperationsValidator.sol", + "contracts/smart-accounts/SmartAccount7702.sol": "project/contracts/smart-accounts/SmartAccount7702.sol", + "contracts/smart-accounts/SmartAccountBase.sol": "project/contracts/smart-accounts/SmartAccountBase.sol", + "contracts/smart-accounts/SmartAccountContract.sol": "project/contracts/smart-accounts/SmartAccountContract.sol", + "contracts/smart-accounts/SmartAccountsHandler.sol": "project/contracts/smart-accounts/SmartAccountsHandler.sol", + "contracts/smart-accounts/SmartAccountsHandlerHelpers.sol": "project/contracts/smart-accounts/SmartAccountsHandlerHelpers.sol", + "contracts/test/CallMock.sol": "project/contracts/test/CallMock.sol", + "contracts/test/SettlerV2Mock.sol": "project/contracts/test/SettlerV2Mock.sol", + "contracts/test/TokenMock.sol": "project/contracts/test/TokenMock.sol", + "contracts/test/dynamic-calls/StaticCallMock.sol": "project/contracts/test/dynamic-calls/StaticCallMock.sol", + "contracts/test/executors/EmptyExecutorMock.sol": "project/contracts/test/executors/EmptyExecutorMock.sol", + "contracts/test/executors/MintExecutorMock.sol": "project/contracts/test/executors/MintExecutorMock.sol", + "contracts/test/executors/ReentrantExecutorMock.sol": "project/contracts/test/executors/ReentrantExecutorMock.sol", + "contracts/test/executors/TransferExecutorMock.sol": "project/contracts/test/executors/TransferExecutorMock.sol", + "contracts/test/smart-accounts/SafeMock.sol": "project/contracts/test/smart-accounts/SafeMock.sol", + "contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol": "project/contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol", + "contracts/test/utils/BytesHelpersMock.sol": "project/contracts/test/utils/BytesHelpersMock.sol", + "contracts/test/utils/DenominationsMock.sol": "project/contracts/test/utils/DenominationsMock.sol", + "contracts/test/utils/ERC20HelpersMock.sol": "project/contracts/test/utils/ERC20HelpersMock.sol", + "contracts/utils/BytesHelpers.sol": "project/contracts/utils/BytesHelpers.sol", + "contracts/utils/Denominations.sol": "project/contracts/utils/Denominations.sol", + "contracts/utils/ERC20Helpers.sol": "project/contracts/utils/ERC20Helpers.sol", + "contracts/utils/MimicHelper.sol": "project/contracts/utils/MimicHelper.sol", + "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol": "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/ProxyAdmin.sol" + }, + "input": { + "language": "Solidity", + "settings": { + "optimizer": { + "enabled": true, + "runs": 1000 + }, + "evmVersion": "cancun", + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "remappings": [ + "npm/@openzeppelin/contracts-upgradeable@5.3.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "npm/@openzeppelin/contracts-upgradeable@5.3.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/" + ] + }, + "sources": { + "npm/@openzeppelin/contracts-upgradeable@5.3.0/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\n struct OwnableStorage {\n address _owner;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Ownable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\n\n function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\n assembly {\n $.slot := OwnableStorageLocation\n }\n }\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n function __Ownable_init(address initialOwner) internal onlyInitializing {\n __Ownable_init_unchained(initialOwner);\n }\n\n function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n OwnableStorage storage $ = _getOwnableStorage();\n return $._owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n OwnableStorage storage $ = _getOwnableStorage();\n address oldOwner = $._owner;\n $._owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Storage of the initializable contract.\n *\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\n * when using with upgradeable contracts.\n *\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\n */\n struct InitializableStorage {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n uint64 _initialized;\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool _initializing;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Initializable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\n\n /**\n * @dev The contract is already initialized.\n */\n error InvalidInitialization();\n\n /**\n * @dev The contract is not initializing.\n */\n error NotInitializing();\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint64 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\n * production.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n // Cache values to avoid duplicated sloads\n bool isTopLevelCall = !$._initializing;\n uint64 initialized = $._initialized;\n\n // Allowed calls:\n // - initialSetup: the contract is not in the initializing state and no previous version was\n // initialized\n // - construction: the contract is initialized at version 1 (no reinitialization) and the\n // current contract is just being deployed\n bool initialSetup = initialized == 0 && isTopLevelCall;\n bool construction = initialized == 1 && address(this).code.length == 0;\n\n if (!initialSetup && !construction) {\n revert InvalidInitialization();\n }\n $._initialized = 1;\n if (isTopLevelCall) {\n $._initializing = true;\n }\n _;\n if (isTopLevelCall) {\n $._initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint64 version) {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing || $._initialized >= version) {\n revert InvalidInitialization();\n }\n $._initialized = version;\n $._initializing = true;\n _;\n $._initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n _checkInitializing();\n _;\n }\n\n /**\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\n */\n function _checkInitializing() internal view virtual {\n if (!_isInitializing()) {\n revert NotInitializing();\n }\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing) {\n revert InvalidInitialization();\n }\n if ($._initialized != type(uint64).max) {\n $._initialized = type(uint64).max;\n emit Initialized(type(uint64).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint64) {\n return _getInitializableStorage()._initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _getInitializableStorage()._initializing;\n }\n\n /**\n * @dev Pointer to storage slot. Allows integrators to override it with a custom storage location.\n *\n * NOTE: Consider following the ERC-7201 formula to derive storage locations.\n */\n function _initializableStorageSlot() internal pure virtual returns (bytes32) {\n return INITIALIZABLE_STORAGE;\n }\n\n /**\n * @dev Returns a pointer to the storage namespace.\n */\n // solhint-disable-next-line var-name-mixedcase\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\n bytes32 slot = _initializableStorageSlot();\n assembly {\n $.slot := slot\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/cryptography/EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.20;\n\nimport {MessageHashUtils} from \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\nimport {IERC5267} from \"@openzeppelin/contracts/interfaces/IERC5267.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose\n * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract\n * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to\n * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\n * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\n */\nabstract contract EIP712Upgradeable is Initializable, IERC5267 {\n bytes32 private constant TYPE_HASH =\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /// @custom:storage-location erc7201:openzeppelin.storage.EIP712\n struct EIP712Storage {\n /// @custom:oz-renamed-from _HASHED_NAME\n bytes32 _hashedName;\n /// @custom:oz-renamed-from _HASHED_VERSION\n bytes32 _hashedVersion;\n\n string _name;\n string _version;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.EIP712\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant EIP712StorageLocation = 0xa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100;\n\n function _getEIP712Storage() private pure returns (EIP712Storage storage $) {\n assembly {\n $.slot := EIP712StorageLocation\n }\n }\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n __EIP712_init_unchained(name, version);\n }\n\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n EIP712Storage storage $ = _getEIP712Storage();\n $._name = name;\n $._version = version;\n\n // Reset prior values in storage if upgrading\n $._hashedName = 0;\n $._hashedVersion = 0;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n return _buildDomainSeparator();\n }\n\n function _buildDomainSeparator() private view returns (bytes32) {\n return keccak256(abi.encode(TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n\n /**\n * @inheritdoc IERC5267\n */\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n EIP712Storage storage $ = _getEIP712Storage();\n // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized\n // and the EIP712 domain is not reliable, as it will be missing name and version.\n require($._hashedName == 0 && $._hashedVersion == 0, \"EIP712: Uninitialized\");\n\n return (\n hex\"0f\", // 01111\n _EIP712Name(),\n _EIP712Version(),\n block.chainid,\n address(this),\n bytes32(0),\n new uint256[](0)\n );\n }\n\n /**\n * @dev The name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712Name() internal view virtual returns (string memory) {\n EIP712Storage storage $ = _getEIP712Storage();\n return $._name;\n }\n\n /**\n * @dev The version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712Version() internal view virtual returns (string memory) {\n EIP712Storage storage $ = _getEIP712Storage();\n return $._version;\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead.\n */\n function _EIP712NameHash() internal view returns (bytes32) {\n EIP712Storage storage $ = _getEIP712Storage();\n string memory name = _EIP712Name();\n if (bytes(name).length > 0) {\n return keccak256(bytes(name));\n } else {\n // If the name is empty, the contract may have been upgraded without initializing the new storage.\n // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design.\n bytes32 hashedName = $._hashedName;\n if (hashedName != 0) {\n return hashedName;\n } else {\n return keccak256(\"\");\n }\n }\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead.\n */\n function _EIP712VersionHash() internal view returns (bytes32) {\n EIP712Storage storage $ = _getEIP712Storage();\n string memory version = _EIP712Version();\n if (bytes(version).length > 0) {\n return keccak256(bytes(version));\n } else {\n // If the version is empty, the contract may have been upgraded without initializing the new storage.\n // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design.\n bytes32 hashedVersion = $._hashedVersion;\n if (hashedVersion != 0) {\n return hashedVersion;\n } else {\n return keccak256(\"\");\n }\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/ReentrancyGuardUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\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 EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\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 ReentrancyGuardUpgradeable is Initializable {\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 /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard\n struct ReentrancyGuardStorage {\n uint256 _status;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.ReentrancyGuard\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;\n\n function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) {\n assembly {\n $.slot := ReentrancyGuardStorageLocation\n }\n }\n\n /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\n\n function __ReentrancyGuard_init() internal onlyInitializing {\n __ReentrancyGuard_init_unchained();\n }\n\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\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 ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n // On the first call to nonReentrant, _status will be NOT_ENTERED\n if ($._status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n $._status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\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 ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n return $._status == ENTERED;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC-20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC-721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC-1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n */\ninterface IERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with `hash`\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1363.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n /*\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n * 0xb0202a11 ===\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n */\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @param data Additional data with no specified format, sent in call to `spender`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1967.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1967.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n */\ninterface IERC1967 {\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Emitted when the beacon is changed.\n */\n event BeaconUpgraded(address indexed beacon);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC5267.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)\n\npragma solidity ^0.8.20;\n\ninterface IERC5267 {\n /**\n * @dev MAY be emitted to signal that the domain could have changed.\n */\n event EIP712DomainChanged();\n\n /**\n * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\n * signature.\n */\n function eip712Domain()\n external\n view\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n );\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {UpgradeableBeacon} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.22;\n\nimport {Proxy} from \"../Proxy.sol\";\nimport {ERC1967Utils} from \"./ERC1967Utils.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `implementation`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `implementation`. This will typically be an\n * encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\n *\n * Requirements:\n *\n * - If `data` is empty, `msg.value` must be zero.\n */\n constructor(address implementation, bytes memory _data) payable {\n ERC1967Utils.upgradeToAndCall(implementation, _data);\n }\n\n /**\n * @dev Returns the current implementation address.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using\n * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function _implementation() internal view virtual override returns (address) {\n return ERC1967Utils.getImplementation();\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/ERC1967/ERC1967Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Utils.sol)\n\npragma solidity ^0.8.22;\n\nimport {IBeacon} from \"../beacon/IBeacon.sol\";\nimport {IERC1967} from \"../../interfaces/IERC1967.sol\";\nimport {Address} from \"../../utils/Address.sol\";\nimport {StorageSlot} from \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This library provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] slots.\n */\nlibrary ERC1967Utils {\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev The `implementation` of the proxy is invalid.\n */\n error ERC1967InvalidImplementation(address implementation);\n\n /**\n * @dev The `admin` of the proxy is invalid.\n */\n error ERC1967InvalidAdmin(address admin);\n\n /**\n * @dev The `beacon` of the proxy is invalid.\n */\n error ERC1967InvalidBeacon(address beacon);\n\n /**\n * @dev An upgrade function sees `msg.value > 0` that may be lost.\n */\n error ERC1967NonPayable();\n\n /**\n * @dev Returns the current implementation address.\n */\n function getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the ERC-1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n if (newImplementation.code.length == 0) {\n revert ERC1967InvalidImplementation(newImplementation);\n }\n StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Performs implementation upgrade with additional setup call if data is nonempty.\n * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n * to avoid stuck value in the contract.\n *\n * Emits an {IERC1967-Upgraded} event.\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) internal {\n _setImplementation(newImplementation);\n emit IERC1967.Upgraded(newImplementation);\n\n if (data.length > 0) {\n Address.functionDelegateCall(newImplementation, data);\n } else {\n _checkNonPayable();\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Returns the current admin.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using\n * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the ERC-1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n if (newAdmin == address(0)) {\n revert ERC1967InvalidAdmin(address(0));\n }\n StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {IERC1967-AdminChanged} event.\n */\n function changeAdmin(address newAdmin) internal {\n emit IERC1967.AdminChanged(getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is the keccak-256 hash of \"eip1967.proxy.beacon\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Returns the current beacon.\n */\n function getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the ERC-1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n if (newBeacon.code.length == 0) {\n revert ERC1967InvalidBeacon(newBeacon);\n }\n\n StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;\n\n address beaconImplementation = IBeacon(newBeacon).implementation();\n if (beaconImplementation.code.length == 0) {\n revert ERC1967InvalidImplementation(beaconImplementation);\n }\n }\n\n /**\n * @dev Change the beacon and trigger a setup call if data is nonempty.\n * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n * to avoid stuck value in the contract.\n *\n * Emits an {IERC1967-BeaconUpgraded} event.\n *\n * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since\n * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for\n * efficiency.\n */\n function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {\n _setBeacon(newBeacon);\n emit IERC1967.BeaconUpgraded(newBeacon);\n\n if (data.length > 0) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n } else {\n _checkNonPayable();\n }\n }\n\n /**\n * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract\n * if an upgrade doesn't perform an initialization call.\n */\n function _checkNonPayable() private {\n if (msg.value > 0) {\n revert ERC1967NonPayable();\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback\n * function and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/ProxyAdmin.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/transparent/ProxyAdmin.sol)\n\npragma solidity ^0.8.22;\n\nimport {ITransparentUpgradeableProxy} from \"./TransparentUpgradeableProxy.sol\";\nimport {Ownable} from \"../../access/Ownable.sol\";\n\n/**\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\n */\ncontract ProxyAdmin is Ownable {\n /**\n * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgrade(address,address)`\n * and `upgradeAndCall(address,address,bytes)` are present, and `upgrade` must be used if no function should be called,\n * while `upgradeAndCall` will invoke the `receive` function if the third argument is the empty byte string.\n * If the getter returns `\"5.0.0\"`, only `upgradeAndCall(address,address,bytes)` is present, and the third argument must\n * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function\n * during an upgrade.\n */\n string public constant UPGRADE_INTERFACE_VERSION = \"5.0.0\";\n\n /**\n * @dev Sets the initial owner who can perform upgrades.\n */\n constructor(address initialOwner) Ownable(initialOwner) {}\n\n /**\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation.\n * See {TransparentUpgradeableProxy-_dispatchUpgradeToAndCall}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n * - If `data` is empty, `msg.value` must be zero.\n */\n function upgradeAndCall(\n ITransparentUpgradeableProxy proxy,\n address implementation,\n bytes memory data\n ) public payable virtual onlyOwner {\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/TransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.22;\n\nimport {ERC1967Utils} from \"../ERC1967/ERC1967Utils.sol\";\nimport {ERC1967Proxy} from \"../ERC1967/ERC1967Proxy.sol\";\nimport {IERC1967} from \"../../interfaces/IERC1967.sol\";\nimport {ProxyAdmin} from \"./ProxyAdmin.sol\";\n\n/**\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\n * does not implement this interface directly, and its upgradeability mechanism is implemented by an internal dispatch\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\n * include them in the ABI so this interface must be used to interact with it.\n */\ninterface ITransparentUpgradeableProxy is IERC1967 {\n /// @dev See {UUPSUpgradeable-upgradeToAndCall}\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable;\n}\n\n/**\n * @dev This contract implements a proxy that is upgradeable through an associated {ProxyAdmin} instance.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches the {ITransparentUpgradeableProxy-upgradeToAndCall} function exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can call the `upgradeToAndCall` function but any other call won't be forwarded to\n * the implementation. If the admin tries to call a function on the implementation it will fail with an error indicating\n * the proxy admin cannot fallback to the target implementation.\n *\n * These properties mean that the admin account can only be used for upgrading the proxy, so it's best if it's a\n * dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to\n * call a function from the proxy implementation. For this reason, the proxy deploys an instance of {ProxyAdmin} and\n * allows upgrades only if they come through it. You should think of the `ProxyAdmin` instance as the administrative\n * interface of the proxy, including the ability to change who can trigger upgrades by transferring ownership.\n *\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\n * inherit from that interface, and instead `upgradeToAndCall` is implicitly implemented using a custom dispatch\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\n * implementation.\n *\n * NOTE: This proxy does not inherit from {Context} deliberately. The {ProxyAdmin} of this contract won't send a\n * meta-transaction in any way, and any other meta-transaction setup should be made in the implementation contract.\n *\n * IMPORTANT: This contract avoids unnecessary storage reads by setting the admin only during construction as an\n * immutable variable, preventing any changes thereafter. However, the admin slot defined in ERC-1967 can still be\n * overwritten by the implementation logic pointed to by this proxy. In such cases, the contract may end up in an\n * undesirable state where the admin slot is different from the actual admin. Relying on the value of the admin slot\n * is generally fine if the implementation is trusted.\n *\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the\n * compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new\n * function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This\n * could render the `upgradeToAndCall` function inaccessible, preventing upgradeability and compromising transparency.\n */\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\n // An immutable address for the admin to avoid unnecessary SLOADs before each call\n // at the expense of removing the ability to change the admin once it's set.\n // This is acceptable if the admin is always a ProxyAdmin instance or similar contract\n // with its own ability to transfer the permissions to another account.\n address private immutable _admin;\n\n /**\n * @dev The proxy caller is the current admin, and can't fallback to the proxy target.\n */\n error ProxyDeniedAdminAccess();\n\n /**\n * @dev Initializes an upgradeable proxy managed by an instance of a {ProxyAdmin} with an `initialOwner`,\n * backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in\n * {ERC1967Proxy-constructor}.\n */\n constructor(address _logic, address initialOwner, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\n _admin = address(new ProxyAdmin(initialOwner));\n // Set the storage value and emit an event for ERC-1967 compatibility\n ERC1967Utils.changeAdmin(_proxyAdmin());\n }\n\n /**\n * @dev Returns the admin of this proxy.\n */\n function _proxyAdmin() internal view virtual returns (address) {\n return _admin;\n }\n\n /**\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior.\n */\n function _fallback() internal virtual override {\n if (msg.sender == _proxyAdmin()) {\n if (msg.sig != ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\n revert ProxyDeniedAdminAccess();\n } else {\n _dispatchUpgradeToAndCall();\n }\n } else {\n super._fallback();\n }\n }\n\n /**\n * @dev Upgrade the implementation of the proxy. See {ERC1967Utils-upgradeToAndCall}.\n *\n * Requirements:\n *\n * - If `data` is empty, `msg.value` must be zero.\n */\n function _dispatchUpgradeToAndCall() private {\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\n ERC1967Utils.upgradeToAndCall(newImplementation, data);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC-20\n * applications.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * Both values are immutable: they can only be set once during construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Skips emitting an {Approval} event indicating an allowance update. This is not\n * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n *\n * ```solidity\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner`'s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance < type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC-20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\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 value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens as the allowance of `spender` over the\n * 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 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` 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 value) external returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 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 /**\n * @dev An operation with an ERC-20 token failed.\n */\n error SafeERC20FailedOperation(address token);\n\n /**\n * @dev Indicates a failed `decreaseAllowance` request.\n */\n error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\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.encodeCall(token.transfer, (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.encodeCall(token.transferFrom, (from, to, value)));\n }\n\n /**\n * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\n }\n\n /**\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\n return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, 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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n forceApprove(token, spender, oldAllowance + value);\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n * value, non-reverting calls are assumed to be successful.\n *\n * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n unchecked {\n uint256 currentAllowance = token.allowance(address(this), spender);\n if (currentAllowance < requestedDecrease) {\n revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n }\n forceApprove(token, spender, currentAllowance - requestedDecrease);\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n * set here.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n safeTransfer(token, to, value);\n } else if (!token.transferAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferFromAndCallRelaxed(\n IERC1363 token,\n address from,\n address to,\n uint256 value,\n bytes memory data\n ) internal {\n if (to.code.length == 0) {\n safeTransferFrom(token, from, to, value);\n } else if (!token.transferFromAndCall(from, to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n * once without retrying, and relies on the returned value to be true.\n *\n * Reverts if the returned value is other than `true`.\n */\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n forceApprove(token, to, value);\n } else if (!token.approveAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n uint256 returnSize;\n uint256 returnValue;\n assembly (\"memory-safe\") {\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n // bubble errors\n if iszero(success) {\n let ptr := mload(0x40)\n returndatacopy(ptr, 0, returndatasize())\n revert(ptr, returndatasize())\n }\n returnSize := returndatasize()\n returnValue := mload(0)\n }\n\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\n revert SafeERC20FailedOperation(address(token));\n }\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 silently catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n bool success;\n uint256 returnSize;\n uint256 returnValue;\n assembly (\"memory-safe\") {\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n returnSize := returndatasize()\n returnValue := mload(0)\n }\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (utils/Address.sol)\n\npragma solidity ^0.8.20;\n\nimport {Errors} from \"./Errors.sol\";\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev There's no code at `target` (it is not a contract).\n */\n error AddressEmptyCode(address target);\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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n if (address(this).balance < amount) {\n revert Errors.InsufficientBalance(address(this).balance, amount);\n }\n\n (bool success, bytes memory returndata) = recipient.call{value: amount}(\"\");\n if (!success) {\n _revert(returndata);\n }\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 or custom error, it is bubbled\n * up by this function (like regular Solidity function calls). However, if\n * the call reverted with no returned reason, this function reverts with a\n * {Errors.FailedCall} error.\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 function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0);\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 function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n if (address(this).balance < value) {\n revert Errors.InsufficientBalance(address(this).balance, value);\n }\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\n * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case\n * of an unsuccessful call.\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata\n ) internal view returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n // only check if target is a contract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n if (returndata.length == 0 && target.code.length == 0) {\n revert AddressEmptyCode(target);\n }\n return returndata;\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\n * revert reason or with a default {Errors.FailedCall} error.\n */\n function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n return returndata;\n }\n }\n\n /**\n * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.\n */\n function _revert(bytes memory returndata) 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 assembly (\"memory-safe\") {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert Errors.FailedCall();\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS\n }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n */\n function tryRecover(\n bytes32 hash,\n bytes memory signature\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly (\"memory-safe\") {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32.\n */\n function toDataWithIntendedValidatorHash(\n address validator,\n bytes32 messageHash\n ) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, hex\"19_00\")\n mstore(0x02, shl(96, validator))\n mstore(0x16, messageHash)\n digest := keccak256(0x00, 0x36)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Errors.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Collection of common custom errors used in multiple contracts\n *\n * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.\n * It is recommended to avoid relying on the error API for critical functionality.\n *\n * _Available since v5.1._\n */\nlibrary Errors {\n /**\n * @dev The ETH balance of the account is not enough to perform the operation.\n */\n error InsufficientBalance(uint256 balance, uint256 needed);\n\n /**\n * @dev A call to an address target failed. The target may have reverted.\n */\n error FailedCall();\n\n /**\n * @dev The deployment failed.\n */\n error FailedDeployment();\n\n /**\n * @dev A necessary precompile is missing.\n */\n error MissingPrecompile(address);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Return the 512-bit addition of two uint256.\n *\n * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.\n */\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n assembly (\"memory-safe\") {\n low := add(a, b)\n high := lt(low, a)\n }\n }\n\n /**\n * @dev Return the 512-bit multiplication of two uint256.\n *\n * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.\n */\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = high * 2²⁵⁶ + low.\n assembly (\"memory-safe\") {\n let mm := mulmod(a, b, not(0))\n low := mul(a, b)\n high := sub(sub(mm, low), lt(mm, low))\n }\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a + b;\n success = c >= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a - b;\n success = c <= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a * b;\n assembly (\"memory-safe\") {\n // Only true when the multiplication doesn't overflow\n // (c / a == b) || (a == 0)\n success := or(eq(div(c, a), b), iszero(a))\n }\n // equivalent to: success ? c : 0\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `DIV` opcode returns zero when the denominator is 0.\n result := div(a, b)\n }\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `MOD` opcode returns zero when the denominator is 0.\n result := mod(a, b)\n }\n }\n }\n\n /**\n * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryAdd(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\n */\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\n (, uint256 result) = trySub(a, b);\n return result;\n }\n\n /**\n * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryMul(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\n }\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a > b, a, b);\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a < b, a, b);\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n\n // The following calculation ensures accurate ceiling division without overflow.\n // Since a is non-zero, (a - 1) / b will not overflow.\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n // but the largest value we can obtain is type(uint256).max - 1, which happens\n // when a = type(uint256).max and b = 1.\n unchecked {\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n }\n }\n\n /**\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n * denominator == 0.\n *\n * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n\n // Handle non-overflow cases, 256 by 256 division.\n if (high == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return low / denominator;\n }\n\n // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n if (denominator <= high) {\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n }\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [high low].\n uint256 remainder;\n assembly (\"memory-safe\") {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n high := sub(high, gt(remainder, low))\n low := sub(low, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\n assembly (\"memory-safe\") {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [high low] by twos.\n low := div(low, twos)\n\n // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from high into low.\n low |= high * twos;\n\n // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n // works in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n inverse *= 2 - denominator * inverse; // inverse mod 2³²\n inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high\n // is no longer required.\n result = low * inverse;\n return result;\n }\n }\n\n /**\n * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n }\n\n /**\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\n */\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n if (high >= 1 << n) {\n Panic.panic(Panic.UNDER_OVERFLOW);\n }\n return (high << (256 - n)) | (low >> n);\n }\n }\n\n /**\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\n */\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\n }\n\n /**\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n *\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n *\n * If the input value is not inversible, 0 is returned.\n *\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n */\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n unchecked {\n if (n == 0) return 0;\n\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n // ax + ny = 1\n // ax = 1 + (-y)n\n // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n // If the remainder is 0 the gcd is n right away.\n uint256 remainder = a % n;\n uint256 gcd = n;\n\n // Therefore the initial coefficients are:\n // ax + ny = gcd(a, n) = n\n // 0a + 1n = n\n int256 x = 0;\n int256 y = 1;\n\n while (remainder != 0) {\n uint256 quotient = gcd / remainder;\n\n (gcd, remainder) = (\n // The old remainder is the next gcd to try.\n remainder,\n // Compute the next remainder.\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n // where gcd is at most n (capped to type(uint256).max)\n gcd - remainder * quotient\n );\n\n (x, y) = (\n // Increment the coefficient of a.\n y,\n // Decrement the coefficient of n.\n // Can overflow, but the result is casted to uint256 so that the\n // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n x - y * int256(quotient)\n );\n }\n\n if (gcd != 1) return 0; // No inverse exists.\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n }\n }\n\n /**\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n *\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n *\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n */\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n unchecked {\n return Math.modExp(a, p - 2, p);\n }\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n *\n * Requirements:\n * - modulus can't be zero\n * - underlying staticcall to precompile must succeed\n *\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n * interpreted as 0.\n */\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n (bool success, uint256 result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n * to operate modulo 0 or if the underlying precompile reverted.\n *\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n * of a revert, but the result may be incorrectly interpreted as 0.\n */\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n if (m == 0) return (false, 0);\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n // | Offset | Content | Content (Hex) |\n // |-----------|------------|--------------------------------------------------------------------|\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n mstore(ptr, 0x20)\n mstore(add(ptr, 0x20), 0x20)\n mstore(add(ptr, 0x40), 0x20)\n mstore(add(ptr, 0x60), b)\n mstore(add(ptr, 0x80), e)\n mstore(add(ptr, 0xa0), m)\n\n // Given the result < m, it's guaranteed to fit in 32 bytes,\n // so we can use the memory scratch space located at offset 0.\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n result := mload(0x00)\n }\n }\n\n /**\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\n */\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n (bool success, bytes memory result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n */\n function tryModExp(\n bytes memory b,\n bytes memory e,\n bytes memory m\n ) internal view returns (bool success, bytes memory result) {\n if (_zeroBytes(m)) return (false, new bytes(0));\n\n uint256 mLen = m.length;\n\n // Encode call args in result and move the free memory pointer\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n assembly (\"memory-safe\") {\n let dataPtr := add(result, 0x20)\n // Write result on top of args to avoid allocating extra memory.\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n // Overwrite the length.\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n mstore(result, mLen)\n // Set the memory pointer after the returned data.\n mstore(0x40, add(dataPtr, mLen))\n }\n }\n\n /**\n * @dev Returns whether the provided byte array is zero.\n */\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\n for (uint256 i = 0; i < byteArray.length; ++i) {\n if (byteArray[i] != 0) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n * towards zero.\n *\n * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n * using integer operations.\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n unchecked {\n // Take care of easy edge cases when a == 0 or a == 1\n if (a <= 1) {\n return a;\n }\n\n // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n // the current value as `ε_n = | x_n - sqrt(a) |`.\n //\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n // bigger than any uint256.\n //\n // By noticing that\n // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n // to the msb function.\n uint256 aa = a;\n uint256 xn = 1;\n\n if (aa >= (1 << 128)) {\n aa >>= 128;\n xn <<= 64;\n }\n if (aa >= (1 << 64)) {\n aa >>= 64;\n xn <<= 32;\n }\n if (aa >= (1 << 32)) {\n aa >>= 32;\n xn <<= 16;\n }\n if (aa >= (1 << 16)) {\n aa >>= 16;\n xn <<= 8;\n }\n if (aa >= (1 << 8)) {\n aa >>= 8;\n xn <<= 4;\n }\n if (aa >= (1 << 4)) {\n aa >>= 4;\n xn <<= 2;\n }\n if (aa >= (1 << 2)) {\n xn <<= 1;\n }\n\n // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n //\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n // This is going to be our x_0 (and ε_0)\n xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n // From here, Newton's method give us:\n // x_{n+1} = (x_n + a / x_n) / 2\n //\n // One should note that:\n // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n // = ((x_n² + a) / (2 * x_n))² - a\n // = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n // = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n // = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n // = (x_n² - a)² / (2 * x_n)²\n // = ((x_n² - a) / (2 * x_n))²\n // ≥ 0\n // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n //\n // This gives us the proof of quadratic convergence of the sequence:\n // ε_{n+1} = | x_{n+1} - sqrt(a) |\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\n // = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n // = | (x_n - sqrt(a))² / (2 * x_n) |\n // = | ε_n² / (2 * x_n) |\n // = ε_n² / | (2 * x_n) |\n //\n // For the first iteration, we have a special case where x_0 is known:\n // ε_1 = ε_0² / | (2 * x_0) |\n // ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n // ≤ 2**(2*e-4) / (3 * 2**(e-1))\n // ≤ 2**(e-3) / 3\n // ≤ 2**(e-3-log2(3))\n // ≤ 2**(e-4.5)\n //\n // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n // ε_{n+1} = ε_n² / | (2 * x_n) |\n // ≤ (2**(e-k))² / (2 * 2**(e-1))\n // ≤ 2**(2*e-2*k) / 2**e\n // ≤ 2**(e-2*k)\n xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5) -- special case, see above\n xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9) -- general case with k = 4.5\n xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18) -- general case with k = 9\n xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36) -- general case with k = 18\n xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72) -- general case with k = 36\n xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144) -- general case with k = 72\n\n // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n // sqrt(a) or sqrt(a) + 1.\n return xn - SafeCast.toUint(xn > a / xn);\n }\n }\n\n /**\n * @dev Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log2(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // If upper 8 bits of 16-bit half set, add 8 to result\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\n // If upper 4 bits of 8-bit half set, add 4 to result\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\n\n // Shifts value right by the current result and use it as an index into this lookup table:\n //\n // | x (4 bits) | index | table[index] = MSB position |\n // |------------|---------|-----------------------------|\n // | 0000 | 0 | table[0] = 0 |\n // | 0001 | 1 | table[1] = 0 |\n // | 0010 | 2 | table[2] = 1 |\n // | 0011 | 3 | table[3] = 1 |\n // | 0100 | 4 | table[4] = 2 |\n // | 0101 | 5 | table[5] = 2 |\n // | 0110 | 6 | table[6] = 2 |\n // | 0111 | 7 | table[7] = 2 |\n // | 1000 | 8 | table[8] = 3 |\n // | 1001 | 9 | table[9] = 3 |\n // | 1010 | 10 | table[10] = 3 |\n // | 1011 | 11 | table[11] = 3 |\n // | 1100 | 12 | table[12] = 3 |\n // | 1101 | 13 | table[13] = 3 |\n // | 1110 | 14 | table[14] = 3 |\n // | 1111 | 15 | table[15] = 3 |\n //\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\n assembly (\"memory-safe\") {\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\n }\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/SafeCast.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool 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 */\nlibrary SafeCast {\n /**\n * @dev Value doesn't fit in an uint of `bits` size.\n */\n error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n /**\n * @dev An int value doesn't fit in an uint of `bits` size.\n */\n error SafeCastOverflowedIntToUint(int256 value);\n\n /**\n * @dev Value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n /**\n * @dev An uint value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedUintToInt(uint256 value);\n\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 function toUint248(uint256 value) internal pure returns (uint248) {\n if (value > type(uint248).max) {\n revert SafeCastOverflowedUintDowncast(248, value);\n }\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 function toUint240(uint256 value) internal pure returns (uint240) {\n if (value > type(uint240).max) {\n revert SafeCastOverflowedUintDowncast(240, value);\n }\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 function toUint232(uint256 value) internal pure returns (uint232) {\n if (value > type(uint232).max) {\n revert SafeCastOverflowedUintDowncast(232, value);\n }\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 function toUint224(uint256 value) internal pure returns (uint224) {\n if (value > type(uint224).max) {\n revert SafeCastOverflowedUintDowncast(224, value);\n }\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 function toUint216(uint256 value) internal pure returns (uint216) {\n if (value > type(uint216).max) {\n revert SafeCastOverflowedUintDowncast(216, value);\n }\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 function toUint208(uint256 value) internal pure returns (uint208) {\n if (value > type(uint208).max) {\n revert SafeCastOverflowedUintDowncast(208, value);\n }\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 function toUint200(uint256 value) internal pure returns (uint200) {\n if (value > type(uint200).max) {\n revert SafeCastOverflowedUintDowncast(200, value);\n }\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 function toUint192(uint256 value) internal pure returns (uint192) {\n if (value > type(uint192).max) {\n revert SafeCastOverflowedUintDowncast(192, value);\n }\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 function toUint184(uint256 value) internal pure returns (uint184) {\n if (value > type(uint184).max) {\n revert SafeCastOverflowedUintDowncast(184, value);\n }\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 function toUint176(uint256 value) internal pure returns (uint176) {\n if (value > type(uint176).max) {\n revert SafeCastOverflowedUintDowncast(176, value);\n }\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 function toUint168(uint256 value) internal pure returns (uint168) {\n if (value > type(uint168).max) {\n revert SafeCastOverflowedUintDowncast(168, value);\n }\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 function toUint160(uint256 value) internal pure returns (uint160) {\n if (value > type(uint160).max) {\n revert SafeCastOverflowedUintDowncast(160, value);\n }\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 function toUint152(uint256 value) internal pure returns (uint152) {\n if (value > type(uint152).max) {\n revert SafeCastOverflowedUintDowncast(152, value);\n }\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 function toUint144(uint256 value) internal pure returns (uint144) {\n if (value > type(uint144).max) {\n revert SafeCastOverflowedUintDowncast(144, value);\n }\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 function toUint136(uint256 value) internal pure returns (uint136) {\n if (value > type(uint136).max) {\n revert SafeCastOverflowedUintDowncast(136, value);\n }\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 function toUint128(uint256 value) internal pure returns (uint128) {\n if (value > type(uint128).max) {\n revert SafeCastOverflowedUintDowncast(128, value);\n }\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 function toUint120(uint256 value) internal pure returns (uint120) {\n if (value > type(uint120).max) {\n revert SafeCastOverflowedUintDowncast(120, value);\n }\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 function toUint112(uint256 value) internal pure returns (uint112) {\n if (value > type(uint112).max) {\n revert SafeCastOverflowedUintDowncast(112, value);\n }\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 function toUint104(uint256 value) internal pure returns (uint104) {\n if (value > type(uint104).max) {\n revert SafeCastOverflowedUintDowncast(104, value);\n }\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 function toUint96(uint256 value) internal pure returns (uint96) {\n if (value > type(uint96).max) {\n revert SafeCastOverflowedUintDowncast(96, value);\n }\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 function toUint88(uint256 value) internal pure returns (uint88) {\n if (value > type(uint88).max) {\n revert SafeCastOverflowedUintDowncast(88, value);\n }\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 function toUint80(uint256 value) internal pure returns (uint80) {\n if (value > type(uint80).max) {\n revert SafeCastOverflowedUintDowncast(80, value);\n }\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 function toUint72(uint256 value) internal pure returns (uint72) {\n if (value > type(uint72).max) {\n revert SafeCastOverflowedUintDowncast(72, value);\n }\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 function toUint64(uint256 value) internal pure returns (uint64) {\n if (value > type(uint64).max) {\n revert SafeCastOverflowedUintDowncast(64, value);\n }\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 function toUint56(uint256 value) internal pure returns (uint56) {\n if (value > type(uint56).max) {\n revert SafeCastOverflowedUintDowncast(56, value);\n }\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 function toUint48(uint256 value) internal pure returns (uint48) {\n if (value > type(uint48).max) {\n revert SafeCastOverflowedUintDowncast(48, value);\n }\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 function toUint40(uint256 value) internal pure returns (uint40) {\n if (value > type(uint40).max) {\n revert SafeCastOverflowedUintDowncast(40, value);\n }\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 function toUint32(uint256 value) internal pure returns (uint32) {\n if (value > type(uint32).max) {\n revert SafeCastOverflowedUintDowncast(32, value);\n }\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 function toUint24(uint256 value) internal pure returns (uint24) {\n if (value > type(uint24).max) {\n revert SafeCastOverflowedUintDowncast(24, value);\n }\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 function toUint16(uint256 value) internal pure returns (uint16) {\n if (value > type(uint16).max) {\n revert SafeCastOverflowedUintDowncast(16, value);\n }\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 function toUint8(uint256 value) internal pure returns (uint8) {\n if (value > type(uint8).max) {\n revert SafeCastOverflowedUintDowncast(8, value);\n }\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 function toUint256(int256 value) internal pure returns (uint256) {\n if (value < 0) {\n revert SafeCastOverflowedIntToUint(value);\n }\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 function toInt248(int256 value) internal pure returns (int248 downcasted) {\n downcasted = int248(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(248, value);\n }\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 function toInt240(int256 value) internal pure returns (int240 downcasted) {\n downcasted = int240(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(240, value);\n }\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 function toInt232(int256 value) internal pure returns (int232 downcasted) {\n downcasted = int232(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(232, value);\n }\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 function toInt224(int256 value) internal pure returns (int224 downcasted) {\n downcasted = int224(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(224, value);\n }\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 function toInt216(int256 value) internal pure returns (int216 downcasted) {\n downcasted = int216(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(216, value);\n }\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 function toInt208(int256 value) internal pure returns (int208 downcasted) {\n downcasted = int208(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(208, value);\n }\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 function toInt200(int256 value) internal pure returns (int200 downcasted) {\n downcasted = int200(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(200, value);\n }\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 function toInt192(int256 value) internal pure returns (int192 downcasted) {\n downcasted = int192(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(192, value);\n }\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 function toInt184(int256 value) internal pure returns (int184 downcasted) {\n downcasted = int184(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(184, value);\n }\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 function toInt176(int256 value) internal pure returns (int176 downcasted) {\n downcasted = int176(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(176, value);\n }\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 function toInt168(int256 value) internal pure returns (int168 downcasted) {\n downcasted = int168(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(168, value);\n }\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 function toInt160(int256 value) internal pure returns (int160 downcasted) {\n downcasted = int160(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(160, value);\n }\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 function toInt152(int256 value) internal pure returns (int152 downcasted) {\n downcasted = int152(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(152, value);\n }\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 function toInt144(int256 value) internal pure returns (int144 downcasted) {\n downcasted = int144(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(144, value);\n }\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 function toInt136(int256 value) internal pure returns (int136 downcasted) {\n downcasted = int136(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(136, value);\n }\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 function toInt128(int256 value) internal pure returns (int128 downcasted) {\n downcasted = int128(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(128, value);\n }\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 function toInt120(int256 value) internal pure returns (int120 downcasted) {\n downcasted = int120(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(120, value);\n }\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 function toInt112(int256 value) internal pure returns (int112 downcasted) {\n downcasted = int112(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(112, value);\n }\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 function toInt104(int256 value) internal pure returns (int104 downcasted) {\n downcasted = int104(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(104, value);\n }\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 function toInt96(int256 value) internal pure returns (int96 downcasted) {\n downcasted = int96(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(96, value);\n }\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 function toInt88(int256 value) internal pure returns (int88 downcasted) {\n downcasted = int88(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(88, value);\n }\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 function toInt80(int256 value) internal pure returns (int80 downcasted) {\n downcasted = int80(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(80, value);\n }\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 function toInt72(int256 value) internal pure returns (int72 downcasted) {\n downcasted = int72(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(72, value);\n }\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 function toInt64(int256 value) internal pure returns (int64 downcasted) {\n downcasted = int64(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(64, value);\n }\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 function toInt56(int256 value) internal pure returns (int56 downcasted) {\n downcasted = int56(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(56, value);\n }\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 function toInt48(int256 value) internal pure returns (int48 downcasted) {\n downcasted = int48(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(48, value);\n }\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 function toInt40(int256 value) internal pure returns (int40 downcasted) {\n downcasted = int40(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(40, value);\n }\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 function toInt32(int256 value) internal pure returns (int32 downcasted) {\n downcasted = int32(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(32, value);\n }\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 function toInt24(int256 value) internal pure returns (int24 downcasted) {\n downcasted = int24(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(24, value);\n }\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 function toInt16(int256 value) internal pure returns (int16 downcasted) {\n downcasted = int16(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(16, value);\n }\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 function toInt8(int256 value) internal pure returns (int8 downcasted) {\n downcasted = int8(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(8, value);\n }\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 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 if (value > uint256(type(int256).max)) {\n revert SafeCastOverflowedUintToInt(value);\n }\n return int256(value);\n }\n\n /**\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n */\n function toUint(bool b) internal pure returns (uint256 u) {\n assembly (\"memory-safe\") {\n u := iszero(iszero(b))\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));\n }\n }\n\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return ternary(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 ternary(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 // Formula from the \"Bit Twiddling Hacks\" by Sean Eron Anderson.\n // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift,\n // taking advantage of the most significant (or \"sign\" bit) in two's complement representation.\n // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result,\n // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative).\n int256 mask = n >> 255;\n\n // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.\n return uint256((n + mask) ^ mask);\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Panic.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n * using Panic for uint256;\n *\n * // Use any of the declared internal constants\n * function foo() { Panic.GENERIC.panic(); }\n *\n * // Alternatively\n * function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n /// @dev generic / unspecified error\n uint256 internal constant GENERIC = 0x00;\n /// @dev used by the assert() builtin\n uint256 internal constant ASSERT = 0x01;\n /// @dev arithmetic underflow or overflow\n uint256 internal constant UNDER_OVERFLOW = 0x11;\n /// @dev division or modulo by zero\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\n /// @dev enum conversion error\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n /// @dev invalid encoding in storage\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n /// @dev empty array pop\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n /// @dev array out of bounds access\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n /// @dev resource error (too large allocation or too large array)\n uint256 internal constant RESOURCE_ERROR = 0x41;\n /// @dev calling invalid internal function\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n /// @dev Reverts with a panic code. Recommended to use with\n /// the internal constants with predefined codes.\n function panic(uint256 code) internal pure {\n assembly (\"memory-safe\") {\n mstore(0x00, 0x4e487b71)\n mstore(0x20, code)\n revert(0x1c, 0x24)\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\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" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC-1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n * // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(newImplementation.code.length > 0);\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * TIP: Consider using this library along with {SlotDerivation}.\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n struct Int256Slot {\n int256 value;\n }\n\n struct StringSlot {\n string value;\n }\n\n struct BytesSlot {\n bytes value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Int256Slot` with member `value` located at `slot`.\n */\n function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `StringSlot` with member `value` located at `slot`.\n */\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n */\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n\n /**\n * @dev Returns a `BytesSlot` with member `value` located at `slot`.\n */\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n */\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SafeCast} from \"./math/SafeCast.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n using SafeCast for *;\n\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n uint256 private constant SPECIAL_CHARS_LOOKUP =\n (1 << 0x08) | // backspace\n (1 << 0x09) | // tab\n (1 << 0x0a) | // newline\n (1 << 0x0c) | // form feed\n (1 << 0x0d) | // carriage return\n (1 << 0x22) | // double quote\n (1 << 0x5c); // backslash\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n /**\n * @dev The string being parsed contains characters that are not in scope of the given base.\n */\n error StringsInvalidChar();\n\n /**\n * @dev The string being parsed is not a properly formatted address.\n */\n error StringsInvalidAddressFormat();\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n assembly (\"memory-safe\") {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n assembly (\"memory-safe\") {\n mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n uint256 localValue = value;\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n * representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal\n * representation, according to EIP-55.\n */\n function toChecksumHexString(address addr) internal pure returns (string memory) {\n bytes memory buffer = bytes(toHexString(addr));\n\n // hash the hex part of buffer (skip length + 2 bytes, length 40)\n uint256 hashValue;\n assembly (\"memory-safe\") {\n hashValue := shr(96, keccak256(add(buffer, 0x22), 40))\n }\n\n for (uint256 i = 41; i > 1; --i) {\n // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f)\n if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) {\n // case shift by xoring with 0x20\n buffer[i] ^= 0x20;\n }\n hashValue >>= 4;\n }\n return string(buffer);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input) internal pure returns (uint256) {\n return parseUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n uint256 result = 0;\n for (uint256 i = begin; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 9) return (false, 0);\n result *= 10;\n result += chr;\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `int256`.\n *\n * Requirements:\n * - The string must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input) internal pure returns (int256) {\n return parseInt(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) {\n (bool success, int256 value) = tryParseInt(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if\n * the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(string memory input) internal pure returns (bool success, int256 value) {\n return _tryParseIntUncheckedBounds(input, 0, bytes(input).length);\n }\n\n uint256 private constant ABS_MIN_INT256 = 2 ** 255;\n\n /**\n * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character or if the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, int256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseIntUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseIntUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, int256 value) {\n bytes memory buffer = bytes(input);\n\n // Check presence of a negative sign.\n bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n bool positiveSign = sign == bytes1(\"+\");\n bool negativeSign = sign == bytes1(\"-\");\n uint256 offset = (positiveSign || negativeSign).toUint();\n\n (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end);\n\n if (absSuccess && absValue < ABS_MIN_INT256) {\n return (true, negativeSign ? -int256(absValue) : int256(absValue));\n } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) {\n return (true, type(int256).min);\n } else return (false, 0);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input) internal pure returns (uint256) {\n return parseHexUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseHexUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an\n * invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseHexUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseHexUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n // skip 0x prefix if present\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 offset = hasPrefix.toUint() * 2;\n\n uint256 result = 0;\n for (uint256 i = begin + offset; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 15) return (false, 0);\n result *= 16;\n unchecked {\n // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check).\n // This guarantees that adding a value < 16 will not cause an overflow, hence the unchecked.\n result += chr;\n }\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as an `address`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input) internal pure returns (address) {\n return parseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) {\n (bool success, address value) = tryParseAddress(input, begin, end);\n if (!success) revert StringsInvalidAddressFormat();\n return value;\n }\n\n /**\n * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly\n * formatted address. See {parseAddress-string} requirements.\n */\n function tryParseAddress(string memory input) internal pure returns (bool success, address value) {\n return tryParseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly\n * formatted address. See {parseAddress-string-uint256-uint256} requirements.\n */\n function tryParseAddress(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, address value) {\n if (end > bytes(input).length || begin > end) return (false, address(0));\n\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 expectedLength = 40 + hasPrefix.toUint() * 2;\n\n // check that input is the correct length\n if (end - begin == expectedLength) {\n // length guarantees that this does not overflow, and value is at most type(uint160).max\n (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end);\n return (s, address(uint160(v)));\n } else {\n return (false, address(0));\n }\n }\n\n function _tryParseChr(bytes1 chr) private pure returns (uint8) {\n uint8 value = uint8(chr);\n\n // Try to parse `chr`:\n // - Case 1: [0-9]\n // - Case 2: [a-f]\n // - Case 3: [A-F]\n // - otherwise not supported\n unchecked {\n if (value > 47 && value < 58) value -= 48;\n else if (value > 96 && value < 103) value -= 87;\n else if (value > 64 && value < 71) value -= 55;\n else return type(uint8).max;\n }\n\n return value;\n }\n\n /**\n * @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.\n *\n * WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.\n *\n * NOTE: This function escapes all unicode characters, and not just the ones in ranges defined in section 2.5 of\n * RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). ECMAScript's `JSON.parse` does recover escaped unicode\n * characters that are not in this range, but other tooling may provide different results.\n */\n function escapeJSON(string memory input) internal pure returns (string memory) {\n bytes memory buffer = bytes(input);\n bytes memory output = new bytes(2 * buffer.length); // worst case scenario\n uint256 outputLength = 0;\n\n for (uint256 i; i < buffer.length; ++i) {\n bytes1 char = bytes1(_unsafeReadBytesOffset(buffer, i));\n if (((SPECIAL_CHARS_LOOKUP & (1 << uint8(char))) != 0)) {\n output[outputLength++] = \"\\\\\";\n if (char == 0x08) output[outputLength++] = \"b\";\n else if (char == 0x09) output[outputLength++] = \"t\";\n else if (char == 0x0a) output[outputLength++] = \"n\";\n else if (char == 0x0c) output[outputLength++] = \"f\";\n else if (char == 0x0d) output[outputLength++] = \"r\";\n else if (char == 0x5c) output[outputLength++] = \"\\\\\";\n else if (char == 0x22) {\n // solhint-disable-next-line quotes\n output[outputLength++] = '\"';\n }\n } else {\n output[outputLength++] = char;\n }\n }\n // write the actual length and deallocate unused memory\n assembly (\"memory-safe\") {\n mstore(output, outputLength)\n mstore(0x40, add(output, shl(5, shr(5, add(outputLength, 63)))))\n }\n\n return string(output);\n }\n\n /**\n * @dev Reads a bytes32 from a bytes array without bounds checking.\n *\n * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n * assembly block as such would prevent some optimizations.\n */\n function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n // This is not memory safe in the general case, but all calls to this private function are within bounds.\n assembly (\"memory-safe\") {\n value := mload(add(buffer, add(0x20, offset)))\n }\n }\n}\n" + }, + "project/contracts/Controller.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\n\nimport './interfaces/IController.sol';\n\n/**\n * @title Controller\n * @dev Manages allow lists for solvers, executors, proposal signers and validators\n */\ncontract Controller is IController, Ownable {\n // List of allowed solvers\n mapping (address => bool) public override isSolverAllowed;\n\n // List of allowed executors\n mapping (address => bool) public override isExecutorAllowed;\n\n // List of allowed proposal signers\n mapping (address => bool) public override isProposalSignerAllowed;\n\n // List of allowed validators\n mapping (address => bool) public override isValidatorAllowed;\n\n // Minimum number of validations allowed\n uint8 public override minValidations;\n\n /**\n * @dev Creates a new Controller contract\n * @param owner Address that will own the contract\n * @param solvers List of allowed solvers\n * @param executors List of allowed executors\n * @param proposalSigners List of allowed proposal signers\n * @param validators List of allowed validators\n * @param _minValidations Minimum number of validations allowed\n */\n constructor(\n address owner,\n address[] memory solvers,\n address[] memory executors,\n address[] memory proposalSigners,\n address[] memory validators,\n uint8 _minValidations\n ) Ownable(owner) {\n for (uint256 i = 0; i < solvers.length; i++) _setAllowedSolver(solvers[i], true);\n for (uint256 i = 0; i < executors.length; i++) _setAllowedExecutor(executors[i], true);\n for (uint256 i = 0; i < proposalSigners.length; i++) _setAllowedProposalSigner(proposalSigners[i], true);\n for (uint256 i = 0; i < validators.length; i++) _setAllowedValidator(validators[i], true);\n _setMinValidations(_minValidations);\n }\n\n /**\n * @dev Sets permissions for multiple solvers\n * @param solvers List of solver addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedSolvers(address[] memory solvers, bool[] memory alloweds) external override onlyOwner {\n if (solvers.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < solvers.length; i++) _setAllowedSolver(solvers[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple executors\n * @param executors List of executor addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedExecutors(address[] memory executors, bool[] memory alloweds) external override onlyOwner {\n if (executors.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < executors.length; i++) _setAllowedExecutor(executors[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple proposal signers\n * @param signers List of proposal signer addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedProposalSigners(address[] memory signers, bool[] memory alloweds) external override onlyOwner {\n if (signers.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < signers.length; i++) _setAllowedProposalSigner(signers[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple validators\n * @param validators List of validator addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedValidators(address[] memory validators, bool[] memory alloweds) external override onlyOwner {\n if (validators.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < validators.length; i++) _setAllowedValidator(validators[i], alloweds[i]);\n }\n\n /**\n * @dev Sets the minimum number of validations allowed\n * @param newMinValidations minimum number of validations allowed\n */\n function setMinValidations(uint8 newMinValidations) external override onlyOwner {\n _setMinValidations(newMinValidations);\n }\n\n /**\n * @dev Sets a solver permission\n */\n function _setAllowedSolver(address solver, bool allowed) internal {\n isSolverAllowed[solver] = allowed;\n emit SolverAllowedSet(solver, allowed);\n }\n\n /**\n * @dev Sets an executor permission\n */\n function _setAllowedExecutor(address executor, bool allowed) internal {\n isExecutorAllowed[executor] = allowed;\n emit ExecutorAllowedSet(executor, allowed);\n }\n\n /**\n * @dev Sets a proposal signer permission\n */\n function _setAllowedProposalSigner(address signer, bool allowed) internal {\n isProposalSignerAllowed[signer] = allowed;\n emit ProposalSignerAllowedSet(signer, allowed);\n }\n\n /**\n * @dev Sets a validator permission\n */\n function _setAllowedValidator(address validator, bool allowed) internal {\n isValidatorAllowed[validator] = allowed;\n emit ValidatorAllowedSet(validator, allowed);\n }\n\n /**\n * @dev Sets the minimum number of validations allowed\n */\n function _setMinValidations(uint8 newMinValidations) internal {\n minValidations = newMinValidations;\n emit MinValidationSet(newMinValidations);\n }\n}\n" + }, + "project/contracts/dynamic-calls/DynamicCallEncoder.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport './DynamicCallTypes.sol';\nimport '../interfaces/IDynamicCallEncoder.sol';\nimport '../utils/BytesHelpers.sol';\n\n/**\n * @title DynamicCallEncoder\n * @dev Builds calldata for arbitrary contract calls from structured arguments.\n *\n * This encoder supports:\n * - Literal ABI-encoded arguments\n * - Variable references resolved from previous execution results\n *\n * The encoder follows standard ABI encoding rules, reconstructing\n * the calldata heads and tails dynamically based on argument types.\n */\ncontract DynamicCallEncoder is IDynamicCallEncoder {\n using BytesHelpers for bytes;\n\n /**\n * @dev Internal representation of a fully-encoded argument\n * @param data ABI-encoded argument payload\n * @param isDynamic Whether this argument requires a head offset\n */\n struct EncodedArg {\n bytes data;\n bool isDynamic;\n }\n\n /**\n * @dev Encodes a dynamic call into calldata\n * @param dynamicCall Dynamic call specification\n * @param variables List of resolved variable values\n * @param variablesLength Number of resolved variables\n * @return data Fully ABI-encoded calldata\n */\n function encode(DynamicCall memory dynamicCall, bytes[][] memory variables, uint256 variablesLength)\n external\n pure\n override\n returns (bytes memory data)\n {\n if (variablesLength > variables.length) revert DynamicCallEncoderVariablesLengthOutOfBounds();\n data = _buildCalldata(dynamicCall.selector, dynamicCall.arguments, variables, variablesLength);\n }\n\n /**\n * @dev Builds calldata from a selector and a list of dynamic arguments\n * This function performs standard ABI aggregation:\n * - static arguments are inlined in the head\n * - dynamic arguments place offsets in the head and append data to the tail\n */\n function _buildCalldata(\n bytes4 selector,\n DynamicArg[] memory args,\n bytes[][] memory variables,\n uint256 variablesLength\n ) internal pure returns (bytes memory data) {\n uint256 n = args.length;\n bytes[] memory encodedArgs = new bytes[](n);\n bool[] memory isDynamic = new bool[](n);\n uint256 headLength = 0;\n\n for (uint256 i = 0; i < n; i++) {\n EncodedArg memory enc = _encodeArg(args[i], variables, variablesLength);\n encodedArgs[i] = enc.data;\n isDynamic[i] = enc.isDynamic;\n headLength += enc.isDynamic ? 32 : enc.data.length;\n }\n\n bytes memory heads;\n bytes memory tails;\n uint256 nextDynamicHead = headLength;\n\n for (uint256 i = 0; i < n; i++) {\n if (isDynamic[i]) {\n heads = bytes.concat(heads, bytes32(nextDynamicHead));\n tails = bytes.concat(tails, encodedArgs[i]);\n nextDynamicHead += encodedArgs[i].length;\n } else {\n heads = bytes.concat(heads, encodedArgs[i]);\n }\n }\n\n data = bytes.concat(selector, heads, tails);\n }\n\n /**\n * @dev Encodes a single dynamic argument based on its kind\n */\n function _encodeArg(DynamicArg memory arg, bytes[][] memory variables, uint256 variablesLength)\n internal\n pure\n returns (EncodedArg memory out)\n {\n if (arg.kind == DynamicArgKind.Literal) return _encodeLiteral(arg);\n if (arg.kind == DynamicArgKind.Variable) return _encodeVariable(arg, variables, variablesLength);\n revert DynamicCallEncoderInvalidArgKind();\n }\n\n /**\n * @dev Encodes a literal argument\n */\n function _encodeLiteral(DynamicArg memory arg) internal pure returns (EncodedArg memory) {\n return _encodeAbiValue(arg.data, arg.isDynamic);\n }\n\n /**\n * @dev Encodes a variable argument by resolving it from the variables list\n */\n function _encodeVariable(DynamicArg memory arg, bytes[][] memory variables, uint256 variablesLength)\n internal\n pure\n returns (EncodedArg memory)\n {\n if (arg.data.length != 64) revert DynamicCallEncoderVariableRefBadLength();\n uint256 opIndex = arg.data.readWord0();\n uint256 subIndex = arg.data.readWord1();\n if (opIndex >= variablesLength) revert DynamicCallEncoderVariableOutOfBounds();\n if (subIndex >= variables[opIndex].length) revert DynamicCallEncoderVariableOutOfBounds();\n\n return _encodeAbiValue(variables[opIndex][subIndex], arg.isDynamic);\n }\n\n /**\n * @dev Interprets ABI-like bytes as either a static or dynamic value. Used for variable resolution.\n */\n function _encodeAbiValue(bytes memory data, bool isDynamic) internal pure returns (EncodedArg memory out) {\n if (data.length == 0 || data.length % 32 != 0) revert DynamicCallEncoderBadLength();\n\n if (isDynamic) {\n if (data.length < 64) revert DynamicCallEncoderEmptyDynamic();\n if (data.readWord0() != 0x20) revert DynamicCallEncoderBadLength();\n\n out.data = data.sliceFrom(32);\n out.isDynamic = true;\n } else {\n out.data = data;\n out.isDynamic = false;\n }\n }\n}\n" + }, + "project/contracts/dynamic-calls/DynamicCallTypes.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Kind of dynamic argument to be encoded\n * @param Literal ABI-encoded literal value provided by the resolver\n * @param Variable Reference to a previously resolved variable value\n */\nenum DynamicArgKind {\n Literal,\n Variable\n}\n\n/**\n * @dev Represents a single dynamic argument\n * @param kind Type of argument resolution strategy\n * @param data Encoded argument data, interpreted based on `kind`\n * @param isDynamic Whether the resolved argument is ABI-dynamic\n */\nstruct DynamicArg {\n DynamicArgKind kind;\n bytes data;\n bool isDynamic;\n}\n\n/**\n * @dev Represents a dynamic contract call intent\n * @param target Contract address to be called\n * @param value ETH value to be sent with the call\n * @param selector Function selector to invoke\n * @param arguments List of dynamically resolved arguments\n */\nstruct DynamicCall {\n address target;\n uint256 value;\n bytes4 selector;\n DynamicArg[] arguments;\n}\n" + }, + "project/contracts/Intents.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Enum representing the operation type.\n * - Swap: Swap tokens in the same chain.\n * - Transfer: Transfer tokens to one or more recipients.\n * - Call: Execute arbitrary contract calls.\n * - CrossChainSwap: Swap tokens between chains.\n * - DynamicCall: Execute arbitrary dynamic contract calls.\n */\nenum OpType {\n Swap,\n Transfer,\n Call,\n CrossChainSwap,\n DynamicCall\n}\n\n/**\n * @dev EIP-712 typed data struct representing a validator's approval of an intent.\n * @param intent The hash of the intent being validated.\n */\nstruct Validation {\n bytes32 intent;\n}\n\n/**\n * @dev General intent structure with different operations.\n * @param feePayer The payer of the intent.\n * @param settler The address responsible for executing the intent on-chain.\n * @param nonce A unique value used to prevent replay attacks and distinguish intents.\n * @param deadline The timestamp by which the intent must be executed.\n * @param maxFees List of max fees the feePayer is willing to pay for the intent.\n * @param triggerSig The signature of the trigger that this intent belongs to\n * @param minValidations The minimum number of validator approvals required for this intent to be considered valid.\n * @param validations The list validator signatures attesting to this intent.\n * @param operations List of operations of the intent.\n */\nstruct Intent {\n address feePayer;\n address settler;\n bytes32 nonce;\n uint256 deadline;\n MaxFee[] maxFees;\n bytes triggerSig;\n uint256 minValidations;\n bytes[] validations;\n Operation[] operations;\n}\n\n/**\n * @dev Operation structure used to abstract over different operation types.\n * @param opType The type of operation this operation represents.\n * @param user The user of the operation.\n * @param data ABI-encoded data representing a specific operation type (e.g. SwapOperation, TransferOperation, CallOperation).\n * @param events List of custom operation events to be emitted.\n */\nstruct Operation {\n uint8 opType;\n address user;\n bytes data;\n OperationEvent[] events;\n}\n\n/**\n * @dev Max fee representation\n * @param token Token used to pay for the execution fee.\n * @param amount Max amount of fee token to be paid for settling this intent.\n */\nstruct MaxFee {\n address token;\n uint256 amount;\n}\n\n/**\n * @dev Operation event representation.\n * @param topic Event topic to be emitted.\n * @param data Event data to be emitted.\n */\nstruct OperationEvent {\n bytes32 topic;\n bytes data;\n}\n\n/**\n * @dev Represents a swap operation between two chains.\n * @param sourceChain Chain ID where tokens will be sent from.\n * @param destinationChain Chain ID where tokens will be received.\n * @param tokensIn List of input tokens and amounts to swap.\n * @param tokensOut List of expected output tokens, minimum amounts, and recipients.\n */\nstruct SwapOperation {\n uint256 sourceChain;\n uint256 destinationChain;\n TokenIn[] tokensIn;\n TokenOut[] tokensOut;\n}\n\n/**\n * @dev Token in representation.\n * @param token Address of a token to be sent.\n * @param amount Amount of tokens to be sent.\n */\nstruct TokenIn {\n address token;\n uint256 amount;\n}\n\n/**\n * @dev Token out representation.\n * @param token Address of a token to be received.\n * @param minAmount Minimum amount of tokens to be received.\n * @param recipient Recipient address that will receive the token out.\n */\nstruct TokenOut {\n address token;\n uint256 minAmount;\n address recipient;\n}\n\n/**\n * @dev Represents a transfer operation containing multiple token transfers.\n * @param chainId Chain ID where the transfers should be executed.\n * @param transfers List of token transfers to be performed.\n */\nstruct TransferOperation {\n uint256 chainId;\n TransferData[] transfers;\n}\n\n/**\n * @dev Transfer data for a single token transfer.\n * @param token Address of the token to transfer.\n * @param amount Amount of the token to transfer.\n * @param recipient Recipient of the token transfer.\n */\nstruct TransferData {\n address token;\n uint256 amount;\n address recipient;\n}\n\n/**\n * @dev Represents a generic call operation consisting of one or more contract calls.\n * @param chainId Chain ID where the calls should be executed.\n * @param calls List of low-level contract calls to be executed.\n */\nstruct CallOperation {\n uint256 chainId;\n CallData[] calls;\n}\n\n/**\n * @dev Low-level call data for a target contract interaction.\n * @param target Target contract address.\n * @param data Calldata to be sent to the target.\n * @param value ETH value to send along with the call.\n */\nstruct CallData {\n address target;\n bytes data;\n uint256 value;\n}\n\n/**\n * @dev Represents a generic dynamic call operation consisting of one or more dynamic contract calls.\n * @param chainId Chain ID where the calls should be executed.\n * @param calls List of ABI-encoded low-level dynamic contract calls to be executed.\n */\nstruct DynamicCallOperation {\n uint256 chainId;\n bytes[] calls;\n}\n\n/**\n * @dev Generic proposal structure representing a solver’s response to an intent.\n * @param deadline Timestamp until when the proposal is valid.\n * @param datas List of ABI-encoded proposal-specific data (e.g. SwapProposal).\n * @param fees List of fee amounts the solver requires for execution.\n */\nstruct Proposal {\n uint256 deadline;\n bytes[] datas;\n uint256[] fees;\n}\n\n/**\n * @dev Swap proposal representation for a swap operation.\n * @param executor Address of the executor contract that should be called during operation execution.\n * @param data Arbitrary data used to call the executor contract.\n * @param amountsOut List of amounts of tokens out proposed by the solver.\n */\nstruct SwapProposal {\n address executor;\n bytes data;\n uint256[] amountsOut;\n}\n\nlibrary IntentsHelpers {\n bytes32 internal constant INTENT_TYPE_HASH =\n keccak256(\n 'Intent(address feePayer,address settler,bytes32 nonce,uint256 deadline,MaxFee[] maxFees,bytes triggerSig,uint256 minValidations,Operation[] operations)MaxFee(address token,uint256 amount)Operation(uint8 opType,address user,bytes data,OperationEvent[] events)OperationEvent(bytes32 topic,bytes data)'\n );\n\n bytes32 internal constant PROPOSAL_TYPE_HASH =\n keccak256('Proposal(bytes32 intent,address solver,uint256 deadline,bytes[] datas,uint256[] fees)');\n\n bytes32 internal constant VALIDATION_TYPE_HASH = keccak256('Validation(bytes32 intent)');\n\n bytes32 internal constant MAX_FEE_TYPE_HASH = keccak256('MaxFee(address token,uint256 amount)');\n\n bytes32 internal constant OPERATION_TYPE_HASH =\n keccak256('Operation(uint8 opType,address user,bytes data,OperationEvent[] events)');\n\n bytes32 internal constant OPERATION_EVENT_TYPE_HASH = keccak256('OperationEvent(bytes32 topic,bytes data)');\n\n function hash(Intent memory intent) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n INTENT_TYPE_HASH,\n intent.feePayer,\n intent.settler,\n intent.nonce,\n intent.deadline,\n hash(intent.maxFees),\n intent.triggerSig,\n intent.minValidations,\n hash(intent.operations)\n )\n );\n }\n\n function hash(Proposal memory proposal, Intent memory intent, address solver) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n PROPOSAL_TYPE_HASH,\n hash(intent),\n solver,\n proposal.deadline,\n hash(proposal.datas),\n hash(proposal.fees)\n )\n );\n }\n\n function hash(MaxFee[] memory fees) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](fees.length);\n for (uint256 i = 0; i < fees.length; i++) {\n hashes[i] = keccak256(abi.encode(MAX_FEE_TYPE_HASH, fees[i].token, fees[i].amount));\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Operation[] memory operations) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](operations.length);\n for (uint256 i = 0; i < operations.length; i++) hashes[i] = hash(operations[i]);\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Operation memory operation) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n OPERATION_TYPE_HASH,\n operation.opType,\n operation.user,\n keccak256(operation.data),\n hash(operation.events)\n )\n );\n }\n\n function hash(OperationEvent[] memory events) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](events.length);\n for (uint256 i = 0; i < events.length; i++) {\n hashes[i] = keccak256(abi.encode(OPERATION_EVENT_TYPE_HASH, events[i].topic, keccak256(events[i].data)));\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(uint256[] memory fees) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(fees));\n }\n\n function hash(bytes[] memory datas) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](datas.length);\n for (uint256 i = 0; i < datas.length; i++) {\n hashes[i] = keccak256(datas[i]);\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Validation memory validation) internal pure returns (bytes32) {\n return keccak256(abi.encode(VALIDATION_TYPE_HASH, validation.intent));\n }\n}\n" + }, + "project/contracts/interfaces/IController.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @title Controller interface\n */\ninterface IController {\n /**\n * @dev The input arrays are not of equal length\n */\n error ControllerInputInvalidLength();\n\n /**\n * @dev Emitted every time a solver permission is set\n */\n event SolverAllowedSet(address indexed solver, bool allowed);\n\n /**\n * @dev Emitted every time an executor permission is set\n */\n event ExecutorAllowedSet(address indexed executor, bool allowed);\n\n /**\n * @dev Emitted every time a proposal signer permission is set\n */\n event ProposalSignerAllowedSet(address indexed proposalSigner, bool allowed);\n\n /**\n * @dev Emitted every time a validator permission is set\n */\n event ValidatorAllowedSet(address indexed validator, bool allowed);\n\n /**\n * @dev Emitted when the minimum validations changes\n */\n event MinValidationSet(uint8 indexed newMinValidation);\n\n /**\n * @dev Tells whether a solver is allowed\n * @param solver Address of the solver being queried\n */\n function isSolverAllowed(address solver) external view returns (bool);\n\n /**\n * @dev Tells whether an executor is allowed\n * @param executor Address of the executor being queried\n */\n function isExecutorAllowed(address executor) external view returns (bool);\n\n /**\n * @dev Tells whether a proposal signer is allowed\n * @param signer Address of the proposal signer being queried\n */\n function isProposalSignerAllowed(address signer) external view returns (bool);\n\n /**\n * @dev Tells whether a validator is allowed\n * @param validator Address of the validator being queried\n */\n function isValidatorAllowed(address validator) external view returns (bool);\n\n /**\n * @dev Tells the minimum number of validations allowed\n */\n function minValidations() external view returns (uint8);\n\n /**\n * @dev Sets permissions for multiple solvers\n * @param solvers List of solver addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedSolvers(address[] memory solvers, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple executors\n * @param executors List of executor addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedExecutors(address[] memory executors, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple proposal signers\n * @param signers List of proposal signer addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedProposalSigners(address[] memory signers, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple validators\n * @param validators List of validator addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedValidators(address[] memory validators, bool[] memory alloweds) external;\n\n /**\n * @dev Sets the minimum number of validations allowed\n * @param newMinValidations minimum number of validations allowed\n */\n function setMinValidations(uint8 newMinValidations) external;\n}\n" + }, + "project/contracts/interfaces/ICreateX.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity ^0.8.4;\n\n/**\n * @title CreateX Factory Interface Definition\n * @author pcaversaccio (https://web.archive.org/web/20230921103111/https://pcaversaccio.com/)\n * @custom:coauthor Matt Solomon (https://web.archive.org/web/20230921103335/https://mattsolomon.dev/)\n */\ninterface ICreateX {\n event ContractCreation(address indexed newContract);\n\n function deployCreate3(bytes32 salt, bytes memory initCode) external payable returns (address newContract);\n}\n" + }, + "project/contracts/interfaces/IDynamicCallEncoder.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../dynamic-calls/DynamicCallTypes.sol';\n\ninterface IDynamicCallEncoder {\n /**\n * @dev The argument is not word-aligned\n */\n error DynamicCallEncoderBadLength();\n\n /**\n * @dev The dynamic value resolves to empty data\n */\n error DynamicCallEncoderEmptyDynamic();\n\n /**\n * @dev The variable reference is not exactly one word\n */\n error DynamicCallEncoderVariableRefBadLength();\n\n /**\n * @dev The variable index is outside the variables array\n */\n error DynamicCallEncoderVariableOutOfBounds();\n\n /**\n * @dev The declared variables length exceeds the variables array length\n */\n error DynamicCallEncoderVariablesLengthOutOfBounds();\n\n /**\n * @dev The argument kind is not valid\n */\n error DynamicCallEncoderInvalidArgKind();\n\n /**\n * @dev Encodes a dynamic call into calldata.\n * @param dynamicCall Dynamic call specification.\n * @param variables List of resolved variable values.\n * @param variablesLength Number of resolved variables.\n */\n function encode(DynamicCall memory dynamicCall, bytes[][] memory variables, uint256 variablesLength)\n external\n pure\n returns (bytes memory);\n}\n" + }, + "project/contracts/interfaces/IExecutor.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\n\n/**\n * @title Executor interface\n */\ninterface IExecutor {\n /**\n * @dev Executes an operation proposal\n * @param operation Operation to be executed\n * @param operationHash unique hash of the operation\n * @param proposalData data of the proposal to be executed to fulfill the operation\n */\n function execute(Operation memory operation, bytes32 operationHash, bytes memory proposalData) external;\n}\n" + }, + "project/contracts/interfaces/IOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\nimport '../safeguards/Safeguards.sol';\n\n/**\n * @title OperationsValidator\n * @dev Performs operations validations based on safeguards\n */\ninterface IOperationsValidator {\n /**\n * @dev Validates an operation for a safeguard\n * @param operation Operation to be validated\n * @param config Safeguard config to validate the operation with\n */\n function validate(Operation memory operation, bytes memory config) external pure;\n}\n" + }, + "project/contracts/interfaces/IPaymentsReceiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @title PaymentsReceiver interface\n */\ninterface IPaymentsReceiver {\n /**\n * @dev The token address is zero\n */\n error PaymentsReceiverTokenZero();\n\n /**\n * @dev The recipient address is zero\n */\n error PaymentsReceiverRecipientZero();\n\n /**\n * @dev The amount is zero\n */\n error PaymentsReceiverAmountZero();\n\n /**\n * @dev The user address is zero\n */\n error PaymentsReceiverUserZero();\n\n /**\n * @dev The input arrays are not of equal length\n */\n error PaymentsReceiverInputInvalidLength();\n\n /**\n * @dev The token is not allowed\n */\n error PaymentsReceiverTokenNotAllowed(address token);\n\n /**\n * @dev Emitted every time a deposit is made\n */\n event Deposited(\n address indexed token,\n address indexed depositor,\n address indexed user,\n uint256 amount,\n uint8 decimals\n );\n\n /**\n * @dev Emitted every time a withdrawal is made\n */\n event Withdrawn(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time a token permission is set\n */\n event TokenAllowedSet(address indexed token, bool allowed);\n\n /**\n * @dev Tells whether a token is allowed\n * @param token Address of the token being queried\n */\n function isTokenAllowed(address token) external view returns (bool);\n\n /**\n * @dev Sets permissions for multiple tokens\n * @param tokens List of token addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedTokens(address[] memory tokens, bool[] memory alloweds) external;\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param amount Amount to deposit\n */\n function deposit(address token, uint256 amount) external;\n\n /**\n * @dev Deposits ERC20 tokens on behalf of a user\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function depositOnBehalf(address token, address user, uint256 amount) external;\n\n /**\n * @dev Withdraws ERC20 tokens to a recipient\n * @param token Address of the token to withdraw\n * @param recipient Address of the recipient\n * @param amount Amount to withdraw\n */\n function withdraw(address token, address recipient, uint256 amount) external;\n}\n" + }, + "project/contracts/interfaces/ISafe.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nenum SafeOperation {\n Call,\n DelegateCall\n}\n\ninterface ISafe {\n function getThreshold() external view returns (uint256);\n\n function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, SafeOperation operation)\n external\n returns (bool success, bytes memory returnData);\n}\n" + }, + "project/contracts/interfaces/ISettler.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\nimport '../safeguards/Safeguards.sol';\n\n/**\n * @title Settler interface\n */\ninterface ISettler {\n /**\n * @dev The requested operation type is unknown\n */\n error SettlerUnknownOperationType(uint8 opType);\n\n /**\n * @dev The simulation has been successful\n */\n error SettlerSimulationSuccess(uint256 gasUsed);\n\n /**\n * @dev The solver is not allowed\n */\n error SettlerSolverNotAllowed(address solver);\n\n /**\n * @dev The executor is not allowed\n */\n error SettlerExecutorNotAllowed(address executor);\n\n /**\n * @dev The proposal signer is not allowed\n */\n error SettlerProposalSignerNotAllowed(address signer);\n\n /**\n * @dev The validator is not allowed\n */\n error SettlerValidatorNotAllowed(address validator);\n\n /**\n * @dev The validator is duplicated\n */\n error SettlerValidatorDuplicatedOrUnsorted(address previous, address current);\n\n /**\n * @dev The settler is not the current contract\n */\n error SettlerInvalidSettler(address settler);\n\n /**\n * @dev The nonce is zero\n */\n error SettlerNonceZero();\n\n /**\n * @dev The intent has already been executed\n */\n error SettlerIntentAlreadyExecuted(bytes32 hash);\n\n /**\n * @dev The intent deadline is in the past\n */\n error SettlerIntentPastDeadline(uint256 deadline, uint256 timestamp);\n\n /**\n * @dev The current chain is not valid\n */\n error SettlerInvalidChain(uint256 chainId);\n\n /**\n * @dev The recipient is the settler contract\n */\n error SettlerInvalidRecipient(address to);\n\n /**\n * @dev The user is not a smart account\n */\n error SettlerUserNotSmartAccount(address user);\n\n /**\n * @dev The amount out is lower than the proposed amount\n */\n error SettlerAmountOutLtProposed(uint256 index, uint256 amountOut, uint256 proposed);\n\n /**\n * @dev The proposed amount is lower than the minimum amount\n */\n error SettlerProposedAmountLtMinAmount(uint256 index, uint256 proposed, uint256 minAmount);\n\n /**\n * @dev The proposed amounts array and the tokens out array are not of equal length\n */\n error SettlerInvalidProposedAmounts();\n\n /**\n * @dev The balance after the proposal execution is lower than the balance before\n */\n error SettlerPostBalanceOutLtPre(uint256 index, uint256 post, uint256 pre);\n\n /**\n * @dev The solver fees length does not match the requested by the user\n */\n error SettlerSolverFeeInvalidLength();\n\n /**\n * @dev The intent operations array is empty\n */\n error SettlerIntentOperationsEmpty();\n\n /**\n * @dev The proposal datas length does not match the intent operations length\n */\n error SettlerProposalDataInvalidLength();\n\n /**\n * @dev The solver fee is too high\n */\n error SettlerSolverFeeTooHigh(uint256 fee, uint256 max);\n\n /**\n * @dev The intent validations are not enough\n */\n error SettlerIntentValidationsNotEnough(uint256 min, uint256 current);\n\n /**\n * @dev The proposal deadline is in the past\n */\n error SettlerProposalPastDeadline(uint256 deadline, uint256 timestamp);\n\n /**\n * @dev The proposal data is not empty\n */\n error SettlerProposalDataNotEmpty();\n\n /**\n * @dev The rescue funds recipient is zero\n */\n error SettlerRescueFundsRecipientZero();\n\n /**\n * @dev The list of safeguards exceed the maximum allowed\n */\n error SettlerTooManySafeguards(uint256 lengthRequested);\n\n /**\n * @dev The chains of a swap operation do not match the swap type (single or cross chain)\n */\n error SettlerOperationChainsMismatch();\n\n /**\n * @dev A CrossChainSwap operation must be the only operation in the intent\n */\n error SettlerCrossChainSwapMustBeOnlyOperation();\n\n /**\n * @dev The new smart accounts handler is zero\n */\n error SmartAccountsHandlerZero();\n\n /**\n * @dev The new dynamic call encoder is zero\n */\n error SettlerDynamicCallEncoderZero();\n\n /**\n * @dev Custom events emitted for each operation\n */\n event OperationExecuted(\n address indexed user,\n bytes32 indexed topic,\n uint8 indexed opType,\n Operation operation,\n Proposal proposal,\n bytes32 intentHash,\n uint256 index,\n bytes output,\n bytes data\n );\n\n /**\n * @dev Emitted every time an intent is fulfilled\n */\n event ProposalExecuted(bytes32 indexed proposal);\n\n /**\n * @dev Emitted every time tokens are withdrawn from the contract balance\n */\n event FundsRescued(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time the smart accounts handler is set\n */\n event SmartAccountsHandlerSet(address indexed smartAccountsHandler);\n\n /**\n * @dev Emitted every time the operations validator is set\n */\n event OperationsValidatorSet(address indexed operationsValidator);\n\n /**\n * @dev Emitted every time the dynamic call encoder is set\n */\n event DynamicCallEncoderSet(address indexed dynamicCallEncoder);\n\n /**\n * @dev Emitted every time a safeguard is set\n */\n event SafeguardSet(address indexed user);\n\n /**\n * @dev Tells the reference to the Mimic controller\n */\n function controller() external view returns (address);\n\n /**\n * @dev Tells the reference to the smart accounts handler\n */\n function smartAccountsHandler() external view returns (address);\n\n /**\n * @dev Tells the reference to the operations validator\n */\n function operationsValidator() external view returns (address);\n\n /**\n * @dev Tells the reference to the dynamic call encoder\n */\n function dynamicCallEncoder() external view returns (address);\n\n /**\n * @dev Tells the block at which an intent was executed. Returns 0 if unexecuted.\n * @param hash Hash of the intent being queried\n */\n function getIntentBlock(bytes32 hash) external view returns (uint256);\n\n /**\n * @dev Tells the safeguard set for a user\n * @param user Address of the user being queried\n */\n function getUserSafeguard(address user) external view returns (bytes memory);\n\n /**\n * @dev Tells the hash of an intent\n * @param intent Intent to get the hash of\n */\n function getIntentHash(Intent memory intent) external pure returns (bytes32);\n\n /**\n * @dev Tells the hash of a proposal\n * @param proposal Proposal to be hashed\n * @param intent Intent being fulfilled by the requested proposal\n * @param solver Address of the solver that made the proposal\n */\n function getProposalHash(Proposal memory proposal, Intent memory intent, address solver)\n external\n pure\n returns (bytes32);\n\n /**\n * @dev Withdraws ERC20 or native tokens from the contract\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function rescueFunds(address token, address recipient, uint256 amount) external;\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function setSmartAccountsHandler(address newSmartAccountsHandler) external;\n\n /**\n * @dev Sets a new operations validator address\n * @param newOperationsValidator New operations validator to be set\n */\n function setOperationsValidator(address newOperationsValidator) external;\n\n /**\n * @dev Sets a new dynamic call encoder address\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function setDynamicCallEncoder(address newDynamicCallEncoder) external;\n\n /**\n * @dev Sets a safeguard for a user\n * @param safeguard Safeguard to be set\n */\n function setSafeguard(bytes memory safeguard) external;\n\n /**\n * @dev Executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function execute(Intent memory intent, Proposal memory proposal, bytes memory signature) external;\n\n /**\n * @dev Simulates an execution. It will always revert. Successful executions are returned as\n * `SettlerSimulationSuccess` errors. Any other error should be treated as failure.\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function simulate(Intent memory intent, Proposal memory proposal, bytes memory signature) external;\n}\n" + }, + "project/contracts/interfaces/ISmartAccount.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/introspection/IERC165.sol';\n\n/**\n * @title SmartAccount interface\n */\ninterface ISmartAccount is IERC165 {\n /**\n * @dev Emitted every time tokens are transferred\n */\n event Transferred(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time `call` is called\n */\n event Called(address indexed target, bytes data, uint256 value, bytes result);\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the owner or the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) external;\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the owner or the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n */\n function call(address target, bytes memory data, uint256 value) external returns (bytes memory result);\n}\n" + }, + "project/contracts/interfaces/ISmartAccountContract.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/interfaces/IERC1271.sol';\n\nimport './ISmartAccount.sol';\n\n/**\n * @title SmartAccountContract interface\n */\ninterface ISmartAccountContract is ISmartAccount, IERC1271 {\n // solhint-disable-previous-line no-empty-blocks\n}\n" + }, + "project/contracts/interfaces/ISmartAccountsHandler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\ninterface ISmartAccountsHandler {\n /**\n * @dev The smart account given is not supported\n */\n error SmartAccountsHandlerUnsupportedAccount(address account);\n\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address account) external view returns (bool);\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address account, address token, address to, uint256 amount) external;\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address account, address target, bytes memory data, uint256 value) external returns (bytes memory);\n}\n" + }, + "project/contracts/payments/PaymentsReceiver.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\n\nimport '../interfaces/IPaymentsReceiver.sol';\n\n/**\n * @title PaymentsReceiver\n * @dev Receives ERC20 deposits and lets the owner withdraw them\n */\ncontract PaymentsReceiver is IPaymentsReceiver, Ownable {\n using SafeERC20 for IERC20;\n\n // List of allowed tokens\n mapping (address => bool) public override isTokenAllowed;\n\n /**\n * @dev Creates a new PaymentsReceiver contract\n * @param owner Address that will own the contract\n * @param tokens List of allowed tokens\n */\n constructor(address owner, address[] memory tokens) Ownable(owner) {\n for (uint256 i = 0; i < tokens.length; i++) _setAllowedToken(tokens[i], true);\n }\n\n /**\n * @dev Sets permissions for multiple tokens\n * @param tokens List of token addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedTokens(address[] memory tokens, bool[] memory alloweds) external override onlyOwner {\n if (tokens.length != alloweds.length) revert PaymentsReceiverInputInvalidLength();\n for (uint256 i = 0; i < tokens.length; i++) _setAllowedToken(tokens[i], alloweds[i]);\n }\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param amount Amount to deposit\n */\n function deposit(address token, uint256 amount) external override {\n _deposit(token, _msgSender(), amount);\n }\n\n /**\n * @dev Deposits ERC20 tokens on behalf of a user\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function depositOnBehalf(address token, address user, uint256 amount) external override {\n if (user == address(0)) revert PaymentsReceiverUserZero();\n _deposit(token, user, amount);\n }\n\n /**\n * @dev Withdraws ERC20 tokens to a recipient\n * @param token Address of the token to withdraw\n * @param recipient Address of the recipient\n * @param amount Amount to withdraw\n */\n function withdraw(address token, address recipient, uint256 amount) external override onlyOwner {\n if (token == address(0)) revert PaymentsReceiverTokenZero();\n if (recipient == address(0)) revert PaymentsReceiverRecipientZero();\n if (amount == 0) revert PaymentsReceiverAmountZero();\n\n IERC20(token).safeTransfer(recipient, amount);\n\n emit Withdrawn(token, recipient, amount);\n }\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function _deposit(address token, address user, uint256 amount) internal {\n if (token == address(0)) revert PaymentsReceiverTokenZero();\n if (amount == 0) revert PaymentsReceiverAmountZero();\n if (!isTokenAllowed[token]) revert PaymentsReceiverTokenNotAllowed(token);\n\n address depositor = _msgSender();\n IERC20(token).safeTransferFrom(depositor, address(this), amount);\n\n uint8 decimals = IERC20Metadata(token).decimals();\n emit Deposited(token, depositor, user, amount, decimals);\n }\n\n /**\n * @dev Sets a token permission\n */\n function _setAllowedToken(address token, bool allowed) internal {\n isTokenAllowed[token] = allowed;\n emit TokenAllowedSet(token, allowed);\n }\n}\n" + }, + "project/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol';\n\ncontract Proxy is TransparentUpgradeableProxy {\n constructor(address implementation, address initialOwner, bytes memory data)\n TransparentUpgradeableProxy(implementation, initialOwner, data)\n {}\n}\n" + }, + "project/contracts/safeguards/BaseOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @title BaseOperationsValidator\n */\ncontract BaseOperationsValidator {\n /**\n * @dev No operations allowed\n */\n error OperationsValidatorNoneAllowed();\n\n /**\n * @dev Operation type unknown\n */\n error OperationsValidatorUnknownOperationType(uint8 opType);\n\n /**\n * @dev Invalid safeguard mode\n */\n error OperationsValidatorInvalidSafeguardMode(uint8 mode);\n\n /**\n * @dev Tells whether a chain is allowed\n */\n function _isChainAllowed(uint256 chainId, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, uint256[] memory values) = abi.decode(config, (bool, uint256[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (chainId == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (chainId == values[i]) return true;\n }\n return false;\n }\n }\n\n /**\n * @dev Tells whether an account is allowed\n */\n function _isAccountAllowed(address account, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, address[] memory values) = abi.decode(config, (bool, address[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (account == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (account == values[i]) return true;\n }\n return false;\n }\n }\n\n /**\n * @dev Tells whether a selector is allowed\n */\n function _isSelectorAllowed(bytes4 selector, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, bytes4[] memory values) = abi.decode(config, (bool, bytes4[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (selector == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (selector == values[i]) return true;\n }\n return false;\n }\n }\n}\n" + }, + "project/contracts/safeguards/CallOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './Safeguards.sol';\nimport './BaseOperationsValidator.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Call safeguard modes to validate call operations\n * @param None To ensure no calls are allowed\n * @param Chain To validate that the chain where calls execute is allowed\n * @param Target To validate that the call targets (contract addresses) are allowed\n * @param Selector To validate that the function selectors being called are allowed\n */\nenum CallSafeguardMode {\n None,\n Chain,\n Target,\n Selector\n}\n\n/**\n * @title CallOperationsValidator\n * @dev Performs call operations validations based on safeguards\n */\ncontract CallOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a call operation is valid for a safeguard\n * @param operation Call operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isCallOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n CallOperation memory callOperation = abi.decode(operation.data, (CallOperation));\n if (safeguard.mode == uint8(CallSafeguardMode.Chain))\n return _isChainAllowed(callOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Target))\n return _areCallTargetsValid(callOperation.calls, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Selector))\n return _areCallSelectorsValid(callOperation.calls, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the call targets are allowed\n */\n function _areCallTargetsValid(CallData[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n if (!_isAccountAllowed(calls[i].target, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the call selectors are allowed\n */\n function _areCallSelectorsValid(CallData[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n if (!_isSelectorAllowed(bytes4(calls[i].data), config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/DynamicCallOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './CallOperationsValidator.sol';\nimport './Safeguards.sol';\nimport './BaseOperationsValidator.sol';\nimport '../Intents.sol';\nimport '../dynamic-calls/DynamicCallTypes.sol';\n\n/**\n * @title DynamicCallOperationsValidator\n * @dev Performs dynamic call operations validations based on call safeguards\n */\ncontract DynamicCallOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a dynamic call operation is valid for a safeguard\n * @param operation Dynamic call operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isDynamicCallOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n DynamicCallOperation memory dynamicCallOperation = abi.decode(operation.data, (DynamicCallOperation));\n if (safeguard.mode == uint8(CallSafeguardMode.Chain))\n return _isChainAllowed(dynamicCallOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Target))\n return _areDynamicCallTargetsValid(dynamicCallOperation.calls, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Selector))\n return _areDynamicCallSelectorsValid(dynamicCallOperation.calls, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the dynamic call targets are allowed\n */\n function _areDynamicCallTargetsValid(bytes[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n DynamicCall memory call = abi.decode(calls[i], (DynamicCall));\n if (!_isAccountAllowed(call.target, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the dynamic call selectors are allowed\n */\n function _areDynamicCallSelectorsValid(bytes[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n DynamicCall memory call = abi.decode(calls[i], (DynamicCall));\n if (!_isSelectorAllowed(call.selector, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/OperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './CallOperationsValidator.sol';\nimport './DynamicCallOperationsValidator.sol';\nimport './TransferOperationsValidator.sol';\nimport './Safeguards.sol';\nimport './SwapOperationsValidator.sol';\nimport '../Intents.sol';\nimport '../interfaces/IOperationsValidator.sol';\n\n/**\n * @title OperationsValidator\n * @dev Performs operations validations based on safeguards\n */\ncontract OperationsValidator is\n IOperationsValidator,\n SwapOperationsValidator,\n TransferOperationsValidator,\n CallOperationsValidator,\n DynamicCallOperationsValidator\n{\n /**\n * @dev Safeguard validation failed\n */\n error OperationsValidatorSafeguardFailed();\n\n /**\n * @dev Invalid safeguard config mode\n */\n error OperationsValidatorInvalidSafeguardConfigMode(uint8 mode);\n\n /**\n * @dev Invalid safeguard group logic mode\n */\n error OperationsValidatorInvalidSafeguardGroupLogicMode(uint8 mode);\n\n /**\n * @dev Tells whether an operation is valid for a safeguard\n * @param operation Operation to be validated\n * @param config Safeguard config to validate the operation with\n */\n function validate(Operation memory operation, bytes memory config) external pure override {\n (uint8 mode, bytes memory safeguard) = abi.decode(config, (uint8, bytes));\n if (mode == uint8(SafeguardConfigMode.List)) _validate(operation, abi.decode(safeguard, (Safeguard[])));\n else if (mode == uint8(SafeguardConfigMode.Tree)) _validate(operation, _decodeSafeguardTree(safeguard));\n else revert OperationsValidatorInvalidSafeguardConfigMode(mode);\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguards list\n * @param operation Operation to be validated\n * @param safeguards Safeguard list to validate the operation with\n */\n function _validate(Operation memory operation, Safeguard[] memory safeguards) internal pure {\n if (safeguards.length == 0) revert OperationsValidatorSafeguardFailed();\n for (uint256 i = 0; i < safeguards.length; i++) {\n if (!_isSafeguardValid(operation, safeguards[i])) revert OperationsValidatorSafeguardFailed();\n }\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard tree\n * @param operation Operation to be validated\n * @param tree Safeguard tree to validate the operation with\n */\n function _validate(Operation memory operation, SafeguardTree memory tree) internal pure {\n if (tree.nodes.length == 0) revert OperationsValidatorSafeguardFailed();\n if (!_isSafeguardGroupValid(operation, tree, 0)) revert OperationsValidatorSafeguardFailed();\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard tree at a certain level\n * @param operation Operation to be validated\n * @param tree Safeguard tree to validate the operation with\n * @param index Index of the group node to evaluate\n */\n function _isSafeguardGroupValid(Operation memory operation, SafeguardTree memory tree, uint16 index)\n internal\n pure\n returns (bool)\n {\n SafeguardGroup memory group = tree.nodes[index];\n\n if (group.logic == uint8(SafeguardGroupLogic.NOT)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i])) return false;\n }\n return true;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.AND)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (!_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (!_isSafeguardGroupValid(operation, tree, group.children[i])) return false;\n }\n return true;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.OR)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return true;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i])) return true;\n }\n return false;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.XOR)) {\n uint256 hits = 0;\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]]))\n if (++hits > 1) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i]))\n if (++hits > 1) return false;\n }\n return hits == 1;\n }\n\n revert OperationsValidatorInvalidSafeguardGroupLogicMode(group.logic);\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard\n * @param operation Operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isSafeguardValid(Operation memory operation, Safeguard memory safeguard) internal pure returns (bool) {\n if (safeguard.mode == uint8(0)) revert OperationsValidatorNoneAllowed();\n if (operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap)) {\n return _isSwapOperationValid(operation, safeguard);\n }\n if (operation.opType == uint8(OpType.Transfer)) return _isTransferOperationValid(operation, safeguard);\n if (operation.opType == uint8(OpType.Call)) return _isCallOperationValid(operation, safeguard);\n if (operation.opType == uint8(OpType.DynamicCall)) return _isDynamicCallOperationValid(operation, safeguard);\n revert OperationsValidatorUnknownOperationType(uint8(operation.opType));\n }\n\n /**\n * @dev Safely decodes a safeguard tree avoiding compiler issues with dynamic arrays\n * @param data Safeguard tree data to be decoded\n */\n function _decodeSafeguardTree(bytes memory data) private pure returns (SafeguardTree memory) {\n (SafeguardGroup[] memory nodes, Safeguard[] memory leaves) = abi.decode(data, (SafeguardGroup[], Safeguard[]));\n return SafeguardTree(nodes, leaves);\n }\n}\n" + }, + "project/contracts/safeguards/Safeguards.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Safeguard config modes\n * - List: Safeguard lists\n * - Tree: Safeguard groups\n */\nenum SafeguardConfigMode {\n List,\n Tree\n}\n\n/**\n * @dev Logical operators for safeguard groups\n * - AND: every child must pass\n * - OR: at least one child must pass\n * - XOR: exactly one child must pass\n * - NOT: every child must fail\n */\nenum SafeguardGroupLogic {\n AND,\n OR,\n XOR,\n NOT\n}\n\n/**\n * @dev Flat node in the safeguard tree\n * @param logic Group operator (AND/OR/XOR/NOT)\n * @param leaves Indices into `SafeguardTree.leaves`\n * @param children Indices into `SafeguardTree.nodes`\n */\nstruct SafeguardGroup {\n uint8 logic;\n uint16[] leaves;\n uint16[] children;\n}\n\n/**\n * @dev Safeguard tree representation\n * @param nodes List of all the nodes in the tree\n * @param leaves List of all the leaves in the tree\n */\nstruct SafeguardTree {\n SafeguardGroup[] nodes;\n Safeguard[] leaves;\n}\n\n/**\n * @dev Safeguard representation\n * @param mode Safeguard mode\n * @param config Safeguard configuration settings or parameters\n */\nstruct Safeguard {\n uint8 mode;\n bytes config;\n}\n" + }, + "project/contracts/safeguards/SwapOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './BaseOperationsValidator.sol';\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Swap safeguard modes to validate swap operations\n * @param None To ensure no swaps are allowed\n * @param SourceChain To validate that the source chain is allowed\n * @param DestinationChain To validate that the destination chain is allowed\n * @param TokenIn To validate that the tokens to be sent are allowed\n * @param TokenOut To validate that the tokens to be received are allowed\n * @param Recipient To validate that the recipients that will receive the tokens are allowed\n */\nenum SwapSafeguardMode {\n None,\n SourceChain,\n DestinationChain,\n TokenIn,\n TokenOut,\n Recipient\n}\n\n/**\n * @title SwapOperationsValidator\n * @dev Performs swap operations validations based on safeguards\n */\ncontract SwapOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a swap operation is valid for a safeguard\n * @param operation Swap operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isSwapOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n SwapOperation memory swapOperation = abi.decode(operation.data, (SwapOperation));\n if (safeguard.mode == uint8(SwapSafeguardMode.SourceChain))\n return _isChainAllowed(swapOperation.sourceChain, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.DestinationChain))\n return _isChainAllowed(swapOperation.destinationChain, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.TokenIn))\n return _areSwapTokensInValid(swapOperation.tokensIn, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.TokenOut))\n return _areSwapTokensOutValid(swapOperation.tokensOut, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.Recipient))\n return _areSwapRecipientsValid(swapOperation.tokensOut, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the tokens to be sent are allowed\n */\n function _areSwapTokensInValid(TokenIn[] memory tokensIn, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensIn.length; i++) {\n if (!_isAccountAllowed(tokensIn[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the tokens to be received are allowed\n */\n function _areSwapTokensOutValid(TokenOut[] memory tokensOut, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensOut.length; i++) {\n if (!_isAccountAllowed(tokensOut[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the recipients to be received are allowed\n */\n function _areSwapRecipientsValid(TokenOut[] memory tokensOut, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensOut.length; i++) {\n if (!_isAccountAllowed(tokensOut[i].recipient, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/TransferOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './BaseOperationsValidator.sol';\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Transfer safeguard modes to validate transfer operations\n * @param None To ensure no transfers are allowed\n * @param Chain To validate that the chain where transfers execute is allowed\n * @param Token To validate that the tokens being transferred are allowed\n * @param Recipient To validate that the recipients of the transfers are allowed\n */\nenum TransferSafeguardMode {\n None,\n Chain,\n Token,\n Recipient\n}\n\n/**\n * @title TransferOperationsValidator\n * @dev Performs transfer operations validations based on safeguards\n */\ncontract TransferOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a transfer operation is valid for a safeguard\n * @param operation Transfer operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isTransferOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n TransferOperation memory transferOperation = abi.decode(operation.data, (TransferOperation));\n if (safeguard.mode == uint8(TransferSafeguardMode.Chain))\n return _isChainAllowed(transferOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(TransferSafeguardMode.Token))\n return _areTransferTokensValid(transferOperation.transfers, safeguard.config);\n if (safeguard.mode == uint8(TransferSafeguardMode.Recipient))\n return _areTransferRecipientsValid(transferOperation.transfers, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the tokens being transferred are allowed\n */\n function _areTransferTokensValid(TransferData[] memory transfers, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < transfers.length; i++) {\n if (!_isAccountAllowed(transfers[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the recipients of the transfers are allowed\n */\n function _areTransferRecipientsValid(TransferData[] memory transfers, bytes memory config)\n private\n pure\n returns (bool)\n {\n for (uint256 i = 0; i < transfers.length; i++) {\n if (!_isAccountAllowed(transfers[i].recipient, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/Settler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';\nimport '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\nimport '@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol';\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\nimport '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';\n\nimport './Intents.sol';\nimport './interfaces/IController.sol';\nimport './interfaces/IDynamicCallEncoder.sol';\nimport './interfaces/IOperationsValidator.sol';\nimport './interfaces/IExecutor.sol';\nimport './interfaces/ISettler.sol';\nimport './utils/Denominations.sol';\nimport './utils/ERC20Helpers.sol';\nimport './smart-accounts/SmartAccountsHandler.sol';\nimport './smart-accounts/SmartAccountsHandlerHelpers.sol';\n\n/**\n * @title Settler\n * @dev Contract that provides the appropriate context for solvers to execute proposals that fulfill user intents\n */\ncontract Settler is ISettler, Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, EIP712Upgradeable {\n using SafeERC20 for IERC20;\n using IntentsHelpers for Intent;\n using IntentsHelpers for Proposal;\n using IntentsHelpers for Validation;\n using SmartAccountsHandlerHelpers for address;\n\n // Mimic controller reference\n address public override controller;\n\n // Smart accounts handler reference\n address public override smartAccountsHandler;\n\n // Operations validator reference\n address public override operationsValidator;\n\n // Dynamic call encoder reference\n address public dynamicCallEncoder;\n\n // List of block numbers at which an intent was executed\n mapping (bytes32 => uint256) public override getIntentBlock;\n\n // Safeguard config per user\n mapping (address => bytes) internal _userSafeguard;\n\n /**\n * @dev Modifier to tag settler functions in order to check if the sender is an allowed solver\n */\n modifier onlySolver() {\n address sender = _msgSender();\n if (!IController(controller).isSolverAllowed(sender)) revert SettlerSolverNotAllowed(sender);\n _;\n }\n\n /**\n * @dev Disables initializers to prevent implementation contract from being initialized directly\n */\n constructor() {\n _disableInitializers();\n }\n\n /**\n * @dev Initializes a new Settler contract\n * @param _controller Address of the Settler controller\n * @param _owner Address that will own the contract\n * @param _dynamicCallEncoder Address of the dynamic call encoder\n */\n function initialize(address _controller, address _owner, address _dynamicCallEncoder) external initializer {\n __Ownable_init(_owner);\n __ReentrancyGuard_init();\n __EIP712_init('Mimic Protocol Settler', '1');\n\n controller = _controller;\n smartAccountsHandler = address(new SmartAccountsHandler());\n _setDynamicCallEncoder(_dynamicCallEncoder);\n }\n\n /**\n * @dev Tells the hash of an intent\n * @param intent Intent to get the hash of\n */\n function getIntentHash(Intent memory intent) external pure override returns (bytes32) {\n return intent.hash();\n }\n\n /**\n * @dev Tells the hash of a proposal\n * @param proposal Proposal to be hashed\n * @param intent Intent being fulfilled by the requested proposal\n * @param solver Address of the solver that made the proposal\n */\n function getProposalHash(Proposal memory proposal, Intent memory intent, address solver)\n external\n pure\n override\n returns (bytes32)\n {\n return proposal.hash(intent, solver);\n }\n\n /**\n * @dev Tells the safeguard set for a user\n * @param user Address of the user being queried\n */\n function getUserSafeguard(address user) external view override returns (bytes memory) {\n return _userSafeguard[user];\n }\n\n /**\n * @dev It allows receiving native token transfers\n * Note: This method mainly allows supporting native tokens for swaps\n */\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n /**\n * @dev Withdraws ERC20 or native tokens from the contract\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function rescueFunds(address token, address recipient, uint256 amount) external override onlyOwner nonReentrant {\n if (recipient == address(0)) revert SettlerRescueFundsRecipientZero();\n ERC20Helpers.transfer(token, recipient, amount);\n emit FundsRescued(token, recipient, amount);\n }\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function setSmartAccountsHandler(address newSmartAccountsHandler) external override onlyOwner {\n _setSmartAccountsHandler(newSmartAccountsHandler);\n }\n\n /**\n * @dev Sets a new operations validator address\n * @param newOperationsValidator New operations validator to be set\n */\n function setOperationsValidator(address newOperationsValidator) external override onlyOwner {\n _setOperationsValidator(newOperationsValidator);\n }\n\n /**\n * @dev Sets a new dynamic call encoder address\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function setDynamicCallEncoder(address newDynamicCallEncoder) external override onlyOwner {\n _setDynamicCallEncoder(newDynamicCallEncoder);\n }\n\n /**\n * @dev Sets a safeguard for a user\n * @param safeguard Safeguard to be set\n */\n function setSafeguard(bytes memory safeguard) external override {\n _setSafeguard(msg.sender, safeguard);\n }\n\n /**\n * @dev Executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function execute(Intent memory intent, Proposal memory proposal, bytes memory signature)\n external\n override\n onlySolver\n {\n _execute(intent, proposal, signature, false);\n }\n\n /**\n * @dev Simulates an execution. It will always revert. Successful executions are returned as\n * `SettlerSimulationSuccess` errors. Any other error should be treated as failure.\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function simulate(Intent memory intent, Proposal memory proposal, bytes memory signature)\n external\n override\n onlySolver\n {\n uint256 initialGas = gasleft();\n _execute(intent, proposal, signature, true);\n uint256 gasUsed = initialGas - gasleft();\n revert SettlerSimulationSuccess(gasUsed);\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n * @param simulated Whether the execution is a simulation\n */\n function _execute(Intent memory intent, Proposal memory proposal, bytes memory signature, bool simulated)\n internal\n nonReentrant\n {\n _validateIntent(intent, proposal, signature, simulated);\n getIntentBlock[intent.hash()] = block.number;\n\n bytes[][] memory outputs = new bytes[][](intent.operations.length);\n for (uint256 i = 0; i < intent.operations.length; i++) {\n outputs[i] = _executeOperation(intent, proposal, i, outputs);\n }\n\n _payFees(intent, proposal);\n emit ProposalExecuted(proposal.hash(intent, _msgSender()));\n }\n\n /**\n * @dev Executes proposal to fulfill an operation\n * @param intent Intent being fulfilled\n * @param proposal Proposal being executed\n * @param index Position where the operation and its corresponding proposal data are located\n * @param outputs List of operations outputs\n */\n function _executeOperation(Intent memory intent, Proposal memory proposal, uint256 index, bytes[][] memory outputs)\n internal\n returns (bytes[] memory)\n {\n uint8 opType = intent.operations[index].opType;\n if (opType == uint8(OpType.Swap) || opType == uint8(OpType.CrossChainSwap)) {\n return _executeSwap(intent, proposal, index);\n }\n if (opType == uint8(OpType.Transfer)) return _executeTransfer(intent, proposal, index);\n if (opType == uint8(OpType.Call)) return _executeCall(intent, proposal, index);\n if (opType == uint8(OpType.DynamicCall)) return _executeDynamicCall(intent, proposal, index, outputs);\n revert SettlerUnknownOperationType(opType);\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a swap operation\n * @param intent Intent that contains swap operation to be fulfilled\n * @param proposal Proposal with swap data to be executed\n * @param index Position where the swap proposal data and operation are located\n */\n function _executeSwap(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n SwapOperation memory swapOperation = abi.decode(operation.data, (SwapOperation));\n SwapProposal memory swapProposal = abi.decode(proposal.datas[index], (SwapProposal));\n if (operation.opType == uint8(OpType.CrossChainSwap)) {\n if (intent.operations.length > 1) revert SettlerCrossChainSwapMustBeOnlyOperation();\n _validateCrossChainSwapOperation(swapOperation, swapProposal);\n } else _validateSingleChainSwapOperation(swapOperation, swapProposal);\n\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(operation.user);\n if (swapOperation.sourceChain == block.chainid) {\n for (uint256 i = 0; i < swapOperation.tokensIn.length; i++) {\n TokenIn memory tokenIn = swapOperation.tokensIn[i];\n _transferFrom(tokenIn.token, operation.user, swapProposal.executor, tokenIn.amount, isSmartAccount);\n }\n }\n\n uint256[] memory preBalancesOut = _getTokensOutBalance(swapOperation);\n // Using the intent hash as the unique operation hash because cross-chain swap has only one operation per intent and the single swap executor does not use it\n bytes32 operationHash = intent.hash();\n IExecutor(swapProposal.executor).execute(operation, operationHash, proposal.datas[index]);\n\n outputs = new bytes[](swapOperation.tokensOut.length);\n if (swapOperation.destinationChain == block.chainid) {\n uint256[] memory amounts = new uint256[](swapOperation.tokensOut.length);\n for (uint256 i = 0; i < swapOperation.tokensOut.length; i++) {\n TokenOut memory tokenOut = swapOperation.tokensOut[i];\n uint256 postBalanceOut = ERC20Helpers.balanceOf(tokenOut.token, address(this));\n uint256 preBalanceOut = preBalancesOut[i];\n if (postBalanceOut < preBalanceOut) revert SettlerPostBalanceOutLtPre(i, postBalanceOut, preBalanceOut);\n\n amounts[i] = postBalanceOut - preBalanceOut;\n uint256 proposedAmount = swapProposal.amountsOut[i];\n if (amounts[i] < proposedAmount) revert SettlerAmountOutLtProposed(i, amounts[i], proposedAmount);\n\n ERC20Helpers.transfer(tokenOut.token, tokenOut.recipient, amounts[i]);\n outputs[i] = abi.encode(amounts[i]);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(amounts));\n }\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a transfer operation\n * @param intent Intent that contains transfer operation to be fulfilled\n * @param proposal Transfer proposal to be executed\n * @param index Position where the transfer proposal data and operation are located\n */\n function _executeTransfer(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n TransferOperation memory transferOperation = abi.decode(operation.data, (TransferOperation));\n _validateTransferOperation(transferOperation, proposal.datas[index]);\n\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(operation.user);\n for (uint256 i = 0; i < transferOperation.transfers.length; i++) {\n TransferData memory transfer = transferOperation.transfers[i];\n _transferFrom(transfer.token, operation.user, transfer.recipient, transfer.amount, isSmartAccount);\n }\n\n outputs = new bytes[](0);\n _emitOperationEvents(operation, proposal, intent.hash(), index, new bytes(0));\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a call operation\n * @param intent Intent that contains call operation to be fulfilled\n * @param proposal Call proposal to be executed\n * @param index Position where the call proposal data and operation are located\n */\n function _executeCall(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n CallOperation memory callOperation = abi.decode(operation.data, (CallOperation));\n _validateCallOperation(callOperation, proposal.datas[index], operation.user);\n\n outputs = new bytes[](callOperation.calls.length);\n for (uint256 i = 0; i < callOperation.calls.length; i++) {\n CallData memory call = callOperation.calls[i];\n // solhint-disable-next-line avoid-low-level-calls\n outputs[i] = smartAccountsHandler.call(operation.user, call.target, call.data, call.value);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(outputs));\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a dynamic call operation\n * @param intent Intent that contains dynamic call operation to be fulfilled\n * @param proposal Dynamic call proposal to be executed\n * @param index Position where the dynamic call proposal data and operation are located\n * @param variables List of operations outputs\n */\n function _executeDynamicCall(\n Intent memory intent,\n Proposal memory proposal,\n uint256 index,\n bytes[][] memory variables\n ) internal returns (bytes[] memory outputs) {\n Operation memory operation = intent.operations[index];\n DynamicCallOperation memory dynamicCallOperation = abi.decode(operation.data, (DynamicCallOperation));\n _validateDynamicCallOperation(dynamicCallOperation, proposal.datas[index], operation.user);\n\n outputs = new bytes[](dynamicCallOperation.calls.length);\n for (uint256 i = 0; i < dynamicCallOperation.calls.length; i++) {\n DynamicCall memory dynamicCall = abi.decode(dynamicCallOperation.calls[i], (DynamicCall));\n bytes memory data = IDynamicCallEncoder(dynamicCallEncoder).encode(dynamicCall, variables, index);\n // solhint-disable-next-line avoid-low-level-calls\n outputs[i] = smartAccountsHandler.call(operation.user, dynamicCall.target, data, dynamicCall.value);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(outputs));\n }\n\n /**\n * @dev Validates an intent and its corresponding proposal\n The off-chain validators are assuring that:\n - The trigger signer has authorization over the intent.feePayer and each operations[i].user\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n * @param simulated Whether the execution is a simulation\n */\n function _validateIntent(Intent memory intent, Proposal memory proposal, bytes memory signature, bool simulated)\n internal\n view\n {\n if (intent.settler != address(this)) revert SettlerInvalidSettler(intent.settler);\n if (intent.nonce == bytes32(0)) revert SettlerNonceZero();\n bytes32 intentHash = intent.hash();\n if (getIntentBlock[intentHash] != 0) revert SettlerIntentAlreadyExecuted(intentHash);\n\n if (intent.operations.length == 0) revert SettlerIntentOperationsEmpty();\n if (intent.operations.length != proposal.datas.length) revert SettlerProposalDataInvalidLength();\n\n if (operationsValidator != address(0)) {\n for (uint256 i = 0; i < intent.operations.length; i++) {\n Operation memory operation = intent.operations[i];\n bytes memory safeguard = _userSafeguard[operation.user];\n if (safeguard.length > 0) IOperationsValidator(operationsValidator).validate(operation, safeguard);\n }\n }\n\n bool shouldValidateDeadlines = _shouldValidateDeadlines(intent);\n if (shouldValidateDeadlines) {\n if (intent.deadline <= block.timestamp) revert SettlerIntentPastDeadline(intent.deadline, block.timestamp);\n bool isProposalPastDeadline = proposal.deadline <= block.timestamp;\n if (isProposalPastDeadline) revert SettlerProposalPastDeadline(proposal.deadline, block.timestamp);\n }\n\n if (intent.maxFees.length != proposal.fees.length) revert SettlerSolverFeeInvalidLength();\n for (uint256 i = 0; i < intent.maxFees.length; i++) {\n uint256 maxFee = intent.maxFees[i].amount;\n uint256 proposalFee = proposal.fees[i];\n if (proposalFee > maxFee) revert SettlerSolverFeeTooHigh(proposalFee, maxFee);\n }\n\n uint8 minValidations = IController(controller).minValidations();\n uint256 requiredValidations = intent.minValidations > minValidations ? intent.minValidations : minValidations;\n\n if (intent.validations.length < requiredValidations) {\n revert SettlerIntentValidationsNotEnough(requiredValidations, intent.validations.length);\n }\n\n address lastValidator = address(0);\n Validation memory validation = Validation(intentHash);\n bytes32 typedDataHash = _hashTypedDataV4(validation.hash());\n for (uint256 i = 0; i < intent.validations.length; i++) {\n address validator = ECDSA.recover(typedDataHash, intent.validations[i]);\n if (validator <= lastValidator) {\n revert SettlerValidatorDuplicatedOrUnsorted(lastValidator, validator);\n }\n lastValidator = validator;\n bool isValidatorNotAllowed = !IController(controller).isValidatorAllowed(validator);\n if (isValidatorNotAllowed) revert SettlerValidatorNotAllowed(validator);\n }\n\n address signer = ECDSA.recover(_hashTypedDataV4(proposal.hash(intent, _msgSender())), signature);\n bool isProposalSignerNotAllowed = !IController(controller).isProposalSignerAllowed(signer) && !simulated;\n if (isProposalSignerNotAllowed) revert SettlerProposalSignerNotAllowed(signer);\n }\n\n /**\n * @dev Validates a swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateSwapOperation(SwapOperation memory operation, SwapProposal memory proposal) internal view {\n if (proposal.amountsOut.length != operation.tokensOut.length) revert SettlerInvalidProposedAmounts();\n\n for (uint256 i = 0; i < operation.tokensOut.length; i++) {\n TokenOut memory tokenOut = operation.tokensOut[i];\n address recipient = tokenOut.recipient;\n if (recipient == address(this)) revert SettlerInvalidRecipient(recipient);\n\n uint256 minAmount = tokenOut.minAmount;\n uint256 proposedAmount = proposal.amountsOut[i];\n if (proposedAmount < minAmount) revert SettlerProposedAmountLtMinAmount(i, proposedAmount, minAmount);\n }\n }\n\n /**\n * @dev Validates a single-chain swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateSingleChainSwapOperation(SwapOperation memory operation, SwapProposal memory proposal)\n internal\n view\n {\n if (operation.sourceChain != operation.destinationChain) revert SettlerOperationChainsMismatch();\n if (operation.sourceChain != block.chainid) revert SettlerInvalidChain(block.chainid);\n _validateSwapOperation(operation, proposal);\n }\n\n /**\n * @dev Validates a transfer operation and its corresponding proposal\n * @param operation Transfer operation to be fulfilled\n * @param proposalData data of the proposal\n */\n function _validateTransferOperation(TransferOperation memory operation, bytes memory proposalData) internal view {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n for (uint256 i = 0; i < operation.transfers.length; i++) {\n address recipient = operation.transfers[i].recipient;\n if (recipient == address(this)) revert SettlerInvalidRecipient(recipient);\n }\n }\n\n /**\n * @dev Validates a call operation and its corresponding proposal\n * @param operation Call operation to be fulfilled\n * @param proposalData data of the proposal\n * @param user The originator of the operation\n */\n function _validateCallOperation(CallOperation memory operation, bytes memory proposalData, address user)\n internal\n view\n {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n if (!smartAccountsHandler.isSmartAccount(user)) revert SettlerUserNotSmartAccount(user);\n }\n\n /**\n * @dev Validates a dynamic call operation and its corresponding proposal\n * @param operation Dynamic call operation to be fulfilled\n * @param proposalData data of the proposal\n * @param user The originator of the operation\n */\n function _validateDynamicCallOperation(\n DynamicCallOperation memory operation,\n bytes memory proposalData,\n address user\n ) internal view {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n if (!smartAccountsHandler.isSmartAccount(user)) revert SettlerUserNotSmartAccount(user);\n }\n\n /**\n * @dev Validates a cross-chain swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateCrossChainSwapOperation(SwapOperation memory operation, SwapProposal memory proposal)\n internal\n view\n {\n if (operation.sourceChain == operation.destinationChain) revert SettlerOperationChainsMismatch();\n bool isChainInvalid = operation.sourceChain != block.chainid && operation.destinationChain != block.chainid;\n if (isChainInvalid) revert SettlerInvalidChain(block.chainid);\n _validateSwapOperation(operation, proposal);\n bool isExecutorInvalid = !IController(controller).isExecutorAllowed(proposal.executor);\n if (isExecutorInvalid) revert SettlerExecutorNotAllowed(proposal.executor);\n }\n\n /**\n * @dev Tells the contract balance for each token out of a swap operation\n * @param operation Swap operation containing the list of tokens out\n */\n function _getTokensOutBalance(SwapOperation memory operation) internal view returns (uint256[] memory balances) {\n balances = new uint256[](operation.tokensOut.length);\n if (operation.destinationChain == block.chainid) {\n for (uint256 i = 0; i < operation.tokensOut.length; i++) {\n balances[i] = ERC20Helpers.balanceOf(operation.tokensOut[i].token, address(this));\n }\n }\n }\n\n /**\n * @dev Tells if the intent and proposal deadlines should be validated\n In the case the intent is being executed on the destination chain of a cross-chain swap, the deadlines are ignored\n * @param intent Intent to be fulfilled\n */\n function _shouldValidateDeadlines(Intent memory intent) internal view returns (bool) {\n // Cross-chain operation can only be the first (and only) operation\n Operation memory operation = intent.operations[0];\n if (operation.opType != uint8(OpType.CrossChainSwap)) return true;\n SwapOperation memory swapIntent = abi.decode(operation.data, (SwapOperation));\n return swapIntent.sourceChain == block.chainid;\n }\n\n /**\n * @dev Emits operation custom events\n * @param operation Operation to emit the custom events for\n * @param proposal Proposal that fulfills the operation\n * @param intentHash Hash of the intent the operation belongs to\n * @param index Position of the operation on operations\n * @param output Encoded array of outputs\n */\n function _emitOperationEvents(\n Operation memory operation,\n Proposal memory proposal,\n bytes32 intentHash,\n uint256 index,\n bytes memory output\n ) internal {\n for (uint256 i = 0; i < operation.events.length; i++) {\n OperationEvent memory operationEvent = operation.events[i];\n emit OperationExecuted(\n operation.user,\n operationEvent.topic,\n uint8(operation.opType),\n operation,\n proposal,\n intentHash,\n index,\n output,\n operationEvent.data\n );\n }\n }\n\n /**\n * @dev Pays fees from the intent feePayer\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _payFees(Intent memory intent, Proposal memory proposal) internal {\n // A CrossChainSwap only pays fees on destination chain and must be the only operation\n if (intent.operations[0].opType == uint8(OpType.CrossChainSwap)) {\n SwapOperation memory swapOperation = abi.decode(intent.operations[0].data, (SwapOperation));\n if (swapOperation.sourceChain == block.chainid) return;\n }\n address from = intent.feePayer;\n address to = _msgSender();\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(from);\n for (uint256 i = 0; i < intent.maxFees.length; i++) {\n address token = intent.maxFees[i].token;\n if (!Denominations.isUSD(token)) _transferFrom(token, from, to, proposal.fees[i], isSmartAccount);\n }\n }\n\n /**\n * @dev Transfers tokens from one account to another\n * @param token Address of the token to transfer\n * @param from Address of the account sending the tokens\n * @param to Address of the account receiving the tokens\n * @param amount Amount of tokens to transfer\n * @param isSmartAccount Whether the sender is a smart account\n */\n function _transferFrom(address token, address from, address to, uint256 amount, bool isSmartAccount) internal {\n if (isSmartAccount) {\n smartAccountsHandler.transfer(from, token, to, amount);\n } else {\n IERC20(token).safeTransferFrom(from, to, amount);\n }\n }\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function _setSmartAccountsHandler(address newSmartAccountsHandler) internal {\n if (newSmartAccountsHandler == address(0)) revert SmartAccountsHandlerZero();\n smartAccountsHandler = newSmartAccountsHandler;\n emit SmartAccountsHandlerSet(newSmartAccountsHandler);\n }\n\n /**\n * @dev Sets the operations validator\n * @param newOperationsValidator New operations validator to be set\n */\n function _setOperationsValidator(address newOperationsValidator) internal {\n operationsValidator = newOperationsValidator;\n emit OperationsValidatorSet(newOperationsValidator);\n }\n\n /**\n * @dev Sets the dynamic call encoder\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function _setDynamicCallEncoder(address newDynamicCallEncoder) internal {\n if (newDynamicCallEncoder == address(0)) revert SettlerDynamicCallEncoderZero();\n dynamicCallEncoder = newDynamicCallEncoder;\n emit DynamicCallEncoderSet(newDynamicCallEncoder);\n }\n\n /**\n * @dev Sets a safeguard for a user\n * @param user Address of the user to set the safeguard for\n * @param safeguard Safeguard to be set\n */\n function _setSafeguard(address user, bytes memory safeguard) internal {\n delete _userSafeguard[user];\n _userSafeguard[user] = safeguard;\n emit SafeguardSet(user);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccount7702.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/Context.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccount.sol';\nimport '../utils/ERC20Helpers.sol';\nimport './SmartAccountBase.sol';\n\n/**\n * @title SmartAccount7702\n * @dev Provides the smart account logic to use with EIP7702\n */\ncontract SmartAccount7702 is SmartAccountBase {\n // Mimic settler reference\n // solhint-disable-next-line immutable-vars-naming\n address public immutable settler;\n\n /**\n * @dev The sender is not the settler\n */\n error SmartAccount7702SenderNotSettler();\n\n /**\n * @dev Reverts unless the sender is the settler\n */\n modifier onlySettler() {\n if (_msgSender() != settler) revert SmartAccount7702SenderNotSettler();\n _;\n }\n\n /**\n * @dev Creates a new SmartAccount7702 contract\n * @param _settler Address of the Mimic settler\n */\n constructor(address _settler) {\n settler = _settler;\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) public override onlySettler {\n super.transfer(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value) public override onlySettler returns (bytes memory) {\n // solhint-disable-next-line avoid-low-level-calls\n return super.call(target, data, value);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountBase.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/Context.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccount.sol';\nimport '../utils/ERC20Helpers.sol';\n\n/**\n * @title SmartAccountBase\n * @dev Provides the base logic for managing assets and executing arbitrary calls\n */\ncontract SmartAccountBase is ISmartAccount, Context, ERC165, ReentrancyGuard {\n /**\n * @dev Tells whether the contract supports the given interface ID. Overrides ERC165 to declare support for ISmartAccount interface.\n * @param interfaceId Interface ID is defined as the XOR of all function selectors in the interface\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {\n return interfaceId == type(ISmartAccount).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) public virtual override nonReentrant {\n ERC20Helpers.transfer(token, recipient, amount);\n emit Transferred(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value)\n public\n virtual\n override\n nonReentrant\n returns (bytes memory result)\n {\n result = Address.functionCallWithValue(target, data, value);\n emit Called(target, data, value, result);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountContract.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccountContract.sol';\nimport './SmartAccountBase.sol';\n\n/**\n * @title SmartAccountContract\n * @dev Provides the smart account logic to use as a standalone contract\n */\ncontract SmartAccountContract is ISmartAccountContract, Ownable, SmartAccountBase {\n // EIP1271 magic return value\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x1626ba7e;\n\n // EIP1271 invalid signature return value\n bytes4 internal constant EIP1271_INVALID_SIGNATURE = 0xffffffff;\n\n // List of account permissions\n mapping (address => bool) public isSignerAllowed;\n\n // Mimic settler reference\n address public settler;\n\n /**\n * @dev The settler is zero\n */\n error SmartAccountSettlerZero();\n\n /**\n * @dev The input arrays are not of equal length\n */\n error SmartAccountInputInvalidLength();\n\n /**\n * @dev The sender is not the owner or the settler\n */\n error SmartAccountUnauthorizedSender(address sender);\n\n /**\n * @dev Emitted every time the settler is set\n */\n event SettlerSet(address indexed settler);\n\n /**\n * @dev Emitted every time a signer allowance is set\n */\n event SignerAllowedSet(address indexed account, bool allowed);\n\n /**\n * @dev Reverts unless the sender is the owner or the settler\n */\n modifier onlyOwnerOrSettler() {\n address sender = _msgSender();\n bool isAuthorized = sender == owner() || sender == settler;\n if (!isAuthorized) revert SmartAccountUnauthorizedSender(sender);\n _;\n }\n\n /**\n * @dev Creates a new SmartAccount contract\n * @param _settler Address of the Mimic settler\n * @param _owner Address that will own the contract\n */\n constructor(address _settler, address _owner) Ownable(_owner) {\n _setSettler(_settler);\n }\n\n /**\n * @dev Tells whether the signature provided belongs to an allowed account.\n * @param hash Message signed by the account\n * @param signature Signature provided to be verified\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view override returns (bytes4) {\n (address signer, , ) = ECDSA.tryRecover(hash, signature);\n if (signer != address(0) && (signer == owner() || isSignerAllowed[signer])) return EIP1271_MAGIC_VALUE;\n return EIP1271_INVALID_SIGNATURE;\n }\n\n /**\n * @dev It allows receiving native token transfers\n */\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n /**\n * @dev Sets the settler. Sender must be the owner.\n * @param newSettler Address of the new settler to be set\n */\n function setSettler(address newSettler) external onlyOwner {\n _setSettler(newSettler);\n }\n\n /**\n * @dev Sets a list of allowed signers. Sender must be the owner.\n * @param accounts List of account addresses\n * @param allowances List of allowed condition per account\n */\n function setAllowedSigners(address[] memory accounts, bool[] memory allowances) external onlyOwner {\n if (accounts.length != allowances.length) revert SmartAccountInputInvalidLength();\n for (uint256 i = 0; i < accounts.length; i++) {\n address account = accounts[i];\n bool allowed = allowances[i];\n isSignerAllowed[account] = allowed;\n emit SignerAllowedSet(account, allowed);\n }\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the owner or the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount)\n public\n override(ISmartAccount, SmartAccountBase)\n onlyOwnerOrSettler\n {\n super.transfer(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the owner or the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value)\n public\n override(ISmartAccount, SmartAccountBase)\n onlyOwnerOrSettler\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n return super.call(target, data, value);\n }\n\n /**\n * @dev Sets the settler\n * @param newSettler Address of the new settler to be set\n */\n function _setSettler(address newSettler) internal {\n if (newSettler == address(0)) revert SmartAccountSettlerZero();\n settler = newSettler;\n emit SettlerSet(newSettler);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountsHandler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport '../interfaces/ISafe.sol';\nimport '../interfaces/ISmartAccount.sol';\nimport '../interfaces/ISmartAccountsHandler.sol';\nimport '../utils/Denominations.sol';\n\ncontract SmartAccountsHandler is ISmartAccountsHandler {\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address account) external view override returns (bool) {\n if (account.code.length == 0) return false;\n if (_isMimicSmartAccount(account)) return true;\n if (_isSafe(account)) return true;\n return false;\n }\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address account, address token, address to, uint256 amount) external override {\n if (_isMimicSmartAccount(account)) return ISmartAccount(account).transfer(token, to, amount);\n if (_isSafe(account)) return _transferSafe(account, token, to, amount);\n revert SmartAccountsHandlerUnsupportedAccount(account);\n }\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address account, address target, bytes memory data, uint256 value)\n external\n override\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n if (_isMimicSmartAccount(account)) return ISmartAccount(account).call(target, data, value);\n if (_isSafe(account)) return _callSafe(account, target, data, value);\n revert SmartAccountsHandlerUnsupportedAccount(account);\n }\n\n /**\n * @dev Performs a transfer from a safe\n */\n function _transferSafe(address account, address token, address to, uint256 amount) internal {\n Denominations.isNativeToken(token)\n ? _callSafe(account, to, new bytes(0), amount)\n : _callSafe(account, token, abi.encodeWithSelector(IERC20.transfer.selector, to, amount), 0);\n }\n\n /**\n * @dev Performs a call from a safe\n */\n function _callSafe(address account, address target, bytes memory data, uint256 value)\n internal\n returns (bytes memory)\n {\n (bool success, bytes memory result) = ISafe(account).execTransactionFromModuleReturnData(\n target,\n value,\n data,\n SafeOperation.Call\n );\n return\n data.length == 0\n ? Address.verifyCallResult(success, result)\n : Address.verifyCallResultFromTarget(target, success, result);\n }\n\n /**\n * @dev Tells whether an account is a Mimic smart account\n * @param account Address of the account being queried\n */\n function _isMimicSmartAccount(address account) internal view returns (bool) {\n try ISmartAccount(account).supportsInterface(type(ISmartAccount).interfaceId) returns (bool ok) {\n return ok;\n } catch {\n return false;\n }\n }\n\n /**\n * @dev Tells whether an account is a Gnosis Safe\n * @param account Address of the account being queried\n */\n function _isSafe(address account) internal view returns (bool) {\n try ISafe(account).getThreshold() returns (uint256) {\n return true;\n } catch {\n return false;\n }\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountsHandlerHelpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport '../interfaces/ISmartAccountsHandler.sol';\n\nlibrary SmartAccountsHandlerHelpers {\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address handler, address account) internal view returns (bool) {\n return ISmartAccountsHandler(handler).isSmartAccount(account);\n }\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address handler, address account, address token, address to, uint256 amount) internal {\n Address.functionDelegateCall(\n handler,\n abi.encodeWithSelector(ISmartAccountsHandler.transfer.selector, account, token, to, amount)\n );\n }\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address handler, address account, address target, bytes memory data, uint256 value)\n internal\n returns (bytes memory result)\n {\n result = Address.functionDelegateCall(\n handler,\n abi.encodeWithSelector(ISmartAccountsHandler.call.selector, account, target, data, value)\n );\n // Skip the ABI-encoded offset and length of the outer `bytes` to point at the inner payload\n assembly {\n result := add(result, 64)\n }\n }\n}\n" + }, + "project/contracts/test/CallMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\ncontract CallMock {\n event CallReceived(address indexed sender, uint256 value);\n error CallError();\n\n function call() external payable {\n emit CallReceived(msg.sender, msg.value);\n }\n\n function callError() external payable {\n revert CallError();\n }\n}\n" + }, + "project/contracts/test/dynamic-calls/StaticCallMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\ncontract StaticCallMock {\n struct StructMock {\n uint256 a;\n address b;\n }\n\n function returnUint(uint256 value) external pure returns (uint256) {\n return value;\n }\n\n function returnAddress(address value) external payable returns (address) {\n return value;\n }\n\n function returnArray(uint256[] calldata value) external pure returns (uint256[] memory) {\n return value;\n }\n\n function returnFixedArray(uint256[3] calldata value) external pure returns (uint256[3] memory) {\n return value;\n }\n\n function returnStruct(StructMock calldata value) external pure returns (StructMock memory) {\n return value;\n }\n}\n" + }, + "project/contracts/test/executors/EmptyExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\n\ncontract EmptyExecutorMock is IExecutor {\n event Executed();\n\n function execute(Operation memory, bytes32, bytes memory) external override {\n emit Executed();\n }\n}\n" + }, + "project/contracts/test/executors/MintExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../TokenMock.sol';\nimport '../../interfaces/IExecutor.sol';\n\n/* solhint-disable custom-errors */\n\ncontract MintExecutorMock is IExecutor {\n event Minted();\n\n function execute(Operation memory operation, bytes32, bytes memory proposalData) external override {\n require(\n operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap),\n 'Invalid operation type'\n );\n\n SwapProposal memory swapProposal = abi.decode(proposalData, (SwapProposal));\n (address[] memory tokens, uint256[] memory amounts) = abi.decode(swapProposal.data, (address[], uint256[]));\n\n require(tokens.length == amounts.length, 'Invalid inputs');\n\n for (uint256 i = 0; i < tokens.length; i++) {\n TokenMock(tokens[i]).mint(msg.sender, amounts[i]);\n emit Minted();\n }\n }\n}\n" + }, + "project/contracts/test/executors/ReentrantExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\nimport '../../interfaces/ISettler.sol';\n\ncontract ReentrantExecutorMock is IExecutor {\n // solhint-disable-next-line immutable-vars-naming\n address payable public immutable settler;\n\n constructor(address payable _settler) {\n settler = _settler;\n }\n\n function execute(Operation memory, bytes32, bytes memory) external override {\n Intent memory intent;\n Proposal memory proposal;\n ISettler(settler).execute(intent, proposal, new bytes(0));\n }\n}\n" + }, + "project/contracts/test/executors/TransferExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\nimport '../../utils/ERC20Helpers.sol';\n\n/* solhint-disable custom-errors */\n\ncontract TransferExecutorMock is IExecutor {\n event Transferred();\n\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n function execute(Operation memory operation, bytes32, bytes memory proposalData) external override {\n require(\n operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap),\n 'Invalid operation type'\n );\n\n SwapProposal memory swapProposal = abi.decode(proposalData, (SwapProposal));\n (address[] memory tokens, uint256[] memory amounts) = abi.decode(swapProposal.data, (address[], uint256[]));\n\n require(tokens.length == amounts.length, 'Invalid inputs');\n\n for (uint256 i = 0; i < tokens.length; i++) {\n ERC20Helpers.transfer(tokens[i], msg.sender, amounts[i]);\n emit Transferred();\n }\n }\n}\n" + }, + "project/contracts/test/SettlerV2Mock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../Settler.sol';\n\ncontract SettlerV2Mock is Settler {\n function someNewFunction() external pure returns (string memory) {\n return 'Some new function';\n }\n}\n" + }, + "project/contracts/test/smart-accounts/SafeMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/ISafe.sol';\n\ncontract SafeMock is ISafe {\n event ModuleTxExecuted(\n address indexed target,\n bytes data,\n uint256 value,\n SafeOperation operation,\n bool success,\n bytes result\n );\n\n receive() external payable {}\n\n function getThreshold() external pure returns (uint256) {\n return 1;\n }\n\n function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, SafeOperation operation)\n external\n returns (bool success, bytes memory result)\n {\n // solhint-disable-next-line avoid-low-level-calls\n (success, result) = to.call{ value: value }(data);\n emit ModuleTxExecuted(to, data, value, operation, success, result);\n }\n}\n" + }, + "project/contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../smart-accounts/SmartAccountsHandlerHelpers.sol';\n\ncontract SmartAccountsHandlerHelpersMock {\n using SmartAccountsHandlerHelpers for address;\n\n function call(address handler, address account, address target, bytes memory data, uint256 value)\n external\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n return handler.call(account, target, data, value);\n }\n}\n" + }, + "project/contracts/test/TokenMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\n\ncontract TokenMock is ERC20 {\n uint8 internal _decimals;\n\n constructor(string memory symbol, uint8 dec) ERC20(symbol, symbol) {\n _decimals = dec;\n }\n\n function mint(address account, uint256 amount) external {\n _mint(account, amount);\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n}\n" + }, + "project/contracts/test/utils/BytesHelpersMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.24;\n\nimport '../../utils/BytesHelpers.sol';\n\ncontract BytesHelpersMock {\n using BytesHelpers for bytes;\n\n function readWord0(bytes memory data) external pure returns (uint256) {\n return data.readWord0();\n }\n\n function readWord1(bytes memory data) external pure returns (uint256) {\n return data.readWord1();\n }\n\n function slice(bytes memory data, uint256 start, uint256 end) external pure returns (bytes memory) {\n return data.slice(start, end);\n }\n\n function sliceFrom(bytes memory data, uint256 start) external pure returns (bytes memory) {\n return data.sliceFrom(start);\n }\n}\n" + }, + "project/contracts/test/utils/DenominationsMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../../utils/Denominations.sol';\n\n// solhint-disable func-name-mixedcase\n\ncontract DenominationsMock {\n function NATIVE_TOKEN() external pure returns (address) {\n return Denominations.NATIVE_TOKEN;\n }\n\n function USD() external pure returns (address) {\n return Denominations.USD;\n }\n}\n" + }, + "project/contracts/test/utils/ERC20HelpersMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../../utils/ERC20Helpers.sol';\n\ncontract ERC20HelpersMock {\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n function approve(address token, address to, uint256 amount) external {\n ERC20Helpers.approve(token, to, amount);\n }\n\n function transfer(address token, address to, uint256 amount) external {\n ERC20Helpers.transfer(token, to, amount);\n }\n\n function balanceOf(address token, address account) external view returns (uint256) {\n return ERC20Helpers.balanceOf(token, account);\n }\n}\n" + }, + "project/contracts/utils/BytesHelpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.24;\n\n/**\n * @title BytesHelpers\n * @dev Collection of low-level helpers to operate on `bytes` values in memory.\n */\nlibrary BytesHelpers {\n /**\n * @dev Thrown when a slice operation exceeds the bounds of the input bytes\n */\n error BytesLibSliceOutOfBounds();\n\n /**\n * @dev Reads the first 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @return result First ABI word of `data`\n */\n function readWord0(bytes memory data) internal pure returns (uint256) {\n return readWord(data, 0);\n }\n\n /**\n * @dev Reads the second 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @return result Second ABI word of `data`\n */\n function readWord1(bytes memory data) internal pure returns (uint256) {\n return readWord(data, 1);\n }\n\n /**\n * @dev Reads the N-th 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @param index Word index to read (0-based)\n * @return result N-th ABI word of `data`\n */\n function readWord(bytes memory data, uint256 index) private pure returns (uint256 result) {\n assembly {\n result := mload(add(data, add(32, mul(index, 32))))\n }\n }\n\n /**\n * @dev Returns a slice of a bytes array from `start` (inclusive) to `end` (exclusive)\n * @param data Bytes array to slice\n * @param start Starting byte index (inclusive)\n * @param end Ending byte index (exclusive)\n */\n function slice(bytes memory data, uint256 start, uint256 end) internal pure returns (bytes memory out) {\n if (end < start) revert BytesLibSliceOutOfBounds();\n if (end > data.length) revert BytesLibSliceOutOfBounds();\n\n uint256 len = end - start;\n out = new bytes(len);\n\n assembly {\n let src := add(add(data, 32), start)\n let dst := add(out, 32)\n mcopy(dst, src, len)\n }\n }\n\n /**\n * @dev Returns a slice of a bytes array starting at `start` until the end\n * @param data Bytes array to slice\n * @param start Starting byte index (inclusive)\n */\n function sliceFrom(bytes memory data, uint256 start) internal pure returns (bytes memory out) {\n return slice(data, start, data.length);\n }\n}\n" + }, + "project/contracts/utils/Denominations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @title Denominations\n * @dev Provides a list of ground denominations for those tokens that cannot be represented by an ERC20.\n * For now, the only needed is the native token that could be ETH, MATIC, or other depending on the layer being operated.\n */\nlibrary Denominations {\n address internal constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n // Fiat currencies follow https://en.wikipedia.org/wiki/ISO_4217\n address internal constant USD = address(840);\n\n function isUSD(address token) internal pure returns (bool) {\n return token == USD;\n }\n\n function isNativeToken(address token) internal pure returns (bool) {\n return token == NATIVE_TOKEN;\n }\n}\n" + }, + "project/contracts/utils/ERC20Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport './Denominations.sol';\n\n/**\n * @title ERC20Helpers\n * @dev Provides a list of ERC20 helper methods\n */\nlibrary ERC20Helpers {\n function approve(address token, address to, uint256 amount) internal {\n SafeERC20.forceApprove(IERC20(token), to, amount);\n }\n\n function transfer(address token, address to, uint256 amount) internal {\n if (Denominations.isNativeToken(token)) Address.sendValue(payable(to), amount);\n else SafeERC20.safeTransfer(IERC20(token), to, amount);\n }\n\n function balanceOf(address token, address account) internal view returns (uint256) {\n if (Denominations.isNativeToken(token)) return address(account).balance;\n else return IERC20(token).balanceOf(address(account));\n }\n}\n" + }, + "project/contracts/utils/MimicHelper.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @title Mimic Helper\n * @dev Collection of helper functions for the Mimic Protocol\n */\ncontract MimicHelper {\n // Custom byte storage per user and key\n mapping (address => mapping (string => bytes)) internal _customStorage;\n\n /**\n * @dev Emitted every time the storage is set\n */\n event StorageSet(address indexed user, string indexed key, bytes indexed data);\n\n /**\n * @dev Tells the native token balance of an address\n * @param target Address to get native token balance\n */\n function getNativeTokenBalance(address target) external view returns (uint256) {\n return target.balance;\n }\n\n /**\n * @dev Tells the code of an address\n * @param target Address to get code\n */\n function getCode(address target) external view returns (bytes memory) {\n return target.code;\n }\n\n /**\n * @dev Tells the data set for the user and the key\n * @param user Address of the user being queried\n * @param key String of the key being queried\n */\n function getStorage(address user, string calldata key) external view returns (bytes memory) {\n return _customStorage[user][key];\n }\n\n /**\n * @dev Sets a data for the user and a key\n * @param key String of the key to set the data for\n * @param data Bytes to be set\n */\n function setStorage(string calldata key, bytes memory data) external {\n _customStorage[msg.sender][key] = data;\n emit StorageSet(msg.sender, key, data);\n }\n}\n" + } + } + } +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-56/deployed_addresses.json b/packages/evm/ignition/deployments/chain-56/deployed_addresses.json index c18d8fb..c9347ec 100644 --- a/packages/evm/ignition/deployments/chain-56/deployed_addresses.json +++ b/packages/evm/ignition/deployments/chain-56/deployed_addresses.json @@ -10,5 +10,9 @@ "Create3DynamicCallEncoder#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", "Create3DynamicCallEncoder#DynamicCallEncoder": "0xb3F0F65FA3f94890B7a5Bd17843a6fdfB9407dbD", "Create3Proxy#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", - "Create3Proxy#Proxy": "0x8be430d29a2c5692f9345a28506b849C6a99eDaA" + "Create3Proxy#Proxy": "0x8be430d29a2c5692f9345a28506b849C6a99eDaA", + "Create3DynamicCallEncoderV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", + "Create3DynamicCallEncoderV1#DynamicCallEncoder": "0x183E61BDE23a80f4D1e003653288d4B4551681ed", + "Create3SettlerV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", + "Create3SettlerV1#Settler": "0x3734D7284f46037688252b13ef6d88E3FFDF5e1B" } \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-56/journal.jsonl b/packages/evm/ignition/deployments/chain-56/journal.jsonl index 91d2d03..1599066 100644 --- a/packages/evm/ignition/deployments/chain-56/journal.jsonl +++ b/packages/evm/ignition/deployments/chain-56/journal.jsonl @@ -75,4 +75,22 @@ {"futureId":"Create3SmartAccount7702#ICreateX.deployCreate3","hash":"0x58abeff2ad97df82206ceeff2604b916057381674a03ab75be3348dea90ca693","networkInteractionId":1,"receipt":{"blockHash":"0xfe84dc35194c5c0f3ef5c21464c3af07e4f06e1e2d52817a9f4dc0a0dead88b8","blockNumber":95571398,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":261,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x000000000000000000000000b800ea953426e361efda80da69765895ab3b04da","0x4d548e60a06ca5826dcab93682802743ae2369c7da6162da7a3f4201826a6d33"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":262,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x00000000000000000000000014ae3c251881d2214e376bfa38dd98a4bd33550c"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} {"futureId":"Create3SmartAccount7702#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} {"artifactId":"Create3SmartAccount7702#ICreateX","dependencies":["Create3SmartAccount7702#ICreateX.deployCreate3","Create3SmartAccount7702#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","strategy":"basic","strategyConfig":{},"txToReadFrom":"0x58abeff2ad97df82206ceeff2604b916057381674a03ab75be3348dea90ca693","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} -{"artifactId":"Create3SmartAccount7702#SmartAccount7702","contractAddress":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","contractName":"SmartAccount7702","dependencies":["Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SmartAccount7702#SmartAccount7702","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} \ No newline at end of file +{"artifactId":"Create3SmartAccount7702#SmartAccount7702","contractAddress":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","contractName":"SmartAccount7702","dependencies":["Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SmartAccount7702#SmartAccount7702","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3DynamicCallEncoderV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","contractName":"ICreateX","dependencies":[],"futureId":"Create3DynamicCallEncoderV1#ICreateX","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"args":["0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b000000000000000004302606","0x6080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033"],"artifactId":"Create3DynamicCallEncoderV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","dependencies":["Create3DynamicCallEncoderV1#ICreateX"],"from":"0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b","functionName":"deployCreate3","futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","strategy":"basic","strategyConfig":{},"type":"CALL_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000c586080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c00330000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":16,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":16,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"50000000"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"50000000"}},"hash":"0x2cfe385bd99298f25810d2b4af8431a6d5a55aa94cae19e6f7fd839eadea74bf"},"type":"TRANSACTION_SEND"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","hash":"0x2cfe385bd99298f25810d2b4af8431a6d5a55aa94cae19e6f7fd839eadea74bf","networkInteractionId":1,"receipt":{"blockHash":"0x4532bdd2a18f241b5d5701bc175c01343a06a57d010483d182248b4e19c8122c","blockNumber":95598862,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":104,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x0000000000000000000000001d9bd3390aaef5bbcf3beb4f60e0ee28805f6779","0xa13cc826172bbf7683ce89033f741800ae55529a93ee495908820a8471d913b0"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":105,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x000000000000000000000000183e61bde23a80f4d1e003653288d4b4551681ed"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} +{"artifactId":"Create3DynamicCallEncoderV1#ICreateX","dependencies":["Create3DynamicCallEncoderV1#ICreateX.deployCreate3","Create3DynamicCallEncoderV1#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3DynamicCallEncoderV1#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x183E61BDE23a80f4D1e003653288d4B4551681ed","strategy":"basic","strategyConfig":{},"txToReadFrom":"0x2cfe385bd99298f25810d2b4af8431a6d5a55aa94cae19e6f7fd839eadea74bf","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","contractAddress":"0x183E61BDE23a80f4D1e003653288d4B4551681ed","contractName":"DynamicCallEncoder","dependencies":["Create3DynamicCallEncoderV1#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","contractName":"ICreateX","dependencies":[],"futureId":"Create3SettlerV1#ICreateX","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"args":["0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b000000000000000004302605","0x6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033"],"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","dependencies":["Create3SettlerV1#ICreateX"],"from":"0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b","functionName":"deployCreate3","futureId":"Create3SettlerV1#ICreateX.deployCreate3","strategy":"basic","strategyConfig":{},"type":"CALL_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000005d166080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c003300000000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":18,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":18,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"50000000"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"50000000"}},"hash":"0x916dea5d8fa813296f811cdce1614d59e43a00345e4df8139f13ac5fb8fc9880"},"type":"TRANSACTION_SEND"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","hash":"0x916dea5d8fa813296f811cdce1614d59e43a00345e4df8139f13ac5fb8fc9880","networkInteractionId":1,"receipt":{"blockHash":"0x300343a27a7199bcce8b2bbc52a801a82e9ea1e73d149a848fc4ce7870b57c3e","blockNumber":95599357,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":91,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x000000000000000000000000b5439ac30ce4daeb02b265d758436e65087047ab","0x660e7900ab9b67f261d92573714530e140aa4f3b2855e1dd677cfa672309b2ee"]},{"address":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","data":"0x000000000000000000000000000000000000000000000000ffffffffffffffff","logIndex":92,"topics":["0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":93,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x0000000000000000000000003734d7284f46037688252b13ef6d88e3ffdf5e1b"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} +{"artifactId":"Create3SettlerV1#ICreateX","dependencies":["Create3SettlerV1#ICreateX.deployCreate3","Create3SettlerV1#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3SettlerV1#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","strategy":"basic","strategyConfig":{},"txToReadFrom":"0x916dea5d8fa813296f811cdce1614d59e43a00345e4df8139f13ac5fb8fc9880","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3SettlerV1#Settler","contractAddress":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","contractName":"Settler","dependencies":["Create3SettlerV1#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SettlerV1#Settler","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-8453/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json b/packages/evm/ignition/deployments/chain-8453/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-8453/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-8453/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json b/packages/evm/ignition/deployments/chain-8453/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json new file mode 100644 index 0000000..aa424ed --- /dev/null +++ b/packages/evm/ignition/deployments/chain-8453/artifacts/Create3DynamicCallEncoderV1#DynamicCallEncoder.json @@ -0,0 +1,117 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "DynamicCallEncoder", + "sourceName": "contracts/dynamic-calls/DynamicCallEncoder.sol", + "abi": [ + { + "inputs": [], + "name": "BytesLibSliceOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderBadLength", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderEmptyDynamic", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderInvalidArgKind", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariableOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariableRefBadLength", + "type": "error" + }, + { + "inputs": [], + "name": "DynamicCallEncoderVariablesLengthOutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum DynamicArgKind", + "name": "kind", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "isDynamic", + "type": "bool" + } + ], + "internalType": "struct DynamicArg[]", + "name": "arguments", + "type": "tuple[]" + } + ], + "internalType": "struct DynamicCall", + "name": "dynamicCall", + "type": "tuple" + }, + { + "internalType": "bytes[][]", + "name": "variables", + "type": "bytes[][]" + }, + { + "internalType": "uint256", + "name": "variablesLength", + "type": "uint256" + } + ], + "name": "encode", + "outputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/dynamic-calls/DynamicCallEncoder.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-8453/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json b/packages/evm/ignition/deployments/chain-8453/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-8453/artifacts/Create3DynamicCallEncoderV1#ICreateX.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-8453/artifacts/Create3DynamicCallEncoderV1#ICreateX.json b/packages/evm/ignition/deployments/chain-8453/artifacts/Create3DynamicCallEncoderV1#ICreateX.json new file mode 100644 index 0000000..837192d --- /dev/null +++ b/packages/evm/ignition/deployments/chain-8453/artifacts/Create3DynamicCallEncoderV1#ICreateX.json @@ -0,0 +1,51 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "ICreateX", + "sourceName": "contracts/interfaces/ICreateX.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "name": "ContractCreation", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + } + ], + "name": "deployCreate3", + "outputs": [ + { + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/interfaces/ICreateX.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-8453/artifacts/Create3SettlerV1#ICreateX.dbg.json b/packages/evm/ignition/deployments/chain-8453/artifacts/Create3SettlerV1#ICreateX.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-8453/artifacts/Create3SettlerV1#ICreateX.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-8453/artifacts/Create3SettlerV1#ICreateX.json b/packages/evm/ignition/deployments/chain-8453/artifacts/Create3SettlerV1#ICreateX.json new file mode 100644 index 0000000..837192d --- /dev/null +++ b/packages/evm/ignition/deployments/chain-8453/artifacts/Create3SettlerV1#ICreateX.json @@ -0,0 +1,51 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "ICreateX", + "sourceName": "contracts/interfaces/ICreateX.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "name": "ContractCreation", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + } + ], + "name": "deployCreate3", + "outputs": [ + { + "internalType": "address", + "name": "newContract", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/interfaces/ICreateX.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-8453/artifacts/Create3SettlerV1#Settler.dbg.json b/packages/evm/ignition/deployments/chain-8453/artifacts/Create3SettlerV1#Settler.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-8453/artifacts/Create3SettlerV1#Settler.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-8453/artifacts/Create3SettlerV1#Settler.json b/packages/evm/ignition/deployments/chain-8453/artifacts/Create3SettlerV1#Settler.json new file mode 100644 index 0000000..cd9fdca --- /dev/null +++ b/packages/evm/ignition/deployments/chain-8453/artifacts/Create3SettlerV1#Settler.json @@ -0,0 +1,1481 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "Settler", + "sourceName": "contracts/Settler.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposed", + "type": "uint256" + } + ], + "name": "SettlerAmountOutLtProposed", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerCrossChainSwapMustBeOnlyOperation", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerDynamicCallEncoderZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "executor", + "type": "address" + } + ], + "name": "SettlerExecutorNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "SettlerIntentAlreadyExecuted", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerIntentOperationsEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SettlerIntentPastDeadline", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "current", + "type": "uint256" + } + ], + "name": "SettlerIntentValidationsNotEnough", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "name": "SettlerInvalidChain", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerInvalidProposedAmounts", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "SettlerInvalidRecipient", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "settler", + "type": "address" + } + ], + "name": "SettlerInvalidSettler", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerNonceZero", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerOperationChainsMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "post", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pre", + "type": "uint256" + } + ], + "name": "SettlerPostBalanceOutLtPre", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerProposalDataInvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerProposalDataNotEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SettlerProposalPastDeadline", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + } + ], + "name": "SettlerProposalSignerNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minAmount", + "type": "uint256" + } + ], + "name": "SettlerProposedAmountLtMinAmount", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerRescueFundsRecipientZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gasUsed", + "type": "uint256" + } + ], + "name": "SettlerSimulationSuccess", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerSolverFeeInvalidLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "SettlerSolverFeeTooHigh", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "solver", + "type": "address" + } + ], + "name": "SettlerSolverNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "lengthRequested", + "type": "uint256" + } + ], + "name": "SettlerTooManySafeguards", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + } + ], + "name": "SettlerUnknownOperationType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "SettlerUserNotSmartAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "previous", + "type": "address" + }, + { + "internalType": "address", + "name": "current", + "type": "address" + } + ], + "name": "SettlerValidatorDuplicatedOrUnsorted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "validator", + "type": "address" + } + ], + "name": "SettlerValidatorNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "SmartAccountsHandlerZero", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dynamicCallEncoder", + "type": "address" + } + ], + "name": "DynamicCallEncoderSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "FundsRescued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "indexed": false, + "internalType": "struct Operation", + "name": "operation", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "indexed": false, + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "intentHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "output", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "OperationExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operationsValidator", + "type": "address" + } + ], + "name": "OperationsValidatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "proposal", + "type": "bytes32" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "SafeguardSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "smartAccountsHandler", + "type": "address" + } + ], + "name": "SmartAccountsHandlerSet", + "type": "event" + }, + { + "inputs": [], + "name": "controller", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dynamicCallEncoder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "getIntentBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + } + ], + "name": "getIntentHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "internalType": "address", + "name": "solver", + "type": "address" + } + ], + "name": "getProposalHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getUserSafeguard", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controller", + "type": "address" + }, + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_dynamicCallEncoder", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "operationsValidator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "rescueFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newDynamicCallEncoder", + "type": "address" + } + ], + "name": "setDynamicCallEncoder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOperationsValidator", + "type": "address" + } + ], + "name": "setOperationsValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "safeguard", + "type": "bytes" + } + ], + "name": "setSafeguard", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newSmartAccountsHandler", + "type": "address" + } + ], + "name": "setSmartAccountsHandler", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "simulate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "smartAccountsHandler", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033", + "deployedBytecode": "0x60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/Settler.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-8453/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json b/packages/evm/ignition/deployments/chain-8453/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json new file mode 100644 index 0000000..dc33803 --- /dev/null +++ b/packages/evm/ignition/deployments/chain-8453/build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json @@ -0,0 +1,373 @@ +{ + "_format": "hh3-sol-build-info-1", + "id": "167571dafa48e7ff636310c6c9f0fc8e202e44bc", + "solcVersion": "0.8.28", + "solcLongVersion": "0.8.28+commit.7893614a", + "userSourceNameMap": { + "contracts/Controller.sol": "project/contracts/Controller.sol", + "contracts/Intents.sol": "project/contracts/Intents.sol", + "contracts/Settler.sol": "project/contracts/Settler.sol", + "contracts/dynamic-calls/DynamicCallEncoder.sol": "project/contracts/dynamic-calls/DynamicCallEncoder.sol", + "contracts/dynamic-calls/DynamicCallTypes.sol": "project/contracts/dynamic-calls/DynamicCallTypes.sol", + "contracts/interfaces/IController.sol": "project/contracts/interfaces/IController.sol", + "contracts/interfaces/ICreateX.sol": "project/contracts/interfaces/ICreateX.sol", + "contracts/interfaces/IDynamicCallEncoder.sol": "project/contracts/interfaces/IDynamicCallEncoder.sol", + "contracts/interfaces/IExecutor.sol": "project/contracts/interfaces/IExecutor.sol", + "contracts/interfaces/IOperationsValidator.sol": "project/contracts/interfaces/IOperationsValidator.sol", + "contracts/interfaces/IPaymentsReceiver.sol": "project/contracts/interfaces/IPaymentsReceiver.sol", + "contracts/interfaces/ISafe.sol": "project/contracts/interfaces/ISafe.sol", + "contracts/interfaces/ISettler.sol": "project/contracts/interfaces/ISettler.sol", + "contracts/interfaces/ISmartAccount.sol": "project/contracts/interfaces/ISmartAccount.sol", + "contracts/interfaces/ISmartAccountContract.sol": "project/contracts/interfaces/ISmartAccountContract.sol", + "contracts/interfaces/ISmartAccountsHandler.sol": "project/contracts/interfaces/ISmartAccountsHandler.sol", + "contracts/payments/PaymentsReceiver.sol": "project/contracts/payments/PaymentsReceiver.sol", + "contracts/proxy/Proxy.sol": "project/contracts/proxy/Proxy.sol", + "contracts/safeguards/BaseOperationsValidator.sol": "project/contracts/safeguards/BaseOperationsValidator.sol", + "contracts/safeguards/CallOperationsValidator.sol": "project/contracts/safeguards/CallOperationsValidator.sol", + "contracts/safeguards/DynamicCallOperationsValidator.sol": "project/contracts/safeguards/DynamicCallOperationsValidator.sol", + "contracts/safeguards/OperationsValidator.sol": "project/contracts/safeguards/OperationsValidator.sol", + "contracts/safeguards/Safeguards.sol": "project/contracts/safeguards/Safeguards.sol", + "contracts/safeguards/SwapOperationsValidator.sol": "project/contracts/safeguards/SwapOperationsValidator.sol", + "contracts/safeguards/TransferOperationsValidator.sol": "project/contracts/safeguards/TransferOperationsValidator.sol", + "contracts/smart-accounts/SmartAccount7702.sol": "project/contracts/smart-accounts/SmartAccount7702.sol", + "contracts/smart-accounts/SmartAccountBase.sol": "project/contracts/smart-accounts/SmartAccountBase.sol", + "contracts/smart-accounts/SmartAccountContract.sol": "project/contracts/smart-accounts/SmartAccountContract.sol", + "contracts/smart-accounts/SmartAccountsHandler.sol": "project/contracts/smart-accounts/SmartAccountsHandler.sol", + "contracts/smart-accounts/SmartAccountsHandlerHelpers.sol": "project/contracts/smart-accounts/SmartAccountsHandlerHelpers.sol", + "contracts/test/CallMock.sol": "project/contracts/test/CallMock.sol", + "contracts/test/SettlerV2Mock.sol": "project/contracts/test/SettlerV2Mock.sol", + "contracts/test/TokenMock.sol": "project/contracts/test/TokenMock.sol", + "contracts/test/dynamic-calls/StaticCallMock.sol": "project/contracts/test/dynamic-calls/StaticCallMock.sol", + "contracts/test/executors/EmptyExecutorMock.sol": "project/contracts/test/executors/EmptyExecutorMock.sol", + "contracts/test/executors/MintExecutorMock.sol": "project/contracts/test/executors/MintExecutorMock.sol", + "contracts/test/executors/ReentrantExecutorMock.sol": "project/contracts/test/executors/ReentrantExecutorMock.sol", + "contracts/test/executors/TransferExecutorMock.sol": "project/contracts/test/executors/TransferExecutorMock.sol", + "contracts/test/smart-accounts/SafeMock.sol": "project/contracts/test/smart-accounts/SafeMock.sol", + "contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol": "project/contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol", + "contracts/test/utils/BytesHelpersMock.sol": "project/contracts/test/utils/BytesHelpersMock.sol", + "contracts/test/utils/DenominationsMock.sol": "project/contracts/test/utils/DenominationsMock.sol", + "contracts/test/utils/ERC20HelpersMock.sol": "project/contracts/test/utils/ERC20HelpersMock.sol", + "contracts/utils/BytesHelpers.sol": "project/contracts/utils/BytesHelpers.sol", + "contracts/utils/Denominations.sol": "project/contracts/utils/Denominations.sol", + "contracts/utils/ERC20Helpers.sol": "project/contracts/utils/ERC20Helpers.sol", + "contracts/utils/MimicHelper.sol": "project/contracts/utils/MimicHelper.sol", + "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol": "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/ProxyAdmin.sol" + }, + "input": { + "language": "Solidity", + "settings": { + "optimizer": { + "enabled": true, + "runs": 1000 + }, + "evmVersion": "cancun", + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "remappings": [ + "npm/@openzeppelin/contracts-upgradeable@5.3.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "npm/@openzeppelin/contracts-upgradeable@5.3.0/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/", + "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.3.0/" + ] + }, + "sources": { + "npm/@openzeppelin/contracts-upgradeable@5.3.0/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\n struct OwnableStorage {\n address _owner;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Ownable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\n\n function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\n assembly {\n $.slot := OwnableStorageLocation\n }\n }\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n function __Ownable_init(address initialOwner) internal onlyInitializing {\n __Ownable_init_unchained(initialOwner);\n }\n\n function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n OwnableStorage storage $ = _getOwnableStorage();\n return $._owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n OwnableStorage storage $ = _getOwnableStorage();\n address oldOwner = $._owner;\n $._owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Storage of the initializable contract.\n *\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\n * when using with upgradeable contracts.\n *\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\n */\n struct InitializableStorage {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n uint64 _initialized;\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool _initializing;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Initializable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\n\n /**\n * @dev The contract is already initialized.\n */\n error InvalidInitialization();\n\n /**\n * @dev The contract is not initializing.\n */\n error NotInitializing();\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint64 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\n * production.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n // Cache values to avoid duplicated sloads\n bool isTopLevelCall = !$._initializing;\n uint64 initialized = $._initialized;\n\n // Allowed calls:\n // - initialSetup: the contract is not in the initializing state and no previous version was\n // initialized\n // - construction: the contract is initialized at version 1 (no reinitialization) and the\n // current contract is just being deployed\n bool initialSetup = initialized == 0 && isTopLevelCall;\n bool construction = initialized == 1 && address(this).code.length == 0;\n\n if (!initialSetup && !construction) {\n revert InvalidInitialization();\n }\n $._initialized = 1;\n if (isTopLevelCall) {\n $._initializing = true;\n }\n _;\n if (isTopLevelCall) {\n $._initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint64 version) {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing || $._initialized >= version) {\n revert InvalidInitialization();\n }\n $._initialized = version;\n $._initializing = true;\n _;\n $._initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n _checkInitializing();\n _;\n }\n\n /**\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\n */\n function _checkInitializing() internal view virtual {\n if (!_isInitializing()) {\n revert NotInitializing();\n }\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing) {\n revert InvalidInitialization();\n }\n if ($._initialized != type(uint64).max) {\n $._initialized = type(uint64).max;\n emit Initialized(type(uint64).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint64) {\n return _getInitializableStorage()._initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _getInitializableStorage()._initializing;\n }\n\n /**\n * @dev Pointer to storage slot. Allows integrators to override it with a custom storage location.\n *\n * NOTE: Consider following the ERC-7201 formula to derive storage locations.\n */\n function _initializableStorageSlot() internal pure virtual returns (bytes32) {\n return INITIALIZABLE_STORAGE;\n }\n\n /**\n * @dev Returns a pointer to the storage namespace.\n */\n // solhint-disable-next-line var-name-mixedcase\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\n bytes32 slot = _initializableStorageSlot();\n assembly {\n $.slot := slot\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/cryptography/EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.20;\n\nimport {MessageHashUtils} from \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\nimport {IERC5267} from \"@openzeppelin/contracts/interfaces/IERC5267.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose\n * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract\n * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to\n * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\n * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\n */\nabstract contract EIP712Upgradeable is Initializable, IERC5267 {\n bytes32 private constant TYPE_HASH =\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /// @custom:storage-location erc7201:openzeppelin.storage.EIP712\n struct EIP712Storage {\n /// @custom:oz-renamed-from _HASHED_NAME\n bytes32 _hashedName;\n /// @custom:oz-renamed-from _HASHED_VERSION\n bytes32 _hashedVersion;\n\n string _name;\n string _version;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.EIP712\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant EIP712StorageLocation = 0xa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100;\n\n function _getEIP712Storage() private pure returns (EIP712Storage storage $) {\n assembly {\n $.slot := EIP712StorageLocation\n }\n }\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n __EIP712_init_unchained(name, version);\n }\n\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n EIP712Storage storage $ = _getEIP712Storage();\n $._name = name;\n $._version = version;\n\n // Reset prior values in storage if upgrading\n $._hashedName = 0;\n $._hashedVersion = 0;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n return _buildDomainSeparator();\n }\n\n function _buildDomainSeparator() private view returns (bytes32) {\n return keccak256(abi.encode(TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n\n /**\n * @inheritdoc IERC5267\n */\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n EIP712Storage storage $ = _getEIP712Storage();\n // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized\n // and the EIP712 domain is not reliable, as it will be missing name and version.\n require($._hashedName == 0 && $._hashedVersion == 0, \"EIP712: Uninitialized\");\n\n return (\n hex\"0f\", // 01111\n _EIP712Name(),\n _EIP712Version(),\n block.chainid,\n address(this),\n bytes32(0),\n new uint256[](0)\n );\n }\n\n /**\n * @dev The name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712Name() internal view virtual returns (string memory) {\n EIP712Storage storage $ = _getEIP712Storage();\n return $._name;\n }\n\n /**\n * @dev The version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712Version() internal view virtual returns (string memory) {\n EIP712Storage storage $ = _getEIP712Storage();\n return $._version;\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead.\n */\n function _EIP712NameHash() internal view returns (bytes32) {\n EIP712Storage storage $ = _getEIP712Storage();\n string memory name = _EIP712Name();\n if (bytes(name).length > 0) {\n return keccak256(bytes(name));\n } else {\n // If the name is empty, the contract may have been upgraded without initializing the new storage.\n // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design.\n bytes32 hashedName = $._hashedName;\n if (hashedName != 0) {\n return hashedName;\n } else {\n return keccak256(\"\");\n }\n }\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead.\n */\n function _EIP712VersionHash() internal view returns (bytes32) {\n EIP712Storage storage $ = _getEIP712Storage();\n string memory version = _EIP712Version();\n if (bytes(version).length > 0) {\n return keccak256(bytes(version));\n } else {\n // If the version is empty, the contract may have been upgraded without initializing the new storage.\n // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design.\n bytes32 hashedVersion = $._hashedVersion;\n if (hashedVersion != 0) {\n return hashedVersion;\n } else {\n return keccak256(\"\");\n }\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts-upgradeable@5.3.0/utils/ReentrancyGuardUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\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 EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\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 ReentrancyGuardUpgradeable is Initializable {\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 /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard\n struct ReentrancyGuardStorage {\n uint256 _status;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.ReentrancyGuard\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;\n\n function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) {\n assembly {\n $.slot := ReentrancyGuardStorageLocation\n }\n }\n\n /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\n\n function __ReentrancyGuard_init() internal onlyInitializing {\n __ReentrancyGuard_init_unchained();\n }\n\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\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 ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n // On the first call to nonReentrant, _status will be NOT_ENTERED\n if ($._status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n $._status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\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 ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n return $._status == ENTERED;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC-20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC-721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC-1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n */\ninterface IERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with `hash`\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1363.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n /*\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n * 0xb0202a11 ===\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n */\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @param data Additional data with no specified format, sent in call to `spender`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC1967.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1967.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n */\ninterface IERC1967 {\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Emitted when the beacon is changed.\n */\n event BeaconUpgraded(address indexed beacon);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n" + }, + "npm/@openzeppelin/contracts@5.3.0/interfaces/IERC5267.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)\n\npragma solidity ^0.8.20;\n\ninterface IERC5267 {\n /**\n * @dev MAY be emitted to signal that the domain could have changed.\n */\n event EIP712DomainChanged();\n\n /**\n * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\n * signature.\n */\n function eip712Domain()\n external\n view\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n );\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {UpgradeableBeacon} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.22;\n\nimport {Proxy} from \"../Proxy.sol\";\nimport {ERC1967Utils} from \"./ERC1967Utils.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `implementation`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `implementation`. This will typically be an\n * encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.\n *\n * Requirements:\n *\n * - If `data` is empty, `msg.value` must be zero.\n */\n constructor(address implementation, bytes memory _data) payable {\n ERC1967Utils.upgradeToAndCall(implementation, _data);\n }\n\n /**\n * @dev Returns the current implementation address.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using\n * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function _implementation() internal view virtual override returns (address) {\n return ERC1967Utils.getImplementation();\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/ERC1967/ERC1967Utils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Utils.sol)\n\npragma solidity ^0.8.22;\n\nimport {IBeacon} from \"../beacon/IBeacon.sol\";\nimport {IERC1967} from \"../../interfaces/IERC1967.sol\";\nimport {Address} from \"../../utils/Address.sol\";\nimport {StorageSlot} from \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This library provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] slots.\n */\nlibrary ERC1967Utils {\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev The `implementation` of the proxy is invalid.\n */\n error ERC1967InvalidImplementation(address implementation);\n\n /**\n * @dev The `admin` of the proxy is invalid.\n */\n error ERC1967InvalidAdmin(address admin);\n\n /**\n * @dev The `beacon` of the proxy is invalid.\n */\n error ERC1967InvalidBeacon(address beacon);\n\n /**\n * @dev An upgrade function sees `msg.value > 0` that may be lost.\n */\n error ERC1967NonPayable();\n\n /**\n * @dev Returns the current implementation address.\n */\n function getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the ERC-1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n if (newImplementation.code.length == 0) {\n revert ERC1967InvalidImplementation(newImplementation);\n }\n StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Performs implementation upgrade with additional setup call if data is nonempty.\n * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n * to avoid stuck value in the contract.\n *\n * Emits an {IERC1967-Upgraded} event.\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) internal {\n _setImplementation(newImplementation);\n emit IERC1967.Upgraded(newImplementation);\n\n if (data.length > 0) {\n Address.functionDelegateCall(newImplementation, data);\n } else {\n _checkNonPayable();\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Returns the current admin.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using\n * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the ERC-1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n if (newAdmin == address(0)) {\n revert ERC1967InvalidAdmin(address(0));\n }\n StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {IERC1967-AdminChanged} event.\n */\n function changeAdmin(address newAdmin) internal {\n emit IERC1967.AdminChanged(getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is the keccak-256 hash of \"eip1967.proxy.beacon\" subtracted by 1.\n */\n // solhint-disable-next-line private-vars-leading-underscore\n bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Returns the current beacon.\n */\n function getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the ERC-1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n if (newBeacon.code.length == 0) {\n revert ERC1967InvalidBeacon(newBeacon);\n }\n\n StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;\n\n address beaconImplementation = IBeacon(newBeacon).implementation();\n if (beaconImplementation.code.length == 0) {\n revert ERC1967InvalidImplementation(beaconImplementation);\n }\n }\n\n /**\n * @dev Change the beacon and trigger a setup call if data is nonempty.\n * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n * to avoid stuck value in the contract.\n *\n * Emits an {IERC1967-BeaconUpgraded} event.\n *\n * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since\n * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for\n * efficiency.\n */\n function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {\n _setBeacon(newBeacon);\n emit IERC1967.BeaconUpgraded(newBeacon);\n\n if (data.length > 0) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n } else {\n _checkNonPayable();\n }\n }\n\n /**\n * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract\n * if an upgrade doesn't perform an initialization call.\n */\n function _checkNonPayable() private {\n if (msg.value > 0) {\n revert ERC1967NonPayable();\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback\n * function and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/ProxyAdmin.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/transparent/ProxyAdmin.sol)\n\npragma solidity ^0.8.22;\n\nimport {ITransparentUpgradeableProxy} from \"./TransparentUpgradeableProxy.sol\";\nimport {Ownable} from \"../../access/Ownable.sol\";\n\n/**\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\n */\ncontract ProxyAdmin is Ownable {\n /**\n * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgrade(address,address)`\n * and `upgradeAndCall(address,address,bytes)` are present, and `upgrade` must be used if no function should be called,\n * while `upgradeAndCall` will invoke the `receive` function if the third argument is the empty byte string.\n * If the getter returns `\"5.0.0\"`, only `upgradeAndCall(address,address,bytes)` is present, and the third argument must\n * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function\n * during an upgrade.\n */\n string public constant UPGRADE_INTERFACE_VERSION = \"5.0.0\";\n\n /**\n * @dev Sets the initial owner who can perform upgrades.\n */\n constructor(address initialOwner) Ownable(initialOwner) {}\n\n /**\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation.\n * See {TransparentUpgradeableProxy-_dispatchUpgradeToAndCall}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n * - If `data` is empty, `msg.value` must be zero.\n */\n function upgradeAndCall(\n ITransparentUpgradeableProxy proxy,\n address implementation,\n bytes memory data\n ) public payable virtual onlyOwner {\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/proxy/transparent/TransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.22;\n\nimport {ERC1967Utils} from \"../ERC1967/ERC1967Utils.sol\";\nimport {ERC1967Proxy} from \"../ERC1967/ERC1967Proxy.sol\";\nimport {IERC1967} from \"../../interfaces/IERC1967.sol\";\nimport {ProxyAdmin} from \"./ProxyAdmin.sol\";\n\n/**\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\n * does not implement this interface directly, and its upgradeability mechanism is implemented by an internal dispatch\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\n * include them in the ABI so this interface must be used to interact with it.\n */\ninterface ITransparentUpgradeableProxy is IERC1967 {\n /// @dev See {UUPSUpgradeable-upgradeToAndCall}\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable;\n}\n\n/**\n * @dev This contract implements a proxy that is upgradeable through an associated {ProxyAdmin} instance.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches the {ITransparentUpgradeableProxy-upgradeToAndCall} function exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can call the `upgradeToAndCall` function but any other call won't be forwarded to\n * the implementation. If the admin tries to call a function on the implementation it will fail with an error indicating\n * the proxy admin cannot fallback to the target implementation.\n *\n * These properties mean that the admin account can only be used for upgrading the proxy, so it's best if it's a\n * dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to\n * call a function from the proxy implementation. For this reason, the proxy deploys an instance of {ProxyAdmin} and\n * allows upgrades only if they come through it. You should think of the `ProxyAdmin` instance as the administrative\n * interface of the proxy, including the ability to change who can trigger upgrades by transferring ownership.\n *\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\n * inherit from that interface, and instead `upgradeToAndCall` is implicitly implemented using a custom dispatch\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\n * implementation.\n *\n * NOTE: This proxy does not inherit from {Context} deliberately. The {ProxyAdmin} of this contract won't send a\n * meta-transaction in any way, and any other meta-transaction setup should be made in the implementation contract.\n *\n * IMPORTANT: This contract avoids unnecessary storage reads by setting the admin only during construction as an\n * immutable variable, preventing any changes thereafter. However, the admin slot defined in ERC-1967 can still be\n * overwritten by the implementation logic pointed to by this proxy. In such cases, the contract may end up in an\n * undesirable state where the admin slot is different from the actual admin. Relying on the value of the admin slot\n * is generally fine if the implementation is trusted.\n *\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the\n * compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new\n * function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This\n * could render the `upgradeToAndCall` function inaccessible, preventing upgradeability and compromising transparency.\n */\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\n // An immutable address for the admin to avoid unnecessary SLOADs before each call\n // at the expense of removing the ability to change the admin once it's set.\n // This is acceptable if the admin is always a ProxyAdmin instance or similar contract\n // with its own ability to transfer the permissions to another account.\n address private immutable _admin;\n\n /**\n * @dev The proxy caller is the current admin, and can't fallback to the proxy target.\n */\n error ProxyDeniedAdminAccess();\n\n /**\n * @dev Initializes an upgradeable proxy managed by an instance of a {ProxyAdmin} with an `initialOwner`,\n * backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in\n * {ERC1967Proxy-constructor}.\n */\n constructor(address _logic, address initialOwner, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\n _admin = address(new ProxyAdmin(initialOwner));\n // Set the storage value and emit an event for ERC-1967 compatibility\n ERC1967Utils.changeAdmin(_proxyAdmin());\n }\n\n /**\n * @dev Returns the admin of this proxy.\n */\n function _proxyAdmin() internal view virtual returns (address) {\n return _admin;\n }\n\n /**\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior.\n */\n function _fallback() internal virtual override {\n if (msg.sender == _proxyAdmin()) {\n if (msg.sig != ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\n revert ProxyDeniedAdminAccess();\n } else {\n _dispatchUpgradeToAndCall();\n }\n } else {\n super._fallback();\n }\n }\n\n /**\n * @dev Upgrade the implementation of the proxy. See {ERC1967Utils-upgradeToAndCall}.\n *\n * Requirements:\n *\n * - If `data` is empty, `msg.value` must be zero.\n */\n function _dispatchUpgradeToAndCall() private {\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\n ERC1967Utils.upgradeToAndCall(newImplementation, data);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC-20\n * applications.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * Both values are immutable: they can only be set once during construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `value`.\n */\n function transfer(address to, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 value) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, value);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Skips emitting an {Approval} event indicating an allowance update. This is not\n * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `value`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `value`.\n */\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, value);\n _transfer(from, to, value);\n return true;\n }\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _transfer(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(from, to, value);\n }\n\n /**\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n * this function.\n *\n * Emits a {Transfer} event.\n */\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n unchecked {\n // Overflow not possible: value <= fromBalance <= totalSupply.\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n _totalSupply -= value;\n }\n } else {\n unchecked {\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n * Relies on the `_update` mechanism\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead.\n */\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n _update(address(0), account, value);\n }\n\n /**\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n * Relies on the `_update` mechanism.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * NOTE: This function is not virtual, {_update} should be overridden instead\n */\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n _update(account, address(0), value);\n }\n\n /**\n * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n /**\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n *\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n * `Approval` event during `transferFrom` operations.\n *\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n * true using the following override:\n *\n * ```solidity\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n * super._approve(owner, spender, value, true);\n * }\n * ```\n *\n * Requirements are the same as {_approve}.\n */\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n _allowances[owner][spender] = value;\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n /**\n * @dev Updates `owner`'s allowance for `spender` based on spent `value`.\n *\n * Does not update the allowance value in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Does not emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance < type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n }\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC-20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\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 value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens as the allowance of `spender` over the\n * 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 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` 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 value) external returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 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 /**\n * @dev An operation with an ERC-20 token failed.\n */\n error SafeERC20FailedOperation(address token);\n\n /**\n * @dev Indicates a failed `decreaseAllowance` request.\n */\n error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\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.encodeCall(token.transfer, (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.encodeCall(token.transferFrom, (from, to, value)));\n }\n\n /**\n * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\n return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\n }\n\n /**\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\n return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, 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 * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n forceApprove(token, spender, oldAllowance + value);\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n * value, non-reverting calls are assumed to be successful.\n *\n * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n unchecked {\n uint256 currentAllowance = token.allowance(address(this), spender);\n if (currentAllowance < requestedDecrease) {\n revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n }\n forceApprove(token, spender, currentAllowance - requestedDecrease);\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 * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n * set here.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n safeTransfer(token, to, value);\n } else if (!token.transferAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferFromAndCallRelaxed(\n IERC1363 token,\n address from,\n address to,\n uint256 value,\n bytes memory data\n ) internal {\n if (to.code.length == 0) {\n safeTransferFrom(token, from, to, value);\n } else if (!token.transferFromAndCall(from, to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n * once without retrying, and relies on the returned value to be true.\n *\n * Reverts if the returned value is other than `true`.\n */\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n forceApprove(token, to, value);\n } else if (!token.approveAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n uint256 returnSize;\n uint256 returnValue;\n assembly (\"memory-safe\") {\n let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n // bubble errors\n if iszero(success) {\n let ptr := mload(0x40)\n returndatacopy(ptr, 0, returndatasize())\n revert(ptr, returndatasize())\n }\n returnSize := returndatasize()\n returnValue := mload(0)\n }\n\n if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\n revert SafeERC20FailedOperation(address(token));\n }\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 silently catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n bool success;\n uint256 returnSize;\n uint256 returnValue;\n assembly (\"memory-safe\") {\n success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n returnSize := returndatasize()\n returnValue := mload(0)\n }\n return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.2.0) (utils/Address.sol)\n\npragma solidity ^0.8.20;\n\nimport {Errors} from \"./Errors.sol\";\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev There's no code at `target` (it is not a contract).\n */\n error AddressEmptyCode(address target);\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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n if (address(this).balance < amount) {\n revert Errors.InsufficientBalance(address(this).balance, amount);\n }\n\n (bool success, bytes memory returndata) = recipient.call{value: amount}(\"\");\n if (!success) {\n _revert(returndata);\n }\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 or custom error, it is bubbled\n * up by this function (like regular Solidity function calls). However, if\n * the call reverted with no returned reason, this function reverts with a\n * {Errors.FailedCall} error.\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 function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0);\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 function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n if (address(this).balance < value) {\n revert Errors.InsufficientBalance(address(this).balance, value);\n }\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\n * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case\n * of an unsuccessful call.\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata\n ) internal view returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n // only check if target is a contract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n if (returndata.length == 0 && target.code.length == 0) {\n revert AddressEmptyCode(target);\n }\n return returndata;\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\n * revert reason or with a default {Errors.FailedCall} error.\n */\n function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n return returndata;\n }\n }\n\n /**\n * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.\n */\n function _revert(bytes memory returndata) 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 assembly (\"memory-safe\") {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert Errors.FailedCall();\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS\n }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n */\n function tryRecover(\n bytes32 hash,\n bytes memory signature\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly (\"memory-safe\") {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32.\n */\n function toDataWithIntendedValidatorHash(\n address validator,\n bytes32 messageHash\n ) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, hex\"19_00\")\n mstore(0x02, shl(96, validator))\n mstore(0x16, messageHash)\n digest := keccak256(0x00, 0x36)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Errors.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Collection of common custom errors used in multiple contracts\n *\n * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.\n * It is recommended to avoid relying on the error API for critical functionality.\n *\n * _Available since v5.1._\n */\nlibrary Errors {\n /**\n * @dev The ETH balance of the account is not enough to perform the operation.\n */\n error InsufficientBalance(uint256 balance, uint256 needed);\n\n /**\n * @dev A call to an address target failed. The target may have reverted.\n */\n error FailedCall();\n\n /**\n * @dev The deployment failed.\n */\n error FailedDeployment();\n\n /**\n * @dev A necessary precompile is missing.\n */\n error MissingPrecompile(address);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Return the 512-bit addition of two uint256.\n *\n * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.\n */\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n assembly (\"memory-safe\") {\n low := add(a, b)\n high := lt(low, a)\n }\n }\n\n /**\n * @dev Return the 512-bit multiplication of two uint256.\n *\n * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.\n */\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = high * 2²⁵⁶ + low.\n assembly (\"memory-safe\") {\n let mm := mulmod(a, b, not(0))\n low := mul(a, b)\n high := sub(sub(mm, low), lt(mm, low))\n }\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a + b;\n success = c >= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a - b;\n success = c <= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a * b;\n assembly (\"memory-safe\") {\n // Only true when the multiplication doesn't overflow\n // (c / a == b) || (a == 0)\n success := or(eq(div(c, a), b), iszero(a))\n }\n // equivalent to: success ? c : 0\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `DIV` opcode returns zero when the denominator is 0.\n result := div(a, b)\n }\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `MOD` opcode returns zero when the denominator is 0.\n result := mod(a, b)\n }\n }\n }\n\n /**\n * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryAdd(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\n */\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\n (, uint256 result) = trySub(a, b);\n return result;\n }\n\n /**\n * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryMul(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\n }\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a > b, a, b);\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a < b, a, b);\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n\n // The following calculation ensures accurate ceiling division without overflow.\n // Since a is non-zero, (a - 1) / b will not overflow.\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n // but the largest value we can obtain is type(uint256).max - 1, which happens\n // when a = type(uint256).max and b = 1.\n unchecked {\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n }\n }\n\n /**\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n * denominator == 0.\n *\n * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n\n // Handle non-overflow cases, 256 by 256 division.\n if (high == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return low / denominator;\n }\n\n // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n if (denominator <= high) {\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n }\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [high low].\n uint256 remainder;\n assembly (\"memory-safe\") {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n high := sub(high, gt(remainder, low))\n low := sub(low, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\n assembly (\"memory-safe\") {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [high low] by twos.\n low := div(low, twos)\n\n // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from high into low.\n low |= high * twos;\n\n // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n // works in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n inverse *= 2 - denominator * inverse; // inverse mod 2³²\n inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high\n // is no longer required.\n result = low * inverse;\n return result;\n }\n }\n\n /**\n * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n }\n\n /**\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\n */\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n if (high >= 1 << n) {\n Panic.panic(Panic.UNDER_OVERFLOW);\n }\n return (high << (256 - n)) | (low >> n);\n }\n }\n\n /**\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\n */\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\n }\n\n /**\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n *\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n *\n * If the input value is not inversible, 0 is returned.\n *\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n */\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n unchecked {\n if (n == 0) return 0;\n\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n // ax + ny = 1\n // ax = 1 + (-y)n\n // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n // If the remainder is 0 the gcd is n right away.\n uint256 remainder = a % n;\n uint256 gcd = n;\n\n // Therefore the initial coefficients are:\n // ax + ny = gcd(a, n) = n\n // 0a + 1n = n\n int256 x = 0;\n int256 y = 1;\n\n while (remainder != 0) {\n uint256 quotient = gcd / remainder;\n\n (gcd, remainder) = (\n // The old remainder is the next gcd to try.\n remainder,\n // Compute the next remainder.\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n // where gcd is at most n (capped to type(uint256).max)\n gcd - remainder * quotient\n );\n\n (x, y) = (\n // Increment the coefficient of a.\n y,\n // Decrement the coefficient of n.\n // Can overflow, but the result is casted to uint256 so that the\n // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n x - y * int256(quotient)\n );\n }\n\n if (gcd != 1) return 0; // No inverse exists.\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n }\n }\n\n /**\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n *\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n *\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n */\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n unchecked {\n return Math.modExp(a, p - 2, p);\n }\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n *\n * Requirements:\n * - modulus can't be zero\n * - underlying staticcall to precompile must succeed\n *\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n * interpreted as 0.\n */\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n (bool success, uint256 result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n * to operate modulo 0 or if the underlying precompile reverted.\n *\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n * of a revert, but the result may be incorrectly interpreted as 0.\n */\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n if (m == 0) return (false, 0);\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n // | Offset | Content | Content (Hex) |\n // |-----------|------------|--------------------------------------------------------------------|\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n mstore(ptr, 0x20)\n mstore(add(ptr, 0x20), 0x20)\n mstore(add(ptr, 0x40), 0x20)\n mstore(add(ptr, 0x60), b)\n mstore(add(ptr, 0x80), e)\n mstore(add(ptr, 0xa0), m)\n\n // Given the result < m, it's guaranteed to fit in 32 bytes,\n // so we can use the memory scratch space located at offset 0.\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n result := mload(0x00)\n }\n }\n\n /**\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\n */\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n (bool success, bytes memory result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n */\n function tryModExp(\n bytes memory b,\n bytes memory e,\n bytes memory m\n ) internal view returns (bool success, bytes memory result) {\n if (_zeroBytes(m)) return (false, new bytes(0));\n\n uint256 mLen = m.length;\n\n // Encode call args in result and move the free memory pointer\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n assembly (\"memory-safe\") {\n let dataPtr := add(result, 0x20)\n // Write result on top of args to avoid allocating extra memory.\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n // Overwrite the length.\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n mstore(result, mLen)\n // Set the memory pointer after the returned data.\n mstore(0x40, add(dataPtr, mLen))\n }\n }\n\n /**\n * @dev Returns whether the provided byte array is zero.\n */\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\n for (uint256 i = 0; i < byteArray.length; ++i) {\n if (byteArray[i] != 0) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n * towards zero.\n *\n * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n * using integer operations.\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n unchecked {\n // Take care of easy edge cases when a == 0 or a == 1\n if (a <= 1) {\n return a;\n }\n\n // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n // the current value as `ε_n = | x_n - sqrt(a) |`.\n //\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n // bigger than any uint256.\n //\n // By noticing that\n // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n // to the msb function.\n uint256 aa = a;\n uint256 xn = 1;\n\n if (aa >= (1 << 128)) {\n aa >>= 128;\n xn <<= 64;\n }\n if (aa >= (1 << 64)) {\n aa >>= 64;\n xn <<= 32;\n }\n if (aa >= (1 << 32)) {\n aa >>= 32;\n xn <<= 16;\n }\n if (aa >= (1 << 16)) {\n aa >>= 16;\n xn <<= 8;\n }\n if (aa >= (1 << 8)) {\n aa >>= 8;\n xn <<= 4;\n }\n if (aa >= (1 << 4)) {\n aa >>= 4;\n xn <<= 2;\n }\n if (aa >= (1 << 2)) {\n xn <<= 1;\n }\n\n // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n //\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n // This is going to be our x_0 (and ε_0)\n xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n // From here, Newton's method give us:\n // x_{n+1} = (x_n + a / x_n) / 2\n //\n // One should note that:\n // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n // = ((x_n² + a) / (2 * x_n))² - a\n // = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n // = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n // = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n // = (x_n² - a)² / (2 * x_n)²\n // = ((x_n² - a) / (2 * x_n))²\n // ≥ 0\n // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n //\n // This gives us the proof of quadratic convergence of the sequence:\n // ε_{n+1} = | x_{n+1} - sqrt(a) |\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\n // = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n // = | (x_n - sqrt(a))² / (2 * x_n) |\n // = | ε_n² / (2 * x_n) |\n // = ε_n² / | (2 * x_n) |\n //\n // For the first iteration, we have a special case where x_0 is known:\n // ε_1 = ε_0² / | (2 * x_0) |\n // ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n // ≤ 2**(2*e-4) / (3 * 2**(e-1))\n // ≤ 2**(e-3) / 3\n // ≤ 2**(e-3-log2(3))\n // ≤ 2**(e-4.5)\n //\n // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n // ε_{n+1} = ε_n² / | (2 * x_n) |\n // ≤ (2**(e-k))² / (2 * 2**(e-1))\n // ≤ 2**(2*e-2*k) / 2**e\n // ≤ 2**(e-2*k)\n xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5) -- special case, see above\n xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9) -- general case with k = 4.5\n xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18) -- general case with k = 9\n xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36) -- general case with k = 18\n xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72) -- general case with k = 36\n xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144) -- general case with k = 72\n\n // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n // sqrt(a) or sqrt(a) + 1.\n return xn - SafeCast.toUint(xn > a / xn);\n }\n }\n\n /**\n * @dev Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log2(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // If upper 8 bits of 16-bit half set, add 8 to result\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\n // If upper 4 bits of 8-bit half set, add 4 to result\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\n\n // Shifts value right by the current result and use it as an index into this lookup table:\n //\n // | x (4 bits) | index | table[index] = MSB position |\n // |------------|---------|-----------------------------|\n // | 0000 | 0 | table[0] = 0 |\n // | 0001 | 1 | table[1] = 0 |\n // | 0010 | 2 | table[2] = 1 |\n // | 0011 | 3 | table[3] = 1 |\n // | 0100 | 4 | table[4] = 2 |\n // | 0101 | 5 | table[5] = 2 |\n // | 0110 | 6 | table[6] = 2 |\n // | 0111 | 7 | table[7] = 2 |\n // | 1000 | 8 | table[8] = 3 |\n // | 1001 | 9 | table[9] = 3 |\n // | 1010 | 10 | table[10] = 3 |\n // | 1011 | 11 | table[11] = 3 |\n // | 1100 | 12 | table[12] = 3 |\n // | 1101 | 13 | table[13] = 3 |\n // | 1110 | 14 | table[14] = 3 |\n // | 1111 | 15 | table[15] = 3 |\n //\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\n assembly (\"memory-safe\") {\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\n }\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/SafeCast.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool 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 */\nlibrary SafeCast {\n /**\n * @dev Value doesn't fit in an uint of `bits` size.\n */\n error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n /**\n * @dev An int value doesn't fit in an uint of `bits` size.\n */\n error SafeCastOverflowedIntToUint(int256 value);\n\n /**\n * @dev Value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n /**\n * @dev An uint value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedUintToInt(uint256 value);\n\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 function toUint248(uint256 value) internal pure returns (uint248) {\n if (value > type(uint248).max) {\n revert SafeCastOverflowedUintDowncast(248, value);\n }\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 function toUint240(uint256 value) internal pure returns (uint240) {\n if (value > type(uint240).max) {\n revert SafeCastOverflowedUintDowncast(240, value);\n }\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 function toUint232(uint256 value) internal pure returns (uint232) {\n if (value > type(uint232).max) {\n revert SafeCastOverflowedUintDowncast(232, value);\n }\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 function toUint224(uint256 value) internal pure returns (uint224) {\n if (value > type(uint224).max) {\n revert SafeCastOverflowedUintDowncast(224, value);\n }\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 function toUint216(uint256 value) internal pure returns (uint216) {\n if (value > type(uint216).max) {\n revert SafeCastOverflowedUintDowncast(216, value);\n }\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 function toUint208(uint256 value) internal pure returns (uint208) {\n if (value > type(uint208).max) {\n revert SafeCastOverflowedUintDowncast(208, value);\n }\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 function toUint200(uint256 value) internal pure returns (uint200) {\n if (value > type(uint200).max) {\n revert SafeCastOverflowedUintDowncast(200, value);\n }\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 function toUint192(uint256 value) internal pure returns (uint192) {\n if (value > type(uint192).max) {\n revert SafeCastOverflowedUintDowncast(192, value);\n }\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 function toUint184(uint256 value) internal pure returns (uint184) {\n if (value > type(uint184).max) {\n revert SafeCastOverflowedUintDowncast(184, value);\n }\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 function toUint176(uint256 value) internal pure returns (uint176) {\n if (value > type(uint176).max) {\n revert SafeCastOverflowedUintDowncast(176, value);\n }\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 function toUint168(uint256 value) internal pure returns (uint168) {\n if (value > type(uint168).max) {\n revert SafeCastOverflowedUintDowncast(168, value);\n }\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 function toUint160(uint256 value) internal pure returns (uint160) {\n if (value > type(uint160).max) {\n revert SafeCastOverflowedUintDowncast(160, value);\n }\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 function toUint152(uint256 value) internal pure returns (uint152) {\n if (value > type(uint152).max) {\n revert SafeCastOverflowedUintDowncast(152, value);\n }\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 function toUint144(uint256 value) internal pure returns (uint144) {\n if (value > type(uint144).max) {\n revert SafeCastOverflowedUintDowncast(144, value);\n }\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 function toUint136(uint256 value) internal pure returns (uint136) {\n if (value > type(uint136).max) {\n revert SafeCastOverflowedUintDowncast(136, value);\n }\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 function toUint128(uint256 value) internal pure returns (uint128) {\n if (value > type(uint128).max) {\n revert SafeCastOverflowedUintDowncast(128, value);\n }\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 function toUint120(uint256 value) internal pure returns (uint120) {\n if (value > type(uint120).max) {\n revert SafeCastOverflowedUintDowncast(120, value);\n }\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 function toUint112(uint256 value) internal pure returns (uint112) {\n if (value > type(uint112).max) {\n revert SafeCastOverflowedUintDowncast(112, value);\n }\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 function toUint104(uint256 value) internal pure returns (uint104) {\n if (value > type(uint104).max) {\n revert SafeCastOverflowedUintDowncast(104, value);\n }\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 function toUint96(uint256 value) internal pure returns (uint96) {\n if (value > type(uint96).max) {\n revert SafeCastOverflowedUintDowncast(96, value);\n }\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 function toUint88(uint256 value) internal pure returns (uint88) {\n if (value > type(uint88).max) {\n revert SafeCastOverflowedUintDowncast(88, value);\n }\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 function toUint80(uint256 value) internal pure returns (uint80) {\n if (value > type(uint80).max) {\n revert SafeCastOverflowedUintDowncast(80, value);\n }\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 function toUint72(uint256 value) internal pure returns (uint72) {\n if (value > type(uint72).max) {\n revert SafeCastOverflowedUintDowncast(72, value);\n }\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 function toUint64(uint256 value) internal pure returns (uint64) {\n if (value > type(uint64).max) {\n revert SafeCastOverflowedUintDowncast(64, value);\n }\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 function toUint56(uint256 value) internal pure returns (uint56) {\n if (value > type(uint56).max) {\n revert SafeCastOverflowedUintDowncast(56, value);\n }\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 function toUint48(uint256 value) internal pure returns (uint48) {\n if (value > type(uint48).max) {\n revert SafeCastOverflowedUintDowncast(48, value);\n }\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 function toUint40(uint256 value) internal pure returns (uint40) {\n if (value > type(uint40).max) {\n revert SafeCastOverflowedUintDowncast(40, value);\n }\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 function toUint32(uint256 value) internal pure returns (uint32) {\n if (value > type(uint32).max) {\n revert SafeCastOverflowedUintDowncast(32, value);\n }\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 function toUint24(uint256 value) internal pure returns (uint24) {\n if (value > type(uint24).max) {\n revert SafeCastOverflowedUintDowncast(24, value);\n }\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 function toUint16(uint256 value) internal pure returns (uint16) {\n if (value > type(uint16).max) {\n revert SafeCastOverflowedUintDowncast(16, value);\n }\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 function toUint8(uint256 value) internal pure returns (uint8) {\n if (value > type(uint8).max) {\n revert SafeCastOverflowedUintDowncast(8, value);\n }\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 function toUint256(int256 value) internal pure returns (uint256) {\n if (value < 0) {\n revert SafeCastOverflowedIntToUint(value);\n }\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 function toInt248(int256 value) internal pure returns (int248 downcasted) {\n downcasted = int248(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(248, value);\n }\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 function toInt240(int256 value) internal pure returns (int240 downcasted) {\n downcasted = int240(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(240, value);\n }\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 function toInt232(int256 value) internal pure returns (int232 downcasted) {\n downcasted = int232(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(232, value);\n }\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 function toInt224(int256 value) internal pure returns (int224 downcasted) {\n downcasted = int224(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(224, value);\n }\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 function toInt216(int256 value) internal pure returns (int216 downcasted) {\n downcasted = int216(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(216, value);\n }\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 function toInt208(int256 value) internal pure returns (int208 downcasted) {\n downcasted = int208(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(208, value);\n }\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 function toInt200(int256 value) internal pure returns (int200 downcasted) {\n downcasted = int200(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(200, value);\n }\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 function toInt192(int256 value) internal pure returns (int192 downcasted) {\n downcasted = int192(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(192, value);\n }\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 function toInt184(int256 value) internal pure returns (int184 downcasted) {\n downcasted = int184(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(184, value);\n }\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 function toInt176(int256 value) internal pure returns (int176 downcasted) {\n downcasted = int176(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(176, value);\n }\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 function toInt168(int256 value) internal pure returns (int168 downcasted) {\n downcasted = int168(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(168, value);\n }\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 function toInt160(int256 value) internal pure returns (int160 downcasted) {\n downcasted = int160(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(160, value);\n }\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 function toInt152(int256 value) internal pure returns (int152 downcasted) {\n downcasted = int152(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(152, value);\n }\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 function toInt144(int256 value) internal pure returns (int144 downcasted) {\n downcasted = int144(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(144, value);\n }\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 function toInt136(int256 value) internal pure returns (int136 downcasted) {\n downcasted = int136(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(136, value);\n }\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 function toInt128(int256 value) internal pure returns (int128 downcasted) {\n downcasted = int128(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(128, value);\n }\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 function toInt120(int256 value) internal pure returns (int120 downcasted) {\n downcasted = int120(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(120, value);\n }\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 function toInt112(int256 value) internal pure returns (int112 downcasted) {\n downcasted = int112(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(112, value);\n }\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 function toInt104(int256 value) internal pure returns (int104 downcasted) {\n downcasted = int104(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(104, value);\n }\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 function toInt96(int256 value) internal pure returns (int96 downcasted) {\n downcasted = int96(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(96, value);\n }\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 function toInt88(int256 value) internal pure returns (int88 downcasted) {\n downcasted = int88(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(88, value);\n }\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 function toInt80(int256 value) internal pure returns (int80 downcasted) {\n downcasted = int80(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(80, value);\n }\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 function toInt72(int256 value) internal pure returns (int72 downcasted) {\n downcasted = int72(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(72, value);\n }\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 function toInt64(int256 value) internal pure returns (int64 downcasted) {\n downcasted = int64(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(64, value);\n }\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 function toInt56(int256 value) internal pure returns (int56 downcasted) {\n downcasted = int56(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(56, value);\n }\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 function toInt48(int256 value) internal pure returns (int48 downcasted) {\n downcasted = int48(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(48, value);\n }\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 function toInt40(int256 value) internal pure returns (int40 downcasted) {\n downcasted = int40(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(40, value);\n }\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 function toInt32(int256 value) internal pure returns (int32 downcasted) {\n downcasted = int32(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(32, value);\n }\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 function toInt24(int256 value) internal pure returns (int24 downcasted) {\n downcasted = int24(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(24, value);\n }\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 function toInt16(int256 value) internal pure returns (int16 downcasted) {\n downcasted = int16(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(16, value);\n }\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 function toInt8(int256 value) internal pure returns (int8 downcasted) {\n downcasted = int8(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(8, value);\n }\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 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 if (value > uint256(type(int256).max)) {\n revert SafeCastOverflowedUintToInt(value);\n }\n return int256(value);\n }\n\n /**\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n */\n function toUint(bool b) internal pure returns (uint256 u) {\n assembly (\"memory-safe\") {\n u := iszero(iszero(b))\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));\n }\n }\n\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return ternary(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 ternary(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 // Formula from the \"Bit Twiddling Hacks\" by Sean Eron Anderson.\n // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift,\n // taking advantage of the most significant (or \"sign\" bit) in two's complement representation.\n // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result,\n // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative).\n int256 mask = n >> 255;\n\n // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.\n return uint256((n + mask) ^ mask);\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Panic.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n * using Panic for uint256;\n *\n * // Use any of the declared internal constants\n * function foo() { Panic.GENERIC.panic(); }\n *\n * // Alternatively\n * function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n /// @dev generic / unspecified error\n uint256 internal constant GENERIC = 0x00;\n /// @dev used by the assert() builtin\n uint256 internal constant ASSERT = 0x01;\n /// @dev arithmetic underflow or overflow\n uint256 internal constant UNDER_OVERFLOW = 0x11;\n /// @dev division or modulo by zero\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\n /// @dev enum conversion error\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n /// @dev invalid encoding in storage\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n /// @dev empty array pop\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n /// @dev array out of bounds access\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n /// @dev resource error (too large allocation or too large array)\n uint256 internal constant RESOURCE_ERROR = 0x41;\n /// @dev calling invalid internal function\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n /// @dev Reverts with a panic code. Recommended to use with\n /// the internal constants with predefined codes.\n function panic(uint256 code) internal pure {\n assembly (\"memory-safe\") {\n mstore(0x00, 0x4e487b71)\n mstore(0x20, code)\n revert(0x1c, 0x24)\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\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 /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\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 if (_status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\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" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC-1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n * // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(newImplementation.code.length > 0);\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * TIP: Consider using this library along with {SlotDerivation}.\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n struct Int256Slot {\n int256 value;\n }\n\n struct StringSlot {\n string value;\n }\n\n struct BytesSlot {\n bytes value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Int256Slot` with member `value` located at `slot`.\n */\n function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `StringSlot` with member `value` located at `slot`.\n */\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n */\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n\n /**\n * @dev Returns a `BytesSlot` with member `value` located at `slot`.\n */\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n */\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n}\n" + }, + "npm/@openzeppelin/contracts@5.3.0/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SafeCast} from \"./math/SafeCast.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n using SafeCast for *;\n\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n uint256 private constant SPECIAL_CHARS_LOOKUP =\n (1 << 0x08) | // backspace\n (1 << 0x09) | // tab\n (1 << 0x0a) | // newline\n (1 << 0x0c) | // form feed\n (1 << 0x0d) | // carriage return\n (1 << 0x22) | // double quote\n (1 << 0x5c); // backslash\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n /**\n * @dev The string being parsed contains characters that are not in scope of the given base.\n */\n error StringsInvalidChar();\n\n /**\n * @dev The string being parsed is not a properly formatted address.\n */\n error StringsInvalidAddressFormat();\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n assembly (\"memory-safe\") {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n assembly (\"memory-safe\") {\n mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n uint256 localValue = value;\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n * representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal\n * representation, according to EIP-55.\n */\n function toChecksumHexString(address addr) internal pure returns (string memory) {\n bytes memory buffer = bytes(toHexString(addr));\n\n // hash the hex part of buffer (skip length + 2 bytes, length 40)\n uint256 hashValue;\n assembly (\"memory-safe\") {\n hashValue := shr(96, keccak256(add(buffer, 0x22), 40))\n }\n\n for (uint256 i = 41; i > 1; --i) {\n // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f)\n if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) {\n // case shift by xoring with 0x20\n buffer[i] ^= 0x20;\n }\n hashValue >>= 4;\n }\n return string(buffer);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input) internal pure returns (uint256) {\n return parseUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n uint256 result = 0;\n for (uint256 i = begin; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 9) return (false, 0);\n result *= 10;\n result += chr;\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `int256`.\n *\n * Requirements:\n * - The string must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input) internal pure returns (int256) {\n return parseInt(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) {\n (bool success, int256 value) = tryParseInt(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if\n * the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(string memory input) internal pure returns (bool success, int256 value) {\n return _tryParseIntUncheckedBounds(input, 0, bytes(input).length);\n }\n\n uint256 private constant ABS_MIN_INT256 = 2 ** 255;\n\n /**\n * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character or if the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, int256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseIntUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseIntUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, int256 value) {\n bytes memory buffer = bytes(input);\n\n // Check presence of a negative sign.\n bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n bool positiveSign = sign == bytes1(\"+\");\n bool negativeSign = sign == bytes1(\"-\");\n uint256 offset = (positiveSign || negativeSign).toUint();\n\n (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end);\n\n if (absSuccess && absValue < ABS_MIN_INT256) {\n return (true, negativeSign ? -int256(absValue) : int256(absValue));\n } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) {\n return (true, type(int256).min);\n } else return (false, 0);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input) internal pure returns (uint256) {\n return parseHexUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseHexUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an\n * invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseHexUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseHexUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n // skip 0x prefix if present\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 offset = hasPrefix.toUint() * 2;\n\n uint256 result = 0;\n for (uint256 i = begin + offset; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 15) return (false, 0);\n result *= 16;\n unchecked {\n // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check).\n // This guarantees that adding a value < 16 will not cause an overflow, hence the unchecked.\n result += chr;\n }\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as an `address`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input) internal pure returns (address) {\n return parseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) {\n (bool success, address value) = tryParseAddress(input, begin, end);\n if (!success) revert StringsInvalidAddressFormat();\n return value;\n }\n\n /**\n * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly\n * formatted address. See {parseAddress-string} requirements.\n */\n function tryParseAddress(string memory input) internal pure returns (bool success, address value) {\n return tryParseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly\n * formatted address. See {parseAddress-string-uint256-uint256} requirements.\n */\n function tryParseAddress(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, address value) {\n if (end > bytes(input).length || begin > end) return (false, address(0));\n\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 expectedLength = 40 + hasPrefix.toUint() * 2;\n\n // check that input is the correct length\n if (end - begin == expectedLength) {\n // length guarantees that this does not overflow, and value is at most type(uint160).max\n (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end);\n return (s, address(uint160(v)));\n } else {\n return (false, address(0));\n }\n }\n\n function _tryParseChr(bytes1 chr) private pure returns (uint8) {\n uint8 value = uint8(chr);\n\n // Try to parse `chr`:\n // - Case 1: [0-9]\n // - Case 2: [a-f]\n // - Case 3: [A-F]\n // - otherwise not supported\n unchecked {\n if (value > 47 && value < 58) value -= 48;\n else if (value > 96 && value < 103) value -= 87;\n else if (value > 64 && value < 71) value -= 55;\n else return type(uint8).max;\n }\n\n return value;\n }\n\n /**\n * @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.\n *\n * WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.\n *\n * NOTE: This function escapes all unicode characters, and not just the ones in ranges defined in section 2.5 of\n * RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). ECMAScript's `JSON.parse` does recover escaped unicode\n * characters that are not in this range, but other tooling may provide different results.\n */\n function escapeJSON(string memory input) internal pure returns (string memory) {\n bytes memory buffer = bytes(input);\n bytes memory output = new bytes(2 * buffer.length); // worst case scenario\n uint256 outputLength = 0;\n\n for (uint256 i; i < buffer.length; ++i) {\n bytes1 char = bytes1(_unsafeReadBytesOffset(buffer, i));\n if (((SPECIAL_CHARS_LOOKUP & (1 << uint8(char))) != 0)) {\n output[outputLength++] = \"\\\\\";\n if (char == 0x08) output[outputLength++] = \"b\";\n else if (char == 0x09) output[outputLength++] = \"t\";\n else if (char == 0x0a) output[outputLength++] = \"n\";\n else if (char == 0x0c) output[outputLength++] = \"f\";\n else if (char == 0x0d) output[outputLength++] = \"r\";\n else if (char == 0x5c) output[outputLength++] = \"\\\\\";\n else if (char == 0x22) {\n // solhint-disable-next-line quotes\n output[outputLength++] = '\"';\n }\n } else {\n output[outputLength++] = char;\n }\n }\n // write the actual length and deallocate unused memory\n assembly (\"memory-safe\") {\n mstore(output, outputLength)\n mstore(0x40, add(output, shl(5, shr(5, add(outputLength, 63)))))\n }\n\n return string(output);\n }\n\n /**\n * @dev Reads a bytes32 from a bytes array without bounds checking.\n *\n * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n * assembly block as such would prevent some optimizations.\n */\n function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n // This is not memory safe in the general case, but all calls to this private function are within bounds.\n assembly (\"memory-safe\") {\n value := mload(add(buffer, add(0x20, offset)))\n }\n }\n}\n" + }, + "project/contracts/Controller.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\n\nimport './interfaces/IController.sol';\n\n/**\n * @title Controller\n * @dev Manages allow lists for solvers, executors, proposal signers and validators\n */\ncontract Controller is IController, Ownable {\n // List of allowed solvers\n mapping (address => bool) public override isSolverAllowed;\n\n // List of allowed executors\n mapping (address => bool) public override isExecutorAllowed;\n\n // List of allowed proposal signers\n mapping (address => bool) public override isProposalSignerAllowed;\n\n // List of allowed validators\n mapping (address => bool) public override isValidatorAllowed;\n\n // Minimum number of validations allowed\n uint8 public override minValidations;\n\n /**\n * @dev Creates a new Controller contract\n * @param owner Address that will own the contract\n * @param solvers List of allowed solvers\n * @param executors List of allowed executors\n * @param proposalSigners List of allowed proposal signers\n * @param validators List of allowed validators\n * @param _minValidations Minimum number of validations allowed\n */\n constructor(\n address owner,\n address[] memory solvers,\n address[] memory executors,\n address[] memory proposalSigners,\n address[] memory validators,\n uint8 _minValidations\n ) Ownable(owner) {\n for (uint256 i = 0; i < solvers.length; i++) _setAllowedSolver(solvers[i], true);\n for (uint256 i = 0; i < executors.length; i++) _setAllowedExecutor(executors[i], true);\n for (uint256 i = 0; i < proposalSigners.length; i++) _setAllowedProposalSigner(proposalSigners[i], true);\n for (uint256 i = 0; i < validators.length; i++) _setAllowedValidator(validators[i], true);\n _setMinValidations(_minValidations);\n }\n\n /**\n * @dev Sets permissions for multiple solvers\n * @param solvers List of solver addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedSolvers(address[] memory solvers, bool[] memory alloweds) external override onlyOwner {\n if (solvers.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < solvers.length; i++) _setAllowedSolver(solvers[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple executors\n * @param executors List of executor addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedExecutors(address[] memory executors, bool[] memory alloweds) external override onlyOwner {\n if (executors.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < executors.length; i++) _setAllowedExecutor(executors[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple proposal signers\n * @param signers List of proposal signer addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedProposalSigners(address[] memory signers, bool[] memory alloweds) external override onlyOwner {\n if (signers.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < signers.length; i++) _setAllowedProposalSigner(signers[i], alloweds[i]);\n }\n\n /**\n * @dev Sets permissions for multiple validators\n * @param validators List of validator addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedValidators(address[] memory validators, bool[] memory alloweds) external override onlyOwner {\n if (validators.length != alloweds.length) revert ControllerInputInvalidLength();\n for (uint256 i = 0; i < validators.length; i++) _setAllowedValidator(validators[i], alloweds[i]);\n }\n\n /**\n * @dev Sets the minimum number of validations allowed\n * @param newMinValidations minimum number of validations allowed\n */\n function setMinValidations(uint8 newMinValidations) external override onlyOwner {\n _setMinValidations(newMinValidations);\n }\n\n /**\n * @dev Sets a solver permission\n */\n function _setAllowedSolver(address solver, bool allowed) internal {\n isSolverAllowed[solver] = allowed;\n emit SolverAllowedSet(solver, allowed);\n }\n\n /**\n * @dev Sets an executor permission\n */\n function _setAllowedExecutor(address executor, bool allowed) internal {\n isExecutorAllowed[executor] = allowed;\n emit ExecutorAllowedSet(executor, allowed);\n }\n\n /**\n * @dev Sets a proposal signer permission\n */\n function _setAllowedProposalSigner(address signer, bool allowed) internal {\n isProposalSignerAllowed[signer] = allowed;\n emit ProposalSignerAllowedSet(signer, allowed);\n }\n\n /**\n * @dev Sets a validator permission\n */\n function _setAllowedValidator(address validator, bool allowed) internal {\n isValidatorAllowed[validator] = allowed;\n emit ValidatorAllowedSet(validator, allowed);\n }\n\n /**\n * @dev Sets the minimum number of validations allowed\n */\n function _setMinValidations(uint8 newMinValidations) internal {\n minValidations = newMinValidations;\n emit MinValidationSet(newMinValidations);\n }\n}\n" + }, + "project/contracts/dynamic-calls/DynamicCallEncoder.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport './DynamicCallTypes.sol';\nimport '../interfaces/IDynamicCallEncoder.sol';\nimport '../utils/BytesHelpers.sol';\n\n/**\n * @title DynamicCallEncoder\n * @dev Builds calldata for arbitrary contract calls from structured arguments.\n *\n * This encoder supports:\n * - Literal ABI-encoded arguments\n * - Variable references resolved from previous execution results\n *\n * The encoder follows standard ABI encoding rules, reconstructing\n * the calldata heads and tails dynamically based on argument types.\n */\ncontract DynamicCallEncoder is IDynamicCallEncoder {\n using BytesHelpers for bytes;\n\n /**\n * @dev Internal representation of a fully-encoded argument\n * @param data ABI-encoded argument payload\n * @param isDynamic Whether this argument requires a head offset\n */\n struct EncodedArg {\n bytes data;\n bool isDynamic;\n }\n\n /**\n * @dev Encodes a dynamic call into calldata\n * @param dynamicCall Dynamic call specification\n * @param variables List of resolved variable values\n * @param variablesLength Number of resolved variables\n * @return data Fully ABI-encoded calldata\n */\n function encode(DynamicCall memory dynamicCall, bytes[][] memory variables, uint256 variablesLength)\n external\n pure\n override\n returns (bytes memory data)\n {\n if (variablesLength > variables.length) revert DynamicCallEncoderVariablesLengthOutOfBounds();\n data = _buildCalldata(dynamicCall.selector, dynamicCall.arguments, variables, variablesLength);\n }\n\n /**\n * @dev Builds calldata from a selector and a list of dynamic arguments\n * This function performs standard ABI aggregation:\n * - static arguments are inlined in the head\n * - dynamic arguments place offsets in the head and append data to the tail\n */\n function _buildCalldata(\n bytes4 selector,\n DynamicArg[] memory args,\n bytes[][] memory variables,\n uint256 variablesLength\n ) internal pure returns (bytes memory data) {\n uint256 n = args.length;\n bytes[] memory encodedArgs = new bytes[](n);\n bool[] memory isDynamic = new bool[](n);\n uint256 headLength = 0;\n\n for (uint256 i = 0; i < n; i++) {\n EncodedArg memory enc = _encodeArg(args[i], variables, variablesLength);\n encodedArgs[i] = enc.data;\n isDynamic[i] = enc.isDynamic;\n headLength += enc.isDynamic ? 32 : enc.data.length;\n }\n\n bytes memory heads;\n bytes memory tails;\n uint256 nextDynamicHead = headLength;\n\n for (uint256 i = 0; i < n; i++) {\n if (isDynamic[i]) {\n heads = bytes.concat(heads, bytes32(nextDynamicHead));\n tails = bytes.concat(tails, encodedArgs[i]);\n nextDynamicHead += encodedArgs[i].length;\n } else {\n heads = bytes.concat(heads, encodedArgs[i]);\n }\n }\n\n data = bytes.concat(selector, heads, tails);\n }\n\n /**\n * @dev Encodes a single dynamic argument based on its kind\n */\n function _encodeArg(DynamicArg memory arg, bytes[][] memory variables, uint256 variablesLength)\n internal\n pure\n returns (EncodedArg memory out)\n {\n if (arg.kind == DynamicArgKind.Literal) return _encodeLiteral(arg);\n if (arg.kind == DynamicArgKind.Variable) return _encodeVariable(arg, variables, variablesLength);\n revert DynamicCallEncoderInvalidArgKind();\n }\n\n /**\n * @dev Encodes a literal argument\n */\n function _encodeLiteral(DynamicArg memory arg) internal pure returns (EncodedArg memory) {\n return _encodeAbiValue(arg.data, arg.isDynamic);\n }\n\n /**\n * @dev Encodes a variable argument by resolving it from the variables list\n */\n function _encodeVariable(DynamicArg memory arg, bytes[][] memory variables, uint256 variablesLength)\n internal\n pure\n returns (EncodedArg memory)\n {\n if (arg.data.length != 64) revert DynamicCallEncoderVariableRefBadLength();\n uint256 opIndex = arg.data.readWord0();\n uint256 subIndex = arg.data.readWord1();\n if (opIndex >= variablesLength) revert DynamicCallEncoderVariableOutOfBounds();\n if (subIndex >= variables[opIndex].length) revert DynamicCallEncoderVariableOutOfBounds();\n\n return _encodeAbiValue(variables[opIndex][subIndex], arg.isDynamic);\n }\n\n /**\n * @dev Interprets ABI-like bytes as either a static or dynamic value. Used for variable resolution.\n */\n function _encodeAbiValue(bytes memory data, bool isDynamic) internal pure returns (EncodedArg memory out) {\n if (data.length == 0 || data.length % 32 != 0) revert DynamicCallEncoderBadLength();\n\n if (isDynamic) {\n if (data.length < 64) revert DynamicCallEncoderEmptyDynamic();\n if (data.readWord0() != 0x20) revert DynamicCallEncoderBadLength();\n\n out.data = data.sliceFrom(32);\n out.isDynamic = true;\n } else {\n out.data = data;\n out.isDynamic = false;\n }\n }\n}\n" + }, + "project/contracts/dynamic-calls/DynamicCallTypes.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Kind of dynamic argument to be encoded\n * @param Literal ABI-encoded literal value provided by the resolver\n * @param Variable Reference to a previously resolved variable value\n */\nenum DynamicArgKind {\n Literal,\n Variable\n}\n\n/**\n * @dev Represents a single dynamic argument\n * @param kind Type of argument resolution strategy\n * @param data Encoded argument data, interpreted based on `kind`\n * @param isDynamic Whether the resolved argument is ABI-dynamic\n */\nstruct DynamicArg {\n DynamicArgKind kind;\n bytes data;\n bool isDynamic;\n}\n\n/**\n * @dev Represents a dynamic contract call intent\n * @param target Contract address to be called\n * @param value ETH value to be sent with the call\n * @param selector Function selector to invoke\n * @param arguments List of dynamically resolved arguments\n */\nstruct DynamicCall {\n address target;\n uint256 value;\n bytes4 selector;\n DynamicArg[] arguments;\n}\n" + }, + "project/contracts/Intents.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Enum representing the operation type.\n * - Swap: Swap tokens in the same chain.\n * - Transfer: Transfer tokens to one or more recipients.\n * - Call: Execute arbitrary contract calls.\n * - CrossChainSwap: Swap tokens between chains.\n * - DynamicCall: Execute arbitrary dynamic contract calls.\n */\nenum OpType {\n Swap,\n Transfer,\n Call,\n CrossChainSwap,\n DynamicCall\n}\n\n/**\n * @dev EIP-712 typed data struct representing a validator's approval of an intent.\n * @param intent The hash of the intent being validated.\n */\nstruct Validation {\n bytes32 intent;\n}\n\n/**\n * @dev General intent structure with different operations.\n * @param feePayer The payer of the intent.\n * @param settler The address responsible for executing the intent on-chain.\n * @param nonce A unique value used to prevent replay attacks and distinguish intents.\n * @param deadline The timestamp by which the intent must be executed.\n * @param maxFees List of max fees the feePayer is willing to pay for the intent.\n * @param triggerSig The signature of the trigger that this intent belongs to\n * @param minValidations The minimum number of validator approvals required for this intent to be considered valid.\n * @param validations The list validator signatures attesting to this intent.\n * @param operations List of operations of the intent.\n */\nstruct Intent {\n address feePayer;\n address settler;\n bytes32 nonce;\n uint256 deadline;\n MaxFee[] maxFees;\n bytes triggerSig;\n uint256 minValidations;\n bytes[] validations;\n Operation[] operations;\n}\n\n/**\n * @dev Operation structure used to abstract over different operation types.\n * @param opType The type of operation this operation represents.\n * @param user The user of the operation.\n * @param data ABI-encoded data representing a specific operation type (e.g. SwapOperation, TransferOperation, CallOperation).\n * @param events List of custom operation events to be emitted.\n */\nstruct Operation {\n uint8 opType;\n address user;\n bytes data;\n OperationEvent[] events;\n}\n\n/**\n * @dev Max fee representation\n * @param token Token used to pay for the execution fee.\n * @param amount Max amount of fee token to be paid for settling this intent.\n */\nstruct MaxFee {\n address token;\n uint256 amount;\n}\n\n/**\n * @dev Operation event representation.\n * @param topic Event topic to be emitted.\n * @param data Event data to be emitted.\n */\nstruct OperationEvent {\n bytes32 topic;\n bytes data;\n}\n\n/**\n * @dev Represents a swap operation between two chains.\n * @param sourceChain Chain ID where tokens will be sent from.\n * @param destinationChain Chain ID where tokens will be received.\n * @param tokensIn List of input tokens and amounts to swap.\n * @param tokensOut List of expected output tokens, minimum amounts, and recipients.\n */\nstruct SwapOperation {\n uint256 sourceChain;\n uint256 destinationChain;\n TokenIn[] tokensIn;\n TokenOut[] tokensOut;\n}\n\n/**\n * @dev Token in representation.\n * @param token Address of a token to be sent.\n * @param amount Amount of tokens to be sent.\n */\nstruct TokenIn {\n address token;\n uint256 amount;\n}\n\n/**\n * @dev Token out representation.\n * @param token Address of a token to be received.\n * @param minAmount Minimum amount of tokens to be received.\n * @param recipient Recipient address that will receive the token out.\n */\nstruct TokenOut {\n address token;\n uint256 minAmount;\n address recipient;\n}\n\n/**\n * @dev Represents a transfer operation containing multiple token transfers.\n * @param chainId Chain ID where the transfers should be executed.\n * @param transfers List of token transfers to be performed.\n */\nstruct TransferOperation {\n uint256 chainId;\n TransferData[] transfers;\n}\n\n/**\n * @dev Transfer data for a single token transfer.\n * @param token Address of the token to transfer.\n * @param amount Amount of the token to transfer.\n * @param recipient Recipient of the token transfer.\n */\nstruct TransferData {\n address token;\n uint256 amount;\n address recipient;\n}\n\n/**\n * @dev Represents a generic call operation consisting of one or more contract calls.\n * @param chainId Chain ID where the calls should be executed.\n * @param calls List of low-level contract calls to be executed.\n */\nstruct CallOperation {\n uint256 chainId;\n CallData[] calls;\n}\n\n/**\n * @dev Low-level call data for a target contract interaction.\n * @param target Target contract address.\n * @param data Calldata to be sent to the target.\n * @param value ETH value to send along with the call.\n */\nstruct CallData {\n address target;\n bytes data;\n uint256 value;\n}\n\n/**\n * @dev Represents a generic dynamic call operation consisting of one or more dynamic contract calls.\n * @param chainId Chain ID where the calls should be executed.\n * @param calls List of ABI-encoded low-level dynamic contract calls to be executed.\n */\nstruct DynamicCallOperation {\n uint256 chainId;\n bytes[] calls;\n}\n\n/**\n * @dev Generic proposal structure representing a solver’s response to an intent.\n * @param deadline Timestamp until when the proposal is valid.\n * @param datas List of ABI-encoded proposal-specific data (e.g. SwapProposal).\n * @param fees List of fee amounts the solver requires for execution.\n */\nstruct Proposal {\n uint256 deadline;\n bytes[] datas;\n uint256[] fees;\n}\n\n/**\n * @dev Swap proposal representation for a swap operation.\n * @param executor Address of the executor contract that should be called during operation execution.\n * @param data Arbitrary data used to call the executor contract.\n * @param amountsOut List of amounts of tokens out proposed by the solver.\n */\nstruct SwapProposal {\n address executor;\n bytes data;\n uint256[] amountsOut;\n}\n\nlibrary IntentsHelpers {\n bytes32 internal constant INTENT_TYPE_HASH =\n keccak256(\n 'Intent(address feePayer,address settler,bytes32 nonce,uint256 deadline,MaxFee[] maxFees,bytes triggerSig,uint256 minValidations,Operation[] operations)MaxFee(address token,uint256 amount)Operation(uint8 opType,address user,bytes data,OperationEvent[] events)OperationEvent(bytes32 topic,bytes data)'\n );\n\n bytes32 internal constant PROPOSAL_TYPE_HASH =\n keccak256('Proposal(bytes32 intent,address solver,uint256 deadline,bytes[] datas,uint256[] fees)');\n\n bytes32 internal constant VALIDATION_TYPE_HASH = keccak256('Validation(bytes32 intent)');\n\n bytes32 internal constant MAX_FEE_TYPE_HASH = keccak256('MaxFee(address token,uint256 amount)');\n\n bytes32 internal constant OPERATION_TYPE_HASH =\n keccak256('Operation(uint8 opType,address user,bytes data,OperationEvent[] events)');\n\n bytes32 internal constant OPERATION_EVENT_TYPE_HASH = keccak256('OperationEvent(bytes32 topic,bytes data)');\n\n function hash(Intent memory intent) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n INTENT_TYPE_HASH,\n intent.feePayer,\n intent.settler,\n intent.nonce,\n intent.deadline,\n hash(intent.maxFees),\n intent.triggerSig,\n intent.minValidations,\n hash(intent.operations)\n )\n );\n }\n\n function hash(Proposal memory proposal, Intent memory intent, address solver) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n PROPOSAL_TYPE_HASH,\n hash(intent),\n solver,\n proposal.deadline,\n hash(proposal.datas),\n hash(proposal.fees)\n )\n );\n }\n\n function hash(MaxFee[] memory fees) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](fees.length);\n for (uint256 i = 0; i < fees.length; i++) {\n hashes[i] = keccak256(abi.encode(MAX_FEE_TYPE_HASH, fees[i].token, fees[i].amount));\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Operation[] memory operations) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](operations.length);\n for (uint256 i = 0; i < operations.length; i++) hashes[i] = hash(operations[i]);\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Operation memory operation) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n OPERATION_TYPE_HASH,\n operation.opType,\n operation.user,\n keccak256(operation.data),\n hash(operation.events)\n )\n );\n }\n\n function hash(OperationEvent[] memory events) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](events.length);\n for (uint256 i = 0; i < events.length; i++) {\n hashes[i] = keccak256(abi.encode(OPERATION_EVENT_TYPE_HASH, events[i].topic, keccak256(events[i].data)));\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(uint256[] memory fees) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(fees));\n }\n\n function hash(bytes[] memory datas) internal pure returns (bytes32) {\n bytes32[] memory hashes = new bytes32[](datas.length);\n for (uint256 i = 0; i < datas.length; i++) {\n hashes[i] = keccak256(datas[i]);\n }\n return keccak256(abi.encodePacked(hashes));\n }\n\n function hash(Validation memory validation) internal pure returns (bytes32) {\n return keccak256(abi.encode(VALIDATION_TYPE_HASH, validation.intent));\n }\n}\n" + }, + "project/contracts/interfaces/IController.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @title Controller interface\n */\ninterface IController {\n /**\n * @dev The input arrays are not of equal length\n */\n error ControllerInputInvalidLength();\n\n /**\n * @dev Emitted every time a solver permission is set\n */\n event SolverAllowedSet(address indexed solver, bool allowed);\n\n /**\n * @dev Emitted every time an executor permission is set\n */\n event ExecutorAllowedSet(address indexed executor, bool allowed);\n\n /**\n * @dev Emitted every time a proposal signer permission is set\n */\n event ProposalSignerAllowedSet(address indexed proposalSigner, bool allowed);\n\n /**\n * @dev Emitted every time a validator permission is set\n */\n event ValidatorAllowedSet(address indexed validator, bool allowed);\n\n /**\n * @dev Emitted when the minimum validations changes\n */\n event MinValidationSet(uint8 indexed newMinValidation);\n\n /**\n * @dev Tells whether a solver is allowed\n * @param solver Address of the solver being queried\n */\n function isSolverAllowed(address solver) external view returns (bool);\n\n /**\n * @dev Tells whether an executor is allowed\n * @param executor Address of the executor being queried\n */\n function isExecutorAllowed(address executor) external view returns (bool);\n\n /**\n * @dev Tells whether a proposal signer is allowed\n * @param signer Address of the proposal signer being queried\n */\n function isProposalSignerAllowed(address signer) external view returns (bool);\n\n /**\n * @dev Tells whether a validator is allowed\n * @param validator Address of the validator being queried\n */\n function isValidatorAllowed(address validator) external view returns (bool);\n\n /**\n * @dev Tells the minimum number of validations allowed\n */\n function minValidations() external view returns (uint8);\n\n /**\n * @dev Sets permissions for multiple solvers\n * @param solvers List of solver addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedSolvers(address[] memory solvers, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple executors\n * @param executors List of executor addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedExecutors(address[] memory executors, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple proposal signers\n * @param signers List of proposal signer addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedProposalSigners(address[] memory signers, bool[] memory alloweds) external;\n\n /**\n * @dev Sets permissions for multiple validators\n * @param validators List of validator addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedValidators(address[] memory validators, bool[] memory alloweds) external;\n\n /**\n * @dev Sets the minimum number of validations allowed\n * @param newMinValidations minimum number of validations allowed\n */\n function setMinValidations(uint8 newMinValidations) external;\n}\n" + }, + "project/contracts/interfaces/ICreateX.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity ^0.8.4;\n\n/**\n * @title CreateX Factory Interface Definition\n * @author pcaversaccio (https://web.archive.org/web/20230921103111/https://pcaversaccio.com/)\n * @custom:coauthor Matt Solomon (https://web.archive.org/web/20230921103335/https://mattsolomon.dev/)\n */\ninterface ICreateX {\n event ContractCreation(address indexed newContract);\n\n function deployCreate3(bytes32 salt, bytes memory initCode) external payable returns (address newContract);\n}\n" + }, + "project/contracts/interfaces/IDynamicCallEncoder.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../dynamic-calls/DynamicCallTypes.sol';\n\ninterface IDynamicCallEncoder {\n /**\n * @dev The argument is not word-aligned\n */\n error DynamicCallEncoderBadLength();\n\n /**\n * @dev The dynamic value resolves to empty data\n */\n error DynamicCallEncoderEmptyDynamic();\n\n /**\n * @dev The variable reference is not exactly one word\n */\n error DynamicCallEncoderVariableRefBadLength();\n\n /**\n * @dev The variable index is outside the variables array\n */\n error DynamicCallEncoderVariableOutOfBounds();\n\n /**\n * @dev The declared variables length exceeds the variables array length\n */\n error DynamicCallEncoderVariablesLengthOutOfBounds();\n\n /**\n * @dev The argument kind is not valid\n */\n error DynamicCallEncoderInvalidArgKind();\n\n /**\n * @dev Encodes a dynamic call into calldata.\n * @param dynamicCall Dynamic call specification.\n * @param variables List of resolved variable values.\n * @param variablesLength Number of resolved variables.\n */\n function encode(DynamicCall memory dynamicCall, bytes[][] memory variables, uint256 variablesLength)\n external\n pure\n returns (bytes memory);\n}\n" + }, + "project/contracts/interfaces/IExecutor.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\n\n/**\n * @title Executor interface\n */\ninterface IExecutor {\n /**\n * @dev Executes an operation proposal\n * @param operation Operation to be executed\n * @param operationHash unique hash of the operation\n * @param proposalData data of the proposal to be executed to fulfill the operation\n */\n function execute(Operation memory operation, bytes32 operationHash, bytes memory proposalData) external;\n}\n" + }, + "project/contracts/interfaces/IOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\nimport '../safeguards/Safeguards.sol';\n\n/**\n * @title OperationsValidator\n * @dev Performs operations validations based on safeguards\n */\ninterface IOperationsValidator {\n /**\n * @dev Validates an operation for a safeguard\n * @param operation Operation to be validated\n * @param config Safeguard config to validate the operation with\n */\n function validate(Operation memory operation, bytes memory config) external pure;\n}\n" + }, + "project/contracts/interfaces/IPaymentsReceiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @title PaymentsReceiver interface\n */\ninterface IPaymentsReceiver {\n /**\n * @dev The token address is zero\n */\n error PaymentsReceiverTokenZero();\n\n /**\n * @dev The recipient address is zero\n */\n error PaymentsReceiverRecipientZero();\n\n /**\n * @dev The amount is zero\n */\n error PaymentsReceiverAmountZero();\n\n /**\n * @dev The user address is zero\n */\n error PaymentsReceiverUserZero();\n\n /**\n * @dev The input arrays are not of equal length\n */\n error PaymentsReceiverInputInvalidLength();\n\n /**\n * @dev The token is not allowed\n */\n error PaymentsReceiverTokenNotAllowed(address token);\n\n /**\n * @dev Emitted every time a deposit is made\n */\n event Deposited(\n address indexed token,\n address indexed depositor,\n address indexed user,\n uint256 amount,\n uint8 decimals\n );\n\n /**\n * @dev Emitted every time a withdrawal is made\n */\n event Withdrawn(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time a token permission is set\n */\n event TokenAllowedSet(address indexed token, bool allowed);\n\n /**\n * @dev Tells whether a token is allowed\n * @param token Address of the token being queried\n */\n function isTokenAllowed(address token) external view returns (bool);\n\n /**\n * @dev Sets permissions for multiple tokens\n * @param tokens List of token addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedTokens(address[] memory tokens, bool[] memory alloweds) external;\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param amount Amount to deposit\n */\n function deposit(address token, uint256 amount) external;\n\n /**\n * @dev Deposits ERC20 tokens on behalf of a user\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function depositOnBehalf(address token, address user, uint256 amount) external;\n\n /**\n * @dev Withdraws ERC20 tokens to a recipient\n * @param token Address of the token to withdraw\n * @param recipient Address of the recipient\n * @param amount Amount to withdraw\n */\n function withdraw(address token, address recipient, uint256 amount) external;\n}\n" + }, + "project/contracts/interfaces/ISafe.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nenum SafeOperation {\n Call,\n DelegateCall\n}\n\ninterface ISafe {\n function getThreshold() external view returns (uint256);\n\n function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, SafeOperation operation)\n external\n returns (bool success, bytes memory returnData);\n}\n" + }, + "project/contracts/interfaces/ISettler.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../Intents.sol';\nimport '../safeguards/Safeguards.sol';\n\n/**\n * @title Settler interface\n */\ninterface ISettler {\n /**\n * @dev The requested operation type is unknown\n */\n error SettlerUnknownOperationType(uint8 opType);\n\n /**\n * @dev The simulation has been successful\n */\n error SettlerSimulationSuccess(uint256 gasUsed);\n\n /**\n * @dev The solver is not allowed\n */\n error SettlerSolverNotAllowed(address solver);\n\n /**\n * @dev The executor is not allowed\n */\n error SettlerExecutorNotAllowed(address executor);\n\n /**\n * @dev The proposal signer is not allowed\n */\n error SettlerProposalSignerNotAllowed(address signer);\n\n /**\n * @dev The validator is not allowed\n */\n error SettlerValidatorNotAllowed(address validator);\n\n /**\n * @dev The validator is duplicated\n */\n error SettlerValidatorDuplicatedOrUnsorted(address previous, address current);\n\n /**\n * @dev The settler is not the current contract\n */\n error SettlerInvalidSettler(address settler);\n\n /**\n * @dev The nonce is zero\n */\n error SettlerNonceZero();\n\n /**\n * @dev The intent has already been executed\n */\n error SettlerIntentAlreadyExecuted(bytes32 hash);\n\n /**\n * @dev The intent deadline is in the past\n */\n error SettlerIntentPastDeadline(uint256 deadline, uint256 timestamp);\n\n /**\n * @dev The current chain is not valid\n */\n error SettlerInvalidChain(uint256 chainId);\n\n /**\n * @dev The recipient is the settler contract\n */\n error SettlerInvalidRecipient(address to);\n\n /**\n * @dev The user is not a smart account\n */\n error SettlerUserNotSmartAccount(address user);\n\n /**\n * @dev The amount out is lower than the proposed amount\n */\n error SettlerAmountOutLtProposed(uint256 index, uint256 amountOut, uint256 proposed);\n\n /**\n * @dev The proposed amount is lower than the minimum amount\n */\n error SettlerProposedAmountLtMinAmount(uint256 index, uint256 proposed, uint256 minAmount);\n\n /**\n * @dev The proposed amounts array and the tokens out array are not of equal length\n */\n error SettlerInvalidProposedAmounts();\n\n /**\n * @dev The balance after the proposal execution is lower than the balance before\n */\n error SettlerPostBalanceOutLtPre(uint256 index, uint256 post, uint256 pre);\n\n /**\n * @dev The solver fees length does not match the requested by the user\n */\n error SettlerSolverFeeInvalidLength();\n\n /**\n * @dev The intent operations array is empty\n */\n error SettlerIntentOperationsEmpty();\n\n /**\n * @dev The proposal datas length does not match the intent operations length\n */\n error SettlerProposalDataInvalidLength();\n\n /**\n * @dev The solver fee is too high\n */\n error SettlerSolverFeeTooHigh(uint256 fee, uint256 max);\n\n /**\n * @dev The intent validations are not enough\n */\n error SettlerIntentValidationsNotEnough(uint256 min, uint256 current);\n\n /**\n * @dev The proposal deadline is in the past\n */\n error SettlerProposalPastDeadline(uint256 deadline, uint256 timestamp);\n\n /**\n * @dev The proposal data is not empty\n */\n error SettlerProposalDataNotEmpty();\n\n /**\n * @dev The rescue funds recipient is zero\n */\n error SettlerRescueFundsRecipientZero();\n\n /**\n * @dev The list of safeguards exceed the maximum allowed\n */\n error SettlerTooManySafeguards(uint256 lengthRequested);\n\n /**\n * @dev The chains of a swap operation do not match the swap type (single or cross chain)\n */\n error SettlerOperationChainsMismatch();\n\n /**\n * @dev A CrossChainSwap operation must be the only operation in the intent\n */\n error SettlerCrossChainSwapMustBeOnlyOperation();\n\n /**\n * @dev The new smart accounts handler is zero\n */\n error SmartAccountsHandlerZero();\n\n /**\n * @dev The new dynamic call encoder is zero\n */\n error SettlerDynamicCallEncoderZero();\n\n /**\n * @dev Custom events emitted for each operation\n */\n event OperationExecuted(\n address indexed user,\n bytes32 indexed topic,\n uint8 indexed opType,\n Operation operation,\n Proposal proposal,\n bytes32 intentHash,\n uint256 index,\n bytes output,\n bytes data\n );\n\n /**\n * @dev Emitted every time an intent is fulfilled\n */\n event ProposalExecuted(bytes32 indexed proposal);\n\n /**\n * @dev Emitted every time tokens are withdrawn from the contract balance\n */\n event FundsRescued(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time the smart accounts handler is set\n */\n event SmartAccountsHandlerSet(address indexed smartAccountsHandler);\n\n /**\n * @dev Emitted every time the operations validator is set\n */\n event OperationsValidatorSet(address indexed operationsValidator);\n\n /**\n * @dev Emitted every time the dynamic call encoder is set\n */\n event DynamicCallEncoderSet(address indexed dynamicCallEncoder);\n\n /**\n * @dev Emitted every time a safeguard is set\n */\n event SafeguardSet(address indexed user);\n\n /**\n * @dev Tells the reference to the Mimic controller\n */\n function controller() external view returns (address);\n\n /**\n * @dev Tells the reference to the smart accounts handler\n */\n function smartAccountsHandler() external view returns (address);\n\n /**\n * @dev Tells the reference to the operations validator\n */\n function operationsValidator() external view returns (address);\n\n /**\n * @dev Tells the reference to the dynamic call encoder\n */\n function dynamicCallEncoder() external view returns (address);\n\n /**\n * @dev Tells the block at which an intent was executed. Returns 0 if unexecuted.\n * @param hash Hash of the intent being queried\n */\n function getIntentBlock(bytes32 hash) external view returns (uint256);\n\n /**\n * @dev Tells the safeguard set for a user\n * @param user Address of the user being queried\n */\n function getUserSafeguard(address user) external view returns (bytes memory);\n\n /**\n * @dev Tells the hash of an intent\n * @param intent Intent to get the hash of\n */\n function getIntentHash(Intent memory intent) external pure returns (bytes32);\n\n /**\n * @dev Tells the hash of a proposal\n * @param proposal Proposal to be hashed\n * @param intent Intent being fulfilled by the requested proposal\n * @param solver Address of the solver that made the proposal\n */\n function getProposalHash(Proposal memory proposal, Intent memory intent, address solver)\n external\n pure\n returns (bytes32);\n\n /**\n * @dev Withdraws ERC20 or native tokens from the contract\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function rescueFunds(address token, address recipient, uint256 amount) external;\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function setSmartAccountsHandler(address newSmartAccountsHandler) external;\n\n /**\n * @dev Sets a new operations validator address\n * @param newOperationsValidator New operations validator to be set\n */\n function setOperationsValidator(address newOperationsValidator) external;\n\n /**\n * @dev Sets a new dynamic call encoder address\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function setDynamicCallEncoder(address newDynamicCallEncoder) external;\n\n /**\n * @dev Sets a safeguard for a user\n * @param safeguard Safeguard to be set\n */\n function setSafeguard(bytes memory safeguard) external;\n\n /**\n * @dev Executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function execute(Intent memory intent, Proposal memory proposal, bytes memory signature) external;\n\n /**\n * @dev Simulates an execution. It will always revert. Successful executions are returned as\n * `SettlerSimulationSuccess` errors. Any other error should be treated as failure.\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function simulate(Intent memory intent, Proposal memory proposal, bytes memory signature) external;\n}\n" + }, + "project/contracts/interfaces/ISmartAccount.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/introspection/IERC165.sol';\n\n/**\n * @title SmartAccount interface\n */\ninterface ISmartAccount is IERC165 {\n /**\n * @dev Emitted every time tokens are transferred\n */\n event Transferred(address indexed token, address indexed recipient, uint256 amount);\n\n /**\n * @dev Emitted every time `call` is called\n */\n event Called(address indexed target, bytes data, uint256 value, bytes result);\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the owner or the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) external;\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the owner or the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n */\n function call(address target, bytes memory data, uint256 value) external returns (bytes memory result);\n}\n" + }, + "project/contracts/interfaces/ISmartAccountContract.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/interfaces/IERC1271.sol';\n\nimport './ISmartAccount.sol';\n\n/**\n * @title SmartAccountContract interface\n */\ninterface ISmartAccountContract is ISmartAccount, IERC1271 {\n // solhint-disable-previous-line no-empty-blocks\n}\n" + }, + "project/contracts/interfaces/ISmartAccountsHandler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\ninterface ISmartAccountsHandler {\n /**\n * @dev The smart account given is not supported\n */\n error SmartAccountsHandlerUnsupportedAccount(address account);\n\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address account) external view returns (bool);\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address account, address token, address to, uint256 amount) external;\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address account, address target, bytes memory data, uint256 value) external returns (bytes memory);\n}\n" + }, + "project/contracts/payments/PaymentsReceiver.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\n\nimport '../interfaces/IPaymentsReceiver.sol';\n\n/**\n * @title PaymentsReceiver\n * @dev Receives ERC20 deposits and lets the owner withdraw them\n */\ncontract PaymentsReceiver is IPaymentsReceiver, Ownable {\n using SafeERC20 for IERC20;\n\n // List of allowed tokens\n mapping (address => bool) public override isTokenAllowed;\n\n /**\n * @dev Creates a new PaymentsReceiver contract\n * @param owner Address that will own the contract\n * @param tokens List of allowed tokens\n */\n constructor(address owner, address[] memory tokens) Ownable(owner) {\n for (uint256 i = 0; i < tokens.length; i++) _setAllowedToken(tokens[i], true);\n }\n\n /**\n * @dev Sets permissions for multiple tokens\n * @param tokens List of token addresses\n * @param alloweds List of permission statuses\n */\n function setAllowedTokens(address[] memory tokens, bool[] memory alloweds) external override onlyOwner {\n if (tokens.length != alloweds.length) revert PaymentsReceiverInputInvalidLength();\n for (uint256 i = 0; i < tokens.length; i++) _setAllowedToken(tokens[i], alloweds[i]);\n }\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param amount Amount to deposit\n */\n function deposit(address token, uint256 amount) external override {\n _deposit(token, _msgSender(), amount);\n }\n\n /**\n * @dev Deposits ERC20 tokens on behalf of a user\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function depositOnBehalf(address token, address user, uint256 amount) external override {\n if (user == address(0)) revert PaymentsReceiverUserZero();\n _deposit(token, user, amount);\n }\n\n /**\n * @dev Withdraws ERC20 tokens to a recipient\n * @param token Address of the token to withdraw\n * @param recipient Address of the recipient\n * @param amount Amount to withdraw\n */\n function withdraw(address token, address recipient, uint256 amount) external override onlyOwner {\n if (token == address(0)) revert PaymentsReceiverTokenZero();\n if (recipient == address(0)) revert PaymentsReceiverRecipientZero();\n if (amount == 0) revert PaymentsReceiverAmountZero();\n\n IERC20(token).safeTransfer(recipient, amount);\n\n emit Withdrawn(token, recipient, amount);\n }\n\n /**\n * @dev Deposits ERC20 tokens into the contract\n * @param token Address of the token to deposit\n * @param user Address to attribute the deposit to\n * @param amount Amount to deposit\n */\n function _deposit(address token, address user, uint256 amount) internal {\n if (token == address(0)) revert PaymentsReceiverTokenZero();\n if (amount == 0) revert PaymentsReceiverAmountZero();\n if (!isTokenAllowed[token]) revert PaymentsReceiverTokenNotAllowed(token);\n\n address depositor = _msgSender();\n IERC20(token).safeTransferFrom(depositor, address(this), amount);\n\n uint8 decimals = IERC20Metadata(token).decimals();\n emit Deposited(token, depositor, user, amount, decimals);\n }\n\n /**\n * @dev Sets a token permission\n */\n function _setAllowedToken(address token, bool allowed) internal {\n isTokenAllowed[token] = allowed;\n emit TokenAllowedSet(token, allowed);\n }\n}\n" + }, + "project/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol';\n\ncontract Proxy is TransparentUpgradeableProxy {\n constructor(address implementation, address initialOwner, bytes memory data)\n TransparentUpgradeableProxy(implementation, initialOwner, data)\n {}\n}\n" + }, + "project/contracts/safeguards/BaseOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @title BaseOperationsValidator\n */\ncontract BaseOperationsValidator {\n /**\n * @dev No operations allowed\n */\n error OperationsValidatorNoneAllowed();\n\n /**\n * @dev Operation type unknown\n */\n error OperationsValidatorUnknownOperationType(uint8 opType);\n\n /**\n * @dev Invalid safeguard mode\n */\n error OperationsValidatorInvalidSafeguardMode(uint8 mode);\n\n /**\n * @dev Tells whether a chain is allowed\n */\n function _isChainAllowed(uint256 chainId, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, uint256[] memory values) = abi.decode(config, (bool, uint256[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (chainId == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (chainId == values[i]) return true;\n }\n return false;\n }\n }\n\n /**\n * @dev Tells whether an account is allowed\n */\n function _isAccountAllowed(address account, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, address[] memory values) = abi.decode(config, (bool, address[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (account == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (account == values[i]) return true;\n }\n return false;\n }\n }\n\n /**\n * @dev Tells whether a selector is allowed\n */\n function _isSelectorAllowed(bytes4 selector, bytes memory config) internal pure returns (bool) {\n (bool isDenyList, bytes4[] memory values) = abi.decode(config, (bool, bytes4[]));\n if (isDenyList) {\n for (uint256 i = 0; i < values.length; i++) {\n if (selector == values[i]) return false;\n }\n return true;\n } else {\n for (uint256 i = 0; i < values.length; i++) {\n if (selector == values[i]) return true;\n }\n return false;\n }\n }\n}\n" + }, + "project/contracts/safeguards/CallOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './Safeguards.sol';\nimport './BaseOperationsValidator.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Call safeguard modes to validate call operations\n * @param None To ensure no calls are allowed\n * @param Chain To validate that the chain where calls execute is allowed\n * @param Target To validate that the call targets (contract addresses) are allowed\n * @param Selector To validate that the function selectors being called are allowed\n */\nenum CallSafeguardMode {\n None,\n Chain,\n Target,\n Selector\n}\n\n/**\n * @title CallOperationsValidator\n * @dev Performs call operations validations based on safeguards\n */\ncontract CallOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a call operation is valid for a safeguard\n * @param operation Call operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isCallOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n CallOperation memory callOperation = abi.decode(operation.data, (CallOperation));\n if (safeguard.mode == uint8(CallSafeguardMode.Chain))\n return _isChainAllowed(callOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Target))\n return _areCallTargetsValid(callOperation.calls, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Selector))\n return _areCallSelectorsValid(callOperation.calls, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the call targets are allowed\n */\n function _areCallTargetsValid(CallData[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n if (!_isAccountAllowed(calls[i].target, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the call selectors are allowed\n */\n function _areCallSelectorsValid(CallData[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n if (!_isSelectorAllowed(bytes4(calls[i].data), config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/DynamicCallOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './CallOperationsValidator.sol';\nimport './Safeguards.sol';\nimport './BaseOperationsValidator.sol';\nimport '../Intents.sol';\nimport '../dynamic-calls/DynamicCallTypes.sol';\n\n/**\n * @title DynamicCallOperationsValidator\n * @dev Performs dynamic call operations validations based on call safeguards\n */\ncontract DynamicCallOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a dynamic call operation is valid for a safeguard\n * @param operation Dynamic call operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isDynamicCallOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n DynamicCallOperation memory dynamicCallOperation = abi.decode(operation.data, (DynamicCallOperation));\n if (safeguard.mode == uint8(CallSafeguardMode.Chain))\n return _isChainAllowed(dynamicCallOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Target))\n return _areDynamicCallTargetsValid(dynamicCallOperation.calls, safeguard.config);\n if (safeguard.mode == uint8(CallSafeguardMode.Selector))\n return _areDynamicCallSelectorsValid(dynamicCallOperation.calls, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the dynamic call targets are allowed\n */\n function _areDynamicCallTargetsValid(bytes[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n DynamicCall memory call = abi.decode(calls[i], (DynamicCall));\n if (!_isAccountAllowed(call.target, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the dynamic call selectors are allowed\n */\n function _areDynamicCallSelectorsValid(bytes[] memory calls, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < calls.length; i++) {\n DynamicCall memory call = abi.decode(calls[i], (DynamicCall));\n if (!_isSelectorAllowed(call.selector, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/OperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './CallOperationsValidator.sol';\nimport './DynamicCallOperationsValidator.sol';\nimport './TransferOperationsValidator.sol';\nimport './Safeguards.sol';\nimport './SwapOperationsValidator.sol';\nimport '../Intents.sol';\nimport '../interfaces/IOperationsValidator.sol';\n\n/**\n * @title OperationsValidator\n * @dev Performs operations validations based on safeguards\n */\ncontract OperationsValidator is\n IOperationsValidator,\n SwapOperationsValidator,\n TransferOperationsValidator,\n CallOperationsValidator,\n DynamicCallOperationsValidator\n{\n /**\n * @dev Safeguard validation failed\n */\n error OperationsValidatorSafeguardFailed();\n\n /**\n * @dev Invalid safeguard config mode\n */\n error OperationsValidatorInvalidSafeguardConfigMode(uint8 mode);\n\n /**\n * @dev Invalid safeguard group logic mode\n */\n error OperationsValidatorInvalidSafeguardGroupLogicMode(uint8 mode);\n\n /**\n * @dev Tells whether an operation is valid for a safeguard\n * @param operation Operation to be validated\n * @param config Safeguard config to validate the operation with\n */\n function validate(Operation memory operation, bytes memory config) external pure override {\n (uint8 mode, bytes memory safeguard) = abi.decode(config, (uint8, bytes));\n if (mode == uint8(SafeguardConfigMode.List)) _validate(operation, abi.decode(safeguard, (Safeguard[])));\n else if (mode == uint8(SafeguardConfigMode.Tree)) _validate(operation, _decodeSafeguardTree(safeguard));\n else revert OperationsValidatorInvalidSafeguardConfigMode(mode);\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguards list\n * @param operation Operation to be validated\n * @param safeguards Safeguard list to validate the operation with\n */\n function _validate(Operation memory operation, Safeguard[] memory safeguards) internal pure {\n if (safeguards.length == 0) revert OperationsValidatorSafeguardFailed();\n for (uint256 i = 0; i < safeguards.length; i++) {\n if (!_isSafeguardValid(operation, safeguards[i])) revert OperationsValidatorSafeguardFailed();\n }\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard tree\n * @param operation Operation to be validated\n * @param tree Safeguard tree to validate the operation with\n */\n function _validate(Operation memory operation, SafeguardTree memory tree) internal pure {\n if (tree.nodes.length == 0) revert OperationsValidatorSafeguardFailed();\n if (!_isSafeguardGroupValid(operation, tree, 0)) revert OperationsValidatorSafeguardFailed();\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard tree at a certain level\n * @param operation Operation to be validated\n * @param tree Safeguard tree to validate the operation with\n * @param index Index of the group node to evaluate\n */\n function _isSafeguardGroupValid(Operation memory operation, SafeguardTree memory tree, uint16 index)\n internal\n pure\n returns (bool)\n {\n SafeguardGroup memory group = tree.nodes[index];\n\n if (group.logic == uint8(SafeguardGroupLogic.NOT)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i])) return false;\n }\n return true;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.AND)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (!_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (!_isSafeguardGroupValid(operation, tree, group.children[i])) return false;\n }\n return true;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.OR)) {\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]])) return true;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i])) return true;\n }\n return false;\n }\n\n if (group.logic == uint8(SafeguardGroupLogic.XOR)) {\n uint256 hits = 0;\n for (uint256 i = 0; i < group.leaves.length; i++) {\n if (_isSafeguardValid(operation, tree.leaves[group.leaves[i]]))\n if (++hits > 1) return false;\n }\n for (uint256 i = 0; i < group.children.length; i++) {\n if (_isSafeguardGroupValid(operation, tree, group.children[i]))\n if (++hits > 1) return false;\n }\n return hits == 1;\n }\n\n revert OperationsValidatorInvalidSafeguardGroupLogicMode(group.logic);\n }\n\n /**\n * @dev Tells whether an operation is valid for a safeguard\n * @param operation Operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isSafeguardValid(Operation memory operation, Safeguard memory safeguard) internal pure returns (bool) {\n if (safeguard.mode == uint8(0)) revert OperationsValidatorNoneAllowed();\n if (operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap)) {\n return _isSwapOperationValid(operation, safeguard);\n }\n if (operation.opType == uint8(OpType.Transfer)) return _isTransferOperationValid(operation, safeguard);\n if (operation.opType == uint8(OpType.Call)) return _isCallOperationValid(operation, safeguard);\n if (operation.opType == uint8(OpType.DynamicCall)) return _isDynamicCallOperationValid(operation, safeguard);\n revert OperationsValidatorUnknownOperationType(uint8(operation.opType));\n }\n\n /**\n * @dev Safely decodes a safeguard tree avoiding compiler issues with dynamic arrays\n * @param data Safeguard tree data to be decoded\n */\n function _decodeSafeguardTree(bytes memory data) private pure returns (SafeguardTree memory) {\n (SafeguardGroup[] memory nodes, Safeguard[] memory leaves) = abi.decode(data, (SafeguardGroup[], Safeguard[]));\n return SafeguardTree(nodes, leaves);\n }\n}\n" + }, + "project/contracts/safeguards/Safeguards.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Safeguard config modes\n * - List: Safeguard lists\n * - Tree: Safeguard groups\n */\nenum SafeguardConfigMode {\n List,\n Tree\n}\n\n/**\n * @dev Logical operators for safeguard groups\n * - AND: every child must pass\n * - OR: at least one child must pass\n * - XOR: exactly one child must pass\n * - NOT: every child must fail\n */\nenum SafeguardGroupLogic {\n AND,\n OR,\n XOR,\n NOT\n}\n\n/**\n * @dev Flat node in the safeguard tree\n * @param logic Group operator (AND/OR/XOR/NOT)\n * @param leaves Indices into `SafeguardTree.leaves`\n * @param children Indices into `SafeguardTree.nodes`\n */\nstruct SafeguardGroup {\n uint8 logic;\n uint16[] leaves;\n uint16[] children;\n}\n\n/**\n * @dev Safeguard tree representation\n * @param nodes List of all the nodes in the tree\n * @param leaves List of all the leaves in the tree\n */\nstruct SafeguardTree {\n SafeguardGroup[] nodes;\n Safeguard[] leaves;\n}\n\n/**\n * @dev Safeguard representation\n * @param mode Safeguard mode\n * @param config Safeguard configuration settings or parameters\n */\nstruct Safeguard {\n uint8 mode;\n bytes config;\n}\n" + }, + "project/contracts/safeguards/SwapOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './BaseOperationsValidator.sol';\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Swap safeguard modes to validate swap operations\n * @param None To ensure no swaps are allowed\n * @param SourceChain To validate that the source chain is allowed\n * @param DestinationChain To validate that the destination chain is allowed\n * @param TokenIn To validate that the tokens to be sent are allowed\n * @param TokenOut To validate that the tokens to be received are allowed\n * @param Recipient To validate that the recipients that will receive the tokens are allowed\n */\nenum SwapSafeguardMode {\n None,\n SourceChain,\n DestinationChain,\n TokenIn,\n TokenOut,\n Recipient\n}\n\n/**\n * @title SwapOperationsValidator\n * @dev Performs swap operations validations based on safeguards\n */\ncontract SwapOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a swap operation is valid for a safeguard\n * @param operation Swap operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isSwapOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n SwapOperation memory swapOperation = abi.decode(operation.data, (SwapOperation));\n if (safeguard.mode == uint8(SwapSafeguardMode.SourceChain))\n return _isChainAllowed(swapOperation.sourceChain, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.DestinationChain))\n return _isChainAllowed(swapOperation.destinationChain, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.TokenIn))\n return _areSwapTokensInValid(swapOperation.tokensIn, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.TokenOut))\n return _areSwapTokensOutValid(swapOperation.tokensOut, safeguard.config);\n if (safeguard.mode == uint8(SwapSafeguardMode.Recipient))\n return _areSwapRecipientsValid(swapOperation.tokensOut, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the tokens to be sent are allowed\n */\n function _areSwapTokensInValid(TokenIn[] memory tokensIn, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensIn.length; i++) {\n if (!_isAccountAllowed(tokensIn[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the tokens to be received are allowed\n */\n function _areSwapTokensOutValid(TokenOut[] memory tokensOut, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensOut.length; i++) {\n if (!_isAccountAllowed(tokensOut[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the recipients to be received are allowed\n */\n function _areSwapRecipientsValid(TokenOut[] memory tokensOut, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < tokensOut.length; i++) {\n if (!_isAccountAllowed(tokensOut[i].recipient, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/safeguards/TransferOperationsValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport './BaseOperationsValidator.sol';\nimport './Safeguards.sol';\nimport '../Intents.sol';\n\n/**\n * @dev Transfer safeguard modes to validate transfer operations\n * @param None To ensure no transfers are allowed\n * @param Chain To validate that the chain where transfers execute is allowed\n * @param Token To validate that the tokens being transferred are allowed\n * @param Recipient To validate that the recipients of the transfers are allowed\n */\nenum TransferSafeguardMode {\n None,\n Chain,\n Token,\n Recipient\n}\n\n/**\n * @title TransferOperationsValidator\n * @dev Performs transfer operations validations based on safeguards\n */\ncontract TransferOperationsValidator is BaseOperationsValidator {\n /**\n * @dev Tells whether a transfer operation is valid for a safeguard\n * @param operation Transfer operation to be validated\n * @param safeguard Safeguard to validate the operation with\n */\n function _isTransferOperationValid(Operation memory operation, Safeguard memory safeguard)\n internal\n pure\n returns (bool)\n {\n TransferOperation memory transferOperation = abi.decode(operation.data, (TransferOperation));\n if (safeguard.mode == uint8(TransferSafeguardMode.Chain))\n return _isChainAllowed(transferOperation.chainId, safeguard.config);\n if (safeguard.mode == uint8(TransferSafeguardMode.Token))\n return _areTransferTokensValid(transferOperation.transfers, safeguard.config);\n if (safeguard.mode == uint8(TransferSafeguardMode.Recipient))\n return _areTransferRecipientsValid(transferOperation.transfers, safeguard.config);\n revert OperationsValidatorInvalidSafeguardMode(safeguard.mode);\n }\n\n /**\n * @dev Tells whether the tokens being transferred are allowed\n */\n function _areTransferTokensValid(TransferData[] memory transfers, bytes memory config) private pure returns (bool) {\n for (uint256 i = 0; i < transfers.length; i++) {\n if (!_isAccountAllowed(transfers[i].token, config)) return false;\n }\n return true;\n }\n\n /**\n * @dev Tells whether the recipients of the transfers are allowed\n */\n function _areTransferRecipientsValid(TransferData[] memory transfers, bytes memory config)\n private\n pure\n returns (bool)\n {\n for (uint256 i = 0; i < transfers.length; i++) {\n if (!_isAccountAllowed(transfers[i].recipient, config)) return false;\n }\n return true;\n }\n}\n" + }, + "project/contracts/Settler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';\nimport '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';\nimport '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol';\nimport '@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol';\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\nimport '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';\n\nimport './Intents.sol';\nimport './interfaces/IController.sol';\nimport './interfaces/IDynamicCallEncoder.sol';\nimport './interfaces/IOperationsValidator.sol';\nimport './interfaces/IExecutor.sol';\nimport './interfaces/ISettler.sol';\nimport './utils/Denominations.sol';\nimport './utils/ERC20Helpers.sol';\nimport './smart-accounts/SmartAccountsHandler.sol';\nimport './smart-accounts/SmartAccountsHandlerHelpers.sol';\n\n/**\n * @title Settler\n * @dev Contract that provides the appropriate context for solvers to execute proposals that fulfill user intents\n */\ncontract Settler is ISettler, Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, EIP712Upgradeable {\n using SafeERC20 for IERC20;\n using IntentsHelpers for Intent;\n using IntentsHelpers for Proposal;\n using IntentsHelpers for Validation;\n using SmartAccountsHandlerHelpers for address;\n\n // Mimic controller reference\n address public override controller;\n\n // Smart accounts handler reference\n address public override smartAccountsHandler;\n\n // Operations validator reference\n address public override operationsValidator;\n\n // Dynamic call encoder reference\n address public dynamicCallEncoder;\n\n // List of block numbers at which an intent was executed\n mapping (bytes32 => uint256) public override getIntentBlock;\n\n // Safeguard config per user\n mapping (address => bytes) internal _userSafeguard;\n\n /**\n * @dev Modifier to tag settler functions in order to check if the sender is an allowed solver\n */\n modifier onlySolver() {\n address sender = _msgSender();\n if (!IController(controller).isSolverAllowed(sender)) revert SettlerSolverNotAllowed(sender);\n _;\n }\n\n /**\n * @dev Disables initializers to prevent implementation contract from being initialized directly\n */\n constructor() {\n _disableInitializers();\n }\n\n /**\n * @dev Initializes a new Settler contract\n * @param _controller Address of the Settler controller\n * @param _owner Address that will own the contract\n * @param _dynamicCallEncoder Address of the dynamic call encoder\n */\n function initialize(address _controller, address _owner, address _dynamicCallEncoder) external initializer {\n __Ownable_init(_owner);\n __ReentrancyGuard_init();\n __EIP712_init('Mimic Protocol Settler', '1');\n\n controller = _controller;\n smartAccountsHandler = address(new SmartAccountsHandler());\n _setDynamicCallEncoder(_dynamicCallEncoder);\n }\n\n /**\n * @dev Tells the hash of an intent\n * @param intent Intent to get the hash of\n */\n function getIntentHash(Intent memory intent) external pure override returns (bytes32) {\n return intent.hash();\n }\n\n /**\n * @dev Tells the hash of a proposal\n * @param proposal Proposal to be hashed\n * @param intent Intent being fulfilled by the requested proposal\n * @param solver Address of the solver that made the proposal\n */\n function getProposalHash(Proposal memory proposal, Intent memory intent, address solver)\n external\n pure\n override\n returns (bytes32)\n {\n return proposal.hash(intent, solver);\n }\n\n /**\n * @dev Tells the safeguard set for a user\n * @param user Address of the user being queried\n */\n function getUserSafeguard(address user) external view override returns (bytes memory) {\n return _userSafeguard[user];\n }\n\n /**\n * @dev It allows receiving native token transfers\n * Note: This method mainly allows supporting native tokens for swaps\n */\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n /**\n * @dev Withdraws ERC20 or native tokens from the contract\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function rescueFunds(address token, address recipient, uint256 amount) external override onlyOwner nonReentrant {\n if (recipient == address(0)) revert SettlerRescueFundsRecipientZero();\n ERC20Helpers.transfer(token, recipient, amount);\n emit FundsRescued(token, recipient, amount);\n }\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function setSmartAccountsHandler(address newSmartAccountsHandler) external override onlyOwner {\n _setSmartAccountsHandler(newSmartAccountsHandler);\n }\n\n /**\n * @dev Sets a new operations validator address\n * @param newOperationsValidator New operations validator to be set\n */\n function setOperationsValidator(address newOperationsValidator) external override onlyOwner {\n _setOperationsValidator(newOperationsValidator);\n }\n\n /**\n * @dev Sets a new dynamic call encoder address\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function setDynamicCallEncoder(address newDynamicCallEncoder) external override onlyOwner {\n _setDynamicCallEncoder(newDynamicCallEncoder);\n }\n\n /**\n * @dev Sets a safeguard for a user\n * @param safeguard Safeguard to be set\n */\n function setSafeguard(bytes memory safeguard) external override {\n _setSafeguard(msg.sender, safeguard);\n }\n\n /**\n * @dev Executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function execute(Intent memory intent, Proposal memory proposal, bytes memory signature)\n external\n override\n onlySolver\n {\n _execute(intent, proposal, signature, false);\n }\n\n /**\n * @dev Simulates an execution. It will always revert. Successful executions are returned as\n * `SettlerSimulationSuccess` errors. Any other error should be treated as failure.\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n */\n function simulate(Intent memory intent, Proposal memory proposal, bytes memory signature)\n external\n override\n onlySolver\n {\n uint256 initialGas = gasleft();\n _execute(intent, proposal, signature, true);\n uint256 gasUsed = initialGas - gasleft();\n revert SettlerSimulationSuccess(gasUsed);\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill an intent\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n * @param simulated Whether the execution is a simulation\n */\n function _execute(Intent memory intent, Proposal memory proposal, bytes memory signature, bool simulated)\n internal\n nonReentrant\n {\n _validateIntent(intent, proposal, signature, simulated);\n getIntentBlock[intent.hash()] = block.number;\n\n bytes[][] memory outputs = new bytes[][](intent.operations.length);\n for (uint256 i = 0; i < intent.operations.length; i++) {\n outputs[i] = _executeOperation(intent, proposal, i, outputs);\n }\n\n _payFees(intent, proposal);\n emit ProposalExecuted(proposal.hash(intent, _msgSender()));\n }\n\n /**\n * @dev Executes proposal to fulfill an operation\n * @param intent Intent being fulfilled\n * @param proposal Proposal being executed\n * @param index Position where the operation and its corresponding proposal data are located\n * @param outputs List of operations outputs\n */\n function _executeOperation(Intent memory intent, Proposal memory proposal, uint256 index, bytes[][] memory outputs)\n internal\n returns (bytes[] memory)\n {\n uint8 opType = intent.operations[index].opType;\n if (opType == uint8(OpType.Swap) || opType == uint8(OpType.CrossChainSwap)) {\n return _executeSwap(intent, proposal, index);\n }\n if (opType == uint8(OpType.Transfer)) return _executeTransfer(intent, proposal, index);\n if (opType == uint8(OpType.Call)) return _executeCall(intent, proposal, index);\n if (opType == uint8(OpType.DynamicCall)) return _executeDynamicCall(intent, proposal, index, outputs);\n revert SettlerUnknownOperationType(opType);\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a swap operation\n * @param intent Intent that contains swap operation to be fulfilled\n * @param proposal Proposal with swap data to be executed\n * @param index Position where the swap proposal data and operation are located\n */\n function _executeSwap(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n SwapOperation memory swapOperation = abi.decode(operation.data, (SwapOperation));\n SwapProposal memory swapProposal = abi.decode(proposal.datas[index], (SwapProposal));\n if (operation.opType == uint8(OpType.CrossChainSwap)) {\n if (intent.operations.length > 1) revert SettlerCrossChainSwapMustBeOnlyOperation();\n _validateCrossChainSwapOperation(swapOperation, swapProposal);\n } else _validateSingleChainSwapOperation(swapOperation, swapProposal);\n\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(operation.user);\n if (swapOperation.sourceChain == block.chainid) {\n for (uint256 i = 0; i < swapOperation.tokensIn.length; i++) {\n TokenIn memory tokenIn = swapOperation.tokensIn[i];\n _transferFrom(tokenIn.token, operation.user, swapProposal.executor, tokenIn.amount, isSmartAccount);\n }\n }\n\n uint256[] memory preBalancesOut = _getTokensOutBalance(swapOperation);\n // Using the intent hash as the unique operation hash because cross-chain swap has only one operation per intent and the single swap executor does not use it\n bytes32 operationHash = intent.hash();\n IExecutor(swapProposal.executor).execute(operation, operationHash, proposal.datas[index]);\n\n outputs = new bytes[](swapOperation.tokensOut.length);\n if (swapOperation.destinationChain == block.chainid) {\n uint256[] memory amounts = new uint256[](swapOperation.tokensOut.length);\n for (uint256 i = 0; i < swapOperation.tokensOut.length; i++) {\n TokenOut memory tokenOut = swapOperation.tokensOut[i];\n uint256 postBalanceOut = ERC20Helpers.balanceOf(tokenOut.token, address(this));\n uint256 preBalanceOut = preBalancesOut[i];\n if (postBalanceOut < preBalanceOut) revert SettlerPostBalanceOutLtPre(i, postBalanceOut, preBalanceOut);\n\n amounts[i] = postBalanceOut - preBalanceOut;\n uint256 proposedAmount = swapProposal.amountsOut[i];\n if (amounts[i] < proposedAmount) revert SettlerAmountOutLtProposed(i, amounts[i], proposedAmount);\n\n ERC20Helpers.transfer(tokenOut.token, tokenOut.recipient, amounts[i]);\n outputs[i] = abi.encode(amounts[i]);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(amounts));\n }\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a transfer operation\n * @param intent Intent that contains transfer operation to be fulfilled\n * @param proposal Transfer proposal to be executed\n * @param index Position where the transfer proposal data and operation are located\n */\n function _executeTransfer(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n TransferOperation memory transferOperation = abi.decode(operation.data, (TransferOperation));\n _validateTransferOperation(transferOperation, proposal.datas[index]);\n\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(operation.user);\n for (uint256 i = 0; i < transferOperation.transfers.length; i++) {\n TransferData memory transfer = transferOperation.transfers[i];\n _transferFrom(transfer.token, operation.user, transfer.recipient, transfer.amount, isSmartAccount);\n }\n\n outputs = new bytes[](0);\n _emitOperationEvents(operation, proposal, intent.hash(), index, new bytes(0));\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a call operation\n * @param intent Intent that contains call operation to be fulfilled\n * @param proposal Call proposal to be executed\n * @param index Position where the call proposal data and operation are located\n */\n function _executeCall(Intent memory intent, Proposal memory proposal, uint256 index)\n internal\n returns (bytes[] memory outputs)\n {\n Operation memory operation = intent.operations[index];\n CallOperation memory callOperation = abi.decode(operation.data, (CallOperation));\n _validateCallOperation(callOperation, proposal.datas[index], operation.user);\n\n outputs = new bytes[](callOperation.calls.length);\n for (uint256 i = 0; i < callOperation.calls.length; i++) {\n CallData memory call = callOperation.calls[i];\n // solhint-disable-next-line avoid-low-level-calls\n outputs[i] = smartAccountsHandler.call(operation.user, call.target, call.data, call.value);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(outputs));\n }\n\n /**\n * @dev Validates and executes a proposal to fulfill a dynamic call operation\n * @param intent Intent that contains dynamic call operation to be fulfilled\n * @param proposal Dynamic call proposal to be executed\n * @param index Position where the dynamic call proposal data and operation are located\n * @param variables List of operations outputs\n */\n function _executeDynamicCall(\n Intent memory intent,\n Proposal memory proposal,\n uint256 index,\n bytes[][] memory variables\n ) internal returns (bytes[] memory outputs) {\n Operation memory operation = intent.operations[index];\n DynamicCallOperation memory dynamicCallOperation = abi.decode(operation.data, (DynamicCallOperation));\n _validateDynamicCallOperation(dynamicCallOperation, proposal.datas[index], operation.user);\n\n outputs = new bytes[](dynamicCallOperation.calls.length);\n for (uint256 i = 0; i < dynamicCallOperation.calls.length; i++) {\n DynamicCall memory dynamicCall = abi.decode(dynamicCallOperation.calls[i], (DynamicCall));\n bytes memory data = IDynamicCallEncoder(dynamicCallEncoder).encode(dynamicCall, variables, index);\n // solhint-disable-next-line avoid-low-level-calls\n outputs[i] = smartAccountsHandler.call(operation.user, dynamicCall.target, data, dynamicCall.value);\n }\n\n _emitOperationEvents(operation, proposal, intent.hash(), index, abi.encode(outputs));\n }\n\n /**\n * @dev Validates an intent and its corresponding proposal\n The off-chain validators are assuring that:\n - The trigger signer has authorization over the intent.feePayer and each operations[i].user\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n * @param signature Proposal signature\n * @param simulated Whether the execution is a simulation\n */\n function _validateIntent(Intent memory intent, Proposal memory proposal, bytes memory signature, bool simulated)\n internal\n view\n {\n if (intent.settler != address(this)) revert SettlerInvalidSettler(intent.settler);\n if (intent.nonce == bytes32(0)) revert SettlerNonceZero();\n bytes32 intentHash = intent.hash();\n if (getIntentBlock[intentHash] != 0) revert SettlerIntentAlreadyExecuted(intentHash);\n\n if (intent.operations.length == 0) revert SettlerIntentOperationsEmpty();\n if (intent.operations.length != proposal.datas.length) revert SettlerProposalDataInvalidLength();\n\n if (operationsValidator != address(0)) {\n for (uint256 i = 0; i < intent.operations.length; i++) {\n Operation memory operation = intent.operations[i];\n bytes memory safeguard = _userSafeguard[operation.user];\n if (safeguard.length > 0) IOperationsValidator(operationsValidator).validate(operation, safeguard);\n }\n }\n\n bool shouldValidateDeadlines = _shouldValidateDeadlines(intent);\n if (shouldValidateDeadlines) {\n if (intent.deadline <= block.timestamp) revert SettlerIntentPastDeadline(intent.deadline, block.timestamp);\n bool isProposalPastDeadline = proposal.deadline <= block.timestamp;\n if (isProposalPastDeadline) revert SettlerProposalPastDeadline(proposal.deadline, block.timestamp);\n }\n\n if (intent.maxFees.length != proposal.fees.length) revert SettlerSolverFeeInvalidLength();\n for (uint256 i = 0; i < intent.maxFees.length; i++) {\n uint256 maxFee = intent.maxFees[i].amount;\n uint256 proposalFee = proposal.fees[i];\n if (proposalFee > maxFee) revert SettlerSolverFeeTooHigh(proposalFee, maxFee);\n }\n\n uint8 minValidations = IController(controller).minValidations();\n uint256 requiredValidations = intent.minValidations > minValidations ? intent.minValidations : minValidations;\n\n if (intent.validations.length < requiredValidations) {\n revert SettlerIntentValidationsNotEnough(requiredValidations, intent.validations.length);\n }\n\n address lastValidator = address(0);\n Validation memory validation = Validation(intentHash);\n bytes32 typedDataHash = _hashTypedDataV4(validation.hash());\n for (uint256 i = 0; i < intent.validations.length; i++) {\n address validator = ECDSA.recover(typedDataHash, intent.validations[i]);\n if (validator <= lastValidator) {\n revert SettlerValidatorDuplicatedOrUnsorted(lastValidator, validator);\n }\n lastValidator = validator;\n bool isValidatorNotAllowed = !IController(controller).isValidatorAllowed(validator);\n if (isValidatorNotAllowed) revert SettlerValidatorNotAllowed(validator);\n }\n\n address signer = ECDSA.recover(_hashTypedDataV4(proposal.hash(intent, _msgSender())), signature);\n bool isProposalSignerNotAllowed = !IController(controller).isProposalSignerAllowed(signer) && !simulated;\n if (isProposalSignerNotAllowed) revert SettlerProposalSignerNotAllowed(signer);\n }\n\n /**\n * @dev Validates a swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateSwapOperation(SwapOperation memory operation, SwapProposal memory proposal) internal view {\n if (proposal.amountsOut.length != operation.tokensOut.length) revert SettlerInvalidProposedAmounts();\n\n for (uint256 i = 0; i < operation.tokensOut.length; i++) {\n TokenOut memory tokenOut = operation.tokensOut[i];\n address recipient = tokenOut.recipient;\n if (recipient == address(this)) revert SettlerInvalidRecipient(recipient);\n\n uint256 minAmount = tokenOut.minAmount;\n uint256 proposedAmount = proposal.amountsOut[i];\n if (proposedAmount < minAmount) revert SettlerProposedAmountLtMinAmount(i, proposedAmount, minAmount);\n }\n }\n\n /**\n * @dev Validates a single-chain swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateSingleChainSwapOperation(SwapOperation memory operation, SwapProposal memory proposal)\n internal\n view\n {\n if (operation.sourceChain != operation.destinationChain) revert SettlerOperationChainsMismatch();\n if (operation.sourceChain != block.chainid) revert SettlerInvalidChain(block.chainid);\n _validateSwapOperation(operation, proposal);\n }\n\n /**\n * @dev Validates a transfer operation and its corresponding proposal\n * @param operation Transfer operation to be fulfilled\n * @param proposalData data of the proposal\n */\n function _validateTransferOperation(TransferOperation memory operation, bytes memory proposalData) internal view {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n for (uint256 i = 0; i < operation.transfers.length; i++) {\n address recipient = operation.transfers[i].recipient;\n if (recipient == address(this)) revert SettlerInvalidRecipient(recipient);\n }\n }\n\n /**\n * @dev Validates a call operation and its corresponding proposal\n * @param operation Call operation to be fulfilled\n * @param proposalData data of the proposal\n * @param user The originator of the operation\n */\n function _validateCallOperation(CallOperation memory operation, bytes memory proposalData, address user)\n internal\n view\n {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n if (!smartAccountsHandler.isSmartAccount(user)) revert SettlerUserNotSmartAccount(user);\n }\n\n /**\n * @dev Validates a dynamic call operation and its corresponding proposal\n * @param operation Dynamic call operation to be fulfilled\n * @param proposalData data of the proposal\n * @param user The originator of the operation\n */\n function _validateDynamicCallOperation(\n DynamicCallOperation memory operation,\n bytes memory proposalData,\n address user\n ) internal view {\n if (operation.chainId != block.chainid) revert SettlerInvalidChain(block.chainid);\n if (proposalData.length > 0) revert SettlerProposalDataNotEmpty();\n if (!smartAccountsHandler.isSmartAccount(user)) revert SettlerUserNotSmartAccount(user);\n }\n\n /**\n * @dev Validates a cross-chain swap operation and its corresponding proposal\n * @param operation Swap operation to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _validateCrossChainSwapOperation(SwapOperation memory operation, SwapProposal memory proposal)\n internal\n view\n {\n if (operation.sourceChain == operation.destinationChain) revert SettlerOperationChainsMismatch();\n bool isChainInvalid = operation.sourceChain != block.chainid && operation.destinationChain != block.chainid;\n if (isChainInvalid) revert SettlerInvalidChain(block.chainid);\n _validateSwapOperation(operation, proposal);\n bool isExecutorInvalid = !IController(controller).isExecutorAllowed(proposal.executor);\n if (isExecutorInvalid) revert SettlerExecutorNotAllowed(proposal.executor);\n }\n\n /**\n * @dev Tells the contract balance for each token out of a swap operation\n * @param operation Swap operation containing the list of tokens out\n */\n function _getTokensOutBalance(SwapOperation memory operation) internal view returns (uint256[] memory balances) {\n balances = new uint256[](operation.tokensOut.length);\n if (operation.destinationChain == block.chainid) {\n for (uint256 i = 0; i < operation.tokensOut.length; i++) {\n balances[i] = ERC20Helpers.balanceOf(operation.tokensOut[i].token, address(this));\n }\n }\n }\n\n /**\n * @dev Tells if the intent and proposal deadlines should be validated\n In the case the intent is being executed on the destination chain of a cross-chain swap, the deadlines are ignored\n * @param intent Intent to be fulfilled\n */\n function _shouldValidateDeadlines(Intent memory intent) internal view returns (bool) {\n // Cross-chain operation can only be the first (and only) operation\n Operation memory operation = intent.operations[0];\n if (operation.opType != uint8(OpType.CrossChainSwap)) return true;\n SwapOperation memory swapIntent = abi.decode(operation.data, (SwapOperation));\n return swapIntent.sourceChain == block.chainid;\n }\n\n /**\n * @dev Emits operation custom events\n * @param operation Operation to emit the custom events for\n * @param proposal Proposal that fulfills the operation\n * @param intentHash Hash of the intent the operation belongs to\n * @param index Position of the operation on operations\n * @param output Encoded array of outputs\n */\n function _emitOperationEvents(\n Operation memory operation,\n Proposal memory proposal,\n bytes32 intentHash,\n uint256 index,\n bytes memory output\n ) internal {\n for (uint256 i = 0; i < operation.events.length; i++) {\n OperationEvent memory operationEvent = operation.events[i];\n emit OperationExecuted(\n operation.user,\n operationEvent.topic,\n uint8(operation.opType),\n operation,\n proposal,\n intentHash,\n index,\n output,\n operationEvent.data\n );\n }\n }\n\n /**\n * @dev Pays fees from the intent feePayer\n * @param intent Intent to be fulfilled\n * @param proposal Proposal to be executed\n */\n function _payFees(Intent memory intent, Proposal memory proposal) internal {\n // A CrossChainSwap only pays fees on destination chain and must be the only operation\n if (intent.operations[0].opType == uint8(OpType.CrossChainSwap)) {\n SwapOperation memory swapOperation = abi.decode(intent.operations[0].data, (SwapOperation));\n if (swapOperation.sourceChain == block.chainid) return;\n }\n address from = intent.feePayer;\n address to = _msgSender();\n bool isSmartAccount = smartAccountsHandler.isSmartAccount(from);\n for (uint256 i = 0; i < intent.maxFees.length; i++) {\n address token = intent.maxFees[i].token;\n if (!Denominations.isUSD(token)) _transferFrom(token, from, to, proposal.fees[i], isSmartAccount);\n }\n }\n\n /**\n * @dev Transfers tokens from one account to another\n * @param token Address of the token to transfer\n * @param from Address of the account sending the tokens\n * @param to Address of the account receiving the tokens\n * @param amount Amount of tokens to transfer\n * @param isSmartAccount Whether the sender is a smart account\n */\n function _transferFrom(address token, address from, address to, uint256 amount, bool isSmartAccount) internal {\n if (isSmartAccount) {\n smartAccountsHandler.transfer(from, token, to, amount);\n } else {\n IERC20(token).safeTransferFrom(from, to, amount);\n }\n }\n\n /**\n * @dev Sets a new smart accounts handler\n * @param newSmartAccountsHandler New smart accounts handler to be set\n */\n function _setSmartAccountsHandler(address newSmartAccountsHandler) internal {\n if (newSmartAccountsHandler == address(0)) revert SmartAccountsHandlerZero();\n smartAccountsHandler = newSmartAccountsHandler;\n emit SmartAccountsHandlerSet(newSmartAccountsHandler);\n }\n\n /**\n * @dev Sets the operations validator\n * @param newOperationsValidator New operations validator to be set\n */\n function _setOperationsValidator(address newOperationsValidator) internal {\n operationsValidator = newOperationsValidator;\n emit OperationsValidatorSet(newOperationsValidator);\n }\n\n /**\n * @dev Sets the dynamic call encoder\n * @param newDynamicCallEncoder New dynamic call encoder to be set\n */\n function _setDynamicCallEncoder(address newDynamicCallEncoder) internal {\n if (newDynamicCallEncoder == address(0)) revert SettlerDynamicCallEncoderZero();\n dynamicCallEncoder = newDynamicCallEncoder;\n emit DynamicCallEncoderSet(newDynamicCallEncoder);\n }\n\n /**\n * @dev Sets a safeguard for a user\n * @param user Address of the user to set the safeguard for\n * @param safeguard Safeguard to be set\n */\n function _setSafeguard(address user, bytes memory safeguard) internal {\n delete _userSafeguard[user];\n _userSafeguard[user] = safeguard;\n emit SafeguardSet(user);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccount7702.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/Context.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccount.sol';\nimport '../utils/ERC20Helpers.sol';\nimport './SmartAccountBase.sol';\n\n/**\n * @title SmartAccount7702\n * @dev Provides the smart account logic to use with EIP7702\n */\ncontract SmartAccount7702 is SmartAccountBase {\n // Mimic settler reference\n // solhint-disable-next-line immutable-vars-naming\n address public immutable settler;\n\n /**\n * @dev The sender is not the settler\n */\n error SmartAccount7702SenderNotSettler();\n\n /**\n * @dev Reverts unless the sender is the settler\n */\n modifier onlySettler() {\n if (_msgSender() != settler) revert SmartAccount7702SenderNotSettler();\n _;\n }\n\n /**\n * @dev Creates a new SmartAccount7702 contract\n * @param _settler Address of the Mimic settler\n */\n constructor(address _settler) {\n settler = _settler;\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) public override onlySettler {\n super.transfer(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value) public override onlySettler returns (bytes memory) {\n // solhint-disable-next-line avoid-low-level-calls\n return super.call(target, data, value);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountBase.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/Context.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccount.sol';\nimport '../utils/ERC20Helpers.sol';\n\n/**\n * @title SmartAccountBase\n * @dev Provides the base logic for managing assets and executing arbitrary calls\n */\ncontract SmartAccountBase is ISmartAccount, Context, ERC165, ReentrancyGuard {\n /**\n * @dev Tells whether the contract supports the given interface ID. Overrides ERC165 to declare support for ISmartAccount interface.\n * @param interfaceId Interface ID is defined as the XOR of all function selectors in the interface\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {\n return interfaceId == type(ISmartAccount).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount) public virtual override nonReentrant {\n ERC20Helpers.transfer(token, recipient, amount);\n emit Transferred(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value)\n public\n virtual\n override\n nonReentrant\n returns (bytes memory result)\n {\n result = Address.functionCallWithValue(target, data, value);\n emit Called(target, data, value, result);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountContract.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/access/Ownable.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';\nimport '@openzeppelin/contracts/utils/introspection/ERC165.sol';\n\nimport '../interfaces/ISmartAccountContract.sol';\nimport './SmartAccountBase.sol';\n\n/**\n * @title SmartAccountContract\n * @dev Provides the smart account logic to use as a standalone contract\n */\ncontract SmartAccountContract is ISmartAccountContract, Ownable, SmartAccountBase {\n // EIP1271 magic return value\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x1626ba7e;\n\n // EIP1271 invalid signature return value\n bytes4 internal constant EIP1271_INVALID_SIGNATURE = 0xffffffff;\n\n // List of account permissions\n mapping (address => bool) public isSignerAllowed;\n\n // Mimic settler reference\n address public settler;\n\n /**\n * @dev The settler is zero\n */\n error SmartAccountSettlerZero();\n\n /**\n * @dev The input arrays are not of equal length\n */\n error SmartAccountInputInvalidLength();\n\n /**\n * @dev The sender is not the owner or the settler\n */\n error SmartAccountUnauthorizedSender(address sender);\n\n /**\n * @dev Emitted every time the settler is set\n */\n event SettlerSet(address indexed settler);\n\n /**\n * @dev Emitted every time a signer allowance is set\n */\n event SignerAllowedSet(address indexed account, bool allowed);\n\n /**\n * @dev Reverts unless the sender is the owner or the settler\n */\n modifier onlyOwnerOrSettler() {\n address sender = _msgSender();\n bool isAuthorized = sender == owner() || sender == settler;\n if (!isAuthorized) revert SmartAccountUnauthorizedSender(sender);\n _;\n }\n\n /**\n * @dev Creates a new SmartAccount contract\n * @param _settler Address of the Mimic settler\n * @param _owner Address that will own the contract\n */\n constructor(address _settler, address _owner) Ownable(_owner) {\n _setSettler(_settler);\n }\n\n /**\n * @dev Tells whether the signature provided belongs to an allowed account.\n * @param hash Message signed by the account\n * @param signature Signature provided to be verified\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view override returns (bytes4) {\n (address signer, , ) = ECDSA.tryRecover(hash, signature);\n if (signer != address(0) && (signer == owner() || isSignerAllowed[signer])) return EIP1271_MAGIC_VALUE;\n return EIP1271_INVALID_SIGNATURE;\n }\n\n /**\n * @dev It allows receiving native token transfers\n */\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n /**\n * @dev Sets the settler. Sender must be the owner.\n * @param newSettler Address of the new settler to be set\n */\n function setSettler(address newSettler) external onlyOwner {\n _setSettler(newSettler);\n }\n\n /**\n * @dev Sets a list of allowed signers. Sender must be the owner.\n * @param accounts List of account addresses\n * @param allowances List of allowed condition per account\n */\n function setAllowedSigners(address[] memory accounts, bool[] memory allowances) external onlyOwner {\n if (accounts.length != allowances.length) revert SmartAccountInputInvalidLength();\n for (uint256 i = 0; i < accounts.length; i++) {\n address account = accounts[i];\n bool allowed = allowances[i];\n isSignerAllowed[account] = allowed;\n emit SignerAllowedSet(account, allowed);\n }\n }\n\n /**\n * @dev Transfers ERC20 or native tokens to the recipient. Sender must be the owner or the settler.\n * @param token Address of the token to be withdrawn\n * @param recipient Address of the account receiving the tokens\n * @param amount Amount of tokens to be withdrawn\n */\n function transfer(address token, address recipient, uint256 amount)\n public\n override(ISmartAccount, SmartAccountBase)\n onlyOwnerOrSettler\n {\n super.transfer(token, recipient, amount);\n }\n\n /**\n * @dev Executes an arbitrary call from the contract. Sender must be the owner or the settler.\n * @param target Address where the call will be sent\n * @param data Calldata to be sent to the target\n * @param value Native token value to send along with the call\n * @return result Call response if it was successful, otherwise it reverts\n */\n function call(address target, bytes memory data, uint256 value)\n public\n override(ISmartAccount, SmartAccountBase)\n onlyOwnerOrSettler\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n return super.call(target, data, value);\n }\n\n /**\n * @dev Sets the settler\n * @param newSettler Address of the new settler to be set\n */\n function _setSettler(address newSettler) internal {\n if (newSettler == address(0)) revert SmartAccountSettlerZero();\n settler = newSettler;\n emit SettlerSet(newSettler);\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountsHandler.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport '../interfaces/ISafe.sol';\nimport '../interfaces/ISmartAccount.sol';\nimport '../interfaces/ISmartAccountsHandler.sol';\nimport '../utils/Denominations.sol';\n\ncontract SmartAccountsHandler is ISmartAccountsHandler {\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address account) external view override returns (bool) {\n if (account.code.length == 0) return false;\n if (_isMimicSmartAccount(account)) return true;\n if (_isSafe(account)) return true;\n return false;\n }\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address account, address token, address to, uint256 amount) external override {\n if (_isMimicSmartAccount(account)) return ISmartAccount(account).transfer(token, to, amount);\n if (_isSafe(account)) return _transferSafe(account, token, to, amount);\n revert SmartAccountsHandlerUnsupportedAccount(account);\n }\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address account, address target, bytes memory data, uint256 value)\n external\n override\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n if (_isMimicSmartAccount(account)) return ISmartAccount(account).call(target, data, value);\n if (_isSafe(account)) return _callSafe(account, target, data, value);\n revert SmartAccountsHandlerUnsupportedAccount(account);\n }\n\n /**\n * @dev Performs a transfer from a safe\n */\n function _transferSafe(address account, address token, address to, uint256 amount) internal {\n Denominations.isNativeToken(token)\n ? _callSafe(account, to, new bytes(0), amount)\n : _callSafe(account, token, abi.encodeWithSelector(IERC20.transfer.selector, to, amount), 0);\n }\n\n /**\n * @dev Performs a call from a safe\n */\n function _callSafe(address account, address target, bytes memory data, uint256 value)\n internal\n returns (bytes memory)\n {\n (bool success, bytes memory result) = ISafe(account).execTransactionFromModuleReturnData(\n target,\n value,\n data,\n SafeOperation.Call\n );\n return\n data.length == 0\n ? Address.verifyCallResult(success, result)\n : Address.verifyCallResultFromTarget(target, success, result);\n }\n\n /**\n * @dev Tells whether an account is a Mimic smart account\n * @param account Address of the account being queried\n */\n function _isMimicSmartAccount(address account) internal view returns (bool) {\n try ISmartAccount(account).supportsInterface(type(ISmartAccount).interfaceId) returns (bool ok) {\n return ok;\n } catch {\n return false;\n }\n }\n\n /**\n * @dev Tells whether an account is a Gnosis Safe\n * @param account Address of the account being queried\n */\n function _isSafe(address account) internal view returns (bool) {\n try ISafe(account).getThreshold() returns (uint256) {\n return true;\n } catch {\n return false;\n }\n }\n}\n" + }, + "project/contracts/smart-accounts/SmartAccountsHandlerHelpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport '../interfaces/ISmartAccountsHandler.sol';\n\nlibrary SmartAccountsHandlerHelpers {\n /**\n * @dev Tells whether an account is a supported smart account\n * @param account Address of the account being queried\n */\n function isSmartAccount(address handler, address account) internal view returns (bool) {\n return ISmartAccountsHandler(handler).isSmartAccount(account);\n }\n\n /**\n * @dev Performs a transfer from a smart account\n */\n function transfer(address handler, address account, address token, address to, uint256 amount) internal {\n Address.functionDelegateCall(\n handler,\n abi.encodeWithSelector(ISmartAccountsHandler.transfer.selector, account, token, to, amount)\n );\n }\n\n /**\n * @dev Performs a call from a smart account\n */\n function call(address handler, address account, address target, bytes memory data, uint256 value)\n internal\n returns (bytes memory result)\n {\n result = Address.functionDelegateCall(\n handler,\n abi.encodeWithSelector(ISmartAccountsHandler.call.selector, account, target, data, value)\n );\n // Skip the ABI-encoded offset and length of the outer `bytes` to point at the inner payload\n assembly {\n result := add(result, 64)\n }\n }\n}\n" + }, + "project/contracts/test/CallMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\ncontract CallMock {\n event CallReceived(address indexed sender, uint256 value);\n error CallError();\n\n function call() external payable {\n emit CallReceived(msg.sender, msg.value);\n }\n\n function callError() external payable {\n revert CallError();\n }\n}\n" + }, + "project/contracts/test/dynamic-calls/StaticCallMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\ncontract StaticCallMock {\n struct StructMock {\n uint256 a;\n address b;\n }\n\n function returnUint(uint256 value) external pure returns (uint256) {\n return value;\n }\n\n function returnAddress(address value) external payable returns (address) {\n return value;\n }\n\n function returnArray(uint256[] calldata value) external pure returns (uint256[] memory) {\n return value;\n }\n\n function returnFixedArray(uint256[3] calldata value) external pure returns (uint256[3] memory) {\n return value;\n }\n\n function returnStruct(StructMock calldata value) external pure returns (StructMock memory) {\n return value;\n }\n}\n" + }, + "project/contracts/test/executors/EmptyExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\n\ncontract EmptyExecutorMock is IExecutor {\n event Executed();\n\n function execute(Operation memory, bytes32, bytes memory) external override {\n emit Executed();\n }\n}\n" + }, + "project/contracts/test/executors/MintExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../TokenMock.sol';\nimport '../../interfaces/IExecutor.sol';\n\n/* solhint-disable custom-errors */\n\ncontract MintExecutorMock is IExecutor {\n event Minted();\n\n function execute(Operation memory operation, bytes32, bytes memory proposalData) external override {\n require(\n operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap),\n 'Invalid operation type'\n );\n\n SwapProposal memory swapProposal = abi.decode(proposalData, (SwapProposal));\n (address[] memory tokens, uint256[] memory amounts) = abi.decode(swapProposal.data, (address[], uint256[]));\n\n require(tokens.length == amounts.length, 'Invalid inputs');\n\n for (uint256 i = 0; i < tokens.length; i++) {\n TokenMock(tokens[i]).mint(msg.sender, amounts[i]);\n emit Minted();\n }\n }\n}\n" + }, + "project/contracts/test/executors/ReentrantExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\nimport '../../interfaces/ISettler.sol';\n\ncontract ReentrantExecutorMock is IExecutor {\n // solhint-disable-next-line immutable-vars-naming\n address payable public immutable settler;\n\n constructor(address payable _settler) {\n settler = _settler;\n }\n\n function execute(Operation memory, bytes32, bytes memory) external override {\n Intent memory intent;\n Proposal memory proposal;\n ISettler(settler).execute(intent, proposal, new bytes(0));\n }\n}\n" + }, + "project/contracts/test/executors/TransferExecutorMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/IExecutor.sol';\nimport '../../utils/ERC20Helpers.sol';\n\n/* solhint-disable custom-errors */\n\ncontract TransferExecutorMock is IExecutor {\n event Transferred();\n\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n function execute(Operation memory operation, bytes32, bytes memory proposalData) external override {\n require(\n operation.opType == uint8(OpType.Swap) || operation.opType == uint8(OpType.CrossChainSwap),\n 'Invalid operation type'\n );\n\n SwapProposal memory swapProposal = abi.decode(proposalData, (SwapProposal));\n (address[] memory tokens, uint256[] memory amounts) = abi.decode(swapProposal.data, (address[], uint256[]));\n\n require(tokens.length == amounts.length, 'Invalid inputs');\n\n for (uint256 i = 0; i < tokens.length; i++) {\n ERC20Helpers.transfer(tokens[i], msg.sender, amounts[i]);\n emit Transferred();\n }\n }\n}\n" + }, + "project/contracts/test/SettlerV2Mock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../Settler.sol';\n\ncontract SettlerV2Mock is Settler {\n function someNewFunction() external pure returns (string memory) {\n return 'Some new function';\n }\n}\n" + }, + "project/contracts/test/smart-accounts/SafeMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../interfaces/ISafe.sol';\n\ncontract SafeMock is ISafe {\n event ModuleTxExecuted(\n address indexed target,\n bytes data,\n uint256 value,\n SafeOperation operation,\n bool success,\n bytes result\n );\n\n receive() external payable {}\n\n function getThreshold() external pure returns (uint256) {\n return 1;\n }\n\n function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, SafeOperation operation)\n external\n returns (bool success, bytes memory result)\n {\n // solhint-disable-next-line avoid-low-level-calls\n (success, result) = to.call{ value: value }(data);\n emit ModuleTxExecuted(to, data, value, operation, success, result);\n }\n}\n" + }, + "project/contracts/test/smart-accounts/SmartAccountsHandlerHelpersMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '../../smart-accounts/SmartAccountsHandlerHelpers.sol';\n\ncontract SmartAccountsHandlerHelpersMock {\n using SmartAccountsHandlerHelpers for address;\n\n function call(address handler, address account, address target, bytes memory data, uint256 value)\n external\n returns (bytes memory)\n {\n // solhint-disable-next-line avoid-low-level-calls\n return handler.call(account, target, data, value);\n }\n}\n" + }, + "project/contracts/test/TokenMock.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/ERC20.sol';\n\ncontract TokenMock is ERC20 {\n uint8 internal _decimals;\n\n constructor(string memory symbol, uint8 dec) ERC20(symbol, symbol) {\n _decimals = dec;\n }\n\n function mint(address account, uint256 amount) external {\n _mint(account, amount);\n }\n\n function decimals() public view override returns (uint8) {\n return _decimals;\n }\n}\n" + }, + "project/contracts/test/utils/BytesHelpersMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.24;\n\nimport '../../utils/BytesHelpers.sol';\n\ncontract BytesHelpersMock {\n using BytesHelpers for bytes;\n\n function readWord0(bytes memory data) external pure returns (uint256) {\n return data.readWord0();\n }\n\n function readWord1(bytes memory data) external pure returns (uint256) {\n return data.readWord1();\n }\n\n function slice(bytes memory data, uint256 start, uint256 end) external pure returns (bytes memory) {\n return data.slice(start, end);\n }\n\n function sliceFrom(bytes memory data, uint256 start) external pure returns (bytes memory) {\n return data.sliceFrom(start);\n }\n}\n" + }, + "project/contracts/test/utils/DenominationsMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../../utils/Denominations.sol';\n\n// solhint-disable func-name-mixedcase\n\ncontract DenominationsMock {\n function NATIVE_TOKEN() external pure returns (address) {\n return Denominations.NATIVE_TOKEN;\n }\n\n function USD() external pure returns (address) {\n return Denominations.USD;\n }\n}\n" + }, + "project/contracts/test/utils/ERC20HelpersMock.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '../../utils/ERC20Helpers.sol';\n\ncontract ERC20HelpersMock {\n receive() external payable {\n // solhint-disable-previous-line no-empty-blocks\n }\n\n function approve(address token, address to, uint256 amount) external {\n ERC20Helpers.approve(token, to, amount);\n }\n\n function transfer(address token, address to, uint256 amount) external {\n ERC20Helpers.transfer(token, to, amount);\n }\n\n function balanceOf(address token, address account) external view returns (uint256) {\n return ERC20Helpers.balanceOf(token, account);\n }\n}\n" + }, + "project/contracts/utils/BytesHelpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.24;\n\n/**\n * @title BytesHelpers\n * @dev Collection of low-level helpers to operate on `bytes` values in memory.\n */\nlibrary BytesHelpers {\n /**\n * @dev Thrown when a slice operation exceeds the bounds of the input bytes\n */\n error BytesLibSliceOutOfBounds();\n\n /**\n * @dev Reads the first 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @return result First ABI word of `data`\n */\n function readWord0(bytes memory data) internal pure returns (uint256) {\n return readWord(data, 0);\n }\n\n /**\n * @dev Reads the second 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @return result Second ABI word of `data`\n */\n function readWord1(bytes memory data) internal pure returns (uint256) {\n return readWord(data, 1);\n }\n\n /**\n * @dev Reads the N-th 32-byte word of a bytes array\n * @param data Bytes array to read from\n * @param index Word index to read (0-based)\n * @return result N-th ABI word of `data`\n */\n function readWord(bytes memory data, uint256 index) private pure returns (uint256 result) {\n assembly {\n result := mload(add(data, add(32, mul(index, 32))))\n }\n }\n\n /**\n * @dev Returns a slice of a bytes array from `start` (inclusive) to `end` (exclusive)\n * @param data Bytes array to slice\n * @param start Starting byte index (inclusive)\n * @param end Ending byte index (exclusive)\n */\n function slice(bytes memory data, uint256 start, uint256 end) internal pure returns (bytes memory out) {\n if (end < start) revert BytesLibSliceOutOfBounds();\n if (end > data.length) revert BytesLibSliceOutOfBounds();\n\n uint256 len = end - start;\n out = new bytes(len);\n\n assembly {\n let src := add(add(data, 32), start)\n let dst := add(out, 32)\n mcopy(dst, src, len)\n }\n }\n\n /**\n * @dev Returns a slice of a bytes array starting at `start` until the end\n * @param data Bytes array to slice\n * @param start Starting byte index (inclusive)\n */\n function sliceFrom(bytes memory data, uint256 start) internal pure returns (bytes memory out) {\n return slice(data, start, data.length);\n }\n}\n" + }, + "project/contracts/utils/Denominations.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @title Denominations\n * @dev Provides a list of ground denominations for those tokens that cannot be represented by an ERC20.\n * For now, the only needed is the native token that could be ETH, MATIC, or other depending on the layer being operated.\n */\nlibrary Denominations {\n address internal constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n // Fiat currencies follow https://en.wikipedia.org/wiki/ISO_4217\n address internal constant USD = address(840);\n\n function isUSD(address token) internal pure returns (bool) {\n return token == USD;\n }\n\n function isNativeToken(address token) internal pure returns (bool) {\n return token == NATIVE_TOKEN;\n }\n}\n" + }, + "project/contracts/utils/ERC20Helpers.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\n\nimport './Denominations.sol';\n\n/**\n * @title ERC20Helpers\n * @dev Provides a list of ERC20 helper methods\n */\nlibrary ERC20Helpers {\n function approve(address token, address to, uint256 amount) internal {\n SafeERC20.forceApprove(IERC20(token), to, amount);\n }\n\n function transfer(address token, address to, uint256 amount) internal {\n if (Denominations.isNativeToken(token)) Address.sendValue(payable(to), amount);\n else SafeERC20.safeTransfer(IERC20(token), to, amount);\n }\n\n function balanceOf(address token, address account) internal view returns (uint256) {\n if (Denominations.isNativeToken(token)) return address(account).balance;\n else return IERC20(token).balanceOf(address(account));\n }\n}\n" + }, + "project/contracts/utils/MimicHelper.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.8.20;\n\n/**\n * @title Mimic Helper\n * @dev Collection of helper functions for the Mimic Protocol\n */\ncontract MimicHelper {\n // Custom byte storage per user and key\n mapping (address => mapping (string => bytes)) internal _customStorage;\n\n /**\n * @dev Emitted every time the storage is set\n */\n event StorageSet(address indexed user, string indexed key, bytes indexed data);\n\n /**\n * @dev Tells the native token balance of an address\n * @param target Address to get native token balance\n */\n function getNativeTokenBalance(address target) external view returns (uint256) {\n return target.balance;\n }\n\n /**\n * @dev Tells the code of an address\n * @param target Address to get code\n */\n function getCode(address target) external view returns (bytes memory) {\n return target.code;\n }\n\n /**\n * @dev Tells the data set for the user and the key\n * @param user Address of the user being queried\n * @param key String of the key being queried\n */\n function getStorage(address user, string calldata key) external view returns (bytes memory) {\n return _customStorage[user][key];\n }\n\n /**\n * @dev Sets a data for the user and a key\n * @param key String of the key to set the data for\n * @param data Bytes to be set\n */\n function setStorage(string calldata key, bytes memory data) external {\n _customStorage[msg.sender][key] = data;\n emit StorageSet(msg.sender, key, data);\n }\n}\n" + } + } + } +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-8453/deployed_addresses.json b/packages/evm/ignition/deployments/chain-8453/deployed_addresses.json index 5bb6950..70484e3 100644 --- a/packages/evm/ignition/deployments/chain-8453/deployed_addresses.json +++ b/packages/evm/ignition/deployments/chain-8453/deployed_addresses.json @@ -12,5 +12,9 @@ "Create3DynamicCallEncoder#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", "Create3DynamicCallEncoder#DynamicCallEncoder": "0xb3F0F65FA3f94890B7a5Bd17843a6fdfB9407dbD", "Create3Proxy#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", - "Create3Proxy#Proxy": "0x8be430d29a2c5692f9345a28506b849C6a99eDaA" + "Create3Proxy#Proxy": "0x8be430d29a2c5692f9345a28506b849C6a99eDaA", + "Create3SettlerV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", + "Create3SettlerV1#Settler": "0x3734D7284f46037688252b13ef6d88E3FFDF5e1B", + "Create3DynamicCallEncoderV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", + "Create3DynamicCallEncoderV1#DynamicCallEncoder": "0x183E61BDE23a80f4D1e003653288d4B4551681ed" } \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-8453/journal.jsonl b/packages/evm/ignition/deployments/chain-8453/journal.jsonl index a74bf39..e064d5d 100644 --- a/packages/evm/ignition/deployments/chain-8453/journal.jsonl +++ b/packages/evm/ignition/deployments/chain-8453/journal.jsonl @@ -95,4 +95,22 @@ {"futureId":"Create3SmartAccount7702#ICreateX.deployCreate3","hash":"0x6b351ee0b5cde48268352ab297d25ac2c60e58f31d546cc6c96a0224213a0f13","networkInteractionId":1,"receipt":{"blockHash":"0x19256d09fe14b5498e7d3abece80d9d60ca467f82662985ab3e8ca70f4194637","blockNumber":45384725,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":368,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x000000000000000000000000b800ea953426e361efda80da69765895ab3b04da","0x4d548e60a06ca5826dcab93682802743ae2369c7da6162da7a3f4201826a6d33"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":369,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x00000000000000000000000014ae3c251881d2214e376bfa38dd98a4bd33550c"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} {"futureId":"Create3SmartAccount7702#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} {"artifactId":"Create3SmartAccount7702#ICreateX","dependencies":["Create3SmartAccount7702#ICreateX.deployCreate3","Create3SmartAccount7702#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","strategy":"basic","strategyConfig":{},"txToReadFrom":"0x6b351ee0b5cde48268352ab297d25ac2c60e58f31d546cc6c96a0224213a0f13","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} -{"artifactId":"Create3SmartAccount7702#SmartAccount7702","contractAddress":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","contractName":"SmartAccount7702","dependencies":["Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SmartAccount7702#SmartAccount7702","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} \ No newline at end of file +{"artifactId":"Create3SmartAccount7702#SmartAccount7702","contractAddress":"0x14AE3C251881d2214E376bfa38dD98A4Bd33550c","contractName":"SmartAccount7702","dependencies":["Create3SmartAccount7702#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SmartAccount7702#SmartAccount7702","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","contractName":"ICreateX","dependencies":[],"futureId":"Create3SettlerV1#ICreateX","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"args":["0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b000000000000000004302605","0x6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033"],"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","dependencies":["Create3SettlerV1#ICreateX"],"from":"0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b","functionName":"deployCreate3","futureId":"Create3SettlerV1#ICreateX.deployCreate3","strategy":"basic","strategyConfig":{},"type":"CALL_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000005d166080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c003300000000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":73,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":73,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"11000000"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"1000000"}},"hash":"0x354f7bf1273d5f5ea996392cb4bd6dcc329586ca42c0746d64defb1cb49b6bd2"},"type":"TRANSACTION_SEND"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","hash":"0x354f7bf1273d5f5ea996392cb4bd6dcc329586ca42c0746d64defb1cb49b6bd2","networkInteractionId":1,"receipt":{"blockHash":"0xfeb92c0be3ef386ba4b663d2d795b9351db135f428d2e1537e5b2a80a4a48793","blockNumber":45390715,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":526,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x000000000000000000000000b5439ac30ce4daeb02b265d758436e65087047ab","0x660e7900ab9b67f261d92573714530e140aa4f3b2855e1dd677cfa672309b2ee"]},{"address":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","data":"0x000000000000000000000000000000000000000000000000ffffffffffffffff","logIndex":527,"topics":["0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":528,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x0000000000000000000000003734d7284f46037688252b13ef6d88e3ffdf5e1b"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} +{"artifactId":"Create3SettlerV1#ICreateX","dependencies":["Create3SettlerV1#ICreateX.deployCreate3","Create3SettlerV1#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3SettlerV1#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","strategy":"basic","strategyConfig":{},"txToReadFrom":"0x354f7bf1273d5f5ea996392cb4bd6dcc329586ca42c0746d64defb1cb49b6bd2","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3SettlerV1#Settler","contractAddress":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","contractName":"Settler","dependencies":["Create3SettlerV1#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SettlerV1#Settler","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3DynamicCallEncoderV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","contractName":"ICreateX","dependencies":[],"futureId":"Create3DynamicCallEncoderV1#ICreateX","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"args":["0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b000000000000000004302606","0x6080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c0033"],"artifactId":"Create3DynamicCallEncoderV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","dependencies":["Create3DynamicCallEncoderV1#ICreateX"],"from":"0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b","functionName":"deployCreate3","futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","strategy":"basic","strategyConfig":{},"type":"CALL_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000c586080604052348015600e575f5ffd5b50610c3c8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063f964081d1461002d575b5f5ffd5b61004061003b3660046109c2565b610056565b60405161004d9190610ace565b60405180910390f35b60608251821115610093576040517f66e32eb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100a78460400151856060015185856100af565b949350505050565b82516060905f8167ffffffffffffffff8111156100ce576100ce6106ae565b60405190808252806020026020018201604052801561010157816020015b60608152602001906001900390816100ec5790505b5090505f8267ffffffffffffffff81111561011e5761011e6106ae565b604051908082528060200260200182016040528015610147578160200160208202803683370190505b5090505f805b848110156101ea575f61017a8a838151811061016b5761016b610b03565b60200260200101518a8a610322565b9050805f015185838151811061019257610192610b03565b602002602001018190525080602001518483815181106101b4576101b4610b03565b9115156020928302919091018201528101516101d2578051516101d5565b60205b6101df9084610b2b565b92505060010161014d565b50606080825f5b878110156102ec5785818151811061020b5761020b610b03565b6020026020010151156102a65760405161022b9085908490602001610b55565b60405160208183030381529060405293508287828151811061024f5761024f610b03565b6020026020010151604051602001610268929190610b6d565b604051602081830303815290604052925086818151811061028b5761028b610b03565b6020026020010151518261029f9190610b2b565b91506102e4565b838782815181106102b9576102b9610b03565b60200260200101516040516020016102d2929190610b6d565b60405160208183030381529060405293505b6001016101f1565b508b838360405160200161030293929190610b81565b604051602081830303815290604052975050505050505050949350505050565b60408051808201909152606081525f60208201525f8451600181111561034a5761034a610bc0565b0361035f57610358846103bd565b90506103b6565b60018451600181111561037457610374610bc0565b03610384576103588484846103e9565b6040517f51c907b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b60408051808201909152606081525f60208201526103e382602001518360400151610500565b92915050565b60408051808201909152606081525f602082015283602001515160401461043c576040517f893ed1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61044a85602001516105dd565b90505f61045a86602001516105e9565b905083821061047c57604051630310496160e21b815260040160405180910390fd5b84828151811061048e5761048e610b03565b60200260200101515181106104b657604051630310496160e21b815260040160405180910390fd5b6104f68583815181106104cb576104cb610b03565b602002602001015182815181106104e4576104e4610b03565b60200260200101518760400151610500565b9695505050505050565b60408051808201909152606081525f60208201528251158061052e57506020835161052b9190610bd4565b15155b1561054c5760405163dd42b1e560e01b815260040160405180910390fd5b81156105d05760408351101561058e576040517f3202a09c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610597836105dd565b6020146105b75760405163dd42b1e560e01b815260040160405180910390fd5b6105c28360206105f5565b8152600160208201526103e3565b918252505f602082015290565b60208101515f906103e3565b60408101515f906103e3565b60606103b683838551606082821015610621576040516319359e9d60e11b815260040160405180910390fd5b8351821115610643576040516319359e9d60e11b815260040160405180910390fd5b5f61064e8484610bf3565b90508067ffffffffffffffff811115610669576106696106ae565b6040519080825280601f01601f191660200182016040528015610693576020820181803683370190505b509150836020860101602083018282825e5050509392505050565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156106e5576106e56106ae565b60405290565b6040516080810167ffffffffffffffff811182821017156106e5576106e56106ae565b604051601f8201601f1916810167ffffffffffffffff81118282101715610737576107376106ae565b604052919050565b5f67ffffffffffffffff821115610758576107586106ae565b5060051b60200190565b5f82601f830112610771575f5ffd5b813567ffffffffffffffff81111561078b5761078b6106ae565b61079e601f8201601f191660200161070e565b8181528460208386010111156107b2575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f8301126107dd575f5ffd5b81356107f06107eb8261073f565b61070e565b8082825260208201915060208360051b860101925085831115610811575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610834575f5ffd5b86016060818903601f19011215610849575f5ffd5b6108516106c2565b602082013560028110610862575f5ffd5b8152604082013567ffffffffffffffff81111561087d575f5ffd5b61088c8a602083860101610762565b6020830152506060820135915081151582146108a6575f5ffd5b6040810191909152835260209283019201610816565b5095945050505050565b5f82601f8301126108d5575f5ffd5b81356108e36107eb8261073f565b8082825260208201915060208360051b860101925085831115610904575f5ffd5b602085015b838110156108bc57803567ffffffffffffffff811115610927575f5ffd5b8601603f81018813610937575f5ffd5b60208101356109486107eb8261073f565b808282526020820191506020808460051b8601010192508a83111561096b575f5ffd5b604084015b838110156109ac57803567ffffffffffffffff81111561098e575f5ffd5b61099d8d604088840101610762565b84525060209283019201610970565b5086525050602093840193919091019050610909565b5f5f5f606084860312156109d4575f5ffd5b833567ffffffffffffffff8111156109ea575f5ffd5b8401608081870312156109fb575f5ffd5b610a036106eb565b813573ffffffffffffffffffffffffffffffffffffffff81168114610a26575f5ffd5b81526020828101359082015260408201357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a64575f5ffd5b6040820152606082013567ffffffffffffffff811115610a82575f5ffd5b610a8e888285016107ce565b606083015250935050602084013567ffffffffffffffff811115610ab0575f5ffd5b610abc868287016108c6565b93969395505050506040919091013590565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156103e3576103e3610b17565b5f81518060208401855e5f93019283525090919050565b5f610b608285610b3e565b9283525050602001919050565b5f6100a7610b7b8386610b3e565b84610b3e565b7fffffffff00000000000000000000000000000000000000000000000000000000841681525f610bb7610b7b6004840186610b3e565b95945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f82610bee57634e487b7160e01b5f52601260045260245ffd5b500690565b818103818111156103e3576103e3610b1756fea264697066735822122041c689a80661212112e3fbf381b7d34afdaa30aa22cea997acd8b19bbe4d093864736f6c634300081c00330000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":75,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":75,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"11000000"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"1000000"}},"hash":"0xc3b37bd026743f3aaa2ed4195d8be8b6a6db1f424bf3c7a5989106229615d615"},"type":"TRANSACTION_SEND"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","hash":"0xc3b37bd026743f3aaa2ed4195d8be8b6a6db1f424bf3c7a5989106229615d615","networkInteractionId":1,"receipt":{"blockHash":"0x691d9a7b1b61a2b745be81d6f007c123abedd465113e7f98a19270ff4e3200b5","blockNumber":45391213,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":353,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x0000000000000000000000001d9bd3390aaef5bbcf3beb4f60e0ee28805f6779","0xa13cc826172bbf7683ce89033f741800ae55529a93ee495908820a8471d913b0"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":354,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x000000000000000000000000183e61bde23a80f4d1e003653288d4b4551681ed"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"Create3DynamicCallEncoderV1#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} +{"artifactId":"Create3DynamicCallEncoderV1#ICreateX","dependencies":["Create3DynamicCallEncoderV1#ICreateX.deployCreate3","Create3DynamicCallEncoderV1#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3DynamicCallEncoderV1#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x183E61BDE23a80f4D1e003653288d4B4551681ed","strategy":"basic","strategyConfig":{},"txToReadFrom":"0xc3b37bd026743f3aaa2ed4195d8be8b6a6db1f424bf3c7a5989106229615d615","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","contractAddress":"0x183E61BDE23a80f4D1e003653288d4B4551681ed","contractName":"DynamicCallEncoder","dependencies":["Create3DynamicCallEncoderV1#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} \ No newline at end of file diff --git a/packages/evm/ignition/modules/Create3.ts b/packages/evm/ignition/modules/Create3.ts index 73925ed..d072d5a 100644 --- a/packages/evm/ignition/modules/Create3.ts +++ b/packages/evm/ignition/modules/Create3.ts @@ -3,8 +3,8 @@ import { buildModule, IgnitionModule } from '@nomicfoundation/hardhat-ignition/m // eslint-disable-next-line no-secrets/no-secrets const CREATEX_ADDRESS = '0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed' -export default (contractName: string): IgnitionModule => - buildModule(`Create3${contractName}`, (m) => { +export default (contractName: string, version = ''): IgnitionModule => + buildModule(`Create3${contractName}${version}`, (m) => { const salt = m.getParameter('salt') const initCode = m.getParameter('initCode') diff --git a/packages/evm/scripts/deploy-contracts.ts b/packages/evm/scripts/deploy-contracts.ts index c8ab828..0182b2c 100644 --- a/packages/evm/scripts/deploy-contracts.ts +++ b/packages/evm/scripts/deploy-contracts.ts @@ -20,7 +20,7 @@ async function main(): Promise { const controllerArgs = [ADMIN, [SOLVER], [], [AXIA], [VALIDATOR], MIN_VALIDATORS] const controller = await deployCreate3(ControllerArtifact, controllerArgs, '0x17') - const dynamicCallEncoder = await deployCreate3(DynamicCallEncoderArtifact, [], '0x04302601') + const dynamicCallEncoder = await deployCreate3(DynamicCallEncoderArtifact, [], '0x04302606') const settlerImplementation = await deployCreate3(SettlerArtifact, [], '0x04302602') const initializeData = new Interface(SettlerArtifact.abi).encodeFunctionData('initialize', [ diff --git a/packages/evm/scripts/deploy-create3.ts b/packages/evm/scripts/deploy-create3.ts index 56aa8b8..f7c6197 100644 --- a/packages/evm/scripts/deploy-create3.ts +++ b/packages/evm/scripts/deploy-create3.ts @@ -5,8 +5,14 @@ import type { Artifact } from 'hardhat/types/artifacts' import buildCreate3Module from '../ignition/modules/Create3' -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export async function deployCreate3(artifact: Artifact, args: any[], saltSuffix: string): Promise { +/* eslint-disable @typescript-eslint/no-explicit-any */ + +export async function deployCreate3( + artifact: Artifact, + args: any[], + saltSuffix: string, + version?: string +): Promise { const { ethers, ignition } = await network.connect() const [signer] = await ethers.getSigners() const salt = buildProtectedSalt(signer.address, saltSuffix) @@ -15,7 +21,7 @@ export async function deployCreate3(artifact: Artifact, args: any[], saltSuffix: const encodedArgs = new Interface(abi).encodeDeploy(args) const initCode = bytecode + encodedArgs.slice(2) - const module = buildCreate3Module(contractName) + const module = buildCreate3Module(contractName, version) const result = await ignition.deploy(module, { parameters: { [module.id]: { initCode, salt, contractName } } }) console.log(`\n🚀 ${contractName} deployed to ${result[contractName].target}, verifying...`) diff --git a/packages/evm/scripts/upgrade-settler.ts b/packages/evm/scripts/upgrade-settler.ts index 32970ba..be47964 100644 --- a/packages/evm/scripts/upgrade-settler.ts +++ b/packages/evm/scripts/upgrade-settler.ts @@ -21,7 +21,7 @@ async function main(): Promise { throw Error(`Signer ${signer.address} is not the ProxyAdmin owner ${proxyAdminOwner}`) } - const implementation = await deployCreate3(SettlerArtifact, [], '0x1802') + const implementation = await deployCreate3(SettlerArtifact, [], '0x04302605', 'V1') const tx = await proxyAdmin.upgradeAndCall(proxy, implementation.target, '0x') await tx.wait() console.log(`✅ Settler ${proxy} upgraded in tx ${tx.hash}`) From e9c4f1cc826360e54c8f8ad4b0f20e271e26d88f Mon Sep 17 00:00:00 2001 From: lgalende Date: Thu, 30 Apr 2026 15:32:48 -0300 Subject: [PATCH 2/2] evm: deploy settler v1 on mainnet --- .../Create3SettlerV1#Settler.dbg.json | 4 + .../artifacts/Create3SettlerV1#Settler.json | 1481 +++++++++++++++++ .../chain-1/deployed_addresses.json | 3 +- .../deployments/chain-1/journal.jsonl | 8 +- 4 files changed, 1494 insertions(+), 2 deletions(-) create mode 100644 packages/evm/ignition/deployments/chain-1/artifacts/Create3SettlerV1#Settler.dbg.json create mode 100644 packages/evm/ignition/deployments/chain-1/artifacts/Create3SettlerV1#Settler.json diff --git a/packages/evm/ignition/deployments/chain-1/artifacts/Create3SettlerV1#Settler.dbg.json b/packages/evm/ignition/deployments/chain-1/artifacts/Create3SettlerV1#Settler.dbg.json new file mode 100644 index 0000000..1fbbc7b --- /dev/null +++ b/packages/evm/ignition/deployments/chain-1/artifacts/Create3SettlerV1#Settler.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/167571dafa48e7ff636310c6c9f0fc8e202e44bc.json" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-1/artifacts/Create3SettlerV1#Settler.json b/packages/evm/ignition/deployments/chain-1/artifacts/Create3SettlerV1#Settler.json new file mode 100644 index 0000000..cd9fdca --- /dev/null +++ b/packages/evm/ignition/deployments/chain-1/artifacts/Create3SettlerV1#Settler.json @@ -0,0 +1,1481 @@ +{ + "_format": "hh3-artifact-1", + "contractName": "Settler", + "sourceName": "contracts/Settler.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposed", + "type": "uint256" + } + ], + "name": "SettlerAmountOutLtProposed", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerCrossChainSwapMustBeOnlyOperation", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerDynamicCallEncoderZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "executor", + "type": "address" + } + ], + "name": "SettlerExecutorNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "SettlerIntentAlreadyExecuted", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerIntentOperationsEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SettlerIntentPastDeadline", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "current", + "type": "uint256" + } + ], + "name": "SettlerIntentValidationsNotEnough", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "name": "SettlerInvalidChain", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerInvalidProposedAmounts", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "SettlerInvalidRecipient", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "settler", + "type": "address" + } + ], + "name": "SettlerInvalidSettler", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerNonceZero", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerOperationChainsMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "post", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pre", + "type": "uint256" + } + ], + "name": "SettlerPostBalanceOutLtPre", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerProposalDataInvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerProposalDataNotEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "SettlerProposalPastDeadline", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + } + ], + "name": "SettlerProposalSignerNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minAmount", + "type": "uint256" + } + ], + "name": "SettlerProposedAmountLtMinAmount", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerRescueFundsRecipientZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gasUsed", + "type": "uint256" + } + ], + "name": "SettlerSimulationSuccess", + "type": "error" + }, + { + "inputs": [], + "name": "SettlerSolverFeeInvalidLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "SettlerSolverFeeTooHigh", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "solver", + "type": "address" + } + ], + "name": "SettlerSolverNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "lengthRequested", + "type": "uint256" + } + ], + "name": "SettlerTooManySafeguards", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + } + ], + "name": "SettlerUnknownOperationType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "SettlerUserNotSmartAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "previous", + "type": "address" + }, + { + "internalType": "address", + "name": "current", + "type": "address" + } + ], + "name": "SettlerValidatorDuplicatedOrUnsorted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "validator", + "type": "address" + } + ], + "name": "SettlerValidatorNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "SmartAccountsHandlerZero", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "dynamicCallEncoder", + "type": "address" + } + ], + "name": "DynamicCallEncoderSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "FundsRescued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "indexed": false, + "internalType": "struct Operation", + "name": "operation", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "indexed": false, + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "intentHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "output", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "OperationExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operationsValidator", + "type": "address" + } + ], + "name": "OperationsValidatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "proposal", + "type": "bytes32" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "SafeguardSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "smartAccountsHandler", + "type": "address" + } + ], + "name": "SmartAccountsHandlerSet", + "type": "event" + }, + { + "inputs": [], + "name": "controller", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dynamicCallEncoder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "getIntentBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + } + ], + "name": "getIntentHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "internalType": "address", + "name": "solver", + "type": "address" + } + ], + "name": "getProposalHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getUserSafeguard", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controller", + "type": "address" + }, + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_dynamicCallEncoder", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "operationsValidator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "rescueFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newDynamicCallEncoder", + "type": "address" + } + ], + "name": "setDynamicCallEncoder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOperationsValidator", + "type": "address" + } + ], + "name": "setOperationsValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "safeguard", + "type": "bytes" + } + ], + "name": "setSafeguard", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newSmartAccountsHandler", + "type": "address" + } + ], + "name": "setSmartAccountsHandler", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "feePayer", + "type": "address" + }, + { + "internalType": "address", + "name": "settler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct MaxFee[]", + "name": "maxFees", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "triggerSig", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "minValidations", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "validations", + "type": "bytes[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "opType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "topic", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct OperationEvent[]", + "name": "events", + "type": "tuple[]" + } + ], + "internalType": "struct Operation[]", + "name": "operations", + "type": "tuple[]" + } + ], + "internalType": "struct Intent", + "name": "intent", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "fees", + "type": "uint256[]" + } + ], + "internalType": "struct Proposal", + "name": "proposal", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "simulate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "smartAccountsHandler", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033", + "deployedBytecode": "0x60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {}, + "immutableReferences": {}, + "inputSourceName": "project/contracts/Settler.sol", + "buildInfoId": "167571dafa48e7ff636310c6c9f0fc8e202e44bc" +} \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-1/deployed_addresses.json b/packages/evm/ignition/deployments/chain-1/deployed_addresses.json index 6cf8c1d..9d4d39d 100644 --- a/packages/evm/ignition/deployments/chain-1/deployed_addresses.json +++ b/packages/evm/ignition/deployments/chain-1/deployed_addresses.json @@ -15,5 +15,6 @@ "Create3SmartAccount7702#SmartAccount7702": "0x14AE3C251881d2214E376bfa38dD98A4Bd33550c", "Create3DynamicCallEncoderV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", "Create3DynamicCallEncoderV1#DynamicCallEncoder": "0x183E61BDE23a80f4D1e003653288d4B4551681ed", - "Create3SettlerV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed" + "Create3SettlerV1#ICreateX": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed", + "Create3SettlerV1#Settler": "0x3734D7284f46037688252b13ef6d88E3FFDF5e1B" } \ No newline at end of file diff --git a/packages/evm/ignition/deployments/chain-1/journal.jsonl b/packages/evm/ignition/deployments/chain-1/journal.jsonl index 2b72ecb..711ba7f 100644 --- a/packages/evm/ignition/deployments/chain-1/journal.jsonl +++ b/packages/evm/ignition/deployments/chain-1/journal.jsonl @@ -107,4 +107,10 @@ {"artifactId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","contractAddress":"0x183E61BDE23a80f4D1e003653288d4B4551681ed","contractName":"DynamicCallEncoder","dependencies":["Create3DynamicCallEncoderV1#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3DynamicCallEncoderV1#DynamicCallEncoder","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} {"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","contractName":"ICreateX","dependencies":[],"futureId":"Create3SettlerV1#ICreateX","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} {"args":["0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b000000000000000004302605","0x6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c0033"],"artifactId":"Create3SettlerV1#ICreateX","contractAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","dependencies":["Create3SettlerV1#ICreateX"],"from":"0x3a0ce8115b4913f42c4928d6bc3f554e9a81468b","functionName":"deployCreate3","futureId":"Create3SettlerV1#ICreateX.deployCreate3","strategy":"basic","strategyConfig":{},"type":"CALL_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} -{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000005d166080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c003300000000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} \ No newline at end of file +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteraction":{"data":"0x9c36a2863a0ce8115b4913f42c4928d6bc3f554e9a81468b00000000000000000430260500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000005d166080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615c40806100d65f395ff3fe60806040526004361061015a575f3560e01c806396d45f51116100bb578063cbc9104511610071578063f2fde38b11610057578063f2fde38b146103d4578063f77c4791146103f3578063faa390d714610411575f5ffd5b8063cbc9104514610396578063e5814ea6146103b5575f5ffd5b80639f86fded116100a15780639f86fded14610339578063a49eacff14610358578063c0c53b8b14610377575f5ffd5b806396d45f51146102fb5780639c2a2c6e1461031a575f5ffd5b806384d44e2811610110578063911929df116100f6578063911929df1461029157806394795916146102bd57806395002651146102dc575f5ffd5b806384d44e281461021c5780638da5cb5b14610255575f5ffd5b80636ccae054116101405780636ccae054146101c2578063715018a6146101e157806384b0196e146101f5575f5ffd5b80630fc27cf6146101655780634987ed2f14610186575f5ffd5b3661016157005b5f5ffd5b348015610170575f5ffd5b5061018461017f366004613ab8565b610430565b005b348015610191575f5ffd5b506001546101a5906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101cd575f5ffd5b506101846101dc366004613ad3565b610444565b3480156101ec575f5ffd5b5061018461051a565b348015610200575f5ffd5b5061020961052d565b6040516101b99796959493929190613b79565b348015610227575f5ffd5b50610247610236366004613c02565b60046020525f908152604090205481565b6040519081526020016101b9565b348015610260575f5ffd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b03166101a5565b34801561029c575f5ffd5b506102b06102ab366004613ab8565b61062c565b6040516101b99190613c19565b3480156102c8575f5ffd5b506101846102d7366004614283565b6106d5565b3480156102e7575f5ffd5b506102476102f6366004614311565b6107c1565b348015610306575f5ffd5b50610184610315366004613ab8565b6107d7565b348015610325575f5ffd5b506003546101a5906001600160a01b031681565b348015610344575f5ffd5b50610184610353366004614283565b6107e8565b348015610363575f5ffd5b50610184610372366004613ab8565b610891565b348015610382575f5ffd5b50610184610391366004614389565b6108a2565b3480156103a1575f5ffd5b506101846103b03660046143c6565b610aaf565b3480156103c0575f5ffd5b506002546101a5906001600160a01b031681565b3480156103df575f5ffd5b506101846103ee366004613ab8565b610ab9565b3480156103fe575f5ffd5b505f546101a5906001600160a01b031681565b34801561041c575f5ffd5b5061024761042b3660046143f8565b610b0c565b610438610b1c565b61044181610b90565b50565b61044c610b1c565b610454610c19565b6001600160a01b038216610494576040517f54328a0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61049f838383610c7c565b816001600160a01b0316836001600160a01b03167fed2837b80b3489773c5f1ed30dd2884b4c90dbf7b87428ea03c49b24ef59a805836040516104e491815260200190565b60405180910390a361051560017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050565b610522610b1c565b61052b5f610cdb565b565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100805490915015801561056b57506001810154155b6105d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a6564000000000000000000000060448201526064015b60405180910390fd5b6105de610d4b565b6105e6610e1e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6001600160a01b0381165f9081526005602052604090208054606091906106529061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061442a565b80156106c95780601f106106a0576101008083540402835291602001916106c9565b820191905f5260205f20905b8154815290600101906020018083116106ac57829003601f168201915b50505050509050919050565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610720573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610744919061446b565b61076c5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b5f5a905061077d8585856001610e6f565b5f5a6107899083614484565b9050806040517fa523ba490000000000000000000000000000000000000000000000000000000081526004016105cd91815260200190565b5f6107cd848484610fa0565b90505b9392505050565b6107df610b1c565b6104418161103d565b5f335f5460405163d9d8edb960e01b81526001600160a01b03808416600483015292935091169063d9d8edb990602401602060405180830381865afa158015610833573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610857919061446b565b61087f5760405163a7ac57a960e01b81526001600160a01b03821660048201526024016105cd565b61088b8484845f610e6f565b50505050565b610899610b1c565b610441816110c6565b5f6108ab61110f565b805490915060ff68010000000000000000820416159067ffffffffffffffff165f811580156108d75750825b90505f8267ffffffffffffffff1660011480156108f35750303b155b905081158015610901575080155b15610938576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561096c57845468ff00000000000000001916680100000000000000001785555b61097587611137565b61097d611148565b6109f16040518060400160405280601681526020017f4d696d69632050726f746f636f6c20536574746c6572000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250611158565b5f80546001600160a01b0319166001600160a01b038a16179055604051610a1790613a42565b604051809103905ff080158015610a30573d5f5f3e3d5ffd5b50600180546001600160a01b0319166001600160a01b0392909216919091179055610a5a8661103d565b8315610aa557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b610441338261116e565b610ac1610b1c565b6001600160a01b038116610b03576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024016105cd565b61044181610cdb565b5f610b16826111e7565b92915050565b33610b4e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461052b576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016105cd565b6001600160a01b038116610bd0576040517f42af048a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f93fa00498c991ad852fbb3361afb0e3507720aa9ff69a8386009b76134a6e654905f90a250565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00805460011901610c76576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610caa576105158282611276565b61051583838361131b565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc89061442a565b8015610e135780601f10610dea57610100808354040283529160200191610e13565b820191905f5260205f20905b815481529060010190602001808311610df657829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610d9c9061442a565b610e77610c19565b610e838484848461138f565b4360045f610e90876111e7565b81526020019081526020015f20819055505f8461010001515167ffffffffffffffff811115610ec157610ec1613c2b565b604051908082528060200260200182016040528015610ef457816020015b6060815260200190600190039081610edf5790505b5090505f5b85610100015151811015610f3857610f1386868385611b85565b828281518110610f2557610f256144a3565b6020908102919091010152600101610ef9565b50610f438585611c5c565b610f4e848633610fa0565b6040517f7b1bcf1ccf901a11589afff5504d59fd0a53780eed2a952adade0348985139e0905f90a25061088b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5f7fa3fe6f3f3735a89666b95c43900391e47561d7b498410df539101e55309a968f610fcb846111e7565b83865f0151610fdd8860200151611d79565b610fea8960400151611e42565b6040805160208101979097528601949094526001600160a01b039092166060850152608084015260a083015260c082015260e0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b03811661107d576040517f1793862f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040517facfbb618325d1abc35c2404086871d507dcae4af0a50a143962f8606f16dde10905f90a250565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f5f409c1b4d4ea8490b2608a50161c1a08dc17a0656869303e6e51b9fc89f4ef7905f90a250565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610b16565b61113f611e54565b61044181611e92565b611150611e54565b61052b611e9a565b611160611e54565b61116a8282611ea2565b5050565b6001600160a01b0382165f90815260056020526040812061118e91613a4f565b6001600160a01b0382165f9081526005602052604090206111af82826144fb565b506040516001600160a01b038316907f5ac98b81e10e07689d7de8e9ec09900564d65647de8d039328d4cbdf575b28f4905f90a25050565b5f7f7d91aa1f7591f1c332ec5a25ed7cf5b18b014aff05605580d4bb8c353714eea6825f01518360200151846040015185606001516112298760800151611f14565b8760a001518860c001516112418a610100015161202a565b604051602001611259999897969594939291906145b6565b604051602081830303815290604052805190602001209050919050565b804710156112b9576040517fcf479181000000000000000000000000000000000000000000000000000000008152476004820152602481018290526044016105cd565b5f5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611303576040519150601f19603f3d011682016040523d82523d5f602084013e611308565b606091505b50915091508161088b5761088b816120c4565b6040516001600160a01b0383811660248301526044820183905261051591859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612106565b60208401516001600160a01b031630146113e65760208401516040517f30b078bf0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b6040840151611421576040517f58e8d18100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61142b856111e7565b5f8181526004602052604090205490915015611476576040517f0413dc4a000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b846101000151515f036114b5576040517fe5dfb56a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83602001515185610100015151146114f9576040517f95784c9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03161561167a575f5b85610100015151811015611678575f8661010001518281518110611532576115326144a3565b602002602001015190505f60055f83602001516001600160a01b03166001600160a01b031681526020019081526020015f20805461156f9061442a565b80601f016020809104026020016040519081016040528092919081815260200182805461159b9061442a565b80156115e65780601f106115bd576101008083540402835291602001916115e6565b820191905f5260205f20905b8154815290600101906020018083116115c957829003601f168201915b505050505090505f8151111561166e576002546040517f4007c7140000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690634007c7149061164190859085906004016146cd565b5f6040518083038186803b158015611657575f5ffd5b505afa158015611669573d5f5f3e3d5ffd5b505050505b505060010161150c565b505b5f6116848661218b565b9050801561172357428660600151116116d85760608601516040517f95d3dc2200000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b845142108015906117215785516040517f2c39717b00000000000000000000000000000000000000000000000000000000815260048101919091524260248201526044016105cd565b505b84604001515186608001515114611766576040517f9dca144800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b866080015151811015611809575f8760800151828151811061178c5761178c6144a3565b60200260200101516020015190505f876040015183815181106117b1576117b16144a3565b60200260200101519050818111156117ff576040517f8ffa61fa00000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016105cd565b5050600101611768565b505f5f5f9054906101000a90046001600160a01b03166001600160a01b031663680038c76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561185a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061187e91906146f1565b90505f8160ff168860c0015111611898578160ff1661189e565b8760c001515b9050808860e001515110156118f05760e0880151516040517fcd0ce6990000000000000000000000000000000000000000000000000000000081526105cd918391600401918252602082015260400190565b60408051602081019091528481525f908161191261190d836121fd565b61223a565b90505f5b8b60e0015151811015611a85575f61194b838e60e00151848151811061193e5761193e6144a3565b6020026020010151612281565b9050846001600160a01b0316816001600160a01b0316116119ab576040517fce98854c0000000000000000000000000000000000000000000000000000000081526001600160a01b038087166004830152821660248201526044016105cd565b5f80546040517f616556700000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152939750879390911690636165567090602401602060405180830381865afa158015611a11573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a35919061446b565b1590508015611a7b576040517ff24706660000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b5050600101611916565b505f611a9e611a9861190d8d8f33610fa0565b8b612281565b5f80546040517f163eed9e0000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301529394509192169063163eed9e90602401602060405180830381865afa158015611b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b26919061446b565b158015611b31575089155b90508015611b76576040517f100158a80000000000000000000000000000000000000000000000000000000081526001600160a01b03831660048201526024016105cd565b50505050505050505050505050565b60605f8561010001518481518110611b9f57611b9f6144a3565b602090810291909101015151905060ff81161580611bc0575060ff81166003145b15611bd857611bd08686866122a9565b915050611c54565b5f1960ff821601611bee57611bd086868661278f565b60011960ff821601611c0557611bd08686866128c4565b60031960ff821601611c1d57611bd086868686612a31565b6040517f3bb38fe200000000000000000000000000000000000000000000000000000000815260ff821660048201526024016105cd565b949350505050565b600360ff168261010001515f81518110611c7857611c786144a3565b60200260200101515f015160ff1603611cd5575f8261010001515f81518110611ca357611ca36144a3565b602002602001015160400151806020019051810190611cc291906147c4565b905046815f015103611cd357505050565b505b815160015433905f90611cf1906001600160a01b031684612c2c565b90505f5b856080015151811015611d71575f86608001518281518110611d1957611d196144a3565b60200260200101515f01519050611d3a816001600160a01b03166103481490565b611d6857611d6881868689604001518681518110611d5a57611d5a6144a3565b602002602001015187612cb0565b50600101611cf5565b505050505050565b5f5f825167ffffffffffffffff811115611d9557611d95613c2b565b604051908082528060200260200182016040528015611dbe578160200160208202803683370190505b5090505f5b8351811015611e1257838181518110611dde57611dde6144a3565b602002602001015180519060200120828281518110611dff57611dff6144a3565b6020908102919091010152600101611dc3565b5080604051602001611e2491906148f4565b60405160208183030381529060405280519060200120915050919050565b5f8160405160200161125991906148f4565b611e5c612cf0565b61052b576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ac1611e54565b610cb5611e54565b611eaa611e54565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102611ef684826144fb565b5060038101611f0583826144fb565b505f8082556001909101555050565b5f5f825167ffffffffffffffff811115611f3057611f30613c2b565b604051908082528060200260200182016040528015611f59578160200160208202803683370190505b5090505f5b8351811015611e12577fe44101eb81f50b64d4005e31312ea7bafd6f81357f9dce4fe51d5f2dcb939da4848281518110611f9a57611f9a6144a3565b60200260200101515f0151858381518110611fb757611fb76144a3565b602002602001015160200151604051602001611fef939291909283526001600160a01b03919091166020830152604082015260600190565b60405160208183030381529060405280519060200120828281518110612017576120176144a3565b6020908102919091010152600101611f5e565b5f5f825167ffffffffffffffff81111561204657612046613c2b565b60405190808252806020026020018201604052801561206f578160200160208202803683370190505b5090505f5b8351811015611e125761209f848281518110612092576120926144a3565b6020026020010151612d0e565b8282815181106120b1576120b16144a3565b6020908102919091010152600101612074565b8051156120d45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f60205f8451602086015f885af180612125576040513d5f823e3d81fd5b50505f513d9150811561213c578060011415612149565b6001600160a01b0384163b155b1561088b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b5f5f8261010001515f815181106121a4576121a46144a3565b60200260200101519050600360048111156121c1576121c161470c565b60ff16815f015160ff16146121d95750600192915050565b5f81604001518060200190518101906121f291906147c4565b514614949350505050565b8051604080517f07094367b2db06e3dbb414cf947644f8e08067ea238c5f41cb2fa5fea5be628e6020820152908101919091525f90606001611259565b5f610b16612246612d8c565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f5f5f5f61228f8686612d9a565b92509250925061229f8282612de3565b5090949350505050565b60605f84610100015183815181106122c3576122c36144a3565b602002602001015190505f81604001518060200190518101906122e691906147c4565b90505f856020015185815181106122ff576122ff6144a3565b602002602001015180602001905181019061231a9190614976565b9050600360ff16835f015160ff160361237d57600187610100015151111561236e576040517f376fce5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123788282612ee6565b612387565b612387828261301e565b60208301516001545f916123a4916001600160a01b031690612c2c565b905046835f015103612406575f5b836040015151811015612404575f846040015182815181106123d6576123d66144a3565b602002602001015190506123fb815f01518760200151865f0151846020015187612cb0565b506001016123b2565b505b5f61241084613070565b90505f61241c8a6111e7565b9050835f01516001600160a01b031663fd93eba687838c602001518c81518110612448576124486144a3565b60200260200101516040518463ffffffff1660e01b815260040161246e93929190614a7b565b5f604051808303815f87803b158015612485575f5ffd5b505af1158015612497573d5f5f3e3d5ffd5b5050505084606001515167ffffffffffffffff8111156124b9576124b9613c2b565b6040519080825280602002602001820160405280156124ec57816020015b60608152602001906001900390816124d75790505b50965046856020015103612782575f85606001515167ffffffffffffffff81111561251957612519613c2b565b604051908082528060200260200182016040528015612542578160200160208202803683370190505b5090505f5b86606001515181101561274b575f8760600151828151811061256b5761256b6144a3565b602002602001015190505f612583825f01513061312c565b90505f868481518110612598576125986144a3565b60200260200101519050808210156125ed576040517ff5ad5ab70000000000000000000000000000000000000000000000000000000081526004810185905260248101839052604481018290526064016105cd565b6125f78183614484565b858581518110612609576126096144a3565b6020026020010181815250505f8960400151858151811061262c5761262c6144a3565b6020026020010151905080868681518110612649576126496144a3565b602002602001015110156126b7578486868151811061266a5761266a6144a3565b60209081029190910101516040517ff0a43aa700000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016105cd565b6126e2845f015185604001518888815181106126d5576126d56144a3565b6020026020010151610c7c565b8585815181106126f4576126f46144a3565b602002602001015160405160200161270e91815260200190565b6040516020818303038152906040528d868151811061272f5761272f6144a3565b6020026020010181905250505050508080600101915050612547565b50612780878b61275a8e6111e7565b8c8560405160200161276c9190614aaf565b6040516020818303038152906040526131ea565b505b5050505050509392505050565b60605f84610100015183815181106127a9576127a96144a3565b602002602001015190505f81604001518060200190518101906127cc9190614ac1565b90506127f581866020015186815181106127e8576127e86144a3565b6020026020010151613281565b60208201516001545f91612812916001600160a01b031690612c2c565b90505f5b826020015151811015612869575f8360200151828151811061283a5761283a6144a3565b60200260200101519050612860815f015186602001518360400151846020015187612cb0565b50600101612816565b50604080515f8082526020820190925290612894565b606081526020019060019003908161287f5790505b5093506128ba83876128a58a6111e7565b604080515f81526020810190915289906131ea565b5050509392505050565b60605f84610100015183815181106128de576128de6144a3565b602002602001015190505f81604001518060200190518101906129019190614b4d565b905061292f818660200151868151811061291d5761291d6144a3565b6020026020010151846020015161333e565b80602001515167ffffffffffffffff81111561294d5761294d613c2b565b60405190808252806020026020018201604052801561298057816020015b606081526020019060019003908161296b5790505b5092505f5b816020015151811015612a07575f826020015182815181106129a9576129a96144a3565b6020908102919091018101518582015181519282015160408301516001549395506129e1946001600160a01b039094169391906133d8565b8583815181106129f3576129f36144a3565b602090810291909101015250600101612985565b50612a288286612a16896111e7565b878760405160200161276c9190614cf1565b50509392505050565b60605f8561010001518481518110612a4b57612a4b6144a3565b602002602001015190505f8160400151806020019051810190612a6e9190614d03565b9050612a8a818760200151878151811061291d5761291d6144a3565b80602001515167ffffffffffffffff811115612aa857612aa8613c2b565b604051908082528060200260200182016040528015612adb57816020015b6060815260200190600190039081612ac65790505b5092505f5b816020015151811015612c01575f82602001518281518110612b0457612b046144a3565b6020026020010151806020019051810190612b1f9190614de3565b6003546040517ff964081d0000000000000000000000000000000000000000000000000000000081529192505f916001600160a01b039091169063f964081d90612b719085908b908d90600401614fcc565b5f60405180830381865afa158015612b8b573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052612bb291908101906150e2565b602080870151845191850151600154939450612bda936001600160a01b0316929085906133d8565b868481518110612bec57612bec6144a3565b60209081029190910101525050600101612ae0565b50612c228287612c108a6111e7565b888760405160200161276c9190614cf1565b5050949350505050565b6040517f5e07a6e60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301525f9190841690635e07a6e690602401602060405180830381865afa158015612c8c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d0919061446b565b8015612cd457600154612ccf906001600160a01b03168587868661346e565b612ce9565b612ce96001600160a01b0386168585856134c7565b5050505050565b5f612cf961110f565b5468010000000000000000900460ff16919050565b5f7fb50234482bc32bb6c761550484098f7c231b0a3e3180699a836f6241d1029de3825f01518360200151846040015180519060200120612d528660600151613500565b60408051602081019690965260ff909416938501939093526001600160a01b039091166060840152608083015260a082015260c001611259565b5f612d95613614565b905090565b5f5f5f8351604103612dd1576020840151604085015160608601515f1a612dc388828585613687565b955095509550505050612ddc565b505081515f91506002905b9250925092565b5f826003811115612df657612df661470c565b03612dff575050565b6001826003811115612e1357612e1361470c565b03612e4a576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115612e5e57612e5e61470c565b03612e98576040517ffce698f7000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6003826003811115612eac57612eac61470c565b0361116a576040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600481018290526024016105cd565b6020820151825103612f0b57604051633bc78edf60e01b815260040160405180910390fd5b81515f904614801590612f22575046836020015114155b90508015612f455760405163308a43dd60e11b81524660048201526024016105cd565b612f4f838361374f565b5f805483516040517f7d7011020000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152911690637d70110290602401602060405180830381865afa158015612fb1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612fd5919061446b565b159050801561088b5782516040517fdb489af40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016105cd565b602082015182511461304357604051633bc78edf60e01b815260040160405180910390fd5b815146146130665760405163308a43dd60e11b81524660048201526024016105cd565b61116a828261374f565b606081606001515167ffffffffffffffff81111561309057613090613c2b565b6040519080825280602002602001820160405280156130b9578160200160208202803683370190505b50905046826020015103613127575f5b82606001515181101561312557613100836060015182815181106130ef576130ef6144a3565b60200260200101515f01513061312c565b828281518110613112576131126144a3565b60209081029190910101526001016130c9565b505b919050565b5f73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384160361316257506001600160a01b03811631610b16565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa1580156131bf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131e39190615114565b9050610b16565b5f5b856060015151811015611d71575f86606001518281518110613210576132106144a3565b60200260200101519050865f015160ff16815f015188602001516001600160a01b03167fb09e51e3f4dd06d21b6df6ec765fb1155b36c6c9b700e07e6a7b1a944c06d8d38a8a8a8a8a89602001516040516132709695949392919061512b565b60405180910390a4506001016131ec565b815146146132a45760405163308a43dd60e11b81524660048201526024016105cd565b8051156132c4576040516393c58e1160e01b815260040160405180910390fd5b5f5b826020015151811015610515575f836020015182815181106132ea576132ea6144a3565b6020026020010151604001519050306001600160a01b0316816001600160a01b03160361333557604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b506001016132c6565b825146146133615760405163308a43dd60e11b81524660048201526024016105cd565b815115613381576040516393c58e1160e01b815260040160405180910390fd5b600154613397906001600160a01b031682612c2c565b610515576040517fcaec9bac0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016105cd565b60606134618663ff883fcf60e01b878787876040516024016133fd94939291906151ee565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261388b565b6040019695505050505050565b6040516001600160a01b03808616602483015280851660448301528316606482015260848101829052611d719086907ff18d03cc000000000000000000000000000000000000000000000000000000009060a4016133fd565b6040516001600160a01b03848116602483015283811660448301526064820183905261088b9186918216906323b872dd90608401611348565b5f5f825167ffffffffffffffff81111561351c5761351c613c2b565b604051908082528060200260200182016040528015613545578160200160208202803683370190505b5090505f5b8351811015611e12577fcf6ba9f1afa971013ec5a00408cf423b65abc1de93e4b7dd80f4fa6f07f193df848281518110613586576135866144a3565b60200260200101515f01518583815181106135a3576135a36144a3565b602002602001015160200151805190602001206040516020016135d9939291909283526020830191909152604082015260600190565b60405160208183030381529060405280519060200120828281518110613601576136016144a3565b602090810291909101015260010161354a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61363e6138fd565b613646613978565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156136c057505f91506003905082613745565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015613711573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b03811661373c57505f925060019150829050613745565b92505f91508190505b9450945094915050565b81606001515181604001515114613792576040517f1816c20200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b826060015151811015610515575f836060015182815181106137b8576137b86144a3565b602002602001015190505f81604001519050306001600160a01b0316816001600160a01b03160361380757604051630b9ab59960e01b81526001600160a01b03821660048201526024016105cd565b5f826020015190505f85604001518581518110613826576138266144a3565b602002602001015190508181101561387b576040517f1fef5f330000000000000000000000000000000000000000000000000000000081526004810186905260248101829052604481018390526064016105cd565b5050600190920191506137949050565b60605f5f846001600160a01b0316846040516138a7919061522f565b5f60405180830381855af49150503d805f81146138df576040519150601f19603f3d011682016040523d82523d5f602084013e6138e4565b606091505b50915091506138f48583836139cd565b95945050505050565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081613928610d4b565b80519091501561394057805160209091012092915050565b8154801561394f579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100816139a3610e1e565b8051909150156139bb57805160209091012092915050565b6001820154801561394f579392505050565b6060826139e2576139dd826120c4565b6107d0565b81511580156139f957506001600160a01b0384163b155b15613a3b576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016105cd565b50806107d0565b6109c58061524683390190565b508054613a5b9061442a565b5f825580601f10613a6a575050565b601f0160209004905f5260205f209081019061044191905b80821115613a95575f8155600101613a82565b5090565b6001600160a01b0381168114610441575f5ffd5b803561312781613a99565b5f60208284031215613ac8575f5ffd5b81356107d081613a99565b5f5f5f60608486031215613ae5575f5ffd5b8335613af081613a99565b92506020840135613b0081613a99565b929592945050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b5f8151808452602084019350602083015f5b82811015613b6f578151865260209586019590910190600101613b51565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f613bb360e0830189613b11565b8281036040840152613bc58189613b11565b90508660608401526001600160a01b03861660808401528460a084015282810360c0840152613bf48185613b3f565b9a9950505050505050505050565b5f60208284031215613c12575f5ffd5b5035919050565b602081525f6107d06020830184613b11565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613c6257613c62613c2b565b60405290565b6040516080810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051610120810167ffffffffffffffff81118282101715613c6257613c62613c2b565b6040516060810167ffffffffffffffff81118282101715613c6257613c62613c2b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613cfb57613cfb613c2b565b604052919050565b5f67ffffffffffffffff821115613d1c57613d1c613c2b565b5060051b60200190565b5f82601f830112613d35575f5ffd5b8135613d48613d4382613d03565b613cd2565b8082825260208201915060208360061b860101925085831115613d69575f5ffd5b602085015b83811015613db45760408188031215613d85575f5ffd5b613d8d613c3f565b8135613d9881613a99565b8152602082810135818301529084529290920191604001613d6e565b5095945050505050565b5f67ffffffffffffffff821115613dd757613dd7613c2b565b50601f01601f191660200190565b5f82601f830112613df4575f5ffd5b8135613e02613d4382613dbe565b818152846020838601011115613e16575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f82601f830112613e41575f5ffd5b8135613e4f613d4382613d03565b8082825260208201915060208360051b860101925085831115613e70575f5ffd5b602085015b83811015613db457803567ffffffffffffffff811115613e93575f5ffd5b613ea2886020838a0101613de5565b84525060209283019201613e75565b60ff81168114610441575f5ffd5b5f82601f830112613ece575f5ffd5b613edb613d438335613d03565b82358082526020808301929160051b850101851015613ef8575f5ffd5b602084015b6020853560051b86010181101561409f5767ffffffffffffffff81351115613f23575f5ffd5b803585016080818803601f19011215613f3a575f5ffd5b613f42613c68565b613f4f6020830135613eb1565b60208201358152613f636040830135613a99565b6040820135602082015267ffffffffffffffff60608301351115613f85575f5ffd5b613f988860206060850135850101613de5565b604082015267ffffffffffffffff60808301351115613fb5575f5ffd5b60206080830135830101915087601f830112613fcf575f5ffd5b613fdc613d438335613d03565b82358082526020808301929160051b8501018a811115613ffa575f5ffd5b602085015b818110156140885767ffffffffffffffff8135111561401c575f5ffd5b803586016040818e03601f19011215614033575f5ffd5b61403b613c3f565b6020820135815267ffffffffffffffff6040830135111561405a575f5ffd5b61406d8e60206040850135850101613de5565b60208201528086525050602084019350602081019050613fff565b505060608301525084525060209283019201613efd565b50949350505050565b5f61012082840312156140b9575f5ffd5b6140c1613c8b565b90506140cc82613aad565b81526140da60208301613aad565b60208201526040828101359082015260608083013590820152608082013567ffffffffffffffff81111561410c575f5ffd5b61411884828501613d26565b60808301525060a082013567ffffffffffffffff811115614137575f5ffd5b61414384828501613de5565b60a08301525060c0828101359082015260e082013567ffffffffffffffff81111561416c575f5ffd5b61417884828501613e32565b60e08301525061010082013567ffffffffffffffff811115614198575f5ffd5b6141a484828501613ebf565b6101008301525092915050565b5f606082840312156141c1575f5ffd5b6141c9613caf565b823581529050602082013567ffffffffffffffff8111156141e8575f5ffd5b6141f484828501613e32565b602083015250604082013567ffffffffffffffff811115614213575f5ffd5b8201601f81018413614223575f5ffd5b8035614231613d4382613d03565b8082825260208201915060208360051b850101925086831115614252575f5ffd5b6020840193505b82841015614274578335825260209384019390910190614259565b60408501525091949350505050565b5f5f5f60608486031215614295575f5ffd5b833567ffffffffffffffff8111156142ab575f5ffd5b6142b7868287016140a8565b935050602084013567ffffffffffffffff8111156142d3575f5ffd5b6142df868287016141b1565b925050604084013567ffffffffffffffff8111156142fb575f5ffd5b61430786828701613de5565b9150509250925092565b5f5f5f60608486031215614323575f5ffd5b833567ffffffffffffffff811115614339575f5ffd5b614345868287016141b1565b935050602084013567ffffffffffffffff811115614361575f5ffd5b61436d868287016140a8565b925050604084013561437e81613a99565b809150509250925092565b5f5f5f6060848603121561439b575f5ffd5b83356143a681613a99565b925060208401356143b681613a99565b9150604084013561437e81613a99565b5f602082840312156143d6575f5ffd5b813567ffffffffffffffff8111156143ec575f5ffd5b611c5484828501613de5565b5f60208284031215614408575f5ffd5b813567ffffffffffffffff81111561441e575f5ffd5b611c54848285016140a8565b600181811c9082168061443e57607f821691505b60208210810361312557634e487b7160e01b5f52602260045260245ffd5b80518015158114613127575f5ffd5b5f6020828403121561447b575f5ffd5b6107d08261445c565b81810381811115610b1657634e487b7160e01b5f52601160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b601f82111561051557805f5260205f20601f840160051c810160208510156144dc5750805b601f840160051c820191505b81811015612ce9575f81556001016144e8565b815167ffffffffffffffff81111561451557614515613c2b565b61452981614523845461442a565b846144b7565b6020601f82116001811461455b575f83156145445750848201515b5f19600385901b1c1916600184901b178455612ce9565b5f84815260208120601f198516915b8281101561458a578785015182556020948501946001909201910161456a565b50848210156145a757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b8981526001600160a01b03891660208201526001600160a01b03881660408201528660608201528560808201528460a082015261012060c08201525f614600610120830186613b11565b60e0830194909452506101000152979650505050505050565b60ff81511682526001600160a01b0360208201511660208301525f60408201516080604085015261464d6080850182613b11565b90506060830151848203606086015281815180845260208401915060208160051b8501016020840193505f5b828110156146c157601f1986830301845284518051835260208101519050604060208401526146ab6040840182613b11565b6020968701969590950194925050600101614679565b50979650505050505050565b604081525f6146df6040830185614619565b82810360208401526138f48185613b11565b5f60208284031215614701575f5ffd5b81516107d081613eb1565b634e487b7160e01b5f52602160045260245ffd5b5f61472d613d4384613d03565b83815290506020810160608402830185811115614748575f5ffd5b835b818110156128ba575f60608289031215614762575f5ffd5b61476a613caf565b9050815161477781613a99565b815260208281015190820152604082015161479181613a99565b6040820152835260209092019160600161474a565b5f82601f8301126147b5575f5ffd5b6107d083835160208501614720565b5f602082840312156147d4575f5ffd5b815167ffffffffffffffff8111156147ea575f5ffd5b8201608081850312156147fb575f5ffd5b614803613c68565b8151815260208083015190820152604082015167ffffffffffffffff81111561482a575f5ffd5b8201601f8101861361483a575f5ffd5b8051614848613d4382613d03565b8082825260208201915060208360061b850101925088831115614869575f5ffd5b6020840193505b828410156148b9576040848a031215614887575f5ffd5b61488f613c3f565b845161489a81613a99565b8152602085810151818301529083526040909401939190910190614870565b6040850152505050606082015167ffffffffffffffff8111156148da575f5ffd5b6148e6868285016147a6565b606083015250949350505050565b81515f90829060208501835b8281101561491e578151845260209384019390910190600101614900565b509195945050505050565b5f82601f830112614938575f5ffd5b8151614946613d4382613dbe565b81815284602083860101111561495a575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215614986575f5ffd5b815167ffffffffffffffff81111561499c575f5ffd5b8201606081850312156149ad575f5ffd5b6149b5613caf565b81516149c081613a99565b8152602082015167ffffffffffffffff8111156149db575f5ffd5b6149e786828501614929565b602083015250604082015167ffffffffffffffff811115614a06575f5ffd5b80830192505084601f830112614a1a575f5ffd5b8151614a28613d4382613d03565b8082825260208201915060208360051b860101925087831115614a49575f5ffd5b6020850194505b82851015614a6b578451825260209485019490910190614a50565b6040840152509095945050505050565b606081525f614a8d6060830186614619565b8460208401528281036040840152614aa58185613b11565b9695505050505050565b602081525f6107d06020830184613b3f565b5f60208284031215614ad1575f5ffd5b815167ffffffffffffffff811115614ae7575f5ffd5b820160408185031215614af8575f5ffd5b614b00613c3f565b81518152602082015167ffffffffffffffff811115614b1d575f5ffd5b80830192505084601f830112614b31575f5ffd5b614b4085835160208501614720565b6020820152949350505050565b5f60208284031215614b5d575f5ffd5b815167ffffffffffffffff811115614b73575f5ffd5b820160408185031215614b84575f5ffd5b614b8c613c3f565b81518152602082015167ffffffffffffffff811115614ba9575f5ffd5b80830192505084601f830112614bbd575f5ffd5b8151614bcb613d4382613d03565b8082825260208201915060208360051b860101925087831115614bec575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614c0f575f5ffd5b86016060818b03601f19011215614c24575f5ffd5b614c2c613caf565b6020820151614c3a81613a99565b8152604082015167ffffffffffffffff811115614c55575f5ffd5b614c648c602083860101614929565b6020838101919091526060939093015160408301525084529283019201614bf1565b506020840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614ccf838351613b11565b6020988901989093509190910190600101614cb3565b50909695505050505050565b602081525f6107d06020830184614c97565b5f60208284031215614d13575f5ffd5b815167ffffffffffffffff811115614d29575f5ffd5b820160408185031215614d3a575f5ffd5b614d42613c3f565b81518152602082015167ffffffffffffffff811115614d5f575f5ffd5b80830192505084601f830112614d73575f5ffd5b8151614d81613d4382613d03565b8082825260208201915060208360051b860101925087831115614da2575f5ffd5b602085015b83811015614c8657805167ffffffffffffffff811115614dc5575f5ffd5b614dd48a6020838a0101614929565b84525060209283019201614da7565b5f60208284031215614df3575f5ffd5b815167ffffffffffffffff811115614e09575f5ffd5b820160808185031215614e1a575f5ffd5b614e22613c68565b8151614e2d81613a99565b81526020828101519082015260408201517fffffffff0000000000000000000000000000000000000000000000000000000081168114614e6b575f5ffd5b6040820152606082015167ffffffffffffffff811115614e89575f5ffd5b80830192505084601f830112614e9d575f5ffd5b8151614eab613d4382613d03565b8082825260208201915060208360051b860101925087831115614ecc575f5ffd5b602085015b83811015614f6d57805167ffffffffffffffff811115614eef575f5ffd5b86016060818b03601f19011215614f04575f5ffd5b614f0c613caf565b602082015160028110614f1d575f5ffd5b8152604082015167ffffffffffffffff811115614f38575f5ffd5b614f478c602083860101614929565b602083015250614f596060830161445c565b604082015284525060209283019201614ed1565b506060840152509095945050505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614ce557601f19858403018852614fb6838351614c97565b6020988901989093509190910190600101614f9a565b606081525f60e082016001600160a01b038651166060840152602086015160808401527fffffffff0000000000000000000000000000000000000000000000000000000060408701511660a08401526060860151608060c0850152818151808452610100860191506101008160051b87010193506020830192505f5b818110156150bb5786850360ff19018352835180516002811061507957634e487b7160e01b5f52602160045260245ffd5b808752506020810151606060208801526150966060880182613b11565b6040928301511515979092019690965294506020938401939290920191600101615048565b5050505082810360208401526150d18186614f7e565b915050826040830152949350505050565b5f602082840312156150f2575f5ffd5b815167ffffffffffffffff811115615108575f5ffd5b611c5484828501614929565b5f60208284031215615124575f5ffd5b5051919050565b60c081525f61513d60c0830189614619565b8281036020840152875181526020880151606060208301526151626060830182614c97565b90506040890151828203604084015281925080518083526020830193506020820192505f91505b808210156151ac5782518452602084019350602083019250600182019150615189565b50505086604084015285606084015282810360808401526151cd8186613b11565b905082810360a08401526151e18185613b11565b9998505050505050505050565b6001600160a01b03851681526001600160a01b0384166020820152608060408201525f61521e6080830185613b11565b905082606083015295945050505050565b5f82518060208501845e5f92019182525091905056fe6080604052348015600e575f5ffd5b506109a98061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80635e07a6e614610043578063f18d03cc1461006b578063ff883fcf14610080575b5f5ffd5b610056610051366004610636565b6100a0565b60405190151581526020015b60405180910390f35b61007e61007936600461064f565b6100ec565b005b61009361008e366004610703565b6101cb565b60405161006291906107d3565b5f816001600160a01b03163b5f036100b957505f919050565b6100c2826102b3565b156100cf57506001919050565b6100d882610364565b156100e557506001919050565b505f919050565b6100f5846102b3565b1561017d576040517fbeabacc80000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015283811660248301526044820183905285169063beabacc8906064015f604051808303815f87803b158015610162575f5ffd5b505af1158015610174573d5f5f3e3d5ffd5b505050506101c5565b61018684610364565b1561019c57610197848484846103d3565b6101c5565b604051636b94637360e11b81526001600160a01b03851660048201526024015b60405180910390fd5b50505050565b60606101d6856102b3565b1561026d576040517f4ae000410000000000000000000000000000000000000000000000000000000081526001600160a01b03861690634ae0004190610224908790879087906004016107e5565b5f604051808303815f875af115801561023f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526102669190810190610863565b90506102ab565b61027685610364565b1561028757610266858585856104a2565b604051636b94637360e11b81526001600160a01b03861660048201526024016101bc565b949350505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ff44bac890000000000000000000000000000000000000000000000000000000060048201525f906001600160a01b038316906301ffc9a790602401602060405180830381865afa92505050801561034e575060408051601f3d908101601f1916820190925261034b918101906108a4565b60015b61035957505f919050565b92915050565b919050565b5f816001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156103bf575060408051601f3d908101601f191682019092526103bc918101906108bd565b60015b6103ca57505f919050565b50600192915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161461047f57604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261047a90859085905f6104a2565b61049b565b604080515f81526020810190915261049b9085908490846104a2565b5050505050565b60605f5f866001600160a01b0316635229073f8786885f6040518563ffffffff1660e01b81526004016104d894939291906108d4565b5f604051808303815f875af11580156104f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261051a9190810190610928565b9150915084515f146105365761053186838361054b565b610540565b61054082826105c3565b979650505050505050565b6060826105605761055b826105de565b6105bc565b815115801561057757506001600160a01b0384163b155b156105b9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016101bc565b50805b9392505050565b6060826105d8576105d3826105de565b610359565b50919050565b8051156105ee5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b038116811461035f575f5ffd5b5f60208284031215610646575f5ffd5b6105bc82610620565b5f5f5f5f60808587031215610662575f5ffd5b61066b85610620565b935061067960208601610620565b925061068760408601610620565b9396929550929360600135925050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156106d4576106d4610697565b604052919050565b5f67ffffffffffffffff8211156106f5576106f5610697565b50601f01601f191660200190565b5f5f5f5f60808587031215610716575f5ffd5b61071f85610620565b935061072d60208601610620565b9250604085013567ffffffffffffffff811115610748575f5ffd5b8501601f81018713610758575f5ffd5b803561076b610766826106dc565b6106ab565b81815288602083850101111561077f575f5ffd5b816020840160208301375f91810160200191909152949793965093946060013593505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105bc60208301846107a5565b6001600160a01b0384168152606060208201525f61080660608301856107a5565b9050826040830152949350505050565b5f82601f830112610825575f5ffd5b8151610833610766826106dc565b818152846020838601011115610847575f5ffd5b8160208501602083015e5f918101602001919091529392505050565b5f60208284031215610873575f5ffd5b815167ffffffffffffffff811115610889575f5ffd5b6102ab84828501610816565b8051801515811461035f575f5ffd5b5f602082840312156108b4575f5ffd5b6105bc82610895565b5f602082840312156108cd575f5ffd5b5051919050565b6001600160a01b0385168152836020820152608060408201525f6108fb60808301856107a5565b90506002831061091957634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f5f60408385031215610939575f5ffd5b61094283610895565b9150602083015167ffffffffffffffff81111561095d575f5ffd5b61096985828601610816565b915050925092905056fea264697066735822122044a28506e8a4bd162591bec9dca6a9c4cdc2688a8e844ccd7c1807a2f175e12b64736f6c634300081c0033a26469706673582212207433b89de705bcd6873c14b2e3f3203dd78cd7260065cb82d757e627aba0433964736f6c634300081c003300000000000000000000","id":1,"to":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":27,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","networkInteractionId":1,"nonce":27,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"2043708194"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"41242"}},"hash":"0xf64c976ba82017f4bd843d7a9f1527c6883b8fc47d0b2ce3b526cfc46fcc3d9f"},"type":"TRANSACTION_SEND"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","hash":"0xf64c976ba82017f4bd843d7a9f1527c6883b8fc47d0b2ce3b526cfc46fcc3d9f","networkInteractionId":1,"receipt":{"blockHash":"0x685550e7b8acfce1bf6db9344f0a2a1b535955c5403c643df33fec3f7944fdbf","blockNumber":24994730,"logs":[{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":287,"topics":["0x2feea65dd4e9f9cbd86b74b7734210c59a1b2981b5b137bd0ee3e208200c9067","0x000000000000000000000000b5439ac30ce4daeb02b265d758436e65087047ab","0x660e7900ab9b67f261d92573714530e140aa4f3b2855e1dd677cfa672309b2ee"]},{"address":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","data":"0x000000000000000000000000000000000000000000000000ffffffffffffffff","logIndex":288,"topics":["0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2"]},{"address":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","data":"0x","logIndex":289,"topics":["0x4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b511","0x0000000000000000000000003734d7284f46037688252b13ef6d88e3ffdf5e1b"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"Create3SettlerV1#ICreateX.deployCreate3","result":{"type":"SUCCESS"},"type":"CALL_EXECUTION_STATE_COMPLETE"} +{"artifactId":"Create3SettlerV1#ICreateX","dependencies":["Create3SettlerV1#ICreateX.deployCreate3","Create3SettlerV1#ICreateX"],"emitterAddress":"0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed","eventIndex":0,"eventName":"ContractCreation","futureId":"Create3SettlerV1#ICreateX.ContractCreation.newContract.0","nameOrIndex":"newContract","result":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","strategy":"basic","strategyConfig":{},"txToReadFrom":"0xf64c976ba82017f4bd843d7a9f1527c6883b8fc47d0b2ce3b526cfc46fcc3d9f","type":"READ_EVENT_ARGUMENT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"Create3SettlerV1#Settler","contractAddress":"0x3734D7284f46037688252b13ef6d88E3FFDF5e1B","contractName":"Settler","dependencies":["Create3SettlerV1#ICreateX.ContractCreation.newContract.0"],"futureId":"Create3SettlerV1#Settler","futureType":"NAMED_ARTIFACT_CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} \ No newline at end of file