1388 lines
49 KiB
JSON
1388 lines
49 KiB
JSON
{
|
|
"contractName": "IDODORewardVault",
|
|
"abi": [
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "reward",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"metadata": "{\"compiler\":{\"version\":\"0.6.9+commit.3e3065ac\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"reward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/token/DODORewardVault.sol\":\"IDODORewardVault\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IERC20.sol\":{\"keccak256\":\"0x40355eddd56b5a9ac760c5a056e135946b372b724fb632415792ad82c60a9ac5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://66e932da3bb19bdd0a7b17715099bc419f087cbf06809885fd98a7a35574387e\",\"dweb:/ipfs/Qmdv97dz4214Xrbb8xGbuYPJtvmqAoUcXuSCFgA8NzBUsg\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/Ownable.sol\":{\"keccak256\":\"0xb7a2ca6570834e4784e86d19fd5a4b6b1eff22a4586dc240659943396a365aa5\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://5855a493c78e787d7effd87d9c661acbcd19ca1e1ba72dbeaa91c3c8db29cbb4\",\"dweb:/ipfs/QmSddEexZ5okMatgoQ5JZRoJqe7BwsJwwWA2o1kKx7vbTH\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeERC20.sol\":{\"keccak256\":\"0xe11bb64537b764f7b0b64f817ffa0b4b278c2017474ff985428225b3f0928295\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://c756ca959d2326d58ed49b8a2d39100866197596ba09240e4f1bf861399a6e96\",\"dweb:/ipfs/QmdgzWZNT614vRnb5zsDva91bkLpvZmCVV5d6xetqsyedR\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeMath.sol\":{\"keccak256\":\"0x57d750628881687f826b54f60cbfd46c1a172433eed892bbb123f91869886af1\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://b40bd7946010ddae9679f36630510217dcaa9cb8643824f9edc8ef52bda95717\",\"dweb:/ipfs/QmZSjpfUGyrmokZyaMc74a8h6zy2qFVECPVP8VfTvzNEFb\"]},\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/token/DODORewardVault.sol\":{\"keccak256\":\"0x9a1ad5dfb8c36b3750f7c3c9aef091e63bad36e2145355eb212d67988914dc1d\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e8ad414d377a1860b064193e015ca67187da4a47c9e925123cef4c9a6cd3448b\",\"dweb:/ipfs/QmS7Po2mSdB7Bk784Zcsxx7HFwJ17WXqKv3FuDGxH5aCFY\"]}},\"version\":1}",
|
|
"bytecode": "0x",
|
|
"deployedBytecode": "0x",
|
|
"immutableReferences": {},
|
|
"sourceMap": "",
|
|
"deployedSourceMap": "",
|
|
"source": "/*\n\n Copyright 2020 DODO ZOO.\n SPDX-License-Identifier: Apache-2.0\n\n*/\n\npragma solidity 0.6.9;\npragma experimental ABIEncoderV2;\n\nimport {Ownable} from \"../lib/Ownable.sol\";\nimport {SafeERC20} from \"../lib/SafeERC20.sol\";\nimport {IERC20} from \"../intf/IERC20.sol\";\n\n\ninterface IDODORewardVault {\n function reward(address to, uint256 amount) external;\n}\n\n\ncontract DODORewardVault is Ownable {\n using SafeERC20 for IERC20;\n\n address public dodoToken;\n\n constructor(address _dodoToken) public {\n dodoToken = _dodoToken;\n }\n\n function reward(address to, uint256 amount) external onlyOwner {\n IERC20(dodoToken).safeTransfer(to, amount);\n }\n}\n",
|
|
"sourcePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/token/DODORewardVault.sol",
|
|
"ast": {
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/token/DODORewardVault.sol",
|
|
"exportedSymbols": {
|
|
"DODORewardVault": [
|
|
12998
|
|
],
|
|
"IDODORewardVault": [
|
|
12962
|
|
]
|
|
},
|
|
"id": 12999,
|
|
"license": "Apache-2.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 12947,
|
|
"literals": [
|
|
"solidity",
|
|
"0.6",
|
|
".9"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "78:22:45"
|
|
},
|
|
{
|
|
"id": 12948,
|
|
"literals": [
|
|
"experimental",
|
|
"ABIEncoderV2"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "101:33:45"
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/Ownable.sol",
|
|
"file": "../lib/Ownable.sol",
|
|
"id": 12950,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 12999,
|
|
"sourceUnit": 11272,
|
|
"src": "136:43:45",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 12949,
|
|
"name": "Ownable",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "144:7:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeERC20.sol",
|
|
"file": "../lib/SafeERC20.sol",
|
|
"id": 12952,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 12999,
|
|
"sourceUnit": 11441,
|
|
"src": "180:47:45",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 12951,
|
|
"name": "SafeERC20",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "188:9:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IERC20.sol",
|
|
"file": "../intf/IERC20.sol",
|
|
"id": 12954,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 12999,
|
|
"sourceUnit": 10608,
|
|
"src": "228:42:45",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 12953,
|
|
"name": "IERC20",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "236:6:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "interface",
|
|
"documentation": null,
|
|
"fullyImplemented": false,
|
|
"id": 12962,
|
|
"linearizedBaseContracts": [
|
|
12962
|
|
],
|
|
"name": "IDODORewardVault",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": null,
|
|
"documentation": null,
|
|
"functionSelector": "21670f22",
|
|
"id": 12961,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "reward",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 12959,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 12956,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 12961,
|
|
"src": "322:10:45",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 12955,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "322:7:45",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 12958,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 12961,
|
|
"src": "334:14:45",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 12957,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "334:7:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "321:28:45"
|
|
},
|
|
"returnParameters": {
|
|
"id": 12960,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "358:0:45"
|
|
},
|
|
"scope": 12962,
|
|
"src": "306:53:45",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 12999,
|
|
"src": "273:88:45"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 12963,
|
|
"name": "Ownable",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 11271,
|
|
"src": "392:7:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Ownable_$11271",
|
|
"typeString": "contract Ownable"
|
|
}
|
|
},
|
|
"id": 12964,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "392:7:45"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
11271
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": true,
|
|
"id": 12998,
|
|
"linearizedBaseContracts": [
|
|
12998,
|
|
11271
|
|
],
|
|
"name": "DODORewardVault",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 12967,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 12965,
|
|
"name": "SafeERC20",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 11440,
|
|
"src": "412:9:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeERC20_$11440",
|
|
"typeString": "library SafeERC20"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "406:27:45",
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 12966,
|
|
"name": "IERC20",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 10607,
|
|
"src": "426:6:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$10607",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"constant": false,
|
|
"functionSelector": "75123ff9",
|
|
"id": 12969,
|
|
"mutability": "mutable",
|
|
"name": "dodoToken",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 12998,
|
|
"src": "439:24:45",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 12968,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "439:7:45",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 12978,
|
|
"nodeType": "Block",
|
|
"src": "509:39:45",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 12976,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 12974,
|
|
"name": "dodoToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 12969,
|
|
"src": "519:9:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 12975,
|
|
"name": "_dodoToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 12971,
|
|
"src": "531:10:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "519:22:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 12977,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "519:22:45"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 12979,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 12972,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 12971,
|
|
"mutability": "mutable",
|
|
"name": "_dodoToken",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 12979,
|
|
"src": "482:18:45",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 12970,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "482:7:45",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "481:20:45"
|
|
},
|
|
"returnParameters": {
|
|
"id": 12973,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "509:0:45"
|
|
},
|
|
"scope": 12998,
|
|
"src": "470:78:45",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 12996,
|
|
"nodeType": "Block",
|
|
"src": "617:59:45",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 12992,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 12981,
|
|
"src": "658:2:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 12993,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 12983,
|
|
"src": "662:6:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 12989,
|
|
"name": "dodoToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 12969,
|
|
"src": "634:9:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 12988,
|
|
"name": "IERC20",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10607,
|
|
"src": "627:6:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$",
|
|
"typeString": "type(contract IERC20)"
|
|
}
|
|
},
|
|
"id": 12990,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "627:17:45",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$10607",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"id": 12991,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "safeTransfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11329,
|
|
"src": "627:30:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$10607_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$10607_$",
|
|
"typeString": "function (contract IERC20,address,uint256)"
|
|
}
|
|
},
|
|
"id": 12994,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "627:42:45",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 12995,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "627:42:45"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"functionSelector": "21670f22",
|
|
"id": 12997,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 12986,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 12985,
|
|
"name": "onlyOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11198,
|
|
"src": "607:9:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "607:9:45"
|
|
}
|
|
],
|
|
"name": "reward",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 12984,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 12981,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 12997,
|
|
"src": "570:10:45",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 12980,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "570:7:45",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 12983,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 12997,
|
|
"src": "582:14:45",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 12982,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "582:7:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "569:28:45"
|
|
},
|
|
"returnParameters": {
|
|
"id": 12987,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "617:0:45"
|
|
},
|
|
"scope": 12998,
|
|
"src": "554:122:45",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 12999,
|
|
"src": "364:314:45"
|
|
}
|
|
],
|
|
"src": "78:601:45"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/token/DODORewardVault.sol",
|
|
"exportedSymbols": {
|
|
"DODORewardVault": [
|
|
12998
|
|
],
|
|
"IDODORewardVault": [
|
|
12962
|
|
]
|
|
},
|
|
"id": 12999,
|
|
"license": "Apache-2.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 12947,
|
|
"literals": [
|
|
"solidity",
|
|
"0.6",
|
|
".9"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "78:22:45"
|
|
},
|
|
{
|
|
"id": 12948,
|
|
"literals": [
|
|
"experimental",
|
|
"ABIEncoderV2"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "101:33:45"
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/Ownable.sol",
|
|
"file": "../lib/Ownable.sol",
|
|
"id": 12950,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 12999,
|
|
"sourceUnit": 11272,
|
|
"src": "136:43:45",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 12949,
|
|
"name": "Ownable",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "144:7:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/lib/SafeERC20.sol",
|
|
"file": "../lib/SafeERC20.sol",
|
|
"id": 12952,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 12999,
|
|
"sourceUnit": 11441,
|
|
"src": "180:47:45",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 12951,
|
|
"name": "SafeERC20",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "188:9:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/intf/IERC20.sol",
|
|
"file": "../intf/IERC20.sol",
|
|
"id": 12954,
|
|
"nodeType": "ImportDirective",
|
|
"scope": 12999,
|
|
"sourceUnit": 10608,
|
|
"src": "228:42:45",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"argumentTypes": null,
|
|
"id": 12953,
|
|
"name": "IERC20",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": null,
|
|
"src": "236:6:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
},
|
|
"local": null
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "interface",
|
|
"documentation": null,
|
|
"fullyImplemented": false,
|
|
"id": 12962,
|
|
"linearizedBaseContracts": [
|
|
12962
|
|
],
|
|
"name": "IDODORewardVault",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": null,
|
|
"documentation": null,
|
|
"functionSelector": "21670f22",
|
|
"id": 12961,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "reward",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 12959,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 12956,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 12961,
|
|
"src": "322:10:45",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 12955,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "322:7:45",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 12958,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 12961,
|
|
"src": "334:14:45",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 12957,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "334:7:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "321:28:45"
|
|
},
|
|
"returnParameters": {
|
|
"id": 12960,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "358:0:45"
|
|
},
|
|
"scope": 12962,
|
|
"src": "306:53:45",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 12999,
|
|
"src": "273:88:45"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 12963,
|
|
"name": "Ownable",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 11271,
|
|
"src": "392:7:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Ownable_$11271",
|
|
"typeString": "contract Ownable"
|
|
}
|
|
},
|
|
"id": 12964,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "392:7:45"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
11271
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": true,
|
|
"id": 12998,
|
|
"linearizedBaseContracts": [
|
|
12998,
|
|
11271
|
|
],
|
|
"name": "DODORewardVault",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"id": 12967,
|
|
"libraryName": {
|
|
"contractScope": null,
|
|
"id": 12965,
|
|
"name": "SafeERC20",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 11440,
|
|
"src": "412:9:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeERC20_$11440",
|
|
"typeString": "library SafeERC20"
|
|
}
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "406:27:45",
|
|
"typeName": {
|
|
"contractScope": null,
|
|
"id": 12966,
|
|
"name": "IERC20",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 10607,
|
|
"src": "426:6:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$10607",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"constant": false,
|
|
"functionSelector": "75123ff9",
|
|
"id": 12969,
|
|
"mutability": "mutable",
|
|
"name": "dodoToken",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 12998,
|
|
"src": "439:24:45",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 12968,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "439:7:45",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 12978,
|
|
"nodeType": "Block",
|
|
"src": "509:39:45",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 12976,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 12974,
|
|
"name": "dodoToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 12969,
|
|
"src": "519:9:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"argumentTypes": null,
|
|
"id": 12975,
|
|
"name": "_dodoToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 12971,
|
|
"src": "531:10:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "519:22:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 12977,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "519:22:45"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"id": 12979,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 12972,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 12971,
|
|
"mutability": "mutable",
|
|
"name": "_dodoToken",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 12979,
|
|
"src": "482:18:45",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 12970,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "482:7:45",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "481:20:45"
|
|
},
|
|
"returnParameters": {
|
|
"id": 12973,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "509:0:45"
|
|
},
|
|
"scope": 12998,
|
|
"src": "470:78:45",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 12996,
|
|
"nodeType": "Block",
|
|
"src": "617:59:45",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 12992,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 12981,
|
|
"src": "658:2:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 12993,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 12983,
|
|
"src": "662:6:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 12989,
|
|
"name": "dodoToken",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 12969,
|
|
"src": "634:9:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 12988,
|
|
"name": "IERC20",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 10607,
|
|
"src": "627:6:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IERC20_$10607_$",
|
|
"typeString": "type(contract IERC20)"
|
|
}
|
|
},
|
|
"id": 12990,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "627:17:45",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$10607",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"id": 12991,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberName": "safeTransfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 11329,
|
|
"src": "627:30:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$10607_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$10607_$",
|
|
"typeString": "function (contract IERC20,address,uint256)"
|
|
}
|
|
},
|
|
"id": 12994,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "627:42:45",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 12995,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "627:42:45"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"functionSelector": "21670f22",
|
|
"id": 12997,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"arguments": null,
|
|
"id": 12986,
|
|
"modifierName": {
|
|
"argumentTypes": null,
|
|
"id": 12985,
|
|
"name": "onlyOwner",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 11198,
|
|
"src": "607:9:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_modifier$__$",
|
|
"typeString": "modifier ()"
|
|
}
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "607:9:45"
|
|
}
|
|
],
|
|
"name": "reward",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 12984,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 12981,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 12997,
|
|
"src": "570:10:45",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 12980,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "570:7:45",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 12983,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 12997,
|
|
"src": "582:14:45",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 12982,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "582:7:45",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "569:28:45"
|
|
},
|
|
"returnParameters": {
|
|
"id": 12987,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "617:0:45"
|
|
},
|
|
"scope": 12998,
|
|
"src": "554:122:45",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 12999,
|
|
"src": "364:314:45"
|
|
}
|
|
],
|
|
"src": "78:601:45"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.6.9+commit.3e3065ac.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "3.2.3",
|
|
"updatedAt": "2020-11-06T08:03:35.740Z",
|
|
"devdoc": {
|
|
"methods": {}
|
|
},
|
|
"userdoc": {
|
|
"methods": {}
|
|
}
|
|
} |