{"abi":[{"type":"constructor","inputs":[],"stateMutability":"nonpayable"},{"name":"AddressIsNull","type":"error","inputs":[]},{"name":"AmoInvalidAccount","type":"error","inputs":[]},{"name":"AmountExceedsAllowance","type":"error","inputs":[]},{"name":"ApproveFromTheZeroAddress","type":"error","inputs":[]},{"name":"ApproveToTheZeroAddress","type":"error","inputs":[]},{"name":"BurnAmountExceedsBalance","type":"error","inputs":[]},{"name":"BurnFromTheZeroAddress","type":"error","inputs":[]},{"name":"DecimalsIsNull","type":"error","inputs":[]},{"name":"DecreasedAllowanceBelowZero","type":"error","inputs":[]},{"name":"MintToTheZeroAddress","type":"error","inputs":[]},{"name":"NameIsNull","type":"error","inputs":[]},{"name":"NewValueIsSameAsCurrent","type":"error","inputs":[]},{"name":"PoolRegistryIsNull","type":"error","inputs":[]},{"name":"SenderCanNotBurn","type":"error","inputs":[]},{"name":"SenderCanNotMint","type":"error","inputs":[]},{"name":"SenderCanNotSeize","type":"error","inputs":[]},{"name":"SenderIsNotGovernor","type":"error","inputs":[]},{"name":"SurpassMaxAmoSupply","type":"error","inputs":[]},{"name":"SurpassMaxBridgingSupply","type":"error","inputs":[]},{"name":"SurpassMaxSynthSupply","type":"error","inputs":[]},{"name":"SymbolIsNull","type":"error","inputs":[]},{"name":"SyntheticIsInactive","type":"error","inputs":[]},{"name":"TransferAmountExceedsBalance","type":"error","inputs":[]},{"name":"TransferFromTheZeroAddress","type":"error","inputs":[]},{"name":"TransferToTheZeroAddress","type":"error","inputs":[]},{"name":"AmoUpdated","type":"event","inputs":[{"name":"oldAmo","type":"address","indexed":false,"internalType":"address"},{"name":"newAmo","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"name":"Approval","type":"event","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Initialized","type":"event","inputs":[{"name":"version","type":"uint8","indexed":false,"internalType":"uint8"}],"anonymous":false},{"name":"MaxAmoSupplyUpdated","type":"event","inputs":[{"name":"oldMaxAmoSupply","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"newMaxAmoSupply","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"MaxBridgedInSupplyUpdated","type":"event","inputs":[{"name":"oldMaxBridgedInSupply","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"newMaxBridgedInSupply","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"MaxBridgedOutSupplyUpdated","type":"event","inputs":[{"name":"oldMaxBridgedOutSupply","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"newMaxBridgedOutSupply","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"MaxTotalSupplyUpdated","type":"event","inputs":[{"name":"oldMaxTotalSupply","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"newMaxTotalSupply","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"ProxyOFTUpdated","type":"event","inputs":[{"name":"oldProxyOFT","type":"address","indexed":false,"internalType":"contract IProxyOFT"},{"name":"newProxyOFT","type":"address","indexed":false,"internalType":"contract IProxyOFT"}],"anonymous":false},{"name":"SyntheticTokenActiveUpdated","type":"event","inputs":[{"name":"newActive","type":"bool","indexed":false,"internalType":"bool"}],"anonymous":false},{"name":"Transfer","type":"event","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"VERSION","type":"function","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"name":"allowance","type":"function","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"amo","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"amoSupply","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"approve","type":"function","inputs":[{"name":"spender_","type":"address","internalType":"address"},{"name":"amount_","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"balanceOf","type":"function","inputs":[{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"bridgedInSupply","type":"function","inputs":[],"outputs":[{"name":"_supply","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"bridgedOutSupply","type":"function","inputs":[],"outputs":[{"name":"_supply","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"burn","type":"function","inputs":[{"name":"from_","type":"address","internalType":"address"},{"name":"amount_","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"decimals","type":"function","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"name":"decreaseAllowance","type":"function","inputs":[{"name":"spender_","type":"address","internalType":"address"},{"name":"subtractedValue_","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"increaseAllowance","type":"function","inputs":[{"name":"spender_","type":"address","internalType":"address"},{"name":"addedValue_","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"initialize","type":"function","inputs":[{"name":"name_","type":"string","internalType":"string"},{"name":"symbol_","type":"string","internalType":"string"},{"name":"decimals_","type":"uint8","internalType":"uint8"},{"name":"poolRegistry_","type":"address","internalType":"contract IPoolRegistry"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"isActive","type":"function","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"maxAmoSupply","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"maxBridgedInSupply","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"maxBridgedOutSupply","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"maxTotalSupply","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"mint","type":"function","inputs":[{"name":"to_","type":"address","internalType":"address"},{"name":"amount_","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"name","type":"function","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"name":"poolRegistry","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IPoolRegistry"}],"stateMutability":"view"},{"name":"proxyOFT","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IProxyOFT"}],"stateMutability":"view"},{"name":"seize","type":"function","inputs":[{"name":"from_","type":"address","internalType":"address"},{"name":"to_","type":"address","internalType":"address"},{"name":"amount_","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"symbol","type":"function","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"name":"toggleIsActive","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"totalBridgedIn","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"totalBridgedOut","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"totalSupply","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"transfer","type":"function","inputs":[{"name":"to_","type":"address","internalType":"address"},{"name":"amount_","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"transferFrom","type":"function","inputs":[{"name":"from_","type":"address","internalType":"address"},{"name":"to_","type":"address","internalType":"address"},{"name":"amount_","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"updateAmo","type":"function","inputs":[{"name":"newAmo_","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"updateMaxAmoSupply","type":"function","inputs":[{"name":"newMaxAmoSupply_","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"updateMaxBridgedInSupply","type":"function","inputs":[{"name":"maxBridgedInSupply_","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"updateMaxBridgedOutSupply","type":"function","inputs":[{"name":"maxBridgedOutSupply_","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"updateMaxTotalSupply","type":"function","inputs":[{"name":"newMaxTotalSupply_","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"updateProxyOFT","type":"function","inputs":[{"name":"newProxyOFT_","type":"address","internalType":"contract IProxyOFT"}],"outputs":[],"stateMutability":"nonpayable"}],"metadata":{"compiler":{"version":"0.8.24+commit.e11b9ed9"},"language":"Solidity","output":{"abi":[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AddressIsNull","type":"error"},{"inputs":[],"name":"AmoInvalidAccount","type":"error"},{"inputs":[],"name":"AmountExceedsAllowance","type":"error"},{"inputs":[],"name":"ApproveFromTheZeroAddress","type":"error"},{"inputs":[],"name":"ApproveToTheZeroAddress","type":"error"},{"inputs":[],"name":"BurnAmountExceedsBalance","type":"error"},{"inputs":[],"name":"BurnFromTheZeroAddress","type":"error"},{"inputs":[],"name":"DecimalsIsNull","type":"error"},{"inputs":[],"name":"DecreasedAllowanceBelowZero","type":"error"},{"inputs":[],"name":"MintToTheZeroAddress","type":"error"},{"inputs":[],"name":"NameIsNull","type":"error"},{"inputs":[],"name":"NewValueIsSameAsCurrent","type":"error"},{"inputs":[],"name":"PoolRegistryIsNull","type":"error"},{"inputs":[],"name":"SenderCanNotBurn","type":"error"},{"inputs":[],"name":"SenderCanNotMint","type":"error"},{"inputs":[],"name":"SenderCanNotSeize","type":"error"},{"inputs":[],"name":"SenderIsNotGovernor","type":"error"},{"inputs":[],"name":"SurpassMaxAmoSupply","type":"error"},{"inputs":[],"name":"SurpassMaxBridgingSupply","type":"error"},{"inputs":[],"name":"SurpassMaxSynthSupply","type":"error"},{"inputs":[],"name":"SymbolIsNull","type":"error"},{"inputs":[],"name":"SyntheticIsInactive","type":"error"},{"inputs":[],"name":"TransferAmountExceedsBalance","type":"error"},{"inputs":[],"name":"TransferFromTheZeroAddress","type":"error"},{"inputs":[],"name":"TransferToTheZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAmo","type":"address"},{"indexed":false,"internalType":"address","name":"newAmo","type":"address"}],"name":"AmoUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMaxAmoSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMaxAmoSupply","type":"uint256"}],"name":"MaxAmoSupplyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMaxBridgedInSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMaxBridgedInSupply","type":"uint256"}],"name":"MaxBridgedInSupplyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMaxBridgedOutSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMaxBridgedOutSupply","type":"uint256"}],"name":"MaxBridgedOutSupplyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMaxTotalSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMaxTotalSupply","type":"uint256"}],"name":"MaxTotalSupplyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IProxyOFT","name":"oldProxyOFT","type":"address"},{"indexed":false,"internalType":"contract IProxyOFT","name":"newProxyOFT","type":"address"}],"name":"ProxyOFTUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"newActive","type":"bool"}],"name":"SyntheticTokenActiveUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"amo","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"amoSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bridgedInSupply","outputs":[{"internalType":"uint256","name":"_supply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bridgedOutSupply","outputs":[{"internalType":"uint256","name":"_supply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"subtractedValue_","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"addedValue_","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"},{"internalType":"contract IPoolRegistry","name":"poolRegistry_","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxAmoSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBridgedInSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBridgedOutSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolRegistry","outputs":[{"internalType":"contract IPoolRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxyOFT","outputs":[{"internalType":"contract IProxyOFT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"seize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleIsActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalBridgedIn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBridgedOut","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAmo_","type":"address"}],"name":"updateAmo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxAmoSupply_","type":"uint256"}],"name":"updateMaxAmoSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxBridgedInSupply_","type":"uint256"}],"name":"updateMaxBridgedInSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxBridgedOutSupply_","type":"uint256"}],"name":"updateMaxBridgedOutSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxTotalSupply_","type":"uint256"}],"name":"updateMaxTotalSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IProxyOFT","name":"newProxyOFT_","type":"address"}],"name":"updateProxyOFT","outputs":[],"stateMutability":"nonpayable","type":"function"}],"devdoc":{"events":{"Approval(address,address,uint256)":{"details":"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance."},"Initialized(uint8)":{"details":"Triggered when the contract has been initialized or reinitialized."},"Transfer(address,address,uint256)":{"details":"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero."}},"kind":"dev","methods":{"bridgedInSupply()":{"details":"The supply is calculated using `MAX(totalBridgedIn - totalBridgedOut, 0)`"},"bridgedOutSupply()":{"details":"The supply is calculated using `MAX(totalBridgedOut - totalBridgedIn, 0)`"},"burn(address,uint256)":{"params":{"amount_":"The amount to burn","from_":"The account to burn from"}},"mint(address,uint256)":{"params":{"amount_":"The amount to mint","to_":"The account to mint to"}},"seize(address,address,uint256)":{"details":"Same as _transfer","params":{"amount_":"The amount to seize","to_":"The beneficiary account"}},"transfer(address,uint256)":{"details":"Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."},"transferFrom(address,address,uint256)":{"details":"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."},"updateAmo(address)":{"params":{"newAmo_":"new AMO address"}},"updateMaxAmoSupply(uint256)":{"params":{"newMaxAmoSupply_":"The new max synth supply for AMO"}},"updateMaxTotalSupply(uint256)":{"params":{"newMaxTotalSupply_":"The new max total supply"}},"updateProxyOFT(address)":{"params":{"newProxyOFT_":"Address of new ProxyOFT"}}},"title":"Synthetic Token contract","version":1},"userdoc":{"events":{"AmoUpdated(address,address)":{"notice":"Emitted when AMO is updated"},"MaxAmoSupplyUpdated(uint256,uint256)":{"notice":"Emitted when max amo supply is updated"},"MaxBridgedInSupplyUpdated(uint256,uint256)":{"notice":"Emitted when max bridged-in supply is updated"},"MaxBridgedOutSupplyUpdated(uint256,uint256)":{"notice":"Emitted when max bridged-out supply is updated"},"MaxTotalSupplyUpdated(uint256,uint256)":{"notice":"Emitted when max total supply is updated"},"ProxyOFTUpdated(address,address)":{"notice":"Emitted when proxyOFT is updated"},"SyntheticTokenActiveUpdated(bool)":{"notice":"Emitted when active flag is updated"}},"kind":"user","methods":{"amo()":{"notice":"Automated Market Operator, it can be a contract, safe or EOA"},"amoSupply()":{"notice":"Synth minted by AMO so far. It will be reduced when Synths are burnt by AMO."},"approve(address,uint256)":{"notice":"Set `amount` as the allowance of `spender` over the caller's tokens"},"bridgedInSupply()":{"notice":"Get net bridged-in circulating supply"},"bridgedOutSupply()":{"notice":"Get net bridged-out circulating supply"},"burn(address,uint256)":{"notice":"Burn synthetic token"},"decimals()":{"notice":"The decimals of the token"},"decreaseAllowance(address,uint256)":{"notice":"Atomically decrease the allowance granted to `spender` by the caller"},"increaseAllowance(address,uint256)":{"notice":"Atomically increase the allowance granted to `spender` by the caller"},"isActive()":{"notice":"If true, disables msAsset minting globally"},"maxAmoSupply()":{"notice":"Maximum Synth AMO can mint. It can be updated by admin/governor."},"maxBridgedInSupply()":{"notice":"Maximum allowed bridged-in (mint-related) supply"},"maxBridgedOutSupply()":{"notice":"Maximum allowed bridged-out (burn-related) supply"},"maxTotalSupply()":{"notice":"The supply cap"},"mint(address,uint256)":{"notice":"Mint synthetic token"},"name()":{"notice":"The name of the token"},"poolRegistry()":{"notice":"Get pool registry contract"},"proxyOFT()":{"notice":"The ProxyOFT contract"},"seize(address,address,uint256)":{"notice":"Seize synthetic tokens"},"symbol()":{"notice":"The symbol of the token"},"toggleIsActive()":{"notice":"Enable/Disable Synthetic Token"},"totalBridgedIn()":{"notice":"Track amount received cross-chain"},"totalBridgedOut()":{"notice":"Track amount sent cross-chain"},"updateAmo(address)":{"notice":"Update AMO (Automated Marker Operator)"},"updateMaxAmoSupply(uint256)":{"notice":"Update max synth supply for AMO."},"updateMaxBridgedInSupply(uint256)":{"notice":"Update max bridged-in supply"},"updateMaxBridgedOutSupply(uint256)":{"notice":"Update max bridged-out supply"},"updateMaxTotalSupply(uint256)":{"notice":"Update max total supply"},"updateProxyOFT(address)":{"notice":"Update proxyOFT"}},"version":1}},"settings":{"compilationTarget":{"contracts/SyntheticToken.sol":"SyntheticToken"},"evmVersion":"cancun","libraries":{},"metadata":{"bytecodeHash":"ipfs","useLiteralContent":true},"optimizer":{"enabled":true,"runs":200},"remappings":[]},"sources":{"contracts/SyntheticToken.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {Initializable} from \"./dependencies/openzeppelin-upgradeable/proxy/utils/Initializable.sol\";\nimport {IERC20} from \"./dependencies/openzeppelin/token/ERC20/IERC20.sol\";\nimport {SynthContext} from \"./utils/SynthContext.sol\";\nimport {WadRayMath} from \"./lib/WadRayMath.sol\";\nimport {IPool} from \"./interfaces/IPool.sol\";\nimport {IProxyOFT} from \"./interfaces/IProxyOFT.sol\";\nimport {IManageable} from \"./interfaces/IManageable.sol\";\nimport {IPoolRegistry} from \"./interfaces/IPoolRegistry.sol\";\nimport {ISyntheticToken} from \"./interfaces/ISyntheticToken.sol\";\nimport {IDebtToken} from \"./interfaces/IDebtToken.sol\";\nimport {SyntheticTokenStorageV2} from \"./storage/SyntheticTokenStorage.sol\";\n\nerror SenderIsNotGovernor();\nerror SenderCanNotBurn();\nerror SenderCanNotMint();\nerror SenderCanNotSeize();\nerror SyntheticIsInactive();\nerror NameIsNull();\nerror SymbolIsNull();\nerror DecimalsIsNull();\nerror PoolRegistryIsNull();\nerror DecreasedAllowanceBelowZero();\nerror AmountExceedsAllowance();\nerror ApproveFromTheZeroAddress();\nerror ApproveToTheZeroAddress();\nerror BurnFromTheZeroAddress();\nerror BurnAmountExceedsBalance();\nerror MintToTheZeroAddress();\nerror SurpassMaxBridgingSupply();\nerror SurpassMaxSynthSupply();\nerror TransferFromTheZeroAddress();\nerror TransferToTheZeroAddress();\nerror TransferAmountExceedsBalance();\nerror NewValueIsSameAsCurrent();\nerror AddressIsNull();\nerror AmoInvalidAccount();\nerror SurpassMaxAmoSupply();\n\n/**\n * @title Synthetic Token contract\n */\ncontract SyntheticToken is SynthContext, Initializable, SyntheticTokenStorageV2 {\n    using WadRayMath for uint256;\n\n    string public constant VERSION = \"1.3.2\";\n\n    /// @notice Emitted when active flag is updated\n    event SyntheticTokenActiveUpdated(bool newActive);\n\n    /// @notice Emitted when max amo supply is updated\n    event MaxAmoSupplyUpdated(uint256 oldMaxAmoSupply, uint256 newMaxAmoSupply);\n\n    /// @notice Emitted when max total supply is updated\n    event MaxTotalSupplyUpdated(uint256 oldMaxTotalSupply, uint256 newMaxTotalSupply);\n\n    /// @notice Emitted when max bridged-in supply is updated\n    event MaxBridgedInSupplyUpdated(uint256 oldMaxBridgedInSupply, uint256 newMaxBridgedInSupply);\n\n    /// @notice Emitted when max bridged-out supply is updated\n    event MaxBridgedOutSupplyUpdated(uint256 oldMaxBridgedOutSupply, uint256 newMaxBridgedOutSupply);\n\n    /// @notice Emitted when proxyOFT is updated\n    event ProxyOFTUpdated(IProxyOFT oldProxyOFT, IProxyOFT newProxyOFT);\n\n    /// @notice Emitted when AMO is updated\n    event AmoUpdated(address oldAmo, address newAmo);\n\n    /**\n     * @notice Throws if caller isn't the governor\n     */\n    modifier onlyGovernor() {\n        if (_msgSender() != _poolRegistry.governor()) revert SenderIsNotGovernor();\n        _;\n    }\n\n    /**\n     * @dev Throws if sender can't burn\n     */\n    modifier onlyIfCanBurn() {\n        address _msgSender = _msgSender();\n        if (\n            !_isMsgSenderProxyOFT(_msgSender) &&\n            !_isMsgSenderAmo(_msgSender) &&\n            !_isMsgSenderPool(_msgSender) &&\n            !_isMsgSenderDebtToken(_msgSender)\n        ) revert SenderCanNotBurn();\n        _;\n    }\n\n    /**\n     * @dev Throws if sender can't mint\n     */\n    modifier onlyIfCanMint() {\n        address _msgSender = _msgSender();\n        if (\n            !_isMsgSenderProxyOFT(_msgSender) &&\n            !_isMsgSenderAmo(_msgSender) &&\n            !_isMsgSenderPool(_msgSender) &&\n            !_isMsgSenderDebtToken(_msgSender)\n        ) revert SenderCanNotMint();\n        _;\n    }\n\n    /**\n     * @dev Throws if sender can't seize\n     */\n    modifier onlyIfCanSeize() {\n        address _msgSender = _msgSender();\n        if (!_isMsgSenderPool(_msgSender) && !_isMsgSenderDebtToken(_msgSender)) revert SenderCanNotSeize();\n        _;\n    }\n\n    /**\n     * @dev Throws if synthetic token isn't enabled\n     */\n    modifier onlyIfSyntheticTokenIsActive() {\n        if (!isActive) revert SyntheticIsInactive();\n        _;\n    }\n\n    constructor() {\n        _disableInitializers();\n    }\n\n    function initialize(\n        string calldata name_,\n        string calldata symbol_,\n        uint8 decimals_,\n        IPoolRegistry poolRegistry_\n    ) external initializer {\n        if (bytes(name_).length == 0) revert NameIsNull();\n        if (bytes(symbol_).length == 0) revert SymbolIsNull();\n        if (decimals_ == 0) revert DecimalsIsNull();\n        if (address(poolRegistry_) == address(0)) revert PoolRegistryIsNull();\n\n        _poolRegistry = poolRegistry_;\n        name = name_;\n        symbol = symbol_;\n        decimals = decimals_;\n        isActive = true;\n        maxTotalSupply = type(uint256).max;\n    }\n\n    /**\n     * @notice Set `amount` as the allowance of `spender` over the caller's tokens\n     */\n    function approve(address spender_, uint256 amount_) external override returns (bool) {\n        _approve(_msgSender(), spender_, amount_);\n        return true;\n    }\n\n    /**\n     * @notice Get net bridged-in circulating supply\n     * @dev The supply is calculated using `MAX(totalBridgedIn - totalBridgedOut, 0)`\n     */\n    function bridgedInSupply() public view returns (uint256 _supply) {\n        uint256 _totalBridgedIn = totalBridgedIn;\n        uint256 _totalBridgedOut = totalBridgedOut;\n\n        if (_totalBridgedIn > _totalBridgedOut) {\n            return _totalBridgedIn - _totalBridgedOut;\n        }\n    }\n\n    /**\n     * @notice Get net bridged-out circulating supply\n     * @dev The supply is calculated using `MAX(totalBridgedOut - totalBridgedIn, 0)`\n     */\n    function bridgedOutSupply() public view returns (uint256 _supply) {\n        uint256 _totalBridgedIn = totalBridgedIn;\n        uint256 _totalBridgedOut = totalBridgedOut;\n\n        if (_totalBridgedOut > _totalBridgedIn) {\n            return _totalBridgedOut - _totalBridgedIn;\n        }\n    }\n\n    /**\n     * @notice Burn synthetic token\n     * @param from_ The account to burn from\n     * @param amount_ The amount to burn\n     */\n    function burn(address from_, uint256 amount_) external override onlyIfCanBurn {\n        _burn(from_, amount_);\n    }\n\n    /**\n     * @notice Atomically decrease the allowance granted to `spender` by the caller\n     */\n    function decreaseAllowance(address spender_, uint256 subtractedValue_) external returns (bool) {\n        address _msgSender = _msgSender();\n        uint256 _currentAllowance = allowance[_msgSender][spender_];\n        if (_currentAllowance < subtractedValue_) revert DecreasedAllowanceBelowZero();\n        unchecked {\n            _approve(_msgSender, spender_, _currentAllowance - subtractedValue_);\n        }\n        return true;\n    }\n\n    /**\n     * @notice Atomically increase the allowance granted to `spender` by the caller\n     */\n    function increaseAllowance(address spender_, uint256 addedValue_) external returns (bool) {\n        address _msgSender = _msgSender();\n        _approve(_msgSender, spender_, allowance[_msgSender][spender_] + addedValue_);\n        return true;\n    }\n\n    /**\n     * @notice Mint synthetic token\n     * @param to_ The account to mint to\n     * @param amount_ The amount to mint\n     */\n    function mint(address to_, uint256 amount_) external override onlyIfCanMint {\n        _mint(to_, amount_);\n    }\n\n    /**\n     * @notice Seize synthetic tokens\n     * @dev Same as _transfer\n     * @param to_ The account to seize from\n     * @param to_ The beneficiary account\n     * @param amount_ The amount to seize\n     */\n    function seize(address from_, address to_, uint256 amount_) external override onlyIfCanSeize {\n        _transfer(from_, to_, amount_);\n    }\n\n    /// @inheritdoc IERC20\n    function transfer(address to_, uint256 amount_) external override returns (bool) {\n        _transfer(_msgSender(), to_, amount_);\n        return true;\n    }\n\n    /// @inheritdoc IERC20\n    function transferFrom(address from_, address to_, uint256 amount_) external override returns (bool) {\n        address _msgSender = _msgSender();\n        uint256 _currentAllowance = allowance[from_][_msgSender];\n        if (_currentAllowance != type(uint256).max) {\n            if (_currentAllowance < amount_) revert AmountExceedsAllowance();\n            unchecked {\n                _approve(from_, _msgSender, _currentAllowance - amount_);\n            }\n        }\n\n        _transfer(from_, to_, amount_);\n\n        return true;\n    }\n\n    /**\n     * @notice Set `amount` as the allowance of `spender` over the `owner` s tokens\n     */\n    function _approve(address owner_, address spender_, uint256 amount_) private {\n        if (owner_ == address(0)) revert ApproveFromTheZeroAddress();\n        if (spender_ == address(0)) revert ApproveToTheZeroAddress();\n\n        allowance[owner_][spender_] = amount_;\n        emit Approval(owner_, spender_, amount_);\n    }\n\n    /**\n     * @notice Destroy `amount` tokens from `account`, reducing the\n     * total supply\n     */\n    function _burn(address account_, uint256 amount_) private {\n        if (account_ == address(0)) revert BurnFromTheZeroAddress();\n\n        address _msgSender = _msgSender();\n\n        if (_isMsgSenderProxyOFT(_msgSender)) {\n            totalBridgedOut += amount_;\n            if (bridgedOutSupply() > maxBridgedOutSupply) revert SurpassMaxBridgingSupply();\n        } else if (_isMsgSenderAmo(_msgSender)) {\n            // AMO can only burn from self address.\n            // account_ should be AMO and in this case it is same as _msgSender()\n            if (account_ != _msgSender) revert AmoInvalidAccount();\n\n            amoSupply -= amount_;\n        }\n\n        uint256 _currentBalance = balanceOf[account_];\n        if (_currentBalance < amount_) revert BurnAmountExceedsBalance();\n        unchecked {\n            balanceOf[account_] = _currentBalance - amount_;\n            totalSupply -= amount_;\n        }\n\n        emit Transfer(account_, address(0), amount_);\n    }\n\n    /**\n     * @dev Check if the sender is AMO\n     */\n    function _isMsgSenderAmo(address sender_) private view returns (bool) {\n        return sender_ == amo;\n    }\n\n    /**\n     * @dev Check if the sender is proxyOFT\n     */\n    function _isMsgSenderProxyOFT(address sender_) private view returns (bool) {\n        return sender_ == address(proxyOFT);\n    }\n\n    /**\n     * @notice Check if the sender is a valid DebtToken contract\n     */\n    function _isMsgSenderDebtToken(address sender_) private view returns (bool) {\n        IPool _pool = IManageable(sender_).pool();\n\n        return\n            _poolRegistry.isPoolRegistered(address(_pool)) &&\n            _pool.doesDebtTokenExist(IDebtToken(sender_)) &&\n            IDebtToken(sender_).syntheticToken() == this;\n    }\n\n    /**\n     * @notice Check if the sender is a valid Pool contract\n     */\n    function _isMsgSenderPool(address sender_) private view returns (bool) {\n        return _poolRegistry.isPoolRegistered(sender_) && IPool(sender_).doesSyntheticTokenExist(this);\n    }\n\n    /**\n     * @notice Create `amount` tokens and assigns them to `account`, increasing\n     * the total supply\n     */\n    function _mint(address account_, uint256 amount_) private onlyIfSyntheticTokenIsActive {\n        if (account_ == address(0)) revert MintToTheZeroAddress();\n\n        address _msgSender = _msgSender();\n\n        if (_isMsgSenderProxyOFT(_msgSender)) {\n            totalBridgedIn += amount_;\n            if (bridgedInSupply() > maxBridgedInSupply) revert SurpassMaxBridgingSupply();\n        } else if (_isMsgSenderAmo(_msgSender)) {\n            amoSupply += amount_;\n            if (amoSupply > maxAmoSupply) revert SurpassMaxAmoSupply();\n        }\n\n        totalSupply += amount_;\n        if (totalSupply > maxTotalSupply) revert SurpassMaxSynthSupply();\n        balanceOf[account_] += amount_;\n        emit Transfer(address(0), account_, amount_);\n    }\n\n    /**\n     * @notice Move `amount` of tokens from `sender` to `recipient`\n     */\n    function _transfer(address sender_, address recipient_, uint256 amount_) private {\n        if (sender_ == address(0)) revert TransferFromTheZeroAddress();\n        if (recipient_ == address(0)) revert TransferToTheZeroAddress();\n\n        uint256 senderBalance = balanceOf[sender_];\n        if (senderBalance < amount_) revert TransferAmountExceedsBalance();\n        unchecked {\n            balanceOf[sender_] = senderBalance - amount_;\n            balanceOf[recipient_] += amount_;\n        }\n\n        emit Transfer(sender_, recipient_, amount_);\n    }\n\n    /**\n     * @notice Enable/Disable Synthetic Token\n     */\n    function toggleIsActive() external override onlyGovernor {\n        bool _newIsActive = !isActive;\n        emit SyntheticTokenActiveUpdated(_newIsActive);\n        isActive = _newIsActive;\n    }\n\n    /**\n     * Update AMO (Automated Marker Operator)\n     * @param newAmo_ new AMO address\n     */\n    function updateAmo(address newAmo_) external onlyGovernor {\n        address _currentAmo = amo;\n        if (newAmo_ == _currentAmo) revert NewValueIsSameAsCurrent();\n        emit AmoUpdated(_currentAmo, newAmo_);\n        amo = newAmo_;\n    }\n\n    /**\n     * @notice Update max synth supply for AMO.\n     * @param newMaxAmoSupply_ The new max synth supply for AMO\n     */\n    function updateMaxAmoSupply(uint256 newMaxAmoSupply_) external onlyGovernor {\n        uint256 _currentMaxAmoSupply = maxAmoSupply;\n        if (newMaxAmoSupply_ == _currentMaxAmoSupply) revert NewValueIsSameAsCurrent();\n        emit MaxAmoSupplyUpdated(_currentMaxAmoSupply, newMaxAmoSupply_);\n        maxAmoSupply = newMaxAmoSupply_;\n    }\n\n    /**\n     * @notice Update max total supply\n     * @param newMaxTotalSupply_ The new max total supply\n     */\n    function updateMaxTotalSupply(uint256 newMaxTotalSupply_) external override onlyGovernor {\n        uint256 _currentMaxTotalSupply = maxTotalSupply;\n        if (newMaxTotalSupply_ == _currentMaxTotalSupply) revert NewValueIsSameAsCurrent();\n        emit MaxTotalSupplyUpdated(_currentMaxTotalSupply, newMaxTotalSupply_);\n        maxTotalSupply = newMaxTotalSupply_;\n    }\n\n    /**\n     * @notice Update max bridged-in supply\n     */\n    function updateMaxBridgedInSupply(uint256 maxBridgedInSupply_) external onlyGovernor {\n        uint256 _currentMaxBridgedInBalance = maxBridgedInSupply;\n        if (maxBridgedInSupply_ == _currentMaxBridgedInBalance) revert NewValueIsSameAsCurrent();\n        emit MaxBridgedInSupplyUpdated(_currentMaxBridgedInBalance, maxBridgedInSupply_);\n        maxBridgedInSupply = maxBridgedInSupply_;\n    }\n\n    /**\n     * @notice Update max bridged-out supply\n     */\n    function updateMaxBridgedOutSupply(uint256 maxBridgedOutSupply_) external onlyGovernor {\n        uint256 _currentMaxBridgedOutBalance = maxBridgedOutSupply;\n        if (maxBridgedOutSupply_ == _currentMaxBridgedOutBalance) revert NewValueIsSameAsCurrent();\n        emit MaxBridgedOutSupplyUpdated(_currentMaxBridgedOutBalance, maxBridgedOutSupply_);\n        maxBridgedOutSupply = maxBridgedOutSupply_;\n    }\n\n    /**\n     * @notice Update proxyOFT\n     * @param newProxyOFT_ Address of new ProxyOFT\n     */\n    function updateProxyOFT(IProxyOFT newProxyOFT_) external override onlyGovernor {\n        if (address(newProxyOFT_) == address(0)) revert AddressIsNull();\n        IProxyOFT _currentProxyOFT = proxyOFT;\n        if (newProxyOFT_ == _currentProxyOFT) revert NewValueIsSameAsCurrent();\n        emit ProxyOFTUpdated(_currentProxyOFT, newProxyOFT_);\n        proxyOFT = newProxyOFT_;\n    }\n\n    /// @inheritdoc SynthContext\n    function poolRegistry() public view override(ISyntheticToken, SynthContext) returns (IPoolRegistry) {\n        return _poolRegistry;\n    }\n}\n","keccak256":"0x2b44177c264e0a2002f09bf11c278f646ac5d85132927e4c9bceac9c532bf670","license":"MIT"},"contracts/dependencies/@layerzerolabs/solidity-examples/contracts-upgradeable/token/oft/IOFTCoreUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.2;\n\nimport \"../../../../../openzeppelin-upgradeable/utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev Interface of the IOFT core standard\n */\ninterface IOFTCoreUpgradeable is IERC165Upgradeable {\n    /**\n     * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)\n     * _dstChainId - L0 defined chain id to send tokens too\n     * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\n     * _amount - amount of the tokens to transfer\n     * _useZro - indicates to use zro to pay L0 fees\n     * _adapterParam - flexible bytes array to indicate messaging adapter services in L0\n     */\n    function estimateSendFee(\n        uint16 _dstChainId,\n        bytes calldata _toAddress,\n        uint _amount,\n        bool _useZro,\n        bytes calldata _adapterParams\n    ) external view returns (uint nativeFee, uint zroFee);\n\n    /**\n     * @dev send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from`\n     * `_from` the owner of token\n     * `_dstChainId` the destination chain identifier\n     * `_toAddress` can be any size depending on the `dstChainId`.\n     * `_amount` the quantity of tokens in wei\n     * `_refundAddress` the address LayerZero refunds if too much message fee is sent\n     * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)\n     * `_adapterParams` is a flexible bytes array to indicate messaging adapter services\n     */\n    function sendFrom(\n        address _from,\n        uint16 _dstChainId,\n        bytes calldata _toAddress,\n        uint _amount,\n        address payable _refundAddress,\n        address _zroPaymentAddress,\n        bytes calldata _adapterParams\n    ) external payable;\n\n    /**\n     * @dev returns the circulating amount of tokens on current chain\n     */\n    function circulatingSupply() external view returns (uint);\n\n    /**\n     * @dev returns the address of the ERC20 token\n     */\n    function token() external view returns (address);\n\n    /**\n     * @dev Emitted when `_amount` tokens are moved from the `_sender` to (`_dstChainId`, `_toAddress`)\n     * `_nonce` is the outbound nonce\n     */\n    event SendToChain(uint16 indexed _dstChainId, address indexed _from, bytes _toAddress, uint _amount);\n\n    /**\n     * @dev Emitted when `_amount` tokens are received from `_srcChainId` into the `_toAddress` on the local chain.\n     * `_nonce` is the inbound nonce.\n     */\n    event ReceiveFromChain(uint16 indexed _srcChainId, address indexed _to, uint _amount);\n\n    event SetUseCustomAdapterParams(bool _useCustomAdapterParams);\n}\n","keccak256":"0x22651924296f8308db8195d7a86a6781023241c53905418f2d3925e3f693f530","license":"MIT"},"contracts/dependencies/@layerzerolabs/solidity-examples/contracts-upgradeable/token/oft/composable/IComposableOFTCoreUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\nimport \"../IOFTCoreUpgradeable.sol\";\n\n/**\n * @dev Interface of the composable OFT core standard\n */\ninterface IComposableOFTCoreUpgradeable is IOFTCoreUpgradeable {\n    function estimateSendAndCallFee(\n        uint16 _dstChainId,\n        bytes calldata _toAddress,\n        uint _amount,\n        bytes calldata _payload,\n        uint64 _dstGasForCall,\n        bool _useZro,\n        bytes calldata _adapterParams\n    ) external view returns (uint nativeFee, uint zroFee);\n\n    function sendAndCall(\n        address _from,\n        uint16 _dstChainId,\n        bytes calldata _toAddress,\n        uint _amount,\n        bytes calldata _payload,\n        uint64 _dstGasForCall,\n        address payable _refundAddress,\n        address _zroPaymentAddress,\n        bytes calldata _adapterParams\n    ) external payable;\n\n    function retryOFTReceived(\n        uint16 _srcChainId,\n        bytes calldata _srcAddress,\n        uint64 _nonce,\n        bytes calldata _from,\n        address _to,\n        uint _amount,\n        bytes calldata _payload\n    ) external;\n\n    event CallOFTReceivedFailure(\n        uint16 indexed _srcChainId,\n        bytes _srcAddress,\n        uint64 _nonce,\n        bytes _from,\n        address indexed _to,\n        uint _amount,\n        bytes _payload,\n        bytes _reason\n    );\n\n    event CallOFTReceivedSuccess(uint16 indexed _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _hash);\n\n    event RetryOFTReceivedSuccess(bytes32 _messageHash);\n\n    event NonContractAddress(address _address);\n}\n","keccak256":"0x769b9356ad6019bdabdcfc11762f28d15eb9a4e262efc96835725f6862c5d9e9","license":"MIT"},"contracts/dependencies/@layerzerolabs/solidity-examples/contracts-upgradeable/token/oft/composable/IOFTReceiverUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\ninterface IOFTReceiverUpgradeable {\n    /**\n     * @dev Called by the OFT contract when tokens are received from source chain.\n     * @param _srcChainId The chain id of the source chain.\n     * @param _srcAddress The address of the OFT token contract on the source chain.\n     * @param _nonce The nonce of the transaction on the source chain.\n     * @param _from The address of the account who calls the sendAndCall() on the source chain.\n     * @param _amount The amount of tokens to transfer.\n     * @param _payload Additional data with no specified format.\n     */\n    function onOFTReceived(\n        uint16 _srcChainId,\n        bytes calldata _srcAddress,\n        uint64 _nonce,\n        bytes calldata _from,\n        uint _amount,\n        bytes calldata _payload\n    ) external;\n}\n","keccak256":"0x287036c704c57e34a6fc3f7e67c8dfaaade6eb3667b570576bc491c0f1f89a5b","license":"MIT"},"contracts/dependencies/openzeppelin-upgradeable/proxy/utils/Initializable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\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 * ```\n * contract MyToken is ERC20Upgradeable {\n *     function initialize() initializer public {\n *         __ERC20_init(\"MyToken\", \"MTK\");\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 Indicates that the contract has been initialized.\n     * @custom:oz-retyped-from bool\n     */\n    uint8 private _initialized;\n\n    /**\n     * @dev Indicates that the contract is in the process of being initialized.\n     */\n    bool private _initializing;\n\n    /**\n     * @dev Triggered when the contract has been initialized or reinitialized.\n     */\n    event Initialized(uint8 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. Equivalent to `reinitializer(1)`.\n     */\n    modifier initializer() {\n        bool isTopLevelCall = _setInitializedVersion(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     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\n     * initialization step. This is essential to configure modules that are added through upgrades and that require\n     * initialization.\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    modifier reinitializer(uint8 version) {\n        bool isTopLevelCall = _setInitializedVersion(version);\n        if (isTopLevelCall) {\n            _initializing = true;\n        }\n        _;\n        if (isTopLevelCall) {\n            _initializing = false;\n            emit Initialized(version);\n        }\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        require(_initializing, \"Initializable: contract is not initializing\");\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    function _disableInitializers() internal virtual {\n        _setInitializedVersion(type(uint8).max);\n    }\n\n    function _setInitializedVersion(uint8 version) private returns (bool) {\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n        // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level\n        // of initializers, because in other contexts the contract may have been reentered.\n        if (_initializing) {\n            require(\n                version == 1 && !AddressUpgradeable.isContract(address(this)),\n                \"Initializable: contract is already initialized\"\n            );\n            return false;\n        } else {\n            require(_initialized < version, \"Initializable: contract is already initialized\");\n            _initialized = version;\n            return true;\n        }\n    }\n}\n","keccak256":"0x7454006cccb737612b00104d2f606d728e2818b778e7e55542f063c614ce46ba","license":"MIT"},"contracts/dependencies/openzeppelin-upgradeable/utils/AddressUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     *\n     * [IMPORTANT]\n     * ====\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\n     *\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n     * constructor.\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n     * revert reason using the provided one.\n     *\n     * _Available since v4.3._\n     */\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // 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\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n","keccak256":"0x55cf2bd9fc76704ddcdc19834cd288b7de00fc0f298a40ea16a954ae8991db2d","license":"MIT"},"contracts/dependencies/openzeppelin-upgradeable/utils/introspection/IERC165Upgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\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 IERC165Upgradeable {\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[EIP 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","keccak256":"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09","license":"MIT"},"contracts/dependencies/openzeppelin/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\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","keccak256":"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a","license":"MIT"},"contracts/dependencies/openzeppelin/token/ERC20/extensions/IERC20Metadata.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\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","keccak256":"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2","license":"MIT"},"contracts/dependencies/openzeppelin/utils/Context.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\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","keccak256":"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7","license":"MIT"},"contracts/dependencies/stargate-protocol/interfaces/IStargateComposer.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.9;\n\nimport \"./IStargateRouter.sol\";\n\ninterface IStargateComposer {\n    function swap(\n        uint16 _dstChainId,\n        uint256 _srcPoolId,\n        uint256 _dstPoolId,\n        address payable _refundAddress,\n        uint256 _amountLD,\n        uint256 _minAmountLD,\n        IStargateRouter.lzTxObj memory _lzTxParams,\n        bytes calldata _to,\n        bytes calldata _payload\n    ) external payable;\n\n    function factory() external view returns (address);\n\n    function stargateBridge() external view returns (address);\n\n    function stargateRouter() external view returns (IStargateRouter);\n\n    function quoteLayerZeroFee(\n        uint16 _dstChainId,\n        uint8 _functionType,\n        bytes calldata _toAddress,\n        bytes calldata _transferAndCallPayload,\n        IStargateRouter.lzTxObj memory _lzTxParams\n    ) external view returns (uint256, uint256);\n\n    function peers(uint16 _chainId) external view returns (address);\n\n    function payloadHashes(\n        uint16 _srcChainId,\n        bytes calldata _srcAddress,\n        uint256 _nonce\n    ) external view returns (bytes32);\n\n    function clearCachedSwap(\n        uint16 _srcChainId,\n        bytes calldata _srcAddress,\n        uint64 _nonce,\n        address _receiver,\n        bytes calldata _sgReceiveCallData\n    ) external;\n}\n","keccak256":"0xe73a6b9b330737a3a15fa331c05973aaa8d2ca06762e6a6a4acdbae0f14bc5fc","license":"BUSL-1.1"},"contracts/dependencies/stargate-protocol/interfaces/IStargateReceiver.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.9;\n\ninterface IStargateReceiver {\n    function sgReceive(\n        uint16 _chainId,\n        bytes memory _srcAddress,\n        uint256 _nonce,\n        address _token,\n        uint256 amountLD,\n        bytes memory payload\n    ) external;\n}\n","keccak256":"0xdc93cc77f883680d1405a172a014a9d80ccb0fd3c53c9e686e0604b6cd84c77e","license":"BUSL-1.1"},"contracts/dependencies/stargate-protocol/interfaces/IStargateRouter.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.9;\n\ninterface IStargateRouter {\n    struct lzTxObj {\n        uint256 dstGasForCall;\n        uint256 dstNativeAmount;\n        bytes dstNativeAddr;\n    }\n\n    function addLiquidity(uint256 _poolId, uint256 _amountLD, address _to) external;\n\n    function swap(\n        uint16 _dstChainId,\n        uint256 _srcPoolId,\n        uint256 _dstPoolId,\n        address payable _refundAddress,\n        uint256 _amountLD,\n        uint256 _minAmountLD,\n        lzTxObj memory _lzTxParams,\n        bytes calldata _to,\n        bytes calldata _payload\n    ) external payable;\n\n    function redeemRemote(\n        uint16 _dstChainId,\n        uint256 _srcPoolId,\n        uint256 _dstPoolId,\n        address payable _refundAddress,\n        uint256 _amountLP,\n        uint256 _minAmountLD,\n        bytes calldata _to,\n        lzTxObj memory _lzTxParams\n    ) external payable;\n\n    function instantRedeemLocal(uint16 _srcPoolId, uint256 _amountLP, address _to) external returns (uint256);\n\n    function redeemLocal(\n        uint16 _dstChainId,\n        uint256 _srcPoolId,\n        uint256 _dstPoolId,\n        address payable _refundAddress,\n        uint256 _amountLP,\n        bytes calldata _to,\n        lzTxObj memory _lzTxParams\n    ) external payable;\n\n    function sendCredits(\n        uint16 _dstChainId,\n        uint256 _srcPoolId,\n        uint256 _dstPoolId,\n        address payable _refundAddress\n    ) external payable;\n\n    function quoteLayerZeroFee(\n        uint16 _dstChainId,\n        uint8 _functionType,\n        bytes calldata _toAddress,\n        bytes calldata _transferAndCallPayload,\n        lzTxObj memory _lzTxParams\n    ) external view returns (uint256, uint256);\n\n    function clearCachedSwap(uint16 _srcChainId, bytes calldata _srcAddress, uint256 _nonce) external;\n\n    function factory() external view returns (address);\n\n    function bridge() external view returns (address);\n\n    function cachedSwapLookup(\n        uint16 _chainId_,\n        bytes calldata _srcAddress,\n        uint256 _nonce\n    ) external view returns (address token, uint256 amountLD, address to, bytes memory payload);\n}\n","keccak256":"0xc07e83d2a1652ff02480a6faabb393fb540aae117bce6fe53fc758f350b4b02c","license":"BUSL-1.1"},"contracts/interfaces/ICrossChainDispatcher.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IOFTReceiverUpgradeable} from \"../dependencies/@layerzerolabs/solidity-examples/contracts-upgradeable/token/oft/composable/IOFTReceiverUpgradeable.sol\";\nimport {IStargateReceiver} from \"../dependencies/stargate-protocol/interfaces/IStargateReceiver.sol\";\nimport {IStargateComposer} from \"../dependencies/stargate-protocol/interfaces/IStargateComposer.sol\";\n\ninterface ICrossChainDispatcher is IStargateReceiver, IOFTReceiverUpgradeable {\n    function crossChainDispatcherOf(uint16 chainId_) external view returns (address);\n\n    function triggerFlashRepaySwap(\n        uint256 id_,\n        address payable account_,\n        address tokenIn_,\n        address tokenOut_,\n        uint256 amountIn_,\n        uint256 amountOutMin_,\n        bytes calldata lzArgs_\n    ) external payable;\n\n    function triggerLeverageSwap(\n        uint256 id_,\n        address payable account_,\n        address tokenIn_,\n        address tokenOut_,\n        uint256 amountIn_,\n        uint256 amountOutMin,\n        bytes calldata lzArgs_\n    ) external payable;\n\n    function isBridgingActive() external view returns (bool);\n\n    function flashRepayCallbackTxGasLimit() external view returns (uint64);\n\n    function flashRepaySwapTxGasLimit() external view returns (uint64);\n\n    function leverageCallbackTxGasLimit() external view returns (uint64);\n\n    function leverageSwapTxGasLimit() external view returns (uint64);\n\n    function lzBaseGasLimit() external view returns (uint256);\n\n    function stargateComposer() external view returns (IStargateComposer);\n\n    function stargateSlippage() external view returns (uint256);\n\n    function stargatePoolIdOf(address token_) external view returns (uint256);\n\n    function isDestinationChainSupported(uint16 dstChainId_) external view returns (bool);\n}\n","keccak256":"0x2224fee00995ba4ee65f7ba0bc2a8fb4b8a17adaca205f0eb069203801820a78","license":"MIT"},"contracts/interfaces/IDebtToken.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IERC20Metadata} from \"../dependencies/openzeppelin/token/ERC20/extensions/IERC20Metadata.sol\";\nimport {ISyntheticToken} from \"./ISyntheticToken.sol\";\n\ninterface IDebtToken is IERC20Metadata {\n    function lastTimestampAccrued() external view returns (uint256);\n\n    function isActive() external view returns (bool);\n\n    function syntheticToken() external view returns (ISyntheticToken);\n\n    function accrueInterest() external;\n\n    function debtIndex() external returns (uint256 debtIndex_);\n\n    function burn(address from_, uint256 amount_) external;\n\n    function issue(uint256 amount_, address to_) external returns (uint256 _issued, uint256 _fee);\n\n    function flashIssue(address to_, uint256 amount_) external returns (uint256 _issued, uint256 _fee);\n\n    function mint(address to_, uint256 amount_) external;\n\n    function repay(address onBehalfOf_, uint256 amount_) external returns (uint256 _repaid, uint256 _fee);\n\n    function repayAll(address onBehalfOf_) external returns (uint256 _repaid, uint256 _fee);\n\n    function quoteIssueIn(uint256 amountToIssue_) external view returns (uint256 _amount, uint256 _fee);\n\n    function quoteIssueOut(uint256 amount_) external view returns (uint256 _amountToIssue, uint256 _fee);\n\n    function quoteRepayIn(uint256 amountToRepay_) external view returns (uint256 _amount, uint256 _fee);\n\n    function quoteRepayOut(uint256 amount_) external view returns (uint256 _amountToRepay, uint256 _fee);\n\n    function updateMaxTotalSupply(uint256 newMaxTotalSupply_) external;\n\n    function updateInterestRate(uint256 newInterestRate_) external;\n\n    function maxTotalSupply() external view returns (uint256);\n\n    function interestRate() external view returns (uint256);\n\n    function interestRatePerSecond() external view returns (uint256);\n\n    function toggleIsActive() external;\n}\n","keccak256":"0x90087bfd3c12f249f7c1280ca61d9e9b5a024e8bd53e207689a2bbe0d110886d","license":"MIT"},"contracts/interfaces/IDepositToken.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IERC20Metadata, IERC20} from \"../dependencies/openzeppelin/token/ERC20/extensions/IERC20Metadata.sol\";\n\ninterface IDepositToken is IERC20Metadata {\n    function underlying() external view returns (IERC20);\n\n    function collateralFactor() external view returns (uint256);\n\n    function unlockedBalanceOf(address account_) external view returns (uint256);\n\n    function lockedBalanceOf(address account_) external view returns (uint256);\n\n    function flashWithdraw(address account_, uint256 amount_) external returns (uint256 _withdrawn, uint256 _fee);\n\n    function deposit(uint256 amount_, address onBehalfOf_) external returns (uint256 _deposited, uint256 _fee);\n\n    function quoteDepositIn(uint256 amountToDeposit_) external view returns (uint256 _amount, uint256 _fee);\n\n    function quoteDepositOut(uint256 amount_) external view returns (uint256 _amountToDeposit, uint256 _fee);\n\n    function quoteWithdrawIn(uint256 amountToWithdraw_) external view returns (uint256 _amount, uint256 _fee);\n\n    function quoteWithdrawOut(uint256 amount_) external view returns (uint256 _amountToWithdraw, uint256 _fee);\n\n    function withdraw(uint256 amount_, address to_) external returns (uint256 _withdrawn, uint256 _fee);\n\n    function seize(address from_, address to_, uint256 amount_) external;\n\n    function updateCollateralFactor(uint128 newCollateralFactor_) external;\n\n    function isActive() external view returns (bool);\n\n    function toggleIsActive() external;\n\n    function maxTotalSupply() external view returns (uint256);\n\n    function updateMaxTotalSupply(uint256 newMaxTotalSupply_) external;\n\n    function withdrawFrom(address from_, uint256 amount_) external returns (uint256 _withdrawn, uint256 _fee);\n}\n","keccak256":"0xb58ed12c0cbfc5f91eb7d77babfb272f8a0ea00c619adde3d6693380109ec5ae","license":"MIT"},"contracts/interfaces/IFeeProvider.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\n/**\n * @notice FeeProvider interface\n */\ninterface IFeeProvider {\n    struct LiquidationFees {\n        uint128 liquidatorIncentive;\n        uint128 protocolFee;\n    }\n\n    function defaultSwapFee() external view returns (uint256);\n\n    function depositFee() external view returns (uint256);\n\n    function issueFee() external view returns (uint256);\n\n    function liquidationFees() external view returns (uint128 liquidatorIncentive, uint128 protocolFee);\n\n    function repayFee() external view returns (uint256);\n\n    function swapFeeFor(address account_) external view returns (uint256);\n\n    function withdrawFee() external view returns (uint256);\n}\n","keccak256":"0xca165a067d676f856b36b2cc729381bb6e0ba4f6c580242f6bb632a214ed2fde","license":"MIT"},"contracts/interfaces/IGovernable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\n/**\n * @notice Governable interface\n */\ninterface IGovernable {\n    function governor() external view returns (address _governor);\n\n    function transferGovernorship(address _proposedGovernor) external;\n}\n","keccak256":"0xff907d86656d2e70621963c25958434a4bc9144ccb0093115a613f01c1bd73d8","license":"MIT"},"contracts/interfaces/IManageable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IPool} from \"./IPool.sol\";\n\n/**\n * @notice Manageable interface\n */\ninterface IManageable {\n    function pool() external view returns (IPool _pool);\n}\n","keccak256":"0x3780952d7a25d0fa02ee2bf54d82cb8569830c7670568f5226759869d1b7f972","license":"MIT"},"contracts/interfaces/IOperator.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\ninterface IOperator {\n    struct Call {\n        address target;\n        uint256 value;\n        bytes callData;\n    }\n\n    function getActualMsgSender() external view returns (address);\n\n    function execute(Call[] calldata calls_) external payable returns (bytes[] memory _returnData);\n}\n","keccak256":"0x080a5505c9ccac5b9be0e31637379c5aa1654b64d250822f6dcdab45816ce599","license":"MIT"},"contracts/interfaces/IPauseable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\ninterface IPauseable {\n    function paused() external view returns (bool);\n\n    function everythingStopped() external view returns (bool);\n}\n","keccak256":"0x6862ab6bdce676e55ff526992ca38d4769783e15d588740c9acd439e7d6e8cca","license":"MIT"},"contracts/interfaces/IPool.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IERC20} from \"../dependencies/openzeppelin/token/ERC20/IERC20.sol\";\nimport {IDepositToken} from \"./IDepositToken.sol\";\nimport {IDebtToken} from \"./IDebtToken.sol\";\nimport {ITreasury} from \"./ITreasury.sol\";\nimport {IPoolRegistry} from \"./IPoolRegistry.sol\";\nimport {IFeeProvider} from \"./IFeeProvider.sol\";\nimport {ISmartFarmingManager} from \"./ISmartFarmingManager.sol\";\nimport {IFeeProvider} from \"../interfaces/IFeeProvider.sol\";\nimport {IPauseable} from \"../interfaces/IPauseable.sol\";\nimport {IGovernable} from \"../interfaces/IGovernable.sol\";\nimport {ISyntheticToken} from \"../interfaces/ISyntheticToken.sol\";\nimport {IMasterOracle} from \"../interfaces/external/IMasterOracle.sol\";\n\n/**\n * @notice Pool interface\n */\ninterface IPool is IPauseable, IGovernable {\n    function debtFloorInUsd() external view returns (uint256);\n\n    function feeCollector() external view returns (address);\n\n    function feeProvider() external view returns (IFeeProvider);\n\n    function maxLiquidable() external view returns (uint256);\n\n    function doesSyntheticTokenExist(ISyntheticToken syntheticToken_) external view returns (bool);\n\n    function doesDebtTokenExist(IDebtToken debtToken_) external view returns (bool);\n\n    function doesDepositTokenExist(IDepositToken depositToken_) external view returns (bool);\n\n    function depositTokenOf(IERC20 underlying_) external view returns (IDepositToken);\n\n    function debtTokenOf(ISyntheticToken syntheticToken_) external view returns (IDebtToken);\n\n    function getDepositTokens() external view returns (address[] memory);\n\n    function getDebtTokens() external view returns (address[] memory);\n\n    function getRewardsDistributors() external view returns (address[] memory);\n\n    function debtOf(address account_) external view returns (uint256 _debtInUsd);\n\n    function depositOf(address account_) external view returns (uint256 _depositInUsd, uint256 _issuableLimitInUsd);\n\n    function debtPositionOf(\n        address account_\n    )\n        external\n        view\n        returns (\n            bool _isHealthy,\n            uint256 _depositInUsd,\n            uint256 _debtInUsd,\n            uint256 _issuableLimitInUsd,\n            uint256 _issuableInUsd\n        );\n\n    function liquidate(\n        ISyntheticToken syntheticToken_,\n        address account_,\n        uint256 amountToRepay_,\n        IDepositToken depositToken_\n    ) external returns (uint256 _totalSeized, uint256 _toLiquidator, uint256 _fee);\n\n    function quoteLiquidateIn(\n        ISyntheticToken syntheticToken_,\n        uint256 totalToSeized_,\n        IDepositToken depositToken_\n    ) external view returns (uint256 _amountToRepay, uint256 _toLiquidator, uint256 _fee);\n\n    function quoteLiquidateMax(\n        ISyntheticToken syntheticToken_,\n        address account_,\n        IDepositToken depositToken_\n    ) external view returns (uint256 _maxAmountToRepay);\n\n    function quoteLiquidateOut(\n        ISyntheticToken syntheticToken_,\n        uint256 amountToRepay_,\n        IDepositToken depositToken_\n    ) external view returns (uint256 _totalSeized, uint256 _toLiquidator, uint256 _fee);\n\n    function quoteSwapIn(\n        ISyntheticToken syntheticTokenIn_,\n        ISyntheticToken syntheticTokenOut_,\n        uint256 amountOut_\n    ) external view returns (uint256 _amountIn, uint256 _fee);\n\n    function quoteSwapOut(\n        ISyntheticToken syntheticTokenIn_,\n        ISyntheticToken syntheticTokenOut_,\n        uint256 amountIn_\n    ) external view returns (uint256 _amountOut, uint256 _fee);\n\n    function swap(\n        ISyntheticToken syntheticTokenIn_,\n        ISyntheticToken syntheticTokenOut_,\n        uint256 amountIn_\n    ) external returns (uint256 _amountOut, uint256 _fee);\n\n    function treasury() external view returns (ITreasury);\n\n    function masterOracle() external view returns (IMasterOracle);\n\n    function poolRegistry() external view returns (IPoolRegistry);\n\n    function addToDepositTokensOfAccount(address account_) external;\n\n    function removeFromDepositTokensOfAccount(address account_) external;\n\n    function addToDebtTokensOfAccount(address account_) external;\n\n    function removeFromDebtTokensOfAccount(address account_) external;\n\n    function getDepositTokensOfAccount(address account_) external view returns (address[] memory);\n\n    function getDebtTokensOfAccount(address account_) external view returns (address[] memory);\n\n    function isSwapActive() external view returns (bool);\n\n    function smartFarmingManager() external view returns (ISmartFarmingManager);\n\n    function isBridgingActive() external view returns (bool);\n}\n","keccak256":"0xe2df17340d60e7db09f0277542489264cf4fd9561624c502d88321918a04cc3c","license":"MIT"},"contracts/interfaces/IPoolRegistry.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IMasterOracle} from \"./external/IMasterOracle.sol\";\nimport {IPauseable} from \"./IPauseable.sol\";\nimport {IGovernable} from \"./IGovernable.sol\";\nimport {ISyntheticToken} from \"./ISyntheticToken.sol\";\nimport {ISwapper} from \"./external/ISwapper.sol\";\nimport {IQuoter} from \"./IQuoter.sol\";\nimport {ICrossChainDispatcher} from \"./ICrossChainDispatcher.sol\";\nimport {IOperator} from \"./IOperator.sol\";\n\ninterface IPoolRegistry is IPauseable, IGovernable {\n    function feeCollector() external view returns (address);\n\n    function isPoolRegistered(address pool_) external view returns (bool);\n\n    function nativeTokenGateway() external view returns (address);\n\n    function getPools() external view returns (address[] memory);\n\n    function registerPool(address pool_) external;\n\n    function unregisterPool(address pool_) external;\n\n    function masterOracle() external view returns (IMasterOracle);\n\n    function updateFeeCollector(address newFeeCollector_) external;\n\n    function idOfPool(address pool_) external view returns (uint256);\n\n    function nextPoolId() external view returns (uint256);\n\n    function swapper() external view returns (ISwapper);\n\n    function quoter() external view returns (IQuoter);\n\n    function crossChainDispatcher() external view returns (ICrossChainDispatcher);\n\n    function doesSyntheticTokenExist(ISyntheticToken syntheticToken_) external view returns (bool _exists);\n\n    function operator() external view returns (IOperator);\n\n    function isGuardian(address) external view returns (bool);\n\n    function isCrossChainFlashRepayActive() external view returns (bool);\n}\n","keccak256":"0xf904767c2545b8c2515a63cf35e1d13a79d2faa36b81b06c578037f92aa6e594","license":"MIT"},"contracts/interfaces/IProxyOFT.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IComposableOFTCoreUpgradeable} from \"../dependencies/@layerzerolabs/solidity-examples/contracts-upgradeable/token/oft/composable/IComposableOFTCoreUpgradeable.sol\";\n\ninterface IProxyOFT is IComposableOFTCoreUpgradeable {\n    function getProxyOFTOf(uint16 chainId_) external view returns (address _proxyOFT);\n}\n","keccak256":"0x63deed4a0e4036e0b8bf7fecbfdd437a4728fe509c1da81f6e1bfaacf3900631","license":"MIT"},"contracts/interfaces/IQuoter.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IProxyOFT} from \"./IProxyOFT.sol\";\n\ninterface IQuoter {\n    function quoteCrossChainFlashRepayNativeFee(\n        IProxyOFT proxyOFT_,\n        bytes calldata lzArgs_\n    ) external view returns (uint256 _nativeFee);\n\n    function quoteCrossChainLeverageNativeFee(\n        IProxyOFT proxyOFT_,\n        bytes calldata lzArgs_\n    ) external view returns (uint256 _nativeFee);\n\n    function quoteLeverageCallbackNativeFee(uint16 dstChainId_) external view returns (uint256 _callbackTxNativeFee);\n\n    function quoteFlashRepayCallbackNativeFee(uint16 dstChainId_) external view returns (uint256 _callbackTxNativeFee);\n\n    function getFlashRepaySwapAndCallbackLzArgs(\n        uint16 srcChainId_,\n        uint16 dstChainId_\n    ) external view returns (bytes memory lzArgs_);\n\n    function getLeverageSwapAndCallbackLzArgs(\n        uint16 srcChainId_,\n        uint16 dstChainId_\n    ) external view returns (bytes memory lzArgs_);\n}\n","keccak256":"0x6f46cca0dac563d6ba3797612c102ba0271ff85a25738548d5b864f9c0ad4be1","license":"MIT"},"contracts/interfaces/ISmartFarmingManager.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IERC20} from \"../dependencies/openzeppelin/token/ERC20/IERC20.sol\";\nimport {IDepositToken} from \"./IDepositToken.sol\";\nimport {ISyntheticToken} from \"./ISyntheticToken.sol\";\n\n/**\n * @notice SmartFarmingManager interface\n */\ninterface ISmartFarmingManager {\n    function flashRepay(\n        ISyntheticToken syntheticToken_,\n        IDepositToken depositToken_,\n        uint256 withdrawAmount_,\n        uint256 repayAmountMin_\n    ) external returns (uint256 _withdrawn, uint256 _repaid);\n\n    function crossChainFlashRepay(\n        ISyntheticToken syntheticToken_,\n        IDepositToken depositToken_,\n        uint256 withdrawAmount_,\n        IERC20 bridgeToken_,\n        uint256 bridgeTokenAmountMin_,\n        uint256 swapAmountOutMin_,\n        uint256 repayAmountMin_,\n        bytes calldata lzArgs_\n    ) external payable;\n\n    function crossChainLeverage(\n        IERC20 tokenIn_,\n        ISyntheticToken syntheticToken_,\n        IERC20 bridgeToken_,\n        IDepositToken depositToken_,\n        uint256 amountIn_,\n        uint256 leverage_,\n        uint256 swapAmountOutMin_,\n        uint256 depositAmountMin_,\n        bytes calldata lzArgs_\n    ) external payable;\n\n    function crossChainLeverageCallback(uint256 id_, uint256 swapAmountOut_) external returns (uint256 _deposited);\n\n    function crossChainFlashRepayCallback(uint256 id_, uint256 swapAmountOut_) external returns (uint256 _repaid);\n\n    function leverage(\n        IERC20 tokenIn_,\n        IDepositToken depositToken_,\n        ISyntheticToken syntheticToken_,\n        uint256 amountIn_,\n        uint256 leverage_,\n        uint256 depositAmountMin_\n    ) external returns (uint256 _deposited, uint256 _issued);\n}\n","keccak256":"0xc3317ebb58a46f9527065c1aa3343267866a57ac5b4c6ea5949e36027de1088e","license":"MIT"},"contracts/interfaces/ISyntheticToken.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IERC20Metadata} from \"../dependencies/openzeppelin/token/ERC20/extensions/IERC20Metadata.sol\";\nimport {IPoolRegistry} from \"./IPoolRegistry.sol\";\nimport {IProxyOFT} from \"../interfaces/IProxyOFT.sol\";\n\ninterface ISyntheticToken is IERC20Metadata {\n    function isActive() external view returns (bool);\n\n    function mint(address to_, uint256 amount_) external;\n\n    function burn(address from_, uint256 amount) external;\n\n    function poolRegistry() external view returns (IPoolRegistry);\n\n    function toggleIsActive() external;\n\n    function seize(address from_, address to_, uint256 amount_) external;\n\n    function updateMaxTotalSupply(uint256 newMaxTotalSupply_) external;\n\n    function updateProxyOFT(IProxyOFT newProxyOFT_) external;\n\n    function maxTotalSupply() external view returns (uint256);\n\n    function proxyOFT() external view returns (IProxyOFT);\n\n    function amoSupply() external view returns (uint256);\n}\n","keccak256":"0x1f34b4976aa387c8b391fc1e57894c89cd11ebfe2d9558b5737abb0ebd62fd25","license":"MIT"},"contracts/interfaces/ITreasury.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\ninterface ITreasury {\n    function pull(address to_, uint256 amount_) external;\n\n    function migrateTo(address newTreasury_) external;\n}\n","keccak256":"0x0f36995596e949ed4c9cd9f654045c979e20aae668192866b89baccc679fe86c","license":"MIT"},"contracts/interfaces/external/IMasterOracle.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\ninterface IMasterOracle {\n    function quoteTokenToUsd(address _asset, uint256 _amount) external view returns (uint256 _amountInUsd);\n\n    function quoteUsdToToken(address _asset, uint256 _amountInUsd) external view returns (uint256 _amount);\n\n    function quote(address _assetIn, address _assetOut, uint256 _amountIn) external view returns (uint256 _amountOut);\n}\n","keccak256":"0x504da52c7d5a4ed547e733800be4072d673941e337f84a0f588bba439ad7765a","license":"MIT"},"contracts/interfaces/external/ISwapper.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\ninterface ISwapper {\n    function swapExactInput(\n        address tokenIn_,\n        address tokenOut_,\n        uint256 amountIn_,\n        uint256 amountOutMin_,\n        address receiver_\n    ) external returns (uint256 _amountOut);\n}\n","keccak256":"0x43edb7ed711525711211cec6322b08a6fc0515d747a9aa0035beba5e5d9e4200","license":"MIT"},"contracts/lib/WadRayMath.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\n/**\n * @title Math library\n * @dev Provides mul and div function for wads (decimal numbers with 18 digits precision) and rays (decimals with 27 digits)\n * @dev Based on https://github.com/dapphub/ds-math/blob/master/src/math.sol\n */\nlibrary WadRayMath {\n    uint256 internal constant WAD = 1e18;\n    uint256 internal constant HALF_WAD = WAD / 2;\n\n    uint256 internal constant RAY = 1e27;\n    uint256 internal constant HALF_RAY = RAY / 2;\n\n    uint256 internal constant WAD_RAY_RATIO = 1e9;\n\n    /**\n     * @dev Multiplies two wad, rounding half up to the nearest wad\n     * @param a Wad\n     * @param b Wad\n     * @return The result of a*b, in wad\n     */\n    function wadMul(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (a == 0 || b == 0) {\n            return 0;\n        }\n\n        return (a * b + HALF_WAD) / WAD;\n    }\n\n    /**\n     * @dev Divides two wad, rounding half up to the nearest wad\n     * @param a Wad\n     * @param b Wad\n     * @return The result of a/b, in wad\n     */\n    function wadDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        return (a * WAD + b / 2) / b;\n    }\n}\n","keccak256":"0xf0ed32e0dd9792e7de5502c6bdfc92cadc0b0a6ea9206109fadc9d8fce0c85e9","license":"MIT"},"contracts/storage/SyntheticTokenStorage.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IPoolRegistry} from \"../interfaces/IPoolRegistry.sol\";\nimport {IProxyOFT} from \"../interfaces/IProxyOFT.sol\";\nimport {ISyntheticToken} from \"../interfaces/ISyntheticToken.sol\";\n\nabstract contract SyntheticTokenStorageV1 is ISyntheticToken {\n    /**\n     * @notice The name of the token\n     */\n    string public override name;\n\n    /**\n     * @notice The symbol of the token\n     */\n    string public override symbol;\n\n    /**\n     * @dev The amount of tokens owned by `account`\n     */\n    mapping(address => uint256) public override balanceOf;\n\n    /**\n     * @dev The remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}\n     */\n    mapping(address => mapping(address => uint256)) public override allowance;\n\n    /**\n     * @dev Amount of tokens in existence\n     */\n    uint256 public override totalSupply;\n\n    /**\n     * @notice The supply cap\n     */\n    uint256 public override maxTotalSupply;\n\n    /**\n     * @dev The Pool Registry\n     */\n    IPoolRegistry internal _poolRegistry;\n\n    /**\n     * @notice If true, disables msAsset minting globally\n     */\n    bool public override isActive;\n\n    /**\n     * @notice The decimals of the token\n     */\n    uint8 public override decimals;\n\n    /**\n     * @notice The ProxyOFT contract\n     */\n    IProxyOFT public override proxyOFT;\n\n    /**\n     * @notice Track amount received cross-chain\n     */\n    uint256 public totalBridgedIn;\n\n    /**\n     * @notice Track amount sent cross-chain\n     */\n    uint256 public totalBridgedOut;\n\n    /**\n     * @notice Maximum allowed bridged-in (mint-related) supply\n     */\n    uint256 public maxBridgedInSupply;\n\n    /**\n     * @notice Maximum allowed bridged-out (burn-related) supply\n     */\n    uint256 public maxBridgedOutSupply;\n}\n\nabstract contract SyntheticTokenStorageV2 is SyntheticTokenStorageV1 {\n    /**\n     * @notice Automated Market Operator, it can be a contract, safe or EOA\n     */\n    address public amo;\n\n    /**\n     * @notice Maximum Synth AMO can mint. It can be updated by admin/governor.\n     */\n    uint256 public maxAmoSupply;\n\n    /**\n     * @notice Synth minted by AMO so far. It will be reduced when Synths are burnt by AMO.\n     */\n    uint256 public amoSupply;\n}\n","keccak256":"0x497eb2b517b1127a7eb2bbebf95d0d007f9d97eea371a360a26d519d1754c781","license":"MIT"},"contracts/utils/SynthContext.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {Context} from \"../dependencies/openzeppelin/utils/Context.sol\";\nimport {IOperator} from \"../interfaces/IOperator.sol\";\nimport {IPoolRegistry} from \"../interfaces/IPoolRegistry.sol\";\n\nabstract contract SynthContext is Context {\n    /// @notice Get pool registry contract\n    function poolRegistry() public view virtual returns (IPoolRegistry);\n\n    /// @inheritdoc Context\n    function _msgSender() internal view virtual override returns (address) {\n        IPoolRegistry _poolRegistry = poolRegistry();\n        if (address(_poolRegistry) != address(0)) {\n            IOperator _operator = _poolRegistry.operator();\n            if (msg.sender == address(_operator)) {\n                return _operator.getActualMsgSender();\n            }\n        }\n\n        return msg.sender;\n    }\n}\n","keccak256":"0x360c95dfcd8542ef84585466797f7318c720fb4ddb60b7466e118c8237e8c0f9","license":"MIT"}},"version":1},"sources":{"contracts/SyntheticToken.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {Initializable} from \"./dependencies/openzeppelin-upgradeable/proxy/utils/Initializable.sol\";\nimport {IERC20} from \"./dependencies/openzeppelin/token/ERC20/IERC20.sol\";\nimport {SynthContext} from \"./utils/SynthContext.sol\";\nimport {WadRayMath} from \"./lib/WadRayMath.sol\";\nimport {IPool} from \"./interfaces/IPool.sol\";\nimport {IProxyOFT} from \"./interfaces/IProxyOFT.sol\";\nimport {IManageable} from \"./interfaces/IManageable.sol\";\nimport {IPoolRegistry} from \"./interfaces/IPoolRegistry.sol\";\nimport {ISyntheticToken} from \"./interfaces/ISyntheticToken.sol\";\nimport {IDebtToken} from \"./interfaces/IDebtToken.sol\";\nimport {SyntheticTokenStorageV2} from \"./storage/SyntheticTokenStorage.sol\";\n\nerror SenderIsNotGovernor();\nerror SenderCanNotBurn();\nerror SenderCanNotMint();\nerror SenderCanNotSeize();\nerror SyntheticIsInactive();\nerror NameIsNull();\nerror SymbolIsNull();\nerror DecimalsIsNull();\nerror PoolRegistryIsNull();\nerror DecreasedAllowanceBelowZero();\nerror AmountExceedsAllowance();\nerror ApproveFromTheZeroAddress();\nerror ApproveToTheZeroAddress();\nerror BurnFromTheZeroAddress();\nerror BurnAmountExceedsBalance();\nerror MintToTheZeroAddress();\nerror SurpassMaxBridgingSupply();\nerror SurpassMaxSynthSupply();\nerror TransferFromTheZeroAddress();\nerror TransferToTheZeroAddress();\nerror TransferAmountExceedsBalance();\nerror NewValueIsSameAsCurrent();\nerror AddressIsNull();\nerror AmoInvalidAccount();\nerror SurpassMaxAmoSupply();\n\n/**\n * @title Synthetic Token contract\n */\ncontract SyntheticToken is SynthContext, Initializable, SyntheticTokenStorageV2 {\n    using WadRayMath for uint256;\n\n    string public constant VERSION = \"1.3.2\";\n\n    /// @notice Emitted when active flag is updated\n    event SyntheticTokenActiveUpdated(bool newActive);\n\n    /// @notice Emitted when max amo supply is updated\n    event MaxAmoSupplyUpdated(uint256 oldMaxAmoSupply, uint256 newMaxAmoSupply);\n\n    /// @notice Emitted when max total supply is updated\n    event MaxTotalSupplyUpdated(uint256 oldMaxTotalSupply, uint256 newMaxTotalSupply);\n\n    /// @notice Emitted when max bridged-in supply is updated\n    event MaxBridgedInSupplyUpdated(uint256 oldMaxBridgedInSupply, uint256 newMaxBridgedInSupply);\n\n    /// @notice Emitted when max bridged-out supply is updated\n    event MaxBridgedOutSupplyUpdated(uint256 oldMaxBridgedOutSupply, uint256 newMaxBridgedOutSupply);\n\n    /// @notice Emitted when proxyOFT is updated\n    event ProxyOFTUpdated(IProxyOFT oldProxyOFT, IProxyOFT newProxyOFT);\n\n    /// @notice Emitted when AMO is updated\n    event AmoUpdated(address oldAmo, address newAmo);\n\n    /**\n     * @notice Throws if caller isn't the governor\n     */\n    modifier onlyGovernor() {\n        if (_msgSender() != _poolRegistry.governor()) revert SenderIsNotGovernor();\n        _;\n    }\n\n    /**\n     * @dev Throws if sender can't burn\n     */\n    modifier onlyIfCanBurn() {\n        address _msgSender = _msgSender();\n        if (\n            !_isMsgSenderProxyOFT(_msgSender) &&\n            !_isMsgSenderAmo(_msgSender) &&\n            !_isMsgSenderPool(_msgSender) &&\n            !_isMsgSenderDebtToken(_msgSender)\n        ) revert SenderCanNotBurn();\n        _;\n    }\n\n    /**\n     * @dev Throws if sender can't mint\n     */\n    modifier onlyIfCanMint() {\n        address _msgSender = _msgSender();\n        if (\n            !_isMsgSenderProxyOFT(_msgSender) &&\n            !_isMsgSenderAmo(_msgSender) &&\n            !_isMsgSenderPool(_msgSender) &&\n            !_isMsgSenderDebtToken(_msgSender)\n        ) revert SenderCanNotMint();\n        _;\n    }\n\n    /**\n     * @dev Throws if sender can't seize\n     */\n    modifier onlyIfCanSeize() {\n        address _msgSender = _msgSender();\n        if (!_isMsgSenderPool(_msgSender) && !_isMsgSenderDebtToken(_msgSender)) revert SenderCanNotSeize();\n        _;\n    }\n\n    /**\n     * @dev Throws if synthetic token isn't enabled\n     */\n    modifier onlyIfSyntheticTokenIsActive() {\n        if (!isActive) revert SyntheticIsInactive();\n        _;\n    }\n\n    constructor() {\n        _disableInitializers();\n    }\n\n    function initialize(\n        string calldata name_,\n        string calldata symbol_,\n        uint8 decimals_,\n        IPoolRegistry poolRegistry_\n    ) external initializer {\n        if (bytes(name_).length == 0) revert NameIsNull();\n        if (bytes(symbol_).length == 0) revert SymbolIsNull();\n        if (decimals_ == 0) revert DecimalsIsNull();\n        if (address(poolRegistry_) == address(0)) revert PoolRegistryIsNull();\n\n        _poolRegistry = poolRegistry_;\n        name = name_;\n        symbol = symbol_;\n        decimals = decimals_;\n        isActive = true;\n        maxTotalSupply = type(uint256).max;\n    }\n\n    /**\n     * @notice Set `amount` as the allowance of `spender` over the caller's tokens\n     */\n    function approve(address spender_, uint256 amount_) external override returns (bool) {\n        _approve(_msgSender(), spender_, amount_);\n        return true;\n    }\n\n    /**\n     * @notice Get net bridged-in circulating supply\n     * @dev The supply is calculated using `MAX(totalBridgedIn - totalBridgedOut, 0)`\n     */\n    function bridgedInSupply() public view returns (uint256 _supply) {\n        uint256 _totalBridgedIn = totalBridgedIn;\n        uint256 _totalBridgedOut = totalBridgedOut;\n\n        if (_totalBridgedIn > _totalBridgedOut) {\n            return _totalBridgedIn - _totalBridgedOut;\n        }\n    }\n\n    /**\n     * @notice Get net bridged-out circulating supply\n     * @dev The supply is calculated using `MAX(totalBridgedOut - totalBridgedIn, 0)`\n     */\n    function bridgedOutSupply() public view returns (uint256 _supply) {\n        uint256 _totalBridgedIn = totalBridgedIn;\n        uint256 _totalBridgedOut = totalBridgedOut;\n\n        if (_totalBridgedOut > _totalBridgedIn) {\n            return _totalBridgedOut - _totalBridgedIn;\n        }\n    }\n\n    /**\n     * @notice Burn synthetic token\n     * @param from_ The account to burn from\n     * @param amount_ The amount to burn\n     */\n    function burn(address from_, uint256 amount_) external override onlyIfCanBurn {\n        _burn(from_, amount_);\n    }\n\n    /**\n     * @notice Atomically decrease the allowance granted to `spender` by the caller\n     */\n    function decreaseAllowance(address spender_, uint256 subtractedValue_) external returns (bool) {\n        address _msgSender = _msgSender();\n        uint256 _currentAllowance = allowance[_msgSender][spender_];\n        if (_currentAllowance < subtractedValue_) revert DecreasedAllowanceBelowZero();\n        unchecked {\n            _approve(_msgSender, spender_, _currentAllowance - subtractedValue_);\n        }\n        return true;\n    }\n\n    /**\n     * @notice Atomically increase the allowance granted to `spender` by the caller\n     */\n    function increaseAllowance(address spender_, uint256 addedValue_) external returns (bool) {\n        address _msgSender = _msgSender();\n        _approve(_msgSender, spender_, allowance[_msgSender][spender_] + addedValue_);\n        return true;\n    }\n\n    /**\n     * @notice Mint synthetic token\n     * @param to_ The account to mint to\n     * @param amount_ The amount to mint\n     */\n    function mint(address to_, uint256 amount_) external override onlyIfCanMint {\n        _mint(to_, amount_);\n    }\n\n    /**\n     * @notice Seize synthetic tokens\n     * @dev Same as _transfer\n     * @param to_ The account to seize from\n     * @param to_ The beneficiary account\n     * @param amount_ The amount to seize\n     */\n    function seize(address from_, address to_, uint256 amount_) external override onlyIfCanSeize {\n        _transfer(from_, to_, amount_);\n    }\n\n    /// @inheritdoc IERC20\n    function transfer(address to_, uint256 amount_) external override returns (bool) {\n        _transfer(_msgSender(), to_, amount_);\n        return true;\n    }\n\n    /// @inheritdoc IERC20\n    function transferFrom(address from_, address to_, uint256 amount_) external override returns (bool) {\n        address _msgSender = _msgSender();\n        uint256 _currentAllowance = allowance[from_][_msgSender];\n        if (_currentAllowance != type(uint256).max) {\n            if (_currentAllowance < amount_) revert AmountExceedsAllowance();\n            unchecked {\n                _approve(from_, _msgSender, _currentAllowance - amount_);\n            }\n        }\n\n        _transfer(from_, to_, amount_);\n\n        return true;\n    }\n\n    /**\n     * @notice Set `amount` as the allowance of `spender` over the `owner` s tokens\n     */\n    function _approve(address owner_, address spender_, uint256 amount_) private {\n        if (owner_ == address(0)) revert ApproveFromTheZeroAddress();\n        if (spender_ == address(0)) revert ApproveToTheZeroAddress();\n\n        allowance[owner_][spender_] = amount_;\n        emit Approval(owner_, spender_, amount_);\n    }\n\n    /**\n     * @notice Destroy `amount` tokens from `account`, reducing the\n     * total supply\n     */\n    function _burn(address account_, uint256 amount_) private {\n        if (account_ == address(0)) revert BurnFromTheZeroAddress();\n\n        address _msgSender = _msgSender();\n\n        if (_isMsgSenderProxyOFT(_msgSender)) {\n            totalBridgedOut += amount_;\n            if (bridgedOutSupply() > maxBridgedOutSupply) revert SurpassMaxBridgingSupply();\n        } else if (_isMsgSenderAmo(_msgSender)) {\n            // AMO can only burn from self address.\n            // account_ should be AMO and in this case it is same as _msgSender()\n            if (account_ != _msgSender) revert AmoInvalidAccount();\n\n            amoSupply -= amount_;\n        }\n\n        uint256 _currentBalance = balanceOf[account_];\n        if (_currentBalance < amount_) revert BurnAmountExceedsBalance();\n        unchecked {\n            balanceOf[account_] = _currentBalance - amount_;\n            totalSupply -= amount_;\n        }\n\n        emit Transfer(account_, address(0), amount_);\n    }\n\n    /**\n     * @dev Check if the sender is AMO\n     */\n    function _isMsgSenderAmo(address sender_) private view returns (bool) {\n        return sender_ == amo;\n    }\n\n    /**\n     * @dev Check if the sender is proxyOFT\n     */\n    function _isMsgSenderProxyOFT(address sender_) private view returns (bool) {\n        return sender_ == address(proxyOFT);\n    }\n\n    /**\n     * @notice Check if the sender is a valid DebtToken contract\n     */\n    function _isMsgSenderDebtToken(address sender_) private view returns (bool) {\n        IPool _pool = IManageable(sender_).pool();\n\n        return\n            _poolRegistry.isPoolRegistered(address(_pool)) &&\n            _pool.doesDebtTokenExist(IDebtToken(sender_)) &&\n            IDebtToken(sender_).syntheticToken() == this;\n    }\n\n    /**\n     * @notice Check if the sender is a valid Pool contract\n     */\n    function _isMsgSenderPool(address sender_) private view returns (bool) {\n        return _poolRegistry.isPoolRegistered(sender_) && IPool(sender_).doesSyntheticTokenExist(this);\n    }\n\n    /**\n     * @notice Create `amount` tokens and assigns them to `account`, increasing\n     * the total supply\n     */\n    function _mint(address account_, uint256 amount_) private onlyIfSyntheticTokenIsActive {\n        if (account_ == address(0)) revert MintToTheZeroAddress();\n\n        address _msgSender = _msgSender();\n\n        if (_isMsgSenderProxyOFT(_msgSender)) {\n            totalBridgedIn += amount_;\n            if (bridgedInSupply() > maxBridgedInSupply) revert SurpassMaxBridgingSupply();\n        } else if (_isMsgSenderAmo(_msgSender)) {\n            amoSupply += amount_;\n            if (amoSupply > maxAmoSupply) revert SurpassMaxAmoSupply();\n        }\n\n        totalSupply += amount_;\n        if (totalSupply > maxTotalSupply) revert SurpassMaxSynthSupply();\n        balanceOf[account_] += amount_;\n        emit Transfer(address(0), account_, amount_);\n    }\n\n    /**\n     * @notice Move `amount` of tokens from `sender` to `recipient`\n     */\n    function _transfer(address sender_, address recipient_, uint256 amount_) private {\n        if (sender_ == address(0)) revert TransferFromTheZeroAddress();\n        if (recipient_ == address(0)) revert TransferToTheZeroAddress();\n\n        uint256 senderBalance = balanceOf[sender_];\n        if (senderBalance < amount_) revert TransferAmountExceedsBalance();\n        unchecked {\n            balanceOf[sender_] = senderBalance - amount_;\n            balanceOf[recipient_] += amount_;\n        }\n\n        emit Transfer(sender_, recipient_, amount_);\n    }\n\n    /**\n     * @notice Enable/Disable Synthetic Token\n     */\n    function toggleIsActive() external override onlyGovernor {\n        bool _newIsActive = !isActive;\n        emit SyntheticTokenActiveUpdated(_newIsActive);\n        isActive = _newIsActive;\n    }\n\n    /**\n     * Update AMO (Automated Marker Operator)\n     * @param newAmo_ new AMO address\n     */\n    function updateAmo(address newAmo_) external onlyGovernor {\n        address _currentAmo = amo;\n        if (newAmo_ == _currentAmo) revert NewValueIsSameAsCurrent();\n        emit AmoUpdated(_currentAmo, newAmo_);\n        amo = newAmo_;\n    }\n\n    /**\n     * @notice Update max synth supply for AMO.\n     * @param newMaxAmoSupply_ The new max synth supply for AMO\n     */\n    function updateMaxAmoSupply(uint256 newMaxAmoSupply_) external onlyGovernor {\n        uint256 _currentMaxAmoSupply = maxAmoSupply;\n        if (newMaxAmoSupply_ == _currentMaxAmoSupply) revert NewValueIsSameAsCurrent();\n        emit MaxAmoSupplyUpdated(_currentMaxAmoSupply, newMaxAmoSupply_);\n        maxAmoSupply = newMaxAmoSupply_;\n    }\n\n    /**\n     * @notice Update max total supply\n     * @param newMaxTotalSupply_ The new max total supply\n     */\n    function updateMaxTotalSupply(uint256 newMaxTotalSupply_) external override onlyGovernor {\n        uint256 _currentMaxTotalSupply = maxTotalSupply;\n        if (newMaxTotalSupply_ == _currentMaxTotalSupply) revert NewValueIsSameAsCurrent();\n        emit MaxTotalSupplyUpdated(_currentMaxTotalSupply, newMaxTotalSupply_);\n        maxTotalSupply = newMaxTotalSupply_;\n    }\n\n    /**\n     * @notice Update max bridged-in supply\n     */\n    function updateMaxBridgedInSupply(uint256 maxBridgedInSupply_) external onlyGovernor {\n        uint256 _currentMaxBridgedInBalance = maxBridgedInSupply;\n        if (maxBridgedInSupply_ == _currentMaxBridgedInBalance) revert NewValueIsSameAsCurrent();\n        emit MaxBridgedInSupplyUpdated(_currentMaxBridgedInBalance, maxBridgedInSupply_);\n        maxBridgedInSupply = maxBridgedInSupply_;\n    }\n\n    /**\n     * @notice Update max bridged-out supply\n     */\n    function updateMaxBridgedOutSupply(uint256 maxBridgedOutSupply_) external onlyGovernor {\n        uint256 _currentMaxBridgedOutBalance = maxBridgedOutSupply;\n        if (maxBridgedOutSupply_ == _currentMaxBridgedOutBalance) revert NewValueIsSameAsCurrent();\n        emit MaxBridgedOutSupplyUpdated(_currentMaxBridgedOutBalance, maxBridgedOutSupply_);\n        maxBridgedOutSupply = maxBridgedOutSupply_;\n    }\n\n    /**\n     * @notice Update proxyOFT\n     * @param newProxyOFT_ Address of new ProxyOFT\n     */\n    function updateProxyOFT(IProxyOFT newProxyOFT_) external override onlyGovernor {\n        if (address(newProxyOFT_) == address(0)) revert AddressIsNull();\n        IProxyOFT _currentProxyOFT = proxyOFT;\n        if (newProxyOFT_ == _currentProxyOFT) revert NewValueIsSameAsCurrent();\n        emit ProxyOFTUpdated(_currentProxyOFT, newProxyOFT_);\n        proxyOFT = newProxyOFT_;\n    }\n\n    /// @inheritdoc SynthContext\n    function poolRegistry() public view override(ISyntheticToken, SynthContext) returns (IPoolRegistry) {\n        return _poolRegistry;\n    }\n}\n"},"contracts/dependencies/@layerzerolabs/solidity-examples/contracts-upgradeable/token/oft/IOFTCoreUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.2;\n\nimport \"../../../../../openzeppelin-upgradeable/utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev Interface of the IOFT core standard\n */\ninterface IOFTCoreUpgradeable is IERC165Upgradeable {\n    /**\n     * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)\n     * _dstChainId - L0 defined chain id to send tokens too\n     * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\n     * _amount - amount of the tokens to transfer\n     * _useZro - indicates to use zro to pay L0 fees\n     * _adapterParam - flexible bytes array to indicate messaging adapter services in L0\n     */\n    function estimateSendFee(\n        uint16 _dstChainId,\n        bytes calldata _toAddress,\n        uint _amount,\n        bool _useZro,\n        bytes calldata _adapterParams\n    ) external view returns (uint nativeFee, uint zroFee);\n\n    /**\n     * @dev send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from`\n     * `_from` the owner of token\n     * `_dstChainId` the destination chain identifier\n     * `_toAddress` can be any size depending on the `dstChainId`.\n     * `_amount` the quantity of tokens in wei\n     * `_refundAddress` the address LayerZero refunds if too much message fee is sent\n     * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)\n     * `_adapterParams` is a flexible bytes array to indicate messaging adapter services\n     */\n    function sendFrom(\n        address _from,\n        uint16 _dstChainId,\n        bytes calldata _toAddress,\n        uint _amount,\n        address payable _refundAddress,\n        address _zroPaymentAddress,\n        bytes calldata _adapterParams\n    ) external payable;\n\n    /**\n     * @dev returns the circulating amount of tokens on current chain\n     */\n    function circulatingSupply() external view returns (uint);\n\n    /**\n     * @dev returns the address of the ERC20 token\n     */\n    function token() external view returns (address);\n\n    /**\n     * @dev Emitted when `_amount` tokens are moved from the `_sender` to (`_dstChainId`, `_toAddress`)\n     * `_nonce` is the outbound nonce\n     */\n    event SendToChain(uint16 indexed _dstChainId, address indexed _from, bytes _toAddress, uint _amount);\n\n    /**\n     * @dev Emitted when `_amount` tokens are received from `_srcChainId` into the `_toAddress` on the local chain.\n     * `_nonce` is the inbound nonce.\n     */\n    event ReceiveFromChain(uint16 indexed _srcChainId, address indexed _to, uint _amount);\n\n    event SetUseCustomAdapterParams(bool _useCustomAdapterParams);\n}\n"},"contracts/dependencies/@layerzerolabs/solidity-examples/contracts-upgradeable/token/oft/composable/IComposableOFTCoreUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\nimport \"../IOFTCoreUpgradeable.sol\";\n\n/**\n * @dev Interface of the composable OFT core standard\n */\ninterface IComposableOFTCoreUpgradeable is IOFTCoreUpgradeable {\n    function estimateSendAndCallFee(\n        uint16 _dstChainId,\n        bytes calldata _toAddress,\n        uint _amount,\n        bytes calldata _payload,\n        uint64 _dstGasForCall,\n        bool _useZro,\n        bytes calldata _adapterParams\n    ) external view returns (uint nativeFee, uint zroFee);\n\n    function sendAndCall(\n        address _from,\n        uint16 _dstChainId,\n        bytes calldata _toAddress,\n        uint _amount,\n        bytes calldata _payload,\n        uint64 _dstGasForCall,\n        address payable _refundAddress,\n        address _zroPaymentAddress,\n        bytes calldata _adapterParams\n    ) external payable;\n\n    function retryOFTReceived(\n        uint16 _srcChainId,\n        bytes calldata _srcAddress,\n        uint64 _nonce,\n        bytes calldata _from,\n        address _to,\n        uint _amount,\n        bytes calldata _payload\n    ) external;\n\n    event CallOFTReceivedFailure(\n        uint16 indexed _srcChainId,\n        bytes _srcAddress,\n        uint64 _nonce,\n        bytes _from,\n        address indexed _to,\n        uint _amount,\n        bytes _payload,\n        bytes _reason\n    );\n\n    event CallOFTReceivedSuccess(uint16 indexed _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _hash);\n\n    event RetryOFTReceivedSuccess(bytes32 _messageHash);\n\n    event NonContractAddress(address _address);\n}\n"},"contracts/dependencies/@layerzerolabs/solidity-examples/contracts-upgradeable/token/oft/composable/IOFTReceiverUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.5.0;\n\ninterface IOFTReceiverUpgradeable {\n    /**\n     * @dev Called by the OFT contract when tokens are received from source chain.\n     * @param _srcChainId The chain id of the source chain.\n     * @param _srcAddress The address of the OFT token contract on the source chain.\n     * @param _nonce The nonce of the transaction on the source chain.\n     * @param _from The address of the account who calls the sendAndCall() on the source chain.\n     * @param _amount The amount of tokens to transfer.\n     * @param _payload Additional data with no specified format.\n     */\n    function onOFTReceived(\n        uint16 _srcChainId,\n        bytes calldata _srcAddress,\n        uint64 _nonce,\n        bytes calldata _from,\n        uint _amount,\n        bytes calldata _payload\n    ) external;\n}\n"},"contracts/dependencies/openzeppelin-upgradeable/proxy/utils/Initializable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\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 * ```\n * contract MyToken is ERC20Upgradeable {\n *     function initialize() initializer public {\n *         __ERC20_init(\"MyToken\", \"MTK\");\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 Indicates that the contract has been initialized.\n     * @custom:oz-retyped-from bool\n     */\n    uint8 private _initialized;\n\n    /**\n     * @dev Indicates that the contract is in the process of being initialized.\n     */\n    bool private _initializing;\n\n    /**\n     * @dev Triggered when the contract has been initialized or reinitialized.\n     */\n    event Initialized(uint8 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. Equivalent to `reinitializer(1)`.\n     */\n    modifier initializer() {\n        bool isTopLevelCall = _setInitializedVersion(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     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\n     * initialization step. This is essential to configure modules that are added through upgrades and that require\n     * initialization.\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    modifier reinitializer(uint8 version) {\n        bool isTopLevelCall = _setInitializedVersion(version);\n        if (isTopLevelCall) {\n            _initializing = true;\n        }\n        _;\n        if (isTopLevelCall) {\n            _initializing = false;\n            emit Initialized(version);\n        }\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        require(_initializing, \"Initializable: contract is not initializing\");\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    function _disableInitializers() internal virtual {\n        _setInitializedVersion(type(uint8).max);\n    }\n\n    function _setInitializedVersion(uint8 version) private returns (bool) {\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n        // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level\n        // of initializers, because in other contexts the contract may have been reentered.\n        if (_initializing) {\n            require(\n                version == 1 && !AddressUpgradeable.isContract(address(this)),\n                \"Initializable: contract is already initialized\"\n            );\n            return false;\n        } else {\n            require(_initialized < version, \"Initializable: contract is already initialized\");\n            _initialized = version;\n            return true;\n        }\n    }\n}\n"},"contracts/dependencies/openzeppelin-upgradeable/utils/AddressUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     *\n     * [IMPORTANT]\n     * ====\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\n     *\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n     * constructor.\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n     * revert reason using the provided one.\n     *\n     * _Available since v4.3._\n     */\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // 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\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n"},"contracts/dependencies/openzeppelin-upgradeable/utils/introspection/IERC165Upgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\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 IERC165Upgradeable {\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[EIP 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"},"contracts/dependencies/openzeppelin/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\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"},"contracts/dependencies/openzeppelin/token/ERC20/extensions/IERC20Metadata.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\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"},"contracts/dependencies/openzeppelin/utils/Context.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\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"},"contracts/dependencies/stargate-protocol/interfaces/IStargateComposer.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.9;\n\nimport \"./IStargateRouter.sol\";\n\ninterface IStargateComposer {\n    function swap(\n        uint16 _dstChainId,\n        uint256 _srcPoolId,\n        uint256 _dstPoolId,\n        address payable _refundAddress,\n        uint256 _amountLD,\n        uint256 _minAmountLD,\n        IStargateRouter.lzTxObj memory _lzTxParams,\n        bytes calldata _to,\n        bytes calldata _payload\n    ) external payable;\n\n    function factory() external view returns (address);\n\n    function stargateBridge() external view returns (address);\n\n    function stargateRouter() external view returns (IStargateRouter);\n\n    function quoteLayerZeroFee(\n        uint16 _dstChainId,\n        uint8 _functionType,\n        bytes calldata _toAddress,\n        bytes calldata _transferAndCallPayload,\n        IStargateRouter.lzTxObj memory _lzTxParams\n    ) external view returns (uint256, uint256);\n\n    function peers(uint16 _chainId) external view returns (address);\n\n    function payloadHashes(\n        uint16 _srcChainId,\n        bytes calldata _srcAddress,\n        uint256 _nonce\n    ) external view returns (bytes32);\n\n    function clearCachedSwap(\n        uint16 _srcChainId,\n        bytes calldata _srcAddress,\n        uint64 _nonce,\n        address _receiver,\n        bytes calldata _sgReceiveCallData\n    ) external;\n}\n"},"contracts/dependencies/stargate-protocol/interfaces/IStargateReceiver.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.9;\n\ninterface IStargateReceiver {\n    function sgReceive(\n        uint16 _chainId,\n        bytes memory _srcAddress,\n        uint256 _nonce,\n        address _token,\n        uint256 amountLD,\n        bytes memory payload\n    ) external;\n}\n"},"contracts/dependencies/stargate-protocol/interfaces/IStargateRouter.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\n\npragma solidity ^0.8.9;\n\ninterface IStargateRouter {\n    struct lzTxObj {\n        uint256 dstGasForCall;\n        uint256 dstNativeAmount;\n        bytes dstNativeAddr;\n    }\n\n    function addLiquidity(uint256 _poolId, uint256 _amountLD, address _to) external;\n\n    function swap(\n        uint16 _dstChainId,\n        uint256 _srcPoolId,\n        uint256 _dstPoolId,\n        address payable _refundAddress,\n        uint256 _amountLD,\n        uint256 _minAmountLD,\n        lzTxObj memory _lzTxParams,\n        bytes calldata _to,\n        bytes calldata _payload\n    ) external payable;\n\n    function redeemRemote(\n        uint16 _dstChainId,\n        uint256 _srcPoolId,\n        uint256 _dstPoolId,\n        address payable _refundAddress,\n        uint256 _amountLP,\n        uint256 _minAmountLD,\n        bytes calldata _to,\n        lzTxObj memory _lzTxParams\n    ) external payable;\n\n    function instantRedeemLocal(uint16 _srcPoolId, uint256 _amountLP, address _to) external returns (uint256);\n\n    function redeemLocal(\n        uint16 _dstChainId,\n        uint256 _srcPoolId,\n        uint256 _dstPoolId,\n        address payable _refundAddress,\n        uint256 _amountLP,\n        bytes calldata _to,\n        lzTxObj memory _lzTxParams\n    ) external payable;\n\n    function sendCredits(\n        uint16 _dstChainId,\n        uint256 _srcPoolId,\n        uint256 _dstPoolId,\n        address payable _refundAddress\n    ) external payable;\n\n    function quoteLayerZeroFee(\n        uint16 _dstChainId,\n        uint8 _functionType,\n        bytes calldata _toAddress,\n        bytes calldata _transferAndCallPayload,\n        lzTxObj memory _lzTxParams\n    ) external view returns (uint256, uint256);\n\n    function clearCachedSwap(uint16 _srcChainId, bytes calldata _srcAddress, uint256 _nonce) external;\n\n    function factory() external view returns (address);\n\n    function bridge() external view returns (address);\n\n    function cachedSwapLookup(\n        uint16 _chainId_,\n        bytes calldata _srcAddress,\n        uint256 _nonce\n    ) external view returns (address token, uint256 amountLD, address to, bytes memory payload);\n}\n"},"contracts/interfaces/ICrossChainDispatcher.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IOFTReceiverUpgradeable} from \"../dependencies/@layerzerolabs/solidity-examples/contracts-upgradeable/token/oft/composable/IOFTReceiverUpgradeable.sol\";\nimport {IStargateReceiver} from \"../dependencies/stargate-protocol/interfaces/IStargateReceiver.sol\";\nimport {IStargateComposer} from \"../dependencies/stargate-protocol/interfaces/IStargateComposer.sol\";\n\ninterface ICrossChainDispatcher is IStargateReceiver, IOFTReceiverUpgradeable {\n    function crossChainDispatcherOf(uint16 chainId_) external view returns (address);\n\n    function triggerFlashRepaySwap(\n        uint256 id_,\n        address payable account_,\n        address tokenIn_,\n        address tokenOut_,\n        uint256 amountIn_,\n        uint256 amountOutMin_,\n        bytes calldata lzArgs_\n    ) external payable;\n\n    function triggerLeverageSwap(\n        uint256 id_,\n        address payable account_,\n        address tokenIn_,\n        address tokenOut_,\n        uint256 amountIn_,\n        uint256 amountOutMin,\n        bytes calldata lzArgs_\n    ) external payable;\n\n    function isBridgingActive() external view returns (bool);\n\n    function flashRepayCallbackTxGasLimit() external view returns (uint64);\n\n    function flashRepaySwapTxGasLimit() external view returns (uint64);\n\n    function leverageCallbackTxGasLimit() external view returns (uint64);\n\n    function leverageSwapTxGasLimit() external view returns (uint64);\n\n    function lzBaseGasLimit() external view returns (uint256);\n\n    function stargateComposer() external view returns (IStargateComposer);\n\n    function stargateSlippage() external view returns (uint256);\n\n    function stargatePoolIdOf(address token_) external view returns (uint256);\n\n    function isDestinationChainSupported(uint16 dstChainId_) external view returns (bool);\n}\n"},"contracts/interfaces/IDebtToken.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IERC20Metadata} from \"../dependencies/openzeppelin/token/ERC20/extensions/IERC20Metadata.sol\";\nimport {ISyntheticToken} from \"./ISyntheticToken.sol\";\n\ninterface IDebtToken is IERC20Metadata {\n    function lastTimestampAccrued() external view returns (uint256);\n\n    function isActive() external view returns (bool);\n\n    function syntheticToken() external view returns (ISyntheticToken);\n\n    function accrueInterest() external;\n\n    function debtIndex() external returns (uint256 debtIndex_);\n\n    function burn(address from_, uint256 amount_) external;\n\n    function issue(uint256 amount_, address to_) external returns (uint256 _issued, uint256 _fee);\n\n    function flashIssue(address to_, uint256 amount_) external returns (uint256 _issued, uint256 _fee);\n\n    function mint(address to_, uint256 amount_) external;\n\n    function repay(address onBehalfOf_, uint256 amount_) external returns (uint256 _repaid, uint256 _fee);\n\n    function repayAll(address onBehalfOf_) external returns (uint256 _repaid, uint256 _fee);\n\n    function quoteIssueIn(uint256 amountToIssue_) external view returns (uint256 _amount, uint256 _fee);\n\n    function quoteIssueOut(uint256 amount_) external view returns (uint256 _amountToIssue, uint256 _fee);\n\n    function quoteRepayIn(uint256 amountToRepay_) external view returns (uint256 _amount, uint256 _fee);\n\n    function quoteRepayOut(uint256 amount_) external view returns (uint256 _amountToRepay, uint256 _fee);\n\n    function updateMaxTotalSupply(uint256 newMaxTotalSupply_) external;\n\n    function updateInterestRate(uint256 newInterestRate_) external;\n\n    function maxTotalSupply() external view returns (uint256);\n\n    function interestRate() external view returns (uint256);\n\n    function interestRatePerSecond() external view returns (uint256);\n\n    function toggleIsActive() external;\n}\n"},"contracts/interfaces/IDepositToken.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IERC20Metadata, IERC20} from \"../dependencies/openzeppelin/token/ERC20/extensions/IERC20Metadata.sol\";\n\ninterface IDepositToken is IERC20Metadata {\n    function underlying() external view returns (IERC20);\n\n    function collateralFactor() external view returns (uint256);\n\n    function unlockedBalanceOf(address account_) external view returns (uint256);\n\n    function lockedBalanceOf(address account_) external view returns (uint256);\n\n    function flashWithdraw(address account_, uint256 amount_) external returns (uint256 _withdrawn, uint256 _fee);\n\n    function deposit(uint256 amount_, address onBehalfOf_) external returns (uint256 _deposited, uint256 _fee);\n\n    function quoteDepositIn(uint256 amountToDeposit_) external view returns (uint256 _amount, uint256 _fee);\n\n    function quoteDepositOut(uint256 amount_) external view returns (uint256 _amountToDeposit, uint256 _fee);\n\n    function quoteWithdrawIn(uint256 amountToWithdraw_) external view returns (uint256 _amount, uint256 _fee);\n\n    function quoteWithdrawOut(uint256 amount_) external view returns (uint256 _amountToWithdraw, uint256 _fee);\n\n    function withdraw(uint256 amount_, address to_) external returns (uint256 _withdrawn, uint256 _fee);\n\n    function seize(address from_, address to_, uint256 amount_) external;\n\n    function updateCollateralFactor(uint128 newCollateralFactor_) external;\n\n    function isActive() external view returns (bool);\n\n    function toggleIsActive() external;\n\n    function maxTotalSupply() external view returns (uint256);\n\n    function updateMaxTotalSupply(uint256 newMaxTotalSupply_) external;\n\n    function withdrawFrom(address from_, uint256 amount_) external returns (uint256 _withdrawn, uint256 _fee);\n}\n"},"contracts/interfaces/IFeeProvider.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\n/**\n * @notice FeeProvider interface\n */\ninterface IFeeProvider {\n    struct LiquidationFees {\n        uint128 liquidatorIncentive;\n        uint128 protocolFee;\n    }\n\n    function defaultSwapFee() external view returns (uint256);\n\n    function depositFee() external view returns (uint256);\n\n    function issueFee() external view returns (uint256);\n\n    function liquidationFees() external view returns (uint128 liquidatorIncentive, uint128 protocolFee);\n\n    function repayFee() external view returns (uint256);\n\n    function swapFeeFor(address account_) external view returns (uint256);\n\n    function withdrawFee() external view returns (uint256);\n}\n"},"contracts/interfaces/IGovernable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\n/**\n * @notice Governable interface\n */\ninterface IGovernable {\n    function governor() external view returns (address _governor);\n\n    function transferGovernorship(address _proposedGovernor) external;\n}\n"},"contracts/interfaces/IManageable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IPool} from \"./IPool.sol\";\n\n/**\n * @notice Manageable interface\n */\ninterface IManageable {\n    function pool() external view returns (IPool _pool);\n}\n"},"contracts/interfaces/IOperator.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\ninterface IOperator {\n    struct Call {\n        address target;\n        uint256 value;\n        bytes callData;\n    }\n\n    function getActualMsgSender() external view returns (address);\n\n    function execute(Call[] calldata calls_) external payable returns (bytes[] memory _returnData);\n}\n"},"contracts/interfaces/IPauseable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\ninterface IPauseable {\n    function paused() external view returns (bool);\n\n    function everythingStopped() external view returns (bool);\n}\n"},"contracts/interfaces/IPool.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IERC20} from \"../dependencies/openzeppelin/token/ERC20/IERC20.sol\";\nimport {IDepositToken} from \"./IDepositToken.sol\";\nimport {IDebtToken} from \"./IDebtToken.sol\";\nimport {ITreasury} from \"./ITreasury.sol\";\nimport {IPoolRegistry} from \"./IPoolRegistry.sol\";\nimport {IFeeProvider} from \"./IFeeProvider.sol\";\nimport {ISmartFarmingManager} from \"./ISmartFarmingManager.sol\";\nimport {IFeeProvider} from \"../interfaces/IFeeProvider.sol\";\nimport {IPauseable} from \"../interfaces/IPauseable.sol\";\nimport {IGovernable} from \"../interfaces/IGovernable.sol\";\nimport {ISyntheticToken} from \"../interfaces/ISyntheticToken.sol\";\nimport {IMasterOracle} from \"../interfaces/external/IMasterOracle.sol\";\n\n/**\n * @notice Pool interface\n */\ninterface IPool is IPauseable, IGovernable {\n    function debtFloorInUsd() external view returns (uint256);\n\n    function feeCollector() external view returns (address);\n\n    function feeProvider() external view returns (IFeeProvider);\n\n    function maxLiquidable() external view returns (uint256);\n\n    function doesSyntheticTokenExist(ISyntheticToken syntheticToken_) external view returns (bool);\n\n    function doesDebtTokenExist(IDebtToken debtToken_) external view returns (bool);\n\n    function doesDepositTokenExist(IDepositToken depositToken_) external view returns (bool);\n\n    function depositTokenOf(IERC20 underlying_) external view returns (IDepositToken);\n\n    function debtTokenOf(ISyntheticToken syntheticToken_) external view returns (IDebtToken);\n\n    function getDepositTokens() external view returns (address[] memory);\n\n    function getDebtTokens() external view returns (address[] memory);\n\n    function getRewardsDistributors() external view returns (address[] memory);\n\n    function debtOf(address account_) external view returns (uint256 _debtInUsd);\n\n    function depositOf(address account_) external view returns (uint256 _depositInUsd, uint256 _issuableLimitInUsd);\n\n    function debtPositionOf(\n        address account_\n    )\n        external\n        view\n        returns (\n            bool _isHealthy,\n            uint256 _depositInUsd,\n            uint256 _debtInUsd,\n            uint256 _issuableLimitInUsd,\n            uint256 _issuableInUsd\n        );\n\n    function liquidate(\n        ISyntheticToken syntheticToken_,\n        address account_,\n        uint256 amountToRepay_,\n        IDepositToken depositToken_\n    ) external returns (uint256 _totalSeized, uint256 _toLiquidator, uint256 _fee);\n\n    function quoteLiquidateIn(\n        ISyntheticToken syntheticToken_,\n        uint256 totalToSeized_,\n        IDepositToken depositToken_\n    ) external view returns (uint256 _amountToRepay, uint256 _toLiquidator, uint256 _fee);\n\n    function quoteLiquidateMax(\n        ISyntheticToken syntheticToken_,\n        address account_,\n        IDepositToken depositToken_\n    ) external view returns (uint256 _maxAmountToRepay);\n\n    function quoteLiquidateOut(\n        ISyntheticToken syntheticToken_,\n        uint256 amountToRepay_,\n        IDepositToken depositToken_\n    ) external view returns (uint256 _totalSeized, uint256 _toLiquidator, uint256 _fee);\n\n    function quoteSwapIn(\n        ISyntheticToken syntheticTokenIn_,\n        ISyntheticToken syntheticTokenOut_,\n        uint256 amountOut_\n    ) external view returns (uint256 _amountIn, uint256 _fee);\n\n    function quoteSwapOut(\n        ISyntheticToken syntheticTokenIn_,\n        ISyntheticToken syntheticTokenOut_,\n        uint256 amountIn_\n    ) external view returns (uint256 _amountOut, uint256 _fee);\n\n    function swap(\n        ISyntheticToken syntheticTokenIn_,\n        ISyntheticToken syntheticTokenOut_,\n        uint256 amountIn_\n    ) external returns (uint256 _amountOut, uint256 _fee);\n\n    function treasury() external view returns (ITreasury);\n\n    function masterOracle() external view returns (IMasterOracle);\n\n    function poolRegistry() external view returns (IPoolRegistry);\n\n    function addToDepositTokensOfAccount(address account_) external;\n\n    function removeFromDepositTokensOfAccount(address account_) external;\n\n    function addToDebtTokensOfAccount(address account_) external;\n\n    function removeFromDebtTokensOfAccount(address account_) external;\n\n    function getDepositTokensOfAccount(address account_) external view returns (address[] memory);\n\n    function getDebtTokensOfAccount(address account_) external view returns (address[] memory);\n\n    function isSwapActive() external view returns (bool);\n\n    function smartFarmingManager() external view returns (ISmartFarmingManager);\n\n    function isBridgingActive() external view returns (bool);\n}\n"},"contracts/interfaces/IPoolRegistry.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IMasterOracle} from \"./external/IMasterOracle.sol\";\nimport {IPauseable} from \"./IPauseable.sol\";\nimport {IGovernable} from \"./IGovernable.sol\";\nimport {ISyntheticToken} from \"./ISyntheticToken.sol\";\nimport {ISwapper} from \"./external/ISwapper.sol\";\nimport {IQuoter} from \"./IQuoter.sol\";\nimport {ICrossChainDispatcher} from \"./ICrossChainDispatcher.sol\";\nimport {IOperator} from \"./IOperator.sol\";\n\ninterface IPoolRegistry is IPauseable, IGovernable {\n    function feeCollector() external view returns (address);\n\n    function isPoolRegistered(address pool_) external view returns (bool);\n\n    function nativeTokenGateway() external view returns (address);\n\n    function getPools() external view returns (address[] memory);\n\n    function registerPool(address pool_) external;\n\n    function unregisterPool(address pool_) external;\n\n    function masterOracle() external view returns (IMasterOracle);\n\n    function updateFeeCollector(address newFeeCollector_) external;\n\n    function idOfPool(address pool_) external view returns (uint256);\n\n    function nextPoolId() external view returns (uint256);\n\n    function swapper() external view returns (ISwapper);\n\n    function quoter() external view returns (IQuoter);\n\n    function crossChainDispatcher() external view returns (ICrossChainDispatcher);\n\n    function doesSyntheticTokenExist(ISyntheticToken syntheticToken_) external view returns (bool _exists);\n\n    function operator() external view returns (IOperator);\n\n    function isGuardian(address) external view returns (bool);\n\n    function isCrossChainFlashRepayActive() external view returns (bool);\n}\n"},"contracts/interfaces/IProxyOFT.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IComposableOFTCoreUpgradeable} from \"../dependencies/@layerzerolabs/solidity-examples/contracts-upgradeable/token/oft/composable/IComposableOFTCoreUpgradeable.sol\";\n\ninterface IProxyOFT is IComposableOFTCoreUpgradeable {\n    function getProxyOFTOf(uint16 chainId_) external view returns (address _proxyOFT);\n}\n"},"contracts/interfaces/IQuoter.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IProxyOFT} from \"./IProxyOFT.sol\";\n\ninterface IQuoter {\n    function quoteCrossChainFlashRepayNativeFee(\n        IProxyOFT proxyOFT_,\n        bytes calldata lzArgs_\n    ) external view returns (uint256 _nativeFee);\n\n    function quoteCrossChainLeverageNativeFee(\n        IProxyOFT proxyOFT_,\n        bytes calldata lzArgs_\n    ) external view returns (uint256 _nativeFee);\n\n    function quoteLeverageCallbackNativeFee(uint16 dstChainId_) external view returns (uint256 _callbackTxNativeFee);\n\n    function quoteFlashRepayCallbackNativeFee(uint16 dstChainId_) external view returns (uint256 _callbackTxNativeFee);\n\n    function getFlashRepaySwapAndCallbackLzArgs(\n        uint16 srcChainId_,\n        uint16 dstChainId_\n    ) external view returns (bytes memory lzArgs_);\n\n    function getLeverageSwapAndCallbackLzArgs(\n        uint16 srcChainId_,\n        uint16 dstChainId_\n    ) external view returns (bytes memory lzArgs_);\n}\n"},"contracts/interfaces/ISmartFarmingManager.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IERC20} from \"../dependencies/openzeppelin/token/ERC20/IERC20.sol\";\nimport {IDepositToken} from \"./IDepositToken.sol\";\nimport {ISyntheticToken} from \"./ISyntheticToken.sol\";\n\n/**\n * @notice SmartFarmingManager interface\n */\ninterface ISmartFarmingManager {\n    function flashRepay(\n        ISyntheticToken syntheticToken_,\n        IDepositToken depositToken_,\n        uint256 withdrawAmount_,\n        uint256 repayAmountMin_\n    ) external returns (uint256 _withdrawn, uint256 _repaid);\n\n    function crossChainFlashRepay(\n        ISyntheticToken syntheticToken_,\n        IDepositToken depositToken_,\n        uint256 withdrawAmount_,\n        IERC20 bridgeToken_,\n        uint256 bridgeTokenAmountMin_,\n        uint256 swapAmountOutMin_,\n        uint256 repayAmountMin_,\n        bytes calldata lzArgs_\n    ) external payable;\n\n    function crossChainLeverage(\n        IERC20 tokenIn_,\n        ISyntheticToken syntheticToken_,\n        IERC20 bridgeToken_,\n        IDepositToken depositToken_,\n        uint256 amountIn_,\n        uint256 leverage_,\n        uint256 swapAmountOutMin_,\n        uint256 depositAmountMin_,\n        bytes calldata lzArgs_\n    ) external payable;\n\n    function crossChainLeverageCallback(uint256 id_, uint256 swapAmountOut_) external returns (uint256 _deposited);\n\n    function crossChainFlashRepayCallback(uint256 id_, uint256 swapAmountOut_) external returns (uint256 _repaid);\n\n    function leverage(\n        IERC20 tokenIn_,\n        IDepositToken depositToken_,\n        ISyntheticToken syntheticToken_,\n        uint256 amountIn_,\n        uint256 leverage_,\n        uint256 depositAmountMin_\n    ) external returns (uint256 _deposited, uint256 _issued);\n}\n"},"contracts/interfaces/ISyntheticToken.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IERC20Metadata} from \"../dependencies/openzeppelin/token/ERC20/extensions/IERC20Metadata.sol\";\nimport {IPoolRegistry} from \"./IPoolRegistry.sol\";\nimport {IProxyOFT} from \"../interfaces/IProxyOFT.sol\";\n\ninterface ISyntheticToken is IERC20Metadata {\n    function isActive() external view returns (bool);\n\n    function mint(address to_, uint256 amount_) external;\n\n    function burn(address from_, uint256 amount) external;\n\n    function poolRegistry() external view returns (IPoolRegistry);\n\n    function toggleIsActive() external;\n\n    function seize(address from_, address to_, uint256 amount_) external;\n\n    function updateMaxTotalSupply(uint256 newMaxTotalSupply_) external;\n\n    function updateProxyOFT(IProxyOFT newProxyOFT_) external;\n\n    function maxTotalSupply() external view returns (uint256);\n\n    function proxyOFT() external view returns (IProxyOFT);\n\n    function amoSupply() external view returns (uint256);\n}\n"},"contracts/interfaces/ITreasury.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\ninterface ITreasury {\n    function pull(address to_, uint256 amount_) external;\n\n    function migrateTo(address newTreasury_) external;\n}\n"},"contracts/interfaces/external/IMasterOracle.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\ninterface IMasterOracle {\n    function quoteTokenToUsd(address _asset, uint256 _amount) external view returns (uint256 _amountInUsd);\n\n    function quoteUsdToToken(address _asset, uint256 _amountInUsd) external view returns (uint256 _amount);\n\n    function quote(address _assetIn, address _assetOut, uint256 _amountIn) external view returns (uint256 _amountOut);\n}\n"},"contracts/interfaces/external/ISwapper.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\ninterface ISwapper {\n    function swapExactInput(\n        address tokenIn_,\n        address tokenOut_,\n        uint256 amountIn_,\n        uint256 amountOutMin_,\n        address receiver_\n    ) external returns (uint256 _amountOut);\n}\n"},"contracts/lib/WadRayMath.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\n/**\n * @title Math library\n * @dev Provides mul and div function for wads (decimal numbers with 18 digits precision) and rays (decimals with 27 digits)\n * @dev Based on https://github.com/dapphub/ds-math/blob/master/src/math.sol\n */\nlibrary WadRayMath {\n    uint256 internal constant WAD = 1e18;\n    uint256 internal constant HALF_WAD = WAD / 2;\n\n    uint256 internal constant RAY = 1e27;\n    uint256 internal constant HALF_RAY = RAY / 2;\n\n    uint256 internal constant WAD_RAY_RATIO = 1e9;\n\n    /**\n     * @dev Multiplies two wad, rounding half up to the nearest wad\n     * @param a Wad\n     * @param b Wad\n     * @return The result of a*b, in wad\n     */\n    function wadMul(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (a == 0 || b == 0) {\n            return 0;\n        }\n\n        return (a * b + HALF_WAD) / WAD;\n    }\n\n    /**\n     * @dev Divides two wad, rounding half up to the nearest wad\n     * @param a Wad\n     * @param b Wad\n     * @return The result of a/b, in wad\n     */\n    function wadDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        return (a * WAD + b / 2) / b;\n    }\n}\n"},"contracts/storage/SyntheticTokenStorage.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {IPoolRegistry} from \"../interfaces/IPoolRegistry.sol\";\nimport {IProxyOFT} from \"../interfaces/IProxyOFT.sol\";\nimport {ISyntheticToken} from \"../interfaces/ISyntheticToken.sol\";\n\nabstract contract SyntheticTokenStorageV1 is ISyntheticToken {\n    /**\n     * @notice The name of the token\n     */\n    string public override name;\n\n    /**\n     * @notice The symbol of the token\n     */\n    string public override symbol;\n\n    /**\n     * @dev The amount of tokens owned by `account`\n     */\n    mapping(address => uint256) public override balanceOf;\n\n    /**\n     * @dev The remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}\n     */\n    mapping(address => mapping(address => uint256)) public override allowance;\n\n    /**\n     * @dev Amount of tokens in existence\n     */\n    uint256 public override totalSupply;\n\n    /**\n     * @notice The supply cap\n     */\n    uint256 public override maxTotalSupply;\n\n    /**\n     * @dev The Pool Registry\n     */\n    IPoolRegistry internal _poolRegistry;\n\n    /**\n     * @notice If true, disables msAsset minting globally\n     */\n    bool public override isActive;\n\n    /**\n     * @notice The decimals of the token\n     */\n    uint8 public override decimals;\n\n    /**\n     * @notice The ProxyOFT contract\n     */\n    IProxyOFT public override proxyOFT;\n\n    /**\n     * @notice Track amount received cross-chain\n     */\n    uint256 public totalBridgedIn;\n\n    /**\n     * @notice Track amount sent cross-chain\n     */\n    uint256 public totalBridgedOut;\n\n    /**\n     * @notice Maximum allowed bridged-in (mint-related) supply\n     */\n    uint256 public maxBridgedInSupply;\n\n    /**\n     * @notice Maximum allowed bridged-out (burn-related) supply\n     */\n    uint256 public maxBridgedOutSupply;\n}\n\nabstract contract SyntheticTokenStorageV2 is SyntheticTokenStorageV1 {\n    /**\n     * @notice Automated Market Operator, it can be a contract, safe or EOA\n     */\n    address public amo;\n\n    /**\n     * @notice Maximum Synth AMO can mint. It can be updated by admin/governor.\n     */\n    uint256 public maxAmoSupply;\n\n    /**\n     * @notice Synth minted by AMO so far. It will be reduced when Synths are burnt by AMO.\n     */\n    uint256 public amoSupply;\n}\n"},"contracts/utils/SynthContext.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.24;\n\nimport {Context} from \"../dependencies/openzeppelin/utils/Context.sol\";\nimport {IOperator} from \"../interfaces/IOperator.sol\";\nimport {IPoolRegistry} from \"../interfaces/IPoolRegistry.sol\";\n\nabstract contract SynthContext is Context {\n    /// @notice Get pool registry contract\n    function poolRegistry() public view virtual returns (IPoolRegistry);\n\n    /// @inheritdoc Context\n    function _msgSender() internal view virtual override returns (address) {\n        IPoolRegistry _poolRegistry = poolRegistry();\n        if (address(_poolRegistry) != address(0)) {\n            IOperator _operator = _poolRegistry.operator();\n            if (msg.sender == address(_operator)) {\n                return _operator.getActualMsgSender();\n            }\n        }\n\n        return msg.sender;\n    }\n}\n"}},"matchId":"40962040","creationMatch":"match","runtimeMatch":"match","verifiedAt":"2026-07-10T17:33:08Z","match":"match","chainId":"1","address":"0x206b88b20D9b2709153Ab596aDd007b21124eB26"}