@keep-network/tbtc-v2 0.1.1-dev.77 → 0.1.1-dev.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/Bank.json +16 -16
- package/artifacts/Bridge.json +5 -5
- package/artifacts/Deposit.json +7 -7
- package/artifacts/DepositSweep.json +7 -7
- package/artifacts/EcdsaDkgValidator.json +1 -1
- package/artifacts/EcdsaInactivity.json +1 -1
- package/artifacts/EcdsaSortitionPool.json +2 -2
- package/artifacts/Fraud.json +7 -7
- package/artifacts/KeepRegistry.json +1 -1
- package/artifacts/KeepStake.json +2 -2
- package/artifacts/KeepToken.json +2 -2
- package/artifacts/KeepTokenStaking.json +1 -1
- package/artifacts/MovingFunds.json +7 -7
- package/artifacts/NuCypherStakingEscrow.json +1 -1
- package/artifacts/NuCypherToken.json +2 -2
- package/artifacts/RandomBeaconStub.json +1 -1
- package/artifacts/Redemption.json +7 -7
- package/artifacts/ReimbursementPool.json +2 -2
- package/artifacts/Relay.json +9 -9
- package/artifacts/T.json +2 -2
- package/artifacts/TBTC.json +3 -3
- package/artifacts/TBTCToken.json +3 -3
- package/artifacts/TokenStaking.json +1 -1
- package/artifacts/TokenholderGovernor.json +9 -9
- package/artifacts/TokenholderTimelock.json +8 -8
- package/artifacts/VendingMachine.json +10 -10
- package/artifacts/VendingMachineKeep.json +1 -1
- package/artifacts/VendingMachineNuCypher.json +1 -1
- package/artifacts/WalletRegistry.json +5 -5
- package/artifacts/WalletRegistryGovernance.json +2 -2
- package/artifacts/Wallets.json +7 -7
- package/artifacts/solcInputs/{490ffccc38e413544104a916bd6aa53c.json → 53b3428138f3e1a8f29707c3a3799af0.json} +5 -2
- package/build/contracts/GovernanceUtils.sol/GovernanceUtils.dbg.json +1 -1
- package/build/contracts/bank/Bank.sol/Bank.dbg.json +1 -1
- package/build/contracts/bank/Bank.sol/Bank.json +3 -3
- package/build/contracts/bank/IReceiveBalanceApproval.sol/IReceiveBalanceApproval.dbg.json +4 -0
- package/build/contracts/bank/IReceiveBalanceApproval.sol/IReceiveBalanceApproval.json +29 -0
- package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.dbg.json +1 -1
- package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.json +2 -2
- package/build/contracts/bridge/Bridge.sol/Bridge.dbg.json +1 -1
- package/build/contracts/bridge/Bridge.sol/Bridge.json +2 -2
- package/build/contracts/bridge/BridgeState.sol/BridgeState.dbg.json +1 -1
- package/build/contracts/bridge/BridgeState.sol/BridgeState.json +2 -2
- package/build/contracts/bridge/Deposit.sol/Deposit.dbg.json +1 -1
- package/build/contracts/bridge/Deposit.sol/Deposit.json +2 -2
- package/build/contracts/bridge/DepositSweep.sol/DepositSweep.dbg.json +1 -1
- package/build/contracts/bridge/DepositSweep.sol/DepositSweep.json +2 -2
- package/build/contracts/bridge/EcdsaLib.sol/EcdsaLib.dbg.json +1 -1
- package/build/contracts/bridge/Fraud.sol/Fraud.dbg.json +1 -1
- package/build/contracts/bridge/Fraud.sol/Fraud.json +2 -2
- package/build/contracts/bridge/Heartbeat.sol/Heartbeat.dbg.json +1 -1
- package/build/contracts/bridge/IRelay.sol/IRelay.dbg.json +1 -1
- package/build/contracts/bridge/MovingFunds.sol/MovingFunds.dbg.json +1 -1
- package/build/contracts/bridge/MovingFunds.sol/MovingFunds.json +2 -2
- package/build/contracts/bridge/Redemption.sol/OutboundTx.dbg.json +1 -1
- package/build/contracts/bridge/Redemption.sol/OutboundTx.json +2 -2
- package/build/contracts/bridge/Redemption.sol/Redemption.dbg.json +1 -1
- package/build/contracts/bridge/Redemption.sol/Redemption.json +2 -2
- package/build/contracts/bridge/VendingMachine.sol/VendingMachine.dbg.json +1 -1
- package/build/contracts/bridge/Wallets.sol/Wallets.dbg.json +1 -1
- package/build/contracts/bridge/Wallets.sol/Wallets.json +2 -2
- package/build/contracts/token/TBTC.sol/TBTC.dbg.json +1 -1
- package/build/contracts/vault/DonationVault.sol/DonationVault.dbg.json +1 -1
- package/build/contracts/vault/DonationVault.sol/DonationVault.json +2 -2
- package/build/contracts/vault/IVault.sol/IVault.dbg.json +1 -1
- package/build/contracts/vault/TBTCVault.sol/TBTCVault.dbg.json +1 -1
- package/build/contracts/vault/TBTCVault.sol/TBTCVault.json +2 -2
- package/contracts/bank/Bank.sol +13 -9
- package/contracts/bank/IReceiveBalanceApproval.sol +40 -0
- package/contracts/vault/IVault.sol +3 -19
- package/export.json +1 -1
- package/package.json +1 -1
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
"language": "Solidity",
|
|
3
3
|
"sources": {
|
|
4
4
|
"contracts/bank/Bank.sol": {
|
|
5
|
-
"content": "// SPDX-License-Identifier: MIT\n\n// ██████████████ ▐████▌ ██████████████\n// ██████████████ ▐████▌ ██████████████\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ██████████████ ▐████▌ ██████████████\n// ██████████████ ▐████▌ ██████████████\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\nimport \"../vault/IVault.sol\";\n\n/// @title Bitcoin Bank\n/// @notice Bank is a central component tracking Bitcoin balances. Balances can\n/// be transferred between holders and holders can approve their\n/// balances to be spent by others. Balances in the Bank are updated for\n/// depositors who deposit their Bitcoin into the Bridge and only the\n/// Bridge can increase balances.\n/// @dev Bank is a governable contract and the Governance can upgrade the Bridge\n/// address.\ncontract Bank is Ownable {\n address public bridge;\n\n /// @notice The balance of a given account in the Bank. Zero by default.\n mapping(address => uint256) public balanceOf;\n\n /// @notice The remaining amount of balance a spender will be\n /// allowed to transfer on behalf of an owner using\n /// `transferBalanceFrom`. Zero by default.\n mapping(address => mapping(address => uint256)) public allowance;\n\n /// @notice Returns the current nonce for EIP2612 permission for the\n /// provided balance owner for a replay protection. Used to\n /// construct EIP2612 signature provided to `permit` function.\n mapping(address => uint256) public nonce;\n\n uint256 public immutable cachedChainId;\n bytes32 public immutable cachedDomainSeparator;\n\n /// @notice Returns EIP2612 Permit message hash. Used to construct EIP2612\n /// signature provided to `permit` function.\n bytes32 public constant PERMIT_TYPEHASH =\n keccak256(\n \"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\"\n );\n\n event BalanceTransferred(\n address indexed from,\n address indexed to,\n uint256 amount\n );\n\n event BalanceApproved(\n address indexed owner,\n address indexed spender,\n uint256 amount\n );\n\n event BalanceIncreased(address indexed owner, uint256 amount);\n\n event BalanceDecreased(address indexed owner, uint256 amount);\n\n event BridgeUpdated(address newBridge);\n\n modifier onlyBridge() {\n require(msg.sender == address(bridge), \"Caller is not the bridge\");\n _;\n }\n\n constructor() {\n cachedChainId = block.chainid;\n cachedDomainSeparator = buildDomainSeparator();\n }\n\n /// @notice Allows the Governance to upgrade the Bridge address.\n /// @dev The function does not implement any governance delay and does not\n /// check the status of the Bridge. The Governance implementation needs\n /// to ensure all requirements for the upgrade are satisfied before\n /// executing this function.\n function updateBridge(address _bridge) external onlyOwner {\n require(_bridge != address(0), \"Bridge address must not be 0x0\");\n bridge = _bridge;\n emit BridgeUpdated(_bridge);\n }\n\n /// @notice Moves the given `amount` of balance from the caller to\n /// `recipient`.\n /// @dev Requirements:\n /// - `recipient` cannot be the zero address,\n /// - the caller must have a balance of at least `amount`.\n function transferBalance(address recipient, uint256 amount) external {\n _transferBalance(msg.sender, recipient, amount);\n }\n\n /// @notice Sets `amount` as the allowance of `spender` over the caller's\n /// balance.\n /// @dev If the `amount` is set to `type(uint256).max` then\n /// `transferBalanceFrom` will not reduce an allowance.\n /// Beware that changing an allowance with this function brings the\n /// risk that someone may use both the old and the new allowance by\n /// unfortunate transaction ordering. Please use\n /// `increaseBalanceAllowance` and `decreaseBalanceAllowance` to\n /// eliminate the risk.\n function approveBalance(address spender, uint256 amount) external {\n _approveBalance(msg.sender, spender, amount);\n }\n\n /// @notice Sets `amount` as the allowance of a smart contract `vault` over\n /// the caller's balance and calls the vault via\n /// `receiveBalanceApproval`.\n /// @dev If the `amount` is set to `type(uint256).max` then the logic in\n /// `receiveBalanceApproval` or later call to `transferBalanceFrom` by\n /// the vault will not reduce an allowance. Beware that changing an\n /// allowance with this function brings the risk that vault may use\n /// both the old and the new allowance by unfortunate transaction\n /// ordering. Please use `increaseBalanceAllowance` and\n /// `decreaseBalanceAllowance` to eliminate the risk.\n function approveBalanceAndCall(address vault, uint256 amount) external {\n _approveBalance(msg.sender, vault, amount);\n IVault(vault).receiveBalanceApproval(msg.sender, amount);\n }\n\n /// @notice Atomically increases the balance allowance granted to `spender`\n /// by the caller by the given `addedValue`.\n function increaseBalanceAllowance(address spender, uint256 addedValue)\n external\n {\n _approveBalance(\n msg.sender,\n spender,\n allowance[msg.sender][spender] + addedValue\n );\n }\n\n /// @notice Atomically decreases the balance allowance granted to `spender`\n /// by the caller by the given `subtractedValue`.\n function decreaseBalanceAllowance(address spender, uint256 subtractedValue)\n external\n {\n uint256 currentAllowance = allowance[msg.sender][spender];\n require(\n currentAllowance >= subtractedValue,\n \"Can not decrease balance allowance below zero\"\n );\n unchecked {\n _approveBalance(\n msg.sender,\n spender,\n currentAllowance - subtractedValue\n );\n }\n }\n\n /// @notice Moves `amount` of balance from `spender` to `recipient` using the\n /// allowance mechanism. `amount` is then deducted from the caller's\n /// allowance unless the allowance was made for `type(uint256).max`.\n /// @dev Requirements:\n /// - `recipient` cannot be the zero address,\n /// - `spender` must have a balance of at least `amount`,\n /// - the caller must have allowance for `spender`'s balance of at\n /// least `amount`.\n function transferBalanceFrom(\n address spender,\n address recipient,\n uint256 amount\n ) external {\n uint256 currentAllowance = allowance[spender][msg.sender];\n if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"Transfer amount exceeds allowance\"\n );\n unchecked {\n _approveBalance(spender, msg.sender, currentAllowance - amount);\n }\n }\n _transferBalance(spender, recipient, amount);\n }\n\n /// @notice EIP2612 approval made with secp256k1 signature.\n /// Users can authorize a transfer of their balance with a signature\n /// conforming EIP712 standard, rather than an on-chain transaction\n /// from their address. Anyone can submit this signature on the\n /// user's behalf by calling the permit function, paying gas fees,\n /// and possibly performing other actions in the same transaction.\n /// @dev The deadline argument can be set to `type(uint256).max to create\n /// permits that effectively never expire. If the `amount` is set\n /// to `type(uint256).max` then `transferBalanceFrom` will not\n /// reduce an allowance. Beware that changing an allowance with this\n /// function brings the risk that someone may use both the old and the\n /// new allowance by unfortunate transaction ordering. Please use\n /// `increaseBalanceAllowance` and `decreaseBalanceAllowance` to\n /// eliminate the risk.\n function permit(\n address owner,\n address spender,\n uint256 amount,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external {\n /* solhint-disable-next-line not-rely-on-time */\n require(deadline >= block.timestamp, \"Permission expired\");\n\n // Validate `s` and `v` values for a malleability concern described in EIP2.\n // Only signatures with `s` value in the lower half of the secp256k1\n // curve's order and `v` value of 27 or 28 are considered valid.\n require(\n uint256(s) <=\n 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0,\n \"Invalid signature 's' value\"\n );\n require(v == 27 || v == 28, \"Invalid signature 'v' value\");\n\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n DOMAIN_SEPARATOR(),\n keccak256(\n abi.encode(\n PERMIT_TYPEHASH,\n owner,\n spender,\n amount,\n nonce[owner]++,\n deadline\n )\n )\n )\n );\n address recoveredAddress = ecrecover(digest, v, r, s);\n require(\n recoveredAddress != address(0) && recoveredAddress == owner,\n \"Invalid signature\"\n );\n _approveBalance(owner, spender, amount);\n }\n\n /// @notice Increases balances of the provided `recipients` by the provided\n /// `amounts`. Can only be called by the Bridge.\n /// @dev Requirements:\n /// - length of `recipients` and `amounts` must be the same.\n function increaseBalances(\n address[] calldata recipients,\n uint256[] calldata amounts\n ) external onlyBridge {\n require(\n recipients.length == amounts.length,\n \"Arrays must have the same length\"\n );\n for (uint256 i = 0; i < recipients.length; i++) {\n _increaseBalance(recipients[i], amounts[i]);\n }\n }\n\n /// @notice Increases balance of the provided `recipient` by the provided\n /// `amount`. Can only be called by the Bridge.\n function increaseBalance(address recipient, uint256 amount)\n external\n onlyBridge\n {\n _increaseBalance(recipient, amount);\n }\n\n /// @notice Increases the given smart contract `vault`'s balance and\n /// notifies the `vault` contract. Called by the Bridge after\n /// the deposits routed by depositors to that `vault` have been\n /// swept by the Bridge. This way, the depositor does not have to\n /// issue a separate transaction to the `vault` contract.\n /// Can be called only by the Bridge.\n /// @dev Requirements:\n /// - `vault` must implement `IVault` interface,\n /// - length of `depositors` and `depositedAmounts` must be the same.\n /// @param vault Address of `IVault` recipient contract.\n /// @param depositors Addresses of depositors whose deposits have been swept.\n /// @param depositedAmounts Amounts deposited by individual depositors and\n /// swept. The `vault`'s balance in the Bank will be increased by the\n /// sum of all elements in this array.\n function increaseBalanceAndCall(\n address vault,\n address[] calldata depositors,\n uint256[] calldata depositedAmounts\n ) external onlyBridge {\n require(\n depositors.length == depositedAmounts.length,\n \"Arrays must have the same length\"\n );\n uint256 totalAmount = 0;\n for (uint256 i = 0; i < depositedAmounts.length; i++) {\n totalAmount += depositedAmounts[i];\n }\n _increaseBalance(vault, totalAmount);\n IVault(vault).receiveBalanceIncrease(depositors, depositedAmounts);\n }\n\n /// @notice Decreases caller's balance by the provided `amount`. There is no\n /// way to restore the balance so do not call this function unless\n /// you really know what you are doing!\n function decreaseBalance(uint256 amount) external {\n balanceOf[msg.sender] -= amount;\n emit BalanceDecreased(msg.sender, amount);\n }\n\n /// @notice Returns hash of EIP712 Domain struct with `TBTC Bank` as\n /// a signing domain and Bank contract as a verifying contract.\n /// Used to construct EIP2612 signature provided to `permit`\n /// function.\n /* solhint-disable-next-line func-name-mixedcase */\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\n // As explained in EIP-2612, if the DOMAIN_SEPARATOR contains the\n // chainId and is defined at contract deployment instead of\n // reconstructed for every signature, there is a risk of possible replay\n // attacks between chains in the event of a future chain split.\n // To address this issue, we check the cached chain ID against the\n // current one and in case they are different, we build domain separator\n // from scratch.\n if (block.chainid == cachedChainId) {\n return cachedDomainSeparator;\n } else {\n return buildDomainSeparator();\n }\n }\n\n function _increaseBalance(address recipient, uint256 amount) internal {\n require(\n recipient != address(this),\n \"Can not increase balance for Bank\"\n );\n balanceOf[recipient] += amount;\n emit BalanceIncreased(recipient, amount);\n }\n\n function _transferBalance(\n address spender,\n address recipient,\n uint256 amount\n ) private {\n require(\n recipient != address(0),\n \"Can not transfer to the zero address\"\n );\n require(\n recipient != address(this),\n \"Can not transfer to the Bank address\"\n );\n\n uint256 spenderBalance = balanceOf[spender];\n require(spenderBalance >= amount, \"Transfer amount exceeds balance\");\n unchecked {\n balanceOf[spender] = spenderBalance - amount;\n }\n balanceOf[recipient] += amount;\n emit BalanceTransferred(spender, recipient, amount);\n }\n\n function _approveBalance(\n address owner,\n address spender,\n uint256 amount\n ) private {\n require(spender != address(0), \"Can not approve to the zero address\");\n allowance[owner][spender] = amount;\n emit BalanceApproved(owner, spender, amount);\n }\n\n function buildDomainSeparator() private view returns (bytes32) {\n return\n keccak256(\n abi.encode(\n keccak256(\n \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"\n ),\n keccak256(bytes(\"TBTC Bank\")),\n keccak256(bytes(\"1\")),\n block.chainid,\n address(this)\n )\n );\n }\n}\n"
|
|
5
|
+
"content": "// SPDX-License-Identifier: MIT\n\n// ██████████████ ▐████▌ ██████████████\n// ██████████████ ▐████▌ ██████████████\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ██████████████ ▐████▌ ██████████████\n// ██████████████ ▐████▌ ██████████████\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\nimport \"./IReceiveBalanceApproval.sol\";\nimport \"../vault/IVault.sol\";\n\n/// @title Bitcoin Bank\n/// @notice Bank is a central component tracking Bitcoin balances. Balances can\n/// be transferred between holders and holders can approve their\n/// balances to be spent by others. Balances in the Bank are updated for\n/// depositors who deposit their Bitcoin into the Bridge and only the\n/// Bridge can increase balances.\n/// @dev Bank is a governable contract and the Governance can upgrade the Bridge\n/// address.\ncontract Bank is Ownable {\n address public bridge;\n\n /// @notice The balance of a given account in the Bank. Zero by default.\n mapping(address => uint256) public balanceOf;\n\n /// @notice The remaining amount of balance a spender will be\n /// allowed to transfer on behalf of an owner using\n /// `transferBalanceFrom`. Zero by default.\n mapping(address => mapping(address => uint256)) public allowance;\n\n /// @notice Returns the current nonce for EIP2612 permission for the\n /// provided balance owner for a replay protection. Used to\n /// construct EIP2612 signature provided to `permit` function.\n mapping(address => uint256) public nonce;\n\n uint256 public immutable cachedChainId;\n bytes32 public immutable cachedDomainSeparator;\n\n /// @notice Returns EIP2612 Permit message hash. Used to construct EIP2612\n /// signature provided to `permit` function.\n bytes32 public constant PERMIT_TYPEHASH =\n keccak256(\n \"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\"\n );\n\n event BalanceTransferred(\n address indexed from,\n address indexed to,\n uint256 amount\n );\n\n event BalanceApproved(\n address indexed owner,\n address indexed spender,\n uint256 amount\n );\n\n event BalanceIncreased(address indexed owner, uint256 amount);\n\n event BalanceDecreased(address indexed owner, uint256 amount);\n\n event BridgeUpdated(address newBridge);\n\n modifier onlyBridge() {\n require(msg.sender == address(bridge), \"Caller is not the bridge\");\n _;\n }\n\n constructor() {\n cachedChainId = block.chainid;\n cachedDomainSeparator = buildDomainSeparator();\n }\n\n /// @notice Allows the Governance to upgrade the Bridge address.\n /// @dev The function does not implement any governance delay and does not\n /// check the status of the Bridge. The Governance implementation needs\n /// to ensure all requirements for the upgrade are satisfied before\n /// executing this function.\n function updateBridge(address _bridge) external onlyOwner {\n require(_bridge != address(0), \"Bridge address must not be 0x0\");\n bridge = _bridge;\n emit BridgeUpdated(_bridge);\n }\n\n /// @notice Moves the given `amount` of balance from the caller to\n /// `recipient`.\n /// @dev Requirements:\n /// - `recipient` cannot be the zero address,\n /// - the caller must have a balance of at least `amount`.\n function transferBalance(address recipient, uint256 amount) external {\n _transferBalance(msg.sender, recipient, amount);\n }\n\n /// @notice Sets `amount` as the allowance of `spender` over the caller's\n /// balance.\n /// @dev If the `amount` is set to `type(uint256).max` then\n /// `transferBalanceFrom` will not reduce an allowance.\n /// Beware that changing an allowance with this function brings the\n /// risk that someone may use both the old and the new allowance by\n /// unfortunate transaction ordering. Please use\n /// `increaseBalanceAllowance` and `decreaseBalanceAllowance` to\n /// eliminate the risk.\n function approveBalance(address spender, uint256 amount) external {\n _approveBalance(msg.sender, spender, amount);\n }\n\n /// @notice Sets the `amount` as an allowance of a smart contract `spender`\n /// over the caller's balance and calls the `spender` via\n /// `receiveBalanceApproval`.\n /// @dev If the `amount` is set to `type(uint256).max`, the potential\n /// `transferBalanceFrom` executed in `receiveBalanceApproval` of\n /// `spender` will not reduce an allowance. Beware that changing an\n /// allowance with this function brings the risk that `spender` may use\n /// both the old and the new allowance by unfortunate transaction\n /// ordering. Please use `increaseBalanceAllowance` and\n /// `decreaseBalanceAllowance` to eliminate the risk.\n function approveBalanceAndCall(address spender, uint256 amount) external {\n _approveBalance(msg.sender, spender, amount);\n IReceiveBalanceApproval(spender).receiveBalanceApproval(\n msg.sender,\n amount\n );\n }\n\n /// @notice Atomically increases the balance allowance granted to `spender`\n /// by the caller by the given `addedValue`.\n function increaseBalanceAllowance(address spender, uint256 addedValue)\n external\n {\n _approveBalance(\n msg.sender,\n spender,\n allowance[msg.sender][spender] + addedValue\n );\n }\n\n /// @notice Atomically decreases the balance allowance granted to `spender`\n /// by the caller by the given `subtractedValue`.\n function decreaseBalanceAllowance(address spender, uint256 subtractedValue)\n external\n {\n uint256 currentAllowance = allowance[msg.sender][spender];\n require(\n currentAllowance >= subtractedValue,\n \"Can not decrease balance allowance below zero\"\n );\n unchecked {\n _approveBalance(\n msg.sender,\n spender,\n currentAllowance - subtractedValue\n );\n }\n }\n\n /// @notice Moves `amount` of balance from `spender` to `recipient` using the\n /// allowance mechanism. `amount` is then deducted from the caller's\n /// allowance unless the allowance was made for `type(uint256).max`.\n /// @dev Requirements:\n /// - `recipient` cannot be the zero address,\n /// - `spender` must have a balance of at least `amount`,\n /// - the caller must have allowance for `spender`'s balance of at\n /// least `amount`.\n function transferBalanceFrom(\n address spender,\n address recipient,\n uint256 amount\n ) external {\n uint256 currentAllowance = allowance[spender][msg.sender];\n if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"Transfer amount exceeds allowance\"\n );\n unchecked {\n _approveBalance(spender, msg.sender, currentAllowance - amount);\n }\n }\n _transferBalance(spender, recipient, amount);\n }\n\n /// @notice EIP2612 approval made with secp256k1 signature.\n /// Users can authorize a transfer of their balance with a signature\n /// conforming EIP712 standard, rather than an on-chain transaction\n /// from their address. Anyone can submit this signature on the\n /// user's behalf by calling the permit function, paying gas fees,\n /// and possibly performing other actions in the same transaction.\n /// @dev The deadline argument can be set to `type(uint256).max to create\n /// permits that effectively never expire. If the `amount` is set\n /// to `type(uint256).max` then `transferBalanceFrom` will not\n /// reduce an allowance. Beware that changing an allowance with this\n /// function brings the risk that someone may use both the old and the\n /// new allowance by unfortunate transaction ordering. Please use\n /// `increaseBalanceAllowance` and `decreaseBalanceAllowance` to\n /// eliminate the risk.\n function permit(\n address owner,\n address spender,\n uint256 amount,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external {\n /* solhint-disable-next-line not-rely-on-time */\n require(deadline >= block.timestamp, \"Permission expired\");\n\n // Validate `s` and `v` values for a malleability concern described in EIP2.\n // Only signatures with `s` value in the lower half of the secp256k1\n // curve's order and `v` value of 27 or 28 are considered valid.\n require(\n uint256(s) <=\n 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0,\n \"Invalid signature 's' value\"\n );\n require(v == 27 || v == 28, \"Invalid signature 'v' value\");\n\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n DOMAIN_SEPARATOR(),\n keccak256(\n abi.encode(\n PERMIT_TYPEHASH,\n owner,\n spender,\n amount,\n nonce[owner]++,\n deadline\n )\n )\n )\n );\n address recoveredAddress = ecrecover(digest, v, r, s);\n require(\n recoveredAddress != address(0) && recoveredAddress == owner,\n \"Invalid signature\"\n );\n _approveBalance(owner, spender, amount);\n }\n\n /// @notice Increases balances of the provided `recipients` by the provided\n /// `amounts`. Can only be called by the Bridge.\n /// @dev Requirements:\n /// - length of `recipients` and `amounts` must be the same.\n function increaseBalances(\n address[] calldata recipients,\n uint256[] calldata amounts\n ) external onlyBridge {\n require(\n recipients.length == amounts.length,\n \"Arrays must have the same length\"\n );\n for (uint256 i = 0; i < recipients.length; i++) {\n _increaseBalance(recipients[i], amounts[i]);\n }\n }\n\n /// @notice Increases balance of the provided `recipient` by the provided\n /// `amount`. Can only be called by the Bridge.\n function increaseBalance(address recipient, uint256 amount)\n external\n onlyBridge\n {\n _increaseBalance(recipient, amount);\n }\n\n /// @notice Increases the given smart contract `vault`'s balance and\n /// notifies the `vault` contract. Called by the Bridge after\n /// the deposits routed by depositors to that `vault` have been\n /// swept by the Bridge. This way, the depositor does not have to\n /// issue a separate transaction to the `vault` contract.\n /// Can be called only by the Bridge.\n /// @dev Requirements:\n /// - `vault` must implement `IVault` interface,\n /// - length of `depositors` and `depositedAmounts` must be the same.\n /// @param vault Address of `IVault` recipient contract.\n /// @param depositors Addresses of depositors whose deposits have been swept.\n /// @param depositedAmounts Amounts deposited by individual depositors and\n /// swept. The `vault`'s balance in the Bank will be increased by the\n /// sum of all elements in this array.\n function increaseBalanceAndCall(\n address vault,\n address[] calldata depositors,\n uint256[] calldata depositedAmounts\n ) external onlyBridge {\n require(\n depositors.length == depositedAmounts.length,\n \"Arrays must have the same length\"\n );\n uint256 totalAmount = 0;\n for (uint256 i = 0; i < depositedAmounts.length; i++) {\n totalAmount += depositedAmounts[i];\n }\n _increaseBalance(vault, totalAmount);\n IVault(vault).receiveBalanceIncrease(depositors, depositedAmounts);\n }\n\n /// @notice Decreases caller's balance by the provided `amount`. There is no\n /// way to restore the balance so do not call this function unless\n /// you really know what you are doing!\n function decreaseBalance(uint256 amount) external {\n balanceOf[msg.sender] -= amount;\n emit BalanceDecreased(msg.sender, amount);\n }\n\n /// @notice Returns hash of EIP712 Domain struct with `TBTC Bank` as\n /// a signing domain and Bank contract as a verifying contract.\n /// Used to construct EIP2612 signature provided to `permit`\n /// function.\n /* solhint-disable-next-line func-name-mixedcase */\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\n // As explained in EIP-2612, if the DOMAIN_SEPARATOR contains the\n // chainId and is defined at contract deployment instead of\n // reconstructed for every signature, there is a risk of possible replay\n // attacks between chains in the event of a future chain split.\n // To address this issue, we check the cached chain ID against the\n // current one and in case they are different, we build domain separator\n // from scratch.\n if (block.chainid == cachedChainId) {\n return cachedDomainSeparator;\n } else {\n return buildDomainSeparator();\n }\n }\n\n function _increaseBalance(address recipient, uint256 amount) internal {\n require(\n recipient != address(this),\n \"Can not increase balance for Bank\"\n );\n balanceOf[recipient] += amount;\n emit BalanceIncreased(recipient, amount);\n }\n\n function _transferBalance(\n address spender,\n address recipient,\n uint256 amount\n ) private {\n require(\n recipient != address(0),\n \"Can not transfer to the zero address\"\n );\n require(\n recipient != address(this),\n \"Can not transfer to the Bank address\"\n );\n\n uint256 spenderBalance = balanceOf[spender];\n require(spenderBalance >= amount, \"Transfer amount exceeds balance\");\n unchecked {\n balanceOf[spender] = spenderBalance - amount;\n }\n balanceOf[recipient] += amount;\n emit BalanceTransferred(spender, recipient, amount);\n }\n\n function _approveBalance(\n address owner,\n address spender,\n uint256 amount\n ) private {\n require(spender != address(0), \"Can not approve to the zero address\");\n allowance[owner][spender] = amount;\n emit BalanceApproved(owner, spender, amount);\n }\n\n function buildDomainSeparator() private view returns (bytes32) {\n return\n keccak256(\n abi.encode(\n keccak256(\n \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"\n ),\n keccak256(bytes(\"TBTC Bank\")),\n keccak256(bytes(\"1\")),\n block.chainid,\n address(this)\n )\n );\n }\n}\n"
|
|
6
6
|
},
|
|
7
7
|
"@openzeppelin/contracts/access/Ownable.sol": {
|
|
8
8
|
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n"
|
|
9
9
|
},
|
|
10
|
+
"contracts/bank/IReceiveBalanceApproval.sol": {
|
|
11
|
+
"content": "// SPDX-License-Identifier: MIT\n\n// ██████████████ ▐████▌ ██████████████\n// ██████████████ ▐████▌ ██████████████\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ██████████████ ▐████▌ ██████████████\n// ██████████████ ▐████▌ ██████████████\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n\npragma solidity ^0.8.9;\n\n/// @title IReceiveBalanceApproval\n/// @notice `IReceiveBalanceApproval` is an interface for a smart contract\n/// consuming Bank balances approved to them in the same transaction by\n/// other contracts or externally owned accounts (EOA).\ninterface IReceiveBalanceApproval {\n /// @notice Called by the Bank in `approveBalanceAndCall` function after\n /// the balance `owner` approved `amount` of their balance in the\n /// Bank for the contract. This way, the depositor can approve\n /// balance and call the contract to use the approved balance in\n /// a single transaction.\n /// @param owner Address of the Bank balance owner who approved their\n /// balance to be used by the contract.\n /// @param amount The amount of the Bank balance approved by the owner\n /// to be used by the contract.\n // @dev The implementation must ensure this function can only be called\n /// by the Bank. The Bank does _not_ guarantee that the `amount`\n /// approved by the `owner` currently exists on their balance. That is,\n /// the `owner` could approve more balance than they currently have.\n /// This works the same as `Bank.approve` function. The contract must\n /// ensure the actual balance is checked before performing any action\n /// based on it.\n function receiveBalanceApproval(address owner, uint256 amount) external;\n}\n"
|
|
12
|
+
},
|
|
10
13
|
"contracts/vault/IVault.sol": {
|
|
11
|
-
"content": "// SPDX-License-Identifier: MIT\n\n// ██████████████ ▐████▌ ██████████████\n// ██████████████ ▐████▌ ██████████████\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ██████████████ ▐████▌ ██████████████\n// ██████████████ ▐████▌ ██████████████\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n\npragma solidity ^0.8.9;\n\n/// @title Bank Vault interface\n/// @notice `IVault` is an interface for a smart contract consuming Bank\n/// balances of other contracts or externally owned accounts (EOA).\ninterface IVault
|
|
14
|
+
"content": "// SPDX-License-Identifier: MIT\n\n// ██████████████ ▐████▌ ██████████████\n// ██████████████ ▐████▌ ██████████████\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ██████████████ ▐████▌ ██████████████\n// ██████████████ ▐████▌ ██████████████\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n// ▐████▌ ▐████▌\n\npragma solidity ^0.8.9;\n\nimport \"../bank/IReceiveBalanceApproval.sol\";\n\n/// @title Bank Vault interface\n/// @notice `IVault` is an interface for a smart contract consuming Bank\n/// balances of other contracts or externally owned accounts (EOA).\ninterface IVault is IReceiveBalanceApproval {\n /// @notice Called by the Bank in `increaseBalanceAndCall` function after\n /// increasing the balance in the Bank for the vault. It happens in\n /// the same transaction in which deposits were swept by the Bridge.\n /// This allows the depositor to route their deposit revealed to the\n /// Bridge to the particular smart contract (vault) in the same\n /// transaction in which the deposit is revealed. This way, the\n /// depositor does not have to execute additional transaction after\n /// the deposit gets swept by the Bridge to approve and transfer\n /// their balance to the vault.\n /// @param depositors Addresses of depositors whose deposits have been swept.\n /// @param depositedAmounts Amounts deposited by individual depositors and\n /// swept.\n /// @dev The implementation must ensure this function can only be called\n /// by the Bank. The Bank guarantees that the vault's balance was\n /// increased by the sum of all deposited amounts before this function\n /// is called, in the same transaction.\n function receiveBalanceIncrease(\n address[] calldata depositors,\n uint256[] calldata depositedAmounts\n ) external;\n}\n"
|
|
12
15
|
},
|
|
13
16
|
"@openzeppelin/contracts/utils/Context.sol": {
|
|
14
17
|
"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"
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
"inputs": [
|
|
201
201
|
{
|
|
202
202
|
"internalType": "address",
|
|
203
|
-
"name": "
|
|
203
|
+
"name": "spender",
|
|
204
204
|
"type": "address"
|
|
205
205
|
},
|
|
206
206
|
{
|
|
@@ -530,8 +530,8 @@
|
|
|
530
530
|
"type": "function"
|
|
531
531
|
}
|
|
532
532
|
],
|
|
533
|
-
"bytecode": "0x60c060405234801561001057600080fd5b5061001a336100f9565b466080526100f16040805180820182526009815268544254432042616e6b60b81b6020918201528151808301835260018152603160f81b9082015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527fa1cc9cffb2f2444066e5c95caef7925ee7ef97efc6002db29d3637e98e2f0dd2818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c0909101909252815191012090565b60a052610149565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60805160a0516117ec61017c6000396000818161032d01526106410152600081816102ce015261061801526117ec6000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c806370a08231116100e3578063b4f94b2e1161008c578063dd62ed3e11610066578063dd62ed3e14610375578063e78cea92146103a0578063f2fde38b146103b357600080fd5b8063b4f94b2e14610328578063bb7e61bc1461034f578063d505accf1461036257600080fd5b8063771da5c5116100bd578063771da5c5146102c95780637c6db49c146102f05780638da5cb5b1461030357600080fd5b806370a082311461028157806370ae92d2146102a1578063715018a6146102c157600080fd5b8063392aee43116101455780635b86f5991161011f5780635b86f599146102485780635bfd99b91461025b5780636eb382121461026e57600080fd5b8063392aee431461020f57806346b05e091461022257806356a6d9ef1461023557600080fd5b8063266a123a11610176578063266a123a146101ba57806330adf81f146101cd5780633644e5151461020757600080fd5b80630b6d324c1461019257806315b9b92a146101a7575b600080fd5b6101a56101a0366004611425565b6103c6565b005b6101a56101b5366004611425565b610477565b6101a56101c836600461149b565b6104ff565b6101f47f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b6040519081526020015b60405180910390f35b6101f4610614565b6101a561021d366004611507565b610764565b6101a5610230366004611425565b6107c0565b6101a5610243366004611425565b6107cf565b6101a5610256366004611425565b6107da565b6101a5610269366004611425565b61083e565b6101a561027c366004611520565b610879565b6101f461028f366004611520565b60026020526000908152604090205481565b6101f46102af366004611520565b60046020526000908152604090205481565b6101a561098a565b6101f47f000000000000000000000000000000000000000000000000000000000000000081565b6101a56102fe366004611542565b6109f0565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101fe565b6101f47f000000000000000000000000000000000000000000000000000000000000000081565b6101a561035d36600461157e565b610ab1565b6101a56103703660046115ff565b610c2e565b6101f4610383366004611672565b600360209081526000928352604080842090915290825290205481565b600154610310906001600160a01b031681565b6101a56103c1366004611520565b610f3e565b3360009081526003602090815260408083206001600160a01b0386168452909152902054818110156104655760405162461bcd60e51b815260206004820152602d60248201527f43616e206e6f742064656372656173652062616c616e636520616c6c6f77616e60448201527f63652062656c6f77207a65726f0000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104723384848403611020565b505050565b610482338383611020565b6040517f53794137000000000000000000000000000000000000000000000000000000008152336004820152602481018290526001600160a01b03831690635379413790604401600060405180830381600087803b1580156104e357600080fd5b505af11580156104f7573d6000803e3d6000fd5b505050505050565b6001546001600160a01b031633146105595760405162461bcd60e51b815260206004820152601860248201527f43616c6c6572206973206e6f7420746865206272696467650000000000000000604482015260640161045c565b8281146105a85760405162461bcd60e51b815260206004820181905260248201527f417272617973206d7573742068617665207468652073616d65206c656e677468604482015260640161045c565b60005b8381101561060d576105fb8585838181106105c8576105c86116a5565b90506020020160208101906105dd9190611520565b8484848181106105ef576105ef6116a5565b905060200201356110fd565b80610605816116d1565b9150506105ab565b5050505050565b60007f000000000000000000000000000000000000000000000000000000000000000046141561066357507f000000000000000000000000000000000000000000000000000000000000000090565b50604080518082018252600981527f544254432042616e6b000000000000000000000000000000000000000000000060209182015281518083018352600181527f31000000000000000000000000000000000000000000000000000000000000009082015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527fa1cc9cffb2f2444066e5c95caef7925ee7ef97efc6002db29d3637e98e2f0dd2818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c0909101909252815191012090565b33600090815260026020526040812080548392906107839084906116ec565b909155505060405181815233907f9c6be7c4260e52ea2e41d7f17932147ab78756f1bb2247a2554796d969741aff9060200160405180910390a250565b6107cb338383611020565b5050565b6107cb3383836111eb565b6001546001600160a01b031633146108345760405162461bcd60e51b815260206004820152601860248201527f43616c6c6572206973206e6f7420746865206272696467650000000000000000604482015260640161045c565b6107cb82826110fd565b3360008181526003602090815260408083206001600160a01b03871684529091529020546107cb91908490610874908590611703565b611020565b6000546001600160a01b031633146108d35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045c565b6001600160a01b0381166109295760405162461bcd60e51b815260206004820152601e60248201527f4272696467652061646472657373206d757374206e6f74206265203078300000604482015260640161045c565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527fe1694c0b21fdceff6411daed547c7463c2341b9695387bc82595b5b9b1851d4a9060200160405180910390a150565b6000546001600160a01b031633146109e45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045c565b6109ee60006113ac565b565b6001600160a01b03831660009081526003602090815260408083203384529091529020546000198114610aa05781811015610a935760405162461bcd60e51b815260206004820152602160248201527f5472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6360448201527f6500000000000000000000000000000000000000000000000000000000000000606482015260840161045c565b610aa08433848403611020565b610aab8484846111eb565b50505050565b6001546001600160a01b03163314610b0b5760405162461bcd60e51b815260206004820152601860248201527f43616c6c6572206973206e6f7420746865206272696467650000000000000000604482015260640161045c565b828114610b5a5760405162461bcd60e51b815260206004820181905260248201527f417272617973206d7573742068617665207468652073616d65206c656e677468604482015260640161045c565b6000805b82811015610b9e57838382818110610b7857610b786116a5565b9050602002013582610b8a9190611703565b915080610b96816116d1565b915050610b5e565b50610ba986826110fd565b6040517f461c63730000000000000000000000000000000000000000000000000000000081526001600160a01b0387169063461c637390610bf490889088908890889060040161171b565b600060405180830381600087803b158015610c0e57600080fd5b505af1158015610c22573d6000803e3d6000fd5b50505050505050505050565b42841015610c7e5760405162461bcd60e51b815260206004820152601260248201527f5065726d697373696f6e20657870697265640000000000000000000000000000604482015260640161045c565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0811115610cee5760405162461bcd60e51b815260206004820152601b60248201527f496e76616c6964207369676e6174757265202773272076616c75650000000000604482015260640161045c565b8260ff16601b1480610d0357508260ff16601c145b610d4f5760405162461bcd60e51b815260206004820152601b60248201527f496e76616c6964207369676e6174757265202776272076616c75650000000000604482015260640161045c565b6000610d59610614565b6001600160a01b038916600090815260046020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928c928c928c92909190610da7836116d1565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e00160405160208183030381529060405280519060200120604051602001610e3b9291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015610ea6573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590610edc5750886001600160a01b0316816001600160a01b0316145b610f285760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e6174757265000000000000000000000000000000604482015260640161045c565b610f33898989611020565b505050505050505050565b6000546001600160a01b03163314610f985760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045c565b6001600160a01b0381166110145760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161045c565b61101d816113ac565b50565b6001600160a01b03821661109c5760405162461bcd60e51b815260206004820152602360248201527f43616e206e6f7420617070726f766520746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161045c565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f2fe5e8e7796010737e636f63b35a0383dc160b68483984f2df987c78e842b405910160405180910390a3505050565b6001600160a01b03821630141561117c5760405162461bcd60e51b815260206004820152602160248201527f43616e206e6f7420696e6372656173652062616c616e636520666f722042616e60448201527f6b00000000000000000000000000000000000000000000000000000000000000606482015260840161045c565b6001600160a01b038216600090815260026020526040812080548392906111a4908490611703565b90915550506040518181526001600160a01b038316907f7a702e80a9c183a6ce9d6732991df2e914555ba35a364a70aed2433984e7544b9060200160405180910390a25050565b6001600160a01b03821661124d5760405162461bcd60e51b8152602060048201526024808201527f43616e206e6f74207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161045c565b6001600160a01b0382163014156112b25760405162461bcd60e51b8152602060048201526024808201527f43616e206e6f74207472616e7366657220746f207468652042616e6b206164646044820152637265737360e01b606482015260840161045c565b6001600160a01b0383166000908152600260205260409020548181101561131b5760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657220616d6f756e7420657863656564732062616c616e636500604482015260640161045c565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290611352908490611703565b92505081905550826001600160a01b0316846001600160a01b03167f4163d0b06696468b3d7903f482bcd0097bd38a9a9086157479fd6c6561d242618460405161139e91815260200190565b60405180910390a350505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461142057600080fd5b919050565b6000806040838503121561143857600080fd5b61144183611409565b946020939093013593505050565b60008083601f84011261146157600080fd5b50813567ffffffffffffffff81111561147957600080fd5b6020830191508360208260051b850101111561149457600080fd5b9250929050565b600080600080604085870312156114b157600080fd5b843567ffffffffffffffff808211156114c957600080fd5b6114d58883890161144f565b909650945060208701359150808211156114ee57600080fd5b506114fb8782880161144f565b95989497509550505050565b60006020828403121561151957600080fd5b5035919050565b60006020828403121561153257600080fd5b61153b82611409565b9392505050565b60008060006060848603121561155757600080fd5b61156084611409565b925061156e60208501611409565b9150604084013590509250925092565b60008060008060006060868803121561159657600080fd5b61159f86611409565b9450602086013567ffffffffffffffff808211156115bc57600080fd5b6115c889838a0161144f565b909650945060408801359150808211156115e157600080fd5b506115ee8882890161144f565b969995985093965092949392505050565b600080600080600080600060e0888a03121561161a57600080fd5b61162388611409565b965061163160208901611409565b95506040880135945060608801359350608088013560ff8116811461165557600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561168557600080fd5b61168e83611409565b915061169c60208401611409565b90509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156116e5576116e56116bb565b5060010190565b6000828210156116fe576116fe6116bb565b500390565b60008219821115611716576117166116bb565b500190565b6040808252810184905260008560608301825b8781101561175c576001600160a01b0361174784611409565b1682526020928301929091019060010161172e565b5083810360208501528481527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85111561179557600080fd5b8460051b91508186602083013760009101602001908152969550505050505056fea264697066735822122042486b8dc4e0ccfec6069d5874ee095de93786a7f5d8affc02f71b86beda69fc64736f6c63430008090033",
|
|
534
|
-
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061018d5760003560e01c806370a08231116100e3578063b4f94b2e1161008c578063dd62ed3e11610066578063dd62ed3e14610375578063e78cea92146103a0578063f2fde38b146103b357600080fd5b8063b4f94b2e14610328578063bb7e61bc1461034f578063d505accf1461036257600080fd5b8063771da5c5116100bd578063771da5c5146102c95780637c6db49c146102f05780638da5cb5b1461030357600080fd5b806370a082311461028157806370ae92d2146102a1578063715018a6146102c157600080fd5b8063392aee43116101455780635b86f5991161011f5780635b86f599146102485780635bfd99b91461025b5780636eb382121461026e57600080fd5b8063392aee431461020f57806346b05e091461022257806356a6d9ef1461023557600080fd5b8063266a123a11610176578063266a123a146101ba57806330adf81f146101cd5780633644e5151461020757600080fd5b80630b6d324c1461019257806315b9b92a146101a7575b600080fd5b6101a56101a0366004611425565b6103c6565b005b6101a56101b5366004611425565b610477565b6101a56101c836600461149b565b6104ff565b6101f47f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b6040519081526020015b60405180910390f35b6101f4610614565b6101a561021d366004611507565b610764565b6101a5610230366004611425565b6107c0565b6101a5610243366004611425565b6107cf565b6101a5610256366004611425565b6107da565b6101a5610269366004611425565b61083e565b6101a561027c366004611520565b610879565b6101f461028f366004611520565b60026020526000908152604090205481565b6101f46102af366004611520565b60046020526000908152604090205481565b6101a561098a565b6101f47f000000000000000000000000000000000000000000000000000000000000000081565b6101a56102fe366004611542565b6109f0565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101fe565b6101f47f000000000000000000000000000000000000000000000000000000000000000081565b6101a561035d36600461157e565b610ab1565b6101a56103703660046115ff565b610c2e565b6101f4610383366004611672565b600360209081526000928352604080842090915290825290205481565b600154610310906001600160a01b031681565b6101a56103c1366004611520565b610f3e565b3360009081526003602090815260408083206001600160a01b0386168452909152902054818110156104655760405162461bcd60e51b815260206004820152602d60248201527f43616e206e6f742064656372656173652062616c616e636520616c6c6f77616e60448201527f63652062656c6f77207a65726f0000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104723384848403611020565b505050565b610482338383611020565b6040517f53794137000000000000000000000000000000000000000000000000000000008152336004820152602481018290526001600160a01b03831690635379413790604401600060405180830381600087803b1580156104e357600080fd5b505af11580156104f7573d6000803e3d6000fd5b505050505050565b6001546001600160a01b031633146105595760405162461bcd60e51b815260206004820152601860248201527f43616c6c6572206973206e6f7420746865206272696467650000000000000000604482015260640161045c565b8281146105a85760405162461bcd60e51b815260206004820181905260248201527f417272617973206d7573742068617665207468652073616d65206c656e677468604482015260640161045c565b60005b8381101561060d576105fb8585838181106105c8576105c86116a5565b90506020020160208101906105dd9190611520565b8484848181106105ef576105ef6116a5565b905060200201356110fd565b80610605816116d1565b9150506105ab565b5050505050565b60007f000000000000000000000000000000000000000000000000000000000000000046141561066357507f000000000000000000000000000000000000000000000000000000000000000090565b50604080518082018252600981527f544254432042616e6b000000000000000000000000000000000000000000000060209182015281518083018352600181527f31000000000000000000000000000000000000000000000000000000000000009082015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527fa1cc9cffb2f2444066e5c95caef7925ee7ef97efc6002db29d3637e98e2f0dd2818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c0909101909252815191012090565b33600090815260026020526040812080548392906107839084906116ec565b909155505060405181815233907f9c6be7c4260e52ea2e41d7f17932147ab78756f1bb2247a2554796d969741aff9060200160405180910390a250565b6107cb338383611020565b5050565b6107cb3383836111eb565b6001546001600160a01b031633146108345760405162461bcd60e51b815260206004820152601860248201527f43616c6c6572206973206e6f7420746865206272696467650000000000000000604482015260640161045c565b6107cb82826110fd565b3360008181526003602090815260408083206001600160a01b03871684529091529020546107cb91908490610874908590611703565b611020565b6000546001600160a01b031633146108d35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045c565b6001600160a01b0381166109295760405162461bcd60e51b815260206004820152601e60248201527f4272696467652061646472657373206d757374206e6f74206265203078300000604482015260640161045c565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527fe1694c0b21fdceff6411daed547c7463c2341b9695387bc82595b5b9b1851d4a9060200160405180910390a150565b6000546001600160a01b031633146109e45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045c565b6109ee60006113ac565b565b6001600160a01b03831660009081526003602090815260408083203384529091529020546000198114610aa05781811015610a935760405162461bcd60e51b815260206004820152602160248201527f5472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6360448201527f6500000000000000000000000000000000000000000000000000000000000000606482015260840161045c565b610aa08433848403611020565b610aab8484846111eb565b50505050565b6001546001600160a01b03163314610b0b5760405162461bcd60e51b815260206004820152601860248201527f43616c6c6572206973206e6f7420746865206272696467650000000000000000604482015260640161045c565b828114610b5a5760405162461bcd60e51b815260206004820181905260248201527f417272617973206d7573742068617665207468652073616d65206c656e677468604482015260640161045c565b6000805b82811015610b9e57838382818110610b7857610b786116a5565b9050602002013582610b8a9190611703565b915080610b96816116d1565b915050610b5e565b50610ba986826110fd565b6040517f461c63730000000000000000000000000000000000000000000000000000000081526001600160a01b0387169063461c637390610bf490889088908890889060040161171b565b600060405180830381600087803b158015610c0e57600080fd5b505af1158015610c22573d6000803e3d6000fd5b50505050505050505050565b42841015610c7e5760405162461bcd60e51b815260206004820152601260248201527f5065726d697373696f6e20657870697265640000000000000000000000000000604482015260640161045c565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0811115610cee5760405162461bcd60e51b815260206004820152601b60248201527f496e76616c6964207369676e6174757265202773272076616c75650000000000604482015260640161045c565b8260ff16601b1480610d0357508260ff16601c145b610d4f5760405162461bcd60e51b815260206004820152601b60248201527f496e76616c6964207369676e6174757265202776272076616c75650000000000604482015260640161045c565b6000610d59610614565b6001600160a01b038916600090815260046020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928c928c928c92909190610da7836116d1565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e00160405160208183030381529060405280519060200120604051602001610e3b9291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015610ea6573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590610edc5750886001600160a01b0316816001600160a01b0316145b610f285760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e6174757265000000000000000000000000000000604482015260640161045c565b610f33898989611020565b505050505050505050565b6000546001600160a01b03163314610f985760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045c565b6001600160a01b0381166110145760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161045c565b61101d816113ac565b50565b6001600160a01b03821661109c5760405162461bcd60e51b815260206004820152602360248201527f43616e206e6f7420617070726f766520746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161045c565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f2fe5e8e7796010737e636f63b35a0383dc160b68483984f2df987c78e842b405910160405180910390a3505050565b6001600160a01b03821630141561117c5760405162461bcd60e51b815260206004820152602160248201527f43616e206e6f7420696e6372656173652062616c616e636520666f722042616e60448201527f6b00000000000000000000000000000000000000000000000000000000000000606482015260840161045c565b6001600160a01b038216600090815260026020526040812080548392906111a4908490611703565b90915550506040518181526001600160a01b038316907f7a702e80a9c183a6ce9d6732991df2e914555ba35a364a70aed2433984e7544b9060200160405180910390a25050565b6001600160a01b03821661124d5760405162461bcd60e51b8152602060048201526024808201527f43616e206e6f74207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161045c565b6001600160a01b0382163014156112b25760405162461bcd60e51b8152602060048201526024808201527f43616e206e6f74207472616e7366657220746f207468652042616e6b206164646044820152637265737360e01b606482015260840161045c565b6001600160a01b0383166000908152600260205260409020548181101561131b5760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657220616d6f756e7420657863656564732062616c616e636500604482015260640161045c565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290611352908490611703565b92505081905550826001600160a01b0316846001600160a01b03167f4163d0b06696468b3d7903f482bcd0097bd38a9a9086157479fd6c6561d242618460405161139e91815260200190565b60405180910390a350505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461142057600080fd5b919050565b6000806040838503121561143857600080fd5b61144183611409565b946020939093013593505050565b60008083601f84011261146157600080fd5b50813567ffffffffffffffff81111561147957600080fd5b6020830191508360208260051b850101111561149457600080fd5b9250929050565b600080600080604085870312156114b157600080fd5b843567ffffffffffffffff808211156114c957600080fd5b6114d58883890161144f565b909650945060208701359150808211156114ee57600080fd5b506114fb8782880161144f565b95989497509550505050565b60006020828403121561151957600080fd5b5035919050565b60006020828403121561153257600080fd5b61153b82611409565b9392505050565b60008060006060848603121561155757600080fd5b61156084611409565b925061156e60208501611409565b9150604084013590509250925092565b60008060008060006060868803121561159657600080fd5b61159f86611409565b9450602086013567ffffffffffffffff808211156115bc57600080fd5b6115c889838a0161144f565b909650945060408801359150808211156115e157600080fd5b506115ee8882890161144f565b969995985093965092949392505050565b600080600080600080600060e0888a03121561161a57600080fd5b61162388611409565b965061163160208901611409565b95506040880135945060608801359350608088013560ff8116811461165557600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561168557600080fd5b61168e83611409565b915061169c60208401611409565b90509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156116e5576116e56116bb565b5060010190565b6000828210156116fe576116fe6116bb565b500390565b60008219821115611716576117166116bb565b500190565b6040808252810184905260008560608301825b8781101561175c576001600160a01b0361174784611409565b1682526020928301929091019060010161172e565b5083810360208501528481527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85111561179557600080fd5b8460051b91508186602083013760009101602001908152969550505050505056fea264697066735822122042486b8dc4e0ccfec6069d5874ee095de93786a7f5d8affc02f71b86beda69fc64736f6c63430008090033",
|
|
533
|
+
"bytecode": "0x60c060405234801561001057600080fd5b5061001a336100f9565b466080526100f16040805180820182526009815268544254432042616e6b60b81b6020918201528151808301835260018152603160f81b9082015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527fa1cc9cffb2f2444066e5c95caef7925ee7ef97efc6002db29d3637e98e2f0dd2818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c0909101909252815191012090565b60a052610149565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60805160a0516117ec61017c6000396000818161032d01526106410152600081816102ce015261061801526117ec6000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c806370a08231116100e3578063b4f94b2e1161008c578063dd62ed3e11610066578063dd62ed3e14610375578063e78cea92146103a0578063f2fde38b146103b357600080fd5b8063b4f94b2e14610328578063bb7e61bc1461034f578063d505accf1461036257600080fd5b8063771da5c5116100bd578063771da5c5146102c95780637c6db49c146102f05780638da5cb5b1461030357600080fd5b806370a082311461028157806370ae92d2146102a1578063715018a6146102c157600080fd5b8063392aee43116101455780635b86f5991161011f5780635b86f599146102485780635bfd99b91461025b5780636eb382121461026e57600080fd5b8063392aee431461020f57806346b05e091461022257806356a6d9ef1461023557600080fd5b8063266a123a11610176578063266a123a146101ba57806330adf81f146101cd5780633644e5151461020757600080fd5b80630b6d324c1461019257806315b9b92a146101a7575b600080fd5b6101a56101a0366004611425565b6103c6565b005b6101a56101b5366004611425565b610477565b6101a56101c836600461149b565b6104ff565b6101f47f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b6040519081526020015b60405180910390f35b6101f4610614565b6101a561021d366004611507565b610764565b6101a5610230366004611425565b6107c0565b6101a5610243366004611425565b6107cf565b6101a5610256366004611425565b6107da565b6101a5610269366004611425565b61083e565b6101a561027c366004611520565b610879565b6101f461028f366004611520565b60026020526000908152604090205481565b6101f46102af366004611520565b60046020526000908152604090205481565b6101a561098a565b6101f47f000000000000000000000000000000000000000000000000000000000000000081565b6101a56102fe366004611542565b6109f0565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101fe565b6101f47f000000000000000000000000000000000000000000000000000000000000000081565b6101a561035d36600461157e565b610ab1565b6101a56103703660046115ff565b610c2e565b6101f4610383366004611672565b600360209081526000928352604080842090915290825290205481565b600154610310906001600160a01b031681565b6101a56103c1366004611520565b610f3e565b3360009081526003602090815260408083206001600160a01b0386168452909152902054818110156104655760405162461bcd60e51b815260206004820152602d60248201527f43616e206e6f742064656372656173652062616c616e636520616c6c6f77616e60448201527f63652062656c6f77207a65726f0000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104723384848403611020565b505050565b610482338383611020565b6040517f53794137000000000000000000000000000000000000000000000000000000008152336004820152602481018290526001600160a01b03831690635379413790604401600060405180830381600087803b1580156104e357600080fd5b505af11580156104f7573d6000803e3d6000fd5b505050505050565b6001546001600160a01b031633146105595760405162461bcd60e51b815260206004820152601860248201527f43616c6c6572206973206e6f7420746865206272696467650000000000000000604482015260640161045c565b8281146105a85760405162461bcd60e51b815260206004820181905260248201527f417272617973206d7573742068617665207468652073616d65206c656e677468604482015260640161045c565b60005b8381101561060d576105fb8585838181106105c8576105c86116a5565b90506020020160208101906105dd9190611520565b8484848181106105ef576105ef6116a5565b905060200201356110fd565b80610605816116d1565b9150506105ab565b5050505050565b60007f000000000000000000000000000000000000000000000000000000000000000046141561066357507f000000000000000000000000000000000000000000000000000000000000000090565b50604080518082018252600981527f544254432042616e6b000000000000000000000000000000000000000000000060209182015281518083018352600181527f31000000000000000000000000000000000000000000000000000000000000009082015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527fa1cc9cffb2f2444066e5c95caef7925ee7ef97efc6002db29d3637e98e2f0dd2818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c0909101909252815191012090565b33600090815260026020526040812080548392906107839084906116ec565b909155505060405181815233907f9c6be7c4260e52ea2e41d7f17932147ab78756f1bb2247a2554796d969741aff9060200160405180910390a250565b6107cb338383611020565b5050565b6107cb3383836111eb565b6001546001600160a01b031633146108345760405162461bcd60e51b815260206004820152601860248201527f43616c6c6572206973206e6f7420746865206272696467650000000000000000604482015260640161045c565b6107cb82826110fd565b3360008181526003602090815260408083206001600160a01b03871684529091529020546107cb91908490610874908590611703565b611020565b6000546001600160a01b031633146108d35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045c565b6001600160a01b0381166109295760405162461bcd60e51b815260206004820152601e60248201527f4272696467652061646472657373206d757374206e6f74206265203078300000604482015260640161045c565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527fe1694c0b21fdceff6411daed547c7463c2341b9695387bc82595b5b9b1851d4a9060200160405180910390a150565b6000546001600160a01b031633146109e45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045c565b6109ee60006113ac565b565b6001600160a01b03831660009081526003602090815260408083203384529091529020546000198114610aa05781811015610a935760405162461bcd60e51b815260206004820152602160248201527f5472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6360448201527f6500000000000000000000000000000000000000000000000000000000000000606482015260840161045c565b610aa08433848403611020565b610aab8484846111eb565b50505050565b6001546001600160a01b03163314610b0b5760405162461bcd60e51b815260206004820152601860248201527f43616c6c6572206973206e6f7420746865206272696467650000000000000000604482015260640161045c565b828114610b5a5760405162461bcd60e51b815260206004820181905260248201527f417272617973206d7573742068617665207468652073616d65206c656e677468604482015260640161045c565b6000805b82811015610b9e57838382818110610b7857610b786116a5565b9050602002013582610b8a9190611703565b915080610b96816116d1565b915050610b5e565b50610ba986826110fd565b6040517f461c63730000000000000000000000000000000000000000000000000000000081526001600160a01b0387169063461c637390610bf490889088908890889060040161171b565b600060405180830381600087803b158015610c0e57600080fd5b505af1158015610c22573d6000803e3d6000fd5b50505050505050505050565b42841015610c7e5760405162461bcd60e51b815260206004820152601260248201527f5065726d697373696f6e20657870697265640000000000000000000000000000604482015260640161045c565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0811115610cee5760405162461bcd60e51b815260206004820152601b60248201527f496e76616c6964207369676e6174757265202773272076616c75650000000000604482015260640161045c565b8260ff16601b1480610d0357508260ff16601c145b610d4f5760405162461bcd60e51b815260206004820152601b60248201527f496e76616c6964207369676e6174757265202776272076616c75650000000000604482015260640161045c565b6000610d59610614565b6001600160a01b038916600090815260046020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928c928c928c92909190610da7836116d1565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e00160405160208183030381529060405280519060200120604051602001610e3b9291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015610ea6573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590610edc5750886001600160a01b0316816001600160a01b0316145b610f285760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e6174757265000000000000000000000000000000604482015260640161045c565b610f33898989611020565b505050505050505050565b6000546001600160a01b03163314610f985760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045c565b6001600160a01b0381166110145760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161045c565b61101d816113ac565b50565b6001600160a01b03821661109c5760405162461bcd60e51b815260206004820152602360248201527f43616e206e6f7420617070726f766520746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161045c565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f2fe5e8e7796010737e636f63b35a0383dc160b68483984f2df987c78e842b405910160405180910390a3505050565b6001600160a01b03821630141561117c5760405162461bcd60e51b815260206004820152602160248201527f43616e206e6f7420696e6372656173652062616c616e636520666f722042616e60448201527f6b00000000000000000000000000000000000000000000000000000000000000606482015260840161045c565b6001600160a01b038216600090815260026020526040812080548392906111a4908490611703565b90915550506040518181526001600160a01b038316907f7a702e80a9c183a6ce9d6732991df2e914555ba35a364a70aed2433984e7544b9060200160405180910390a25050565b6001600160a01b03821661124d5760405162461bcd60e51b8152602060048201526024808201527f43616e206e6f74207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161045c565b6001600160a01b0382163014156112b25760405162461bcd60e51b8152602060048201526024808201527f43616e206e6f74207472616e7366657220746f207468652042616e6b206164646044820152637265737360e01b606482015260840161045c565b6001600160a01b0383166000908152600260205260409020548181101561131b5760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657220616d6f756e7420657863656564732062616c616e636500604482015260640161045c565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290611352908490611703565b92505081905550826001600160a01b0316846001600160a01b03167f4163d0b06696468b3d7903f482bcd0097bd38a9a9086157479fd6c6561d242618460405161139e91815260200190565b60405180910390a350505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461142057600080fd5b919050565b6000806040838503121561143857600080fd5b61144183611409565b946020939093013593505050565b60008083601f84011261146157600080fd5b50813567ffffffffffffffff81111561147957600080fd5b6020830191508360208260051b850101111561149457600080fd5b9250929050565b600080600080604085870312156114b157600080fd5b843567ffffffffffffffff808211156114c957600080fd5b6114d58883890161144f565b909650945060208701359150808211156114ee57600080fd5b506114fb8782880161144f565b95989497509550505050565b60006020828403121561151957600080fd5b5035919050565b60006020828403121561153257600080fd5b61153b82611409565b9392505050565b60008060006060848603121561155757600080fd5b61156084611409565b925061156e60208501611409565b9150604084013590509250925092565b60008060008060006060868803121561159657600080fd5b61159f86611409565b9450602086013567ffffffffffffffff808211156115bc57600080fd5b6115c889838a0161144f565b909650945060408801359150808211156115e157600080fd5b506115ee8882890161144f565b969995985093965092949392505050565b600080600080600080600060e0888a03121561161a57600080fd5b61162388611409565b965061163160208901611409565b95506040880135945060608801359350608088013560ff8116811461165557600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561168557600080fd5b61168e83611409565b915061169c60208401611409565b90509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156116e5576116e56116bb565b5060010190565b6000828210156116fe576116fe6116bb565b500390565b60008219821115611716576117166116bb565b500190565b6040808252810184905260008560608301825b8781101561175c576001600160a01b0361174784611409565b1682526020928301929091019060010161172e565b5083810360208501528481527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85111561179557600080fd5b8460051b91508186602083013760009101602001908152969550505050505056fea2646970667358221220ea04d31867991c6496ad78d54697174c8c2c264c9b7b24c0daf106e9aa67afc664736f6c63430008090033",
|
|
534
|
+
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061018d5760003560e01c806370a08231116100e3578063b4f94b2e1161008c578063dd62ed3e11610066578063dd62ed3e14610375578063e78cea92146103a0578063f2fde38b146103b357600080fd5b8063b4f94b2e14610328578063bb7e61bc1461034f578063d505accf1461036257600080fd5b8063771da5c5116100bd578063771da5c5146102c95780637c6db49c146102f05780638da5cb5b1461030357600080fd5b806370a082311461028157806370ae92d2146102a1578063715018a6146102c157600080fd5b8063392aee43116101455780635b86f5991161011f5780635b86f599146102485780635bfd99b91461025b5780636eb382121461026e57600080fd5b8063392aee431461020f57806346b05e091461022257806356a6d9ef1461023557600080fd5b8063266a123a11610176578063266a123a146101ba57806330adf81f146101cd5780633644e5151461020757600080fd5b80630b6d324c1461019257806315b9b92a146101a7575b600080fd5b6101a56101a0366004611425565b6103c6565b005b6101a56101b5366004611425565b610477565b6101a56101c836600461149b565b6104ff565b6101f47f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b6040519081526020015b60405180910390f35b6101f4610614565b6101a561021d366004611507565b610764565b6101a5610230366004611425565b6107c0565b6101a5610243366004611425565b6107cf565b6101a5610256366004611425565b6107da565b6101a5610269366004611425565b61083e565b6101a561027c366004611520565b610879565b6101f461028f366004611520565b60026020526000908152604090205481565b6101f46102af366004611520565b60046020526000908152604090205481565b6101a561098a565b6101f47f000000000000000000000000000000000000000000000000000000000000000081565b6101a56102fe366004611542565b6109f0565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101fe565b6101f47f000000000000000000000000000000000000000000000000000000000000000081565b6101a561035d36600461157e565b610ab1565b6101a56103703660046115ff565b610c2e565b6101f4610383366004611672565b600360209081526000928352604080842090915290825290205481565b600154610310906001600160a01b031681565b6101a56103c1366004611520565b610f3e565b3360009081526003602090815260408083206001600160a01b0386168452909152902054818110156104655760405162461bcd60e51b815260206004820152602d60248201527f43616e206e6f742064656372656173652062616c616e636520616c6c6f77616e60448201527f63652062656c6f77207a65726f0000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104723384848403611020565b505050565b610482338383611020565b6040517f53794137000000000000000000000000000000000000000000000000000000008152336004820152602481018290526001600160a01b03831690635379413790604401600060405180830381600087803b1580156104e357600080fd5b505af11580156104f7573d6000803e3d6000fd5b505050505050565b6001546001600160a01b031633146105595760405162461bcd60e51b815260206004820152601860248201527f43616c6c6572206973206e6f7420746865206272696467650000000000000000604482015260640161045c565b8281146105a85760405162461bcd60e51b815260206004820181905260248201527f417272617973206d7573742068617665207468652073616d65206c656e677468604482015260640161045c565b60005b8381101561060d576105fb8585838181106105c8576105c86116a5565b90506020020160208101906105dd9190611520565b8484848181106105ef576105ef6116a5565b905060200201356110fd565b80610605816116d1565b9150506105ab565b5050505050565b60007f000000000000000000000000000000000000000000000000000000000000000046141561066357507f000000000000000000000000000000000000000000000000000000000000000090565b50604080518082018252600981527f544254432042616e6b000000000000000000000000000000000000000000000060209182015281518083018352600181527f31000000000000000000000000000000000000000000000000000000000000009082015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527fa1cc9cffb2f2444066e5c95caef7925ee7ef97efc6002db29d3637e98e2f0dd2818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c0909101909252815191012090565b33600090815260026020526040812080548392906107839084906116ec565b909155505060405181815233907f9c6be7c4260e52ea2e41d7f17932147ab78756f1bb2247a2554796d969741aff9060200160405180910390a250565b6107cb338383611020565b5050565b6107cb3383836111eb565b6001546001600160a01b031633146108345760405162461bcd60e51b815260206004820152601860248201527f43616c6c6572206973206e6f7420746865206272696467650000000000000000604482015260640161045c565b6107cb82826110fd565b3360008181526003602090815260408083206001600160a01b03871684529091529020546107cb91908490610874908590611703565b611020565b6000546001600160a01b031633146108d35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045c565b6001600160a01b0381166109295760405162461bcd60e51b815260206004820152601e60248201527f4272696467652061646472657373206d757374206e6f74206265203078300000604482015260640161045c565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527fe1694c0b21fdceff6411daed547c7463c2341b9695387bc82595b5b9b1851d4a9060200160405180910390a150565b6000546001600160a01b031633146109e45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045c565b6109ee60006113ac565b565b6001600160a01b03831660009081526003602090815260408083203384529091529020546000198114610aa05781811015610a935760405162461bcd60e51b815260206004820152602160248201527f5472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6360448201527f6500000000000000000000000000000000000000000000000000000000000000606482015260840161045c565b610aa08433848403611020565b610aab8484846111eb565b50505050565b6001546001600160a01b03163314610b0b5760405162461bcd60e51b815260206004820152601860248201527f43616c6c6572206973206e6f7420746865206272696467650000000000000000604482015260640161045c565b828114610b5a5760405162461bcd60e51b815260206004820181905260248201527f417272617973206d7573742068617665207468652073616d65206c656e677468604482015260640161045c565b6000805b82811015610b9e57838382818110610b7857610b786116a5565b9050602002013582610b8a9190611703565b915080610b96816116d1565b915050610b5e565b50610ba986826110fd565b6040517f461c63730000000000000000000000000000000000000000000000000000000081526001600160a01b0387169063461c637390610bf490889088908890889060040161171b565b600060405180830381600087803b158015610c0e57600080fd5b505af1158015610c22573d6000803e3d6000fd5b50505050505050505050565b42841015610c7e5760405162461bcd60e51b815260206004820152601260248201527f5065726d697373696f6e20657870697265640000000000000000000000000000604482015260640161045c565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0811115610cee5760405162461bcd60e51b815260206004820152601b60248201527f496e76616c6964207369676e6174757265202773272076616c75650000000000604482015260640161045c565b8260ff16601b1480610d0357508260ff16601c145b610d4f5760405162461bcd60e51b815260206004820152601b60248201527f496e76616c6964207369676e6174757265202776272076616c75650000000000604482015260640161045c565b6000610d59610614565b6001600160a01b038916600090815260046020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928c928c928c92909190610da7836116d1565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e00160405160208183030381529060405280519060200120604051602001610e3b9291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015610ea6573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590610edc5750886001600160a01b0316816001600160a01b0316145b610f285760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e6174757265000000000000000000000000000000604482015260640161045c565b610f33898989611020565b505050505050505050565b6000546001600160a01b03163314610f985760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045c565b6001600160a01b0381166110145760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161045c565b61101d816113ac565b50565b6001600160a01b03821661109c5760405162461bcd60e51b815260206004820152602360248201527f43616e206e6f7420617070726f766520746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161045c565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f2fe5e8e7796010737e636f63b35a0383dc160b68483984f2df987c78e842b405910160405180910390a3505050565b6001600160a01b03821630141561117c5760405162461bcd60e51b815260206004820152602160248201527f43616e206e6f7420696e6372656173652062616c616e636520666f722042616e60448201527f6b00000000000000000000000000000000000000000000000000000000000000606482015260840161045c565b6001600160a01b038216600090815260026020526040812080548392906111a4908490611703565b90915550506040518181526001600160a01b038316907f7a702e80a9c183a6ce9d6732991df2e914555ba35a364a70aed2433984e7544b9060200160405180910390a25050565b6001600160a01b03821661124d5760405162461bcd60e51b8152602060048201526024808201527f43616e206e6f74207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161045c565b6001600160a01b0382163014156112b25760405162461bcd60e51b8152602060048201526024808201527f43616e206e6f74207472616e7366657220746f207468652042616e6b206164646044820152637265737360e01b606482015260840161045c565b6001600160a01b0383166000908152600260205260409020548181101561131b5760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657220616d6f756e7420657863656564732062616c616e636500604482015260640161045c565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290611352908490611703565b92505081905550826001600160a01b0316846001600160a01b03167f4163d0b06696468b3d7903f482bcd0097bd38a9a9086157479fd6c6561d242618460405161139e91815260200190565b60405180910390a350505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461142057600080fd5b919050565b6000806040838503121561143857600080fd5b61144183611409565b946020939093013593505050565b60008083601f84011261146157600080fd5b50813567ffffffffffffffff81111561147957600080fd5b6020830191508360208260051b850101111561149457600080fd5b9250929050565b600080600080604085870312156114b157600080fd5b843567ffffffffffffffff808211156114c957600080fd5b6114d58883890161144f565b909650945060208701359150808211156114ee57600080fd5b506114fb8782880161144f565b95989497509550505050565b60006020828403121561151957600080fd5b5035919050565b60006020828403121561153257600080fd5b61153b82611409565b9392505050565b60008060006060848603121561155757600080fd5b61156084611409565b925061156e60208501611409565b9150604084013590509250925092565b60008060008060006060868803121561159657600080fd5b61159f86611409565b9450602086013567ffffffffffffffff808211156115bc57600080fd5b6115c889838a0161144f565b909650945060408801359150808211156115e157600080fd5b506115ee8882890161144f565b969995985093965092949392505050565b600080600080600080600060e0888a03121561161a57600080fd5b61162388611409565b965061163160208901611409565b95506040880135945060608801359350608088013560ff8116811461165557600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561168557600080fd5b61168e83611409565b915061169c60208401611409565b90509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156116e5576116e56116bb565b5060010190565b6000828210156116fe576116fe6116bb565b500390565b60008219821115611716576117166116bb565b500190565b6040808252810184905260008560608301825b8781101561175c576001600160a01b0361174784611409565b1682526020928301929091019060010161172e565b5083810360208501528481527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85111561179557600080fd5b8460051b91508186602083013760009101602001908152969550505050505056fea2646970667358221220ea04d31867991c6496ad78d54697174c8c2c264c9b7b24c0daf106e9aa67afc664736f6c63430008090033",
|
|
535
535
|
"linkReferences": {},
|
|
536
536
|
"deployedLinkReferences": {}
|
|
537
537
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "IReceiveBalanceApproval",
|
|
4
|
+
"sourceName": "contracts/bank/IReceiveBalanceApproval.sol",
|
|
5
|
+
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"internalType": "address",
|
|
10
|
+
"name": "owner",
|
|
11
|
+
"type": "address"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"internalType": "uint256",
|
|
15
|
+
"name": "amount",
|
|
16
|
+
"type": "uint256"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"name": "receiveBalanceApproval",
|
|
20
|
+
"outputs": [],
|
|
21
|
+
"stateMutability": "nonpayable",
|
|
22
|
+
"type": "function"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"bytecode": "0x",
|
|
26
|
+
"deployedBytecode": "0x",
|
|
27
|
+
"linkReferences": {},
|
|
28
|
+
"deployedLinkReferences": {}
|
|
29
|
+
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"contractName": "BitcoinTx",
|
|
4
4
|
"sourceName": "contracts/bridge/BitcoinTx.sol",
|
|
5
5
|
"abi": [],
|
|
6
|
-
"bytecode": "
|
|
7
|
-
"deployedBytecode": "
|
|
6
|
+
"bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e55f5cfaf4bbe18c06e55acf6c7d2fd93b838639872ae8807746d799f8947e6e64736f6c63430008090033",
|
|
7
|
+
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e55f5cfaf4bbe18c06e55acf6c7d2fd93b838639872ae8807746d799f8947e6e64736f6c63430008090033",
|
|
8
8
|
"linkReferences": {},
|
|
9
9
|
"deployedLinkReferences": {}
|
|
10
10
|
}
|