@sonicswap/periphery
Version:
🎚 Peripheral smart contracts for interacting with the Sonicswap exchanges
1,004 lines • 36.1 kB
JSON
{
"contractName": "Migrations",
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "last_completed_migration",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function",
"constant": true
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function",
"constant": true
},
{
"inputs": [
{
"internalType": "uint256",
"name": "completed",
"type": "uint256"
}
],
"name": "setCompleted",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"last_completed_migration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"completed\",\"type\":\"uint256\"}],\"name\":\"setCompleted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/var/www/Sonic/sonicswap-periphery/contracts/Migration.sol\":\"Migrations\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/var/www/Sonic/sonicswap-periphery/contracts/Migration.sol\":{\"keccak256\":\"0xebb7958379a84a832c5965cba4aa092ea1aea34821b156e5b490c5776991d8f3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5fa608812d4a65c503687a21d758f276ede61ca6fd0b1f2b035160212df131e5\",\"dweb:/ipfs/QmUMmxZBYYJbetswVpH1c8N2QFjMAwF9cp4MBLbBjzWAH5\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b0319163317905560fd806100316000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c8063445df0ac1460415780638da5cb5b146059578063fdacd57614607b575b600080fd5b60476097565b60408051918252519081900360200190f35b605f609d565b604080516001600160a01b039092168252519081900360200190f35b609560048036036020811015608f57600080fd5b503560ac565b005b60015481565b6000546001600160a01b031681565b6000546001600160a01b031633141560c45760018190555b5056fea2646970667358221220421341dc4dfe30c679f26fa9c752ba16dc007aacb5905003892fbf2080912cc764736f6c634300060c0033",
"deployedBytecode": "0x6080604052348015600f57600080fd5b5060043610603c5760003560e01c8063445df0ac1460415780638da5cb5b146059578063fdacd57614607b575b600080fd5b60476097565b60408051918252519081900360200190f35b605f609d565b604080516001600160a01b039092168252519081900360200190f35b609560048036036020811015608f57600080fd5b503560ac565b005b60015481565b6000546001600160a01b031681565b6000546001600160a01b031633141560c45760018190555b5056fea2646970667358221220421341dc4dfe30c679f26fa9c752ba16dc007aacb5905003892fbf2080912cc764736f6c634300060c0033",
"immutableReferences": {},
"sourceMap": "66:311:0:-:0;;;218:50;;;;;;;;;-1:-1:-1;245:5:0;:18;;-1:-1:-1;;;;;;245:18:0;253:10;245:18;;;66:311;;;;;;",
"deployedSourceMap": "66:311:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;114:36;;;:::i;:::-;;;;;;;;;;;;;;;;90:20;;;:::i;:::-;;;;-1:-1:-1;;;;;90:20:0;;;;;;;;;;;;;;272:103;;;;;;;;;;;;;;;;-1:-1:-1;272:103:0;;:::i;:::-;;114:36;;;;:::o;90:20::-;;;-1:-1:-1;;;;;90:20:0;;:::o;272:103::-;201:5;;-1:-1:-1;;;;;201:5:0;187:10;:19;183:26;;;334:24:::1;:36:::0;;;183:26;272:103;:::o",
"source": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.25 <0.7.0;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n constructor() public {\n owner = msg.sender;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n}",
"sourcePath": "/var/www/Sonic/sonicswap-periphery/contracts/Migration.sol",
"ast": {
"absolutePath": "/var/www/Sonic/sonicswap-periphery/contracts/Migration.sol",
"exportedSymbols": {
"Migrations": [
36
]
},
"id": 37,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
">=",
"0.4",
".25",
"<",
"0.7",
".0"
],
"nodeType": "PragmaDirective",
"src": "32:32:0"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 36,
"linearizedBaseContracts": [
36
],
"name": "Migrations",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"functionSelector": "8da5cb5b",
"id": 3,
"mutability": "mutable",
"name": "owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 36,
"src": "90:20:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "90:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"functionSelector": "445df0ac",
"id": 5,
"mutability": "mutable",
"name": "last_completed_migration",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 36,
"src": "114:36:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "114:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 13,
"nodeType": "Block",
"src": "177:37:0",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 10,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 7,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "187:3:0",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 8,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "187:10:0",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 9,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3,
"src": "201:5:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "187:19:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 12,
"nodeType": "IfStatement",
"src": "183:26:0",
"trueBody": {
"id": 11,
"nodeType": "PlaceholderStatement",
"src": "208:1:0"
}
}
]
},
"documentation": null,
"id": 14,
"name": "restricted",
"nodeType": "ModifierDefinition",
"overrides": null,
"parameters": {
"id": 6,
"nodeType": "ParameterList",
"parameters": [],
"src": "174:2:0"
},
"src": "155:59:0",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 22,
"nodeType": "Block",
"src": "239:29:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 20,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 17,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3,
"src": "245:5:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 18,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "253:3:0",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 19,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "253:10:0",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "245:18:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 21,
"nodeType": "ExpressionStatement",
"src": "245:18:0"
}
]
},
"documentation": null,
"id": 23,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 15,
"nodeType": "ParameterList",
"parameters": [],
"src": "229:2:0"
},
"returnParameters": {
"id": 16,
"nodeType": "ParameterList",
"parameters": [],
"src": "239:0:0"
},
"scope": 36,
"src": "218:50:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 34,
"nodeType": "Block",
"src": "328:47:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 32,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 30,
"name": "last_completed_migration",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "334:24:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 31,
"name": "completed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 25,
"src": "361:9:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "334:36:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 33,
"nodeType": "ExpressionStatement",
"src": "334:36:0"
}
]
},
"documentation": null,
"functionSelector": "fdacd576",
"id": 35,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 28,
"modifierName": {
"argumentTypes": null,
"id": 27,
"name": "restricted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14,
"src": "317:10:0",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "317:10:0"
}
],
"name": "setCompleted",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 26,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 25,
"mutability": "mutable",
"name": "completed",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 35,
"src": "294:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 24,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "294:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "293:16:0"
},
"returnParameters": {
"id": 29,
"nodeType": "ParameterList",
"parameters": [],
"src": "328:0:0"
},
"scope": 36,
"src": "272:103:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 37,
"src": "66:311:0"
}
],
"src": "32:345:0"
},
"legacyAST": {
"attributes": {
"absolutePath": "/var/www/Sonic/sonicswap-periphery/contracts/Migration.sol",
"exportedSymbols": {
"Migrations": [
36
]
},
"license": "MIT"
},
"children": [
{
"attributes": {
"literals": [
"solidity",
">=",
"0.4",
".25",
"<",
"0.7",
".0"
]
},
"id": 1,
"name": "PragmaDirective",
"src": "32:32:0"
},
{
"attributes": {
"abstract": false,
"baseContracts": [
null
],
"contractDependencies": [
null
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"linearizedBaseContracts": [
36
],
"name": "Migrations",
"scope": 37
},
"children": [
{
"attributes": {
"constant": false,
"functionSelector": "8da5cb5b",
"mutability": "mutable",
"name": "owner",
"overrides": null,
"scope": 36,
"stateVariable": true,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 2,
"name": "ElementaryTypeName",
"src": "90:7:0"
}
],
"id": 3,
"name": "VariableDeclaration",
"src": "90:20:0"
},
{
"attributes": {
"constant": false,
"functionSelector": "445df0ac",
"mutability": "mutable",
"name": "last_completed_migration",
"overrides": null,
"scope": 36,
"stateVariable": true,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "public"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 4,
"name": "ElementaryTypeName",
"src": "114:4:0"
}
],
"id": 5,
"name": "VariableDeclaration",
"src": "114:36:0"
},
{
"attributes": {
"documentation": null,
"name": "restricted",
"overrides": null,
"virtual": false,
"visibility": "internal"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 6,
"name": "ParameterList",
"src": "174:2:0"
},
{
"children": [
{
"attributes": {
"falseBody": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "==",
"type": "bool"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address payable"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": -15,
"type": "msg",
"value": "msg"
},
"id": 7,
"name": "Identifier",
"src": "187:3:0"
}
],
"id": 8,
"name": "MemberAccess",
"src": "187:10:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 3,
"type": "address",
"value": "owner"
},
"id": 9,
"name": "Identifier",
"src": "201:5:0"
}
],
"id": 10,
"name": "BinaryOperation",
"src": "187:19:0"
},
{
"id": 11,
"name": "PlaceholderStatement",
"src": "208:1:0"
}
],
"id": 12,
"name": "IfStatement",
"src": "183:26:0"
}
],
"id": 13,
"name": "Block",
"src": "177:37:0"
}
],
"id": 14,
"name": "ModifierDefinition",
"src": "155:59:0"
},
{
"attributes": {
"documentation": null,
"implemented": true,
"isConstructor": true,
"kind": "constructor",
"modifiers": [
null
],
"name": "",
"overrides": null,
"scope": 36,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 15,
"name": "ParameterList",
"src": "229:2:0"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 16,
"name": "ParameterList",
"src": "239:0:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "address"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 3,
"type": "address",
"value": "owner"
},
"id": 17,
"name": "Identifier",
"src": "245:5:0"
},
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"referencedDeclaration": null,
"type": "address payable"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": -15,
"type": "msg",
"value": "msg"
},
"id": 18,
"name": "Identifier",
"src": "253:3:0"
}
],
"id": 19,
"name": "MemberAccess",
"src": "253:10:0"
}
],
"id": 20,
"name": "Assignment",
"src": "245:18:0"
}
],
"id": 21,
"name": "ExpressionStatement",
"src": "245:18:0"
}
],
"id": 22,
"name": "Block",
"src": "239:29:0"
}
],
"id": 23,
"name": "FunctionDefinition",
"src": "218:50:0"
},
{
"attributes": {
"documentation": null,
"functionSelector": "fdacd576",
"implemented": true,
"isConstructor": false,
"kind": "function",
"name": "setCompleted",
"overrides": null,
"scope": 36,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "completed",
"overrides": null,
"scope": 35,
"stateVariable": false,
"storageLocation": "default",
"type": "uint256",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 24,
"name": "ElementaryTypeName",
"src": "294:4:0"
}
],
"id": 25,
"name": "VariableDeclaration",
"src": "294:14:0"
}
],
"id": 26,
"name": "ParameterList",
"src": "293:16:0"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 29,
"name": "ParameterList",
"src": "328:0:0"
},
{
"attributes": {
"arguments": null
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 14,
"type": "modifier ()",
"value": "restricted"
},
"id": 27,
"name": "Identifier",
"src": "317:10:0"
}
],
"id": 28,
"name": "ModifierInvocation",
"src": "317:10:0"
},
{
"children": [
{
"children": [
{
"attributes": {
"argumentTypes": null,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"operator": "=",
"type": "uint256"
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 5,
"type": "uint256",
"value": "last_completed_migration"
},
"id": 30,
"name": "Identifier",
"src": "334:24:0"
},
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 25,
"type": "uint256",
"value": "completed"
},
"id": 31,
"name": "Identifier",
"src": "361:9:0"
}
],
"id": 32,
"name": "Assignment",
"src": "334:36:0"
}
],
"id": 33,
"name": "ExpressionStatement",
"src": "334:36:0"
}
],
"id": 34,
"name": "Block",
"src": "328:47:0"
}
],
"id": 35,
"name": "FunctionDefinition",
"src": "272:103:0"
}
],
"id": 36,
"name": "ContractDefinition",
"src": "66:311:0"
}
],
"id": 37,
"name": "SourceUnit",
"src": "32:345:0"
},
"compiler": {
"name": "solc",
"version": "0.6.12+commit.27d51765.Emscripten.clang"
},
"networks": {
"2": {
"events": {},
"links": {},
"address": "0xf15871b42cd4481977F85681e9B43f2aaD369e9b",
"transactionHash": "0x3e3ee401bdc29c4041fe1d0c5e13df0d4ebec8aa44e74621c8e2ee1569b7903f"
}
},
"schemaVersion": "3.4.1",
"updatedAt": "2021-06-27T15:55:13.046Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}