creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "contracts/interface/IDBridge.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.20;\r\ninterface IDBridge  {\r\n    function deposit(\r\n        uint256 chainId,\r\n        address tokenAddress,\r\n        uint256 amount\r\n    ) external  returns (bytes32 bridgeId);\r\n\r\n    function withdraw(bytes32 bridgeId) external payable;\r\n}\r\n"
      },
      "contracts/interface/IERCToken.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.20;\r\n\r\ninterface IERCToken {\r\n    function balanceOf(address account) external view returns (uint256);\r\n    function approve(address to, uint256 amount) external;\r\n    function burn(uint256 amount) external;\r\n}"
      },
      "contracts/interface/IVusdToken.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.20;\r\n\r\ninterface IVusdToken {\r\n    function balanceOf(address account) external view returns (uint256);\r\n    function burn(uint256 amount, bytes calldata data) external;\r\n    function burnFrom(address account, uint256 amount) external;\r\n    function mint(address to, uint256 amount) external;\r\n}"
      },
      "contracts/VusdBurning.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.20;\r\n\r\nimport \"./interface/IDBridge.sol\";\r\nimport \"./interface/IERCToken.sol\";\r\nimport \"./interface/IVusdToken.sol\";\r\n\r\ncontract VusdBurning {\r\n    uint256 private _destinationChainId;    \r\n    address private _bridgeAddress;\r\n\r\n    constructor(\r\n        uint256 destinationChainId_, \r\n        address bridgeAddress_\r\n    ) {\r\n        _destinationChainId = destinationChainId_;\r\n        _bridgeAddress = bridgeAddress_;\r\n    }\r\n\r\n    function bridge(\r\n        address tokenAddress\r\n    ) external {\r\n        uint256 balance = IERCToken(tokenAddress).balanceOf(address(this));\r\n        require(balance > 0, \"VusdBurningBsc: !Zero balance\");\r\n\r\n        IERCToken(tokenAddress).approve(_bridgeAddress, balance);\r\n        IDBridge(_bridgeAddress).deposit(\r\n            _destinationChainId,\r\n            tokenAddress,\r\n            balance\r\n        );\r\n    }\r\n\r\n    function withdraw(\r\n        bytes32 bridgeId\r\n    ) external payable {\r\n        IDBridge(_bridgeAddress).withdraw{value: msg.value}(bridgeId);\r\n    }\r\n\r\n    function burn(\r\n        address tokenAddress\r\n    ) external {\r\n        uint256 balance = IERCToken(tokenAddress).balanceOf(address(this));\r\n        require(balance > 0, \"VusdBurningBsc: !Zero balance\");\r\n        IERCToken(tokenAddress).burn(balance);\r\n    }\r\n\r\n    function burnVusd(\r\n        address tokenAddress\r\n    ) external {\r\n        uint256 balance = IERCToken(tokenAddress).balanceOf(address(this));\r\n        require(balance > 0, \"VusdBurningBsc: !Zero balance\");\r\n        IVusdToken(tokenAddress).burn(balance, new bytes(0));\r\n    }\r\n}\r\n"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": false,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "libraries": {}
    }
  }}