{
  "_format": "hh-sol-artifact-1",
  "contractName": "DepositBox",
  "sourceName": "contracts/deposit/DepositBox.sol",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "manager_",
          "type": "address"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "target",
          "type": "address"
        }
      ],
      "name": "AddressEmptyCode",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "FailedCall",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "balance",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "needed",
          "type": "uint256"
        }
      ],
      "name": "InsufficientBalance",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "InvalidInitialization",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "NotInitializing",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "token",
          "type": "address"
        }
      ],
      "name": "SafeERC20FailedOperation",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "Unauthorized",
      "type": "error"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint64",
          "name": "version",
          "type": "uint64"
        }
      ],
      "name": "Initialized",
      "type": "event"
    },
    {
      "inputs": [],
      "name": "BOX_ID",
      "outputs": [
        {
          "internalType": "uint32",
          "name": "",
          "type": "uint32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "MANAGER",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "OWNER",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "components": [
            {
              "internalType": "address",
              "name": "token",
              "type": "address"
            },
            {
              "internalType": "uint256",
              "name": "amount",
              "type": "uint256"
            },
            {
              "internalType": "address",
              "name": "approveTo",
              "type": "address"
            },
            {
              "internalType": "address",
              "name": "callTo",
              "type": "address"
            },
            {
              "internalType": "bytes",
              "name": "data",
              "type": "bytes"
            }
          ],
          "internalType": "struct ApprovedCall",
          "name": "call",
          "type": "tuple"
        },
        {
          "internalType": "address",
          "name": "nativeRefund",
          "type": "address"
        }
      ],
      "name": "approveAndCall",
      "outputs": [
        {
          "internalType": "bytes",
          "name": "result",
          "type": "bytes"
        }
      ],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "owner_",
          "type": "address"
        },
        {
          "internalType": "uint32",
          "name": "boxId_",
          "type": "uint32"
        }
      ],
      "name": "initialize",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "token",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "withdrawTo",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "stateMutability": "payable",
      "type": "receive"
    }
  ],
  "bytecode": "0x60a060405234801561000f575f5ffd5b50604051610cb8380380610cb883398101604081905261002e916100f9565b610036610047565b6001600160a01b0316608052610126565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100975760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146100f65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b5f60208284031215610109575f5ffd5b81516001600160a01b038116811461011f575f5ffd5b9392505050565b608051610b6d61014b5f395f818160a70152818161016d015261027c0152610b6d5ff3fe608060405260043610610057575f3560e01c8063117803e3146100625780631b2df8501461009657806328dc8307146100c9578063a817c113146100e9578063c3b35a7e14610120578063c5e4c9f914610141575f5ffd5b3661005e57005b5f5ffd5b34801561006d575f5ffd5b505f54610080906001600160a01b031681565b60405161008d919061085a565b60405180910390f35b3480156100a1575f5ffd5b506100807f000000000000000000000000000000000000000000000000000000000000000081565b6100dc6100d73660046108f5565b610160565b60405161008d9190610a0b565b3480156100f4575f5ffd5b505f5461010b90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161008d565b34801561012b575f5ffd5b5061013f61013a366004610a40565b610271565b005b34801561014c575f5ffd5b5061013f61015b366004610a7a565b6102c9565b6060336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101aa576040516282b42960e81b815260040160405180910390fd5b82515f906001600160a01b0316156101c2575f6101c8565b83602001515b9050345f81836101d7836103e1565b6101e19190610acb565b6101eb9190610acb565b9050610203865f0151876040015188602001516103f2565b608086015161022b906102168486610ade565b60608901516001600160a01b03169190610419565b935061023f865f015187604001515f6103f2565b5f6102495f6103e1565b905081811115610267576102675f876102628585610acb565b6104c0565b5050505092915050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146102b9576040516282b42960e81b815260040160405180910390fd5b6102c48284836104c0565b505050565b5f6102d2610598565b805490915060ff600160401b82041615906001600160401b03165f811580156102f85750825b90505f826001600160401b031660011480156103135750303b155b905081158015610321575080155b1561033f5760405163f92ee8a960e01b815260040160405180910390fd5b84546001600160401b0319166001178555831561036857845460ff60401b1916600160401b1785555b5f805463ffffffff8816600160a01b026001600160c01b03199091166001600160a01b038a161717905583156103d857845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b5f6103ec30836105c0565b92915050565b6001600160a01b03831661040557505050565b6102c46001600160a01b038416838361064f565b60608147101561044a5760405163cf47918160e01b8152476004820152602481018390526044015b60405180910390fd5b5f5f856001600160a01b031684866040516104659190610af1565b5f6040518083038185875af1925050503d805f811461049f576040519150601f19603f3d011682016040523d82523d5f602084013e6104a4565b606091505b50915091506104b4868383610711565b925050505b9392505050565b8015806104d557506001600160a01b03821630145b156104df57505050565b6001600160a01b038316610584575f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114610536576040519150601f19603f3d011682016040523d82523d5f602084013e61053b565b606091505b505090508061057e5760405162461bcd60e51b815260206004820152600f60248201526e195d1a081cd95b990819985a5b1959608a1b6044820152606401610441565b50505050565b6102c46001600160a01b038416838361075f565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a006103ec565b5f6001600160a01b03821615610640576040516370a0823160e01b81526001600160a01b038316906370a08231906105fc90869060040161085a565b602060405180830381865afa158015610617573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061063b9190610b07565b6104b9565b50506001600160a01b03163190565b5f836001600160a01b031663095ea7b38484604051602401610672929190610b1e565b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505090506106ab8482610785565b61057e5761070784856001600160a01b031663095ea7b3865f6040516024016106d5929190610b1e565b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506107ce565b61057e84826107ce565b6060826107215761063b82610831565b815115801561073857506001600160a01b0384163b155b156107585783604051639996b31560e01b8152600401610441919061085a565b50806104b9565b6102c483846001600160a01b031663a9059cbb85856040516024016106d5929190610b1e565b5f5f5f5f60205f8651602088015f8a5af192503d91505f5190508280156107c4575081156107b657806001146107c4565b5f866001600160a01b03163b115b9695505050505050565b5f5f60205f8451602086015f885af1806107ed576040513d5f823e3d81fd5b50505f513d91508115610804578060011415610811565b6001600160a01b0384163b155b1561057e5783604051635274afe760e01b8152600401610441919061085a565b8051156108415780518082602001fd5b60405163d6bda27560e01b815260040160405180910390fd5b6001600160a01b0391909116815260200190565b634e487b7160e01b5f52604160045260245ffd5b60405160a081016001600160401b03811182821017156108a4576108a461086e565b60405290565b604051601f8201601f191681016001600160401b03811182821017156108d2576108d261086e565b604052919050565b80356001600160a01b03811681146108f0575f5ffd5b919050565b5f5f60408385031215610906575f5ffd5b82356001600160401b0381111561091b575f5ffd5b830160a0818603121561092c575f5ffd5b610934610882565b61093d826108da565b815260208281013590820152610955604083016108da565b6040820152610966606083016108da565b606082015260808201356001600160401b03811115610983575f5ffd5b80830192505085601f830112610997575f5ffd5b81356001600160401b038111156109b0576109b061086e565b6109c3601f8201601f19166020016108aa565b8181528760208386010111156109d7575f5ffd5b816020850160208301375f6020838301015280608084015250508093505050610a02602084016108da565b90509250929050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f5f5f60608486031215610a52575f5ffd5b610a5b846108da565b9250610a69602085016108da565b929592945050506040919091013590565b5f5f60408385031215610a8b575f5ffd5b610a94836108da565b9150602083013563ffffffff81168114610aac575f5ffd5b809150509250929050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156103ec576103ec610ab7565b808201808211156103ec576103ec610ab7565b5f82518060208501845e5f920191825250919050565b5f60208284031215610b17575f5ffd5b5051919050565b6001600160a01b0392909216825260208201526040019056fea2646970667358221220600ac0ca3dc3d2b205c87ba268bb0c92dba49fcf607f4ceb2a0a7dd8da3f6b3464736f6c634300081c0033",
  "deployedBytecode": "0x608060405260043610610057575f3560e01c8063117803e3146100625780631b2df8501461009657806328dc8307146100c9578063a817c113146100e9578063c3b35a7e14610120578063c5e4c9f914610141575f5ffd5b3661005e57005b5f5ffd5b34801561006d575f5ffd5b505f54610080906001600160a01b031681565b60405161008d919061085a565b60405180910390f35b3480156100a1575f5ffd5b506100807f000000000000000000000000000000000000000000000000000000000000000081565b6100dc6100d73660046108f5565b610160565b60405161008d9190610a0b565b3480156100f4575f5ffd5b505f5461010b90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161008d565b34801561012b575f5ffd5b5061013f61013a366004610a40565b610271565b005b34801561014c575f5ffd5b5061013f61015b366004610a7a565b6102c9565b6060336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101aa576040516282b42960e81b815260040160405180910390fd5b82515f906001600160a01b0316156101c2575f6101c8565b83602001515b9050345f81836101d7836103e1565b6101e19190610acb565b6101eb9190610acb565b9050610203865f0151876040015188602001516103f2565b608086015161022b906102168486610ade565b60608901516001600160a01b03169190610419565b935061023f865f015187604001515f6103f2565b5f6102495f6103e1565b905081811115610267576102675f876102628585610acb565b6104c0565b5050505092915050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146102b9576040516282b42960e81b815260040160405180910390fd5b6102c48284836104c0565b505050565b5f6102d2610598565b805490915060ff600160401b82041615906001600160401b03165f811580156102f85750825b90505f826001600160401b031660011480156103135750303b155b905081158015610321575080155b1561033f5760405163f92ee8a960e01b815260040160405180910390fd5b84546001600160401b0319166001178555831561036857845460ff60401b1916600160401b1785555b5f805463ffffffff8816600160a01b026001600160c01b03199091166001600160a01b038a161717905583156103d857845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b5f6103ec30836105c0565b92915050565b6001600160a01b03831661040557505050565b6102c46001600160a01b038416838361064f565b60608147101561044a5760405163cf47918160e01b8152476004820152602481018390526044015b60405180910390fd5b5f5f856001600160a01b031684866040516104659190610af1565b5f6040518083038185875af1925050503d805f811461049f576040519150601f19603f3d011682016040523d82523d5f602084013e6104a4565b606091505b50915091506104b4868383610711565b925050505b9392505050565b8015806104d557506001600160a01b03821630145b156104df57505050565b6001600160a01b038316610584575f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114610536576040519150601f19603f3d011682016040523d82523d5f602084013e61053b565b606091505b505090508061057e5760405162461bcd60e51b815260206004820152600f60248201526e195d1a081cd95b990819985a5b1959608a1b6044820152606401610441565b50505050565b6102c46001600160a01b038416838361075f565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a006103ec565b5f6001600160a01b03821615610640576040516370a0823160e01b81526001600160a01b038316906370a08231906105fc90869060040161085a565b602060405180830381865afa158015610617573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061063b9190610b07565b6104b9565b50506001600160a01b03163190565b5f836001600160a01b031663095ea7b38484604051602401610672929190610b1e565b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505090506106ab8482610785565b61057e5761070784856001600160a01b031663095ea7b3865f6040516024016106d5929190610b1e565b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506107ce565b61057e84826107ce565b6060826107215761063b82610831565b815115801561073857506001600160a01b0384163b155b156107585783604051639996b31560e01b8152600401610441919061085a565b50806104b9565b6102c483846001600160a01b031663a9059cbb85856040516024016106d5929190610b1e565b5f5f5f5f60205f8651602088015f8a5af192503d91505f5190508280156107c4575081156107b657806001146107c4565b5f866001600160a01b03163b115b9695505050505050565b5f5f60205f8451602086015f885af1806107ed576040513d5f823e3d81fd5b50505f513d91508115610804578060011415610811565b6001600160a01b0384163b155b1561057e5783604051635274afe760e01b8152600401610441919061085a565b8051156108415780518082602001fd5b60405163d6bda27560e01b815260040160405180910390fd5b6001600160a01b0391909116815260200190565b634e487b7160e01b5f52604160045260245ffd5b60405160a081016001600160401b03811182821017156108a4576108a461086e565b60405290565b604051601f8201601f191681016001600160401b03811182821017156108d2576108d261086e565b604052919050565b80356001600160a01b03811681146108f0575f5ffd5b919050565b5f5f60408385031215610906575f5ffd5b82356001600160401b0381111561091b575f5ffd5b830160a0818603121561092c575f5ffd5b610934610882565b61093d826108da565b815260208281013590820152610955604083016108da565b6040820152610966606083016108da565b606082015260808201356001600160401b03811115610983575f5ffd5b80830192505085601f830112610997575f5ffd5b81356001600160401b038111156109b0576109b061086e565b6109c3601f8201601f19166020016108aa565b8181528760208386010111156109d7575f5ffd5b816020850160208301375f6020838301015280608084015250508093505050610a02602084016108da565b90509250929050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f5f5f60608486031215610a52575f5ffd5b610a5b846108da565b9250610a69602085016108da565b929592945050506040919091013590565b5f5f60408385031215610a8b575f5ffd5b610a94836108da565b9150602083013563ffffffff81168114610aac575f5ffd5b809150509250929050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156103ec576103ec610ab7565b808201808211156103ec576103ec610ab7565b5f82518060208501845e5f920191825250919050565b5f60208284031215610b17575f5ffd5b5051919050565b6001600160a01b0392909216825260208201526040019056fea2646970667358221220600ac0ca3dc3d2b205c87ba268bb0c92dba49fcf607f4ceb2a0a7dd8da3f6b3464736f6c634300081c0033",
  "linkReferences": {},
  "deployedLinkReferences": {}
}
