Update for nftdapp
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
{
|
||||
"contractName": "AddressUtils",
|
||||
"abi": [],
|
||||
"bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a7230582057055433fd49bcd62bd59af54c3a75f9b5c81d9c70f5bb908838e055d5c8ece90029",
|
||||
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a7230582057055433fd49bcd62bd59af54c3a75f9b5c81d9c70f5bb908838e055d5c8ece90029",
|
||||
"sourceMap": "87:932:2:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24",
|
||||
"deployedSourceMap": "87:932:2:-;;;;;;;;",
|
||||
"bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820a33fcaee8adec8f4f199d47c1b3eb0309f78890ba1f229616f27f0a5aedbe8450029",
|
||||
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820a33fcaee8adec8f4f199d47c1b3eb0309f78890ba1f229616f27f0a5aedbe8450029",
|
||||
"sourceMap": "87:932:3:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24",
|
||||
"deployedSourceMap": "87:932:3:-;;;;;;;;",
|
||||
"source": "pragma solidity ^0.4.24;\n\n\n/**\n * Utility library of inline functions on addresses\n */\nlibrary AddressUtils {\n\n /**\n * Returns whether the target address is a contract\n * @dev This function will return false if invoked during the constructor of a contract,\n * as the code is not actually created until after the constructor finishes.\n * @param _addr address to check\n * @return whether the target address is a contract\n */\n function isContract(address _addr) internal view returns (bool) {\n uint256 size;\n // XXX Currently there is no better way to check if there is a contract in an address\n // than to check the size of the code at that address.\n // See https://ethereum.stackexchange.com/a/14016/36603\n // for more details about how this works.\n // TODO Check this again before the Serenity release, because all addresses will be\n // contracts then.\n // solium-disable-next-line security/no-inline-assembly\n assembly { size := extcodesize(_addr) }\n return size > 0;\n }\n\n}\n",
|
||||
"sourcePath": "/Users/willpark/Desktop/bookwork-blockchain/testcodes/9nftdapp-new/backend-nftdapp/node_modules/zeppelin-solidity/contracts/AddressUtils.sol",
|
||||
"sourcePath": "/Users/willpark/Desktop/bookwork-klaytn/project_codes/nftbapp/backend-nftdapp/node_modules/zeppelin-solidity/contracts/AddressUtils.sol",
|
||||
"ast": {
|
||||
"absolutePath": "/Users/willpark/Desktop/bookwork-blockchain/testcodes/9nftdapp-new/backend-nftdapp/node_modules/zeppelin-solidity/contracts/AddressUtils.sol",
|
||||
"absolutePath": "/Users/willpark/Desktop/bookwork-klaytn/project_codes/nftbapp/backend-nftdapp/node_modules/zeppelin-solidity/contracts/AddressUtils.sol",
|
||||
"exportedSymbols": {
|
||||
"AddressUtils": [
|
||||
413
|
||||
470
|
||||
]
|
||||
},
|
||||
"id": 414,
|
||||
"id": 471,
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 396,
|
||||
"id": 453,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"^",
|
||||
@@ -26,7 +26,7 @@
|
||||
".24"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "0:24:2"
|
||||
"src": "0:24:3"
|
||||
},
|
||||
{
|
||||
"baseContracts": [],
|
||||
@@ -34,29 +34,29 @@
|
||||
"contractKind": "library",
|
||||
"documentation": "Utility library of inline functions on addresses",
|
||||
"fullyImplemented": true,
|
||||
"id": 413,
|
||||
"id": 470,
|
||||
"linearizedBaseContracts": [
|
||||
413
|
||||
470
|
||||
],
|
||||
"name": "AddressUtils",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": {
|
||||
"id": 411,
|
||||
"id": 468,
|
||||
"nodeType": "Block",
|
||||
"src": "502:514:2",
|
||||
"src": "502:514:3",
|
||||
"statements": [
|
||||
{
|
||||
"assignments": [],
|
||||
"declarations": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 404,
|
||||
"id": 461,
|
||||
"name": "size",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 412,
|
||||
"src": "508:12:2",
|
||||
"scope": 469,
|
||||
"src": "508:12:3",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -64,10 +64,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 403,
|
||||
"id": 460,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "508:7:2",
|
||||
"src": "508:7:3",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@@ -77,36 +77,36 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"id": 405,
|
||||
"id": 462,
|
||||
"initialValue": null,
|
||||
"nodeType": "VariableDeclarationStatement",
|
||||
"src": "508:12:2"
|
||||
"src": "508:12:3"
|
||||
},
|
||||
{
|
||||
"externalReferences": [
|
||||
{
|
||||
"size": {
|
||||
"declaration": 404,
|
||||
"declaration": 461,
|
||||
"isOffset": false,
|
||||
"isSlot": false,
|
||||
"src": "963:4:2",
|
||||
"src": "963:4:3",
|
||||
"valueSize": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"_addr": {
|
||||
"declaration": 398,
|
||||
"declaration": 455,
|
||||
"isOffset": false,
|
||||
"isSlot": false,
|
||||
"src": "983:5:2",
|
||||
"src": "983:5:3",
|
||||
"valueSize": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": 406,
|
||||
"id": 463,
|
||||
"nodeType": "InlineAssembly",
|
||||
"operations": "{\n size := extcodesize(_addr)\n}",
|
||||
"src": "952:50:2"
|
||||
"src": "952:50:3"
|
||||
},
|
||||
{
|
||||
"expression": {
|
||||
@@ -115,19 +115,19 @@
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"id": 409,
|
||||
"id": 466,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": false,
|
||||
"lValueRequested": false,
|
||||
"leftExpression": {
|
||||
"argumentTypes": null,
|
||||
"id": 407,
|
||||
"id": 464,
|
||||
"name": "size",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 404,
|
||||
"src": "1003:4:2",
|
||||
"referencedDeclaration": 461,
|
||||
"src": "1003:4:3",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@@ -138,14 +138,14 @@
|
||||
"rightExpression": {
|
||||
"argumentTypes": null,
|
||||
"hexValue": "30",
|
||||
"id": 408,
|
||||
"id": 465,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"kind": "number",
|
||||
"lValueRequested": false,
|
||||
"nodeType": "Literal",
|
||||
"src": "1010:1:2",
|
||||
"src": "1010:1:3",
|
||||
"subdenomination": null,
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_rational_0_by_1",
|
||||
@@ -153,21 +153,21 @@
|
||||
},
|
||||
"value": "0"
|
||||
},
|
||||
"src": "1003:8:2",
|
||||
"src": "1003:8:3",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
}
|
||||
},
|
||||
"functionReturnParameters": 402,
|
||||
"id": 410,
|
||||
"functionReturnParameters": 459,
|
||||
"id": 467,
|
||||
"nodeType": "Return",
|
||||
"src": "996:15:2"
|
||||
"src": "996:15:3"
|
||||
}
|
||||
]
|
||||
},
|
||||
"documentation": "Returns whether the target address is a contract\n@dev This function will return false if invoked during the constructor of a contract,\nas the code is not actually created until after the constructor finishes.\n@param _addr address to check\n@return whether the target address is a contract",
|
||||
"id": 412,
|
||||
"id": 469,
|
||||
"implemented": true,
|
||||
"isConstructor": false,
|
||||
"isDeclaredConst": true,
|
||||
@@ -175,16 +175,16 @@
|
||||
"name": "isContract",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 399,
|
||||
"id": 456,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 398,
|
||||
"id": 455,
|
||||
"name": "_addr",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 412,
|
||||
"src": "458:13:2",
|
||||
"scope": 469,
|
||||
"src": "458:13:3",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -192,10 +192,10 @@
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 397,
|
||||
"id": 454,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "458:7:2",
|
||||
"src": "458:7:3",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
@@ -205,20 +205,20 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "457:15:2"
|
||||
"src": "457:15:3"
|
||||
},
|
||||
"payable": false,
|
||||
"returnParameters": {
|
||||
"id": 402,
|
||||
"id": 459,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 401,
|
||||
"id": 458,
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 412,
|
||||
"src": "496:4:2",
|
||||
"scope": 469,
|
||||
"src": "496:4:3",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -226,10 +226,10 @@
|
||||
"typeString": "bool"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 400,
|
||||
"id": 457,
|
||||
"name": "bool",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "496:4:2",
|
||||
"src": "496:4:3",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
@@ -239,33 +239,33 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "495:6:2"
|
||||
"src": "495:6:3"
|
||||
},
|
||||
"scope": 413,
|
||||
"src": "438:578:2",
|
||||
"scope": 470,
|
||||
"src": "438:578:3",
|
||||
"stateMutability": "view",
|
||||
"superFunction": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"scope": 414,
|
||||
"src": "87:932:2"
|
||||
"scope": 471,
|
||||
"src": "87:932:3"
|
||||
}
|
||||
],
|
||||
"src": "0:1020:2"
|
||||
"src": "0:1020:3"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "/Users/willpark/Desktop/bookwork-blockchain/testcodes/9nftdapp-new/backend-nftdapp/node_modules/zeppelin-solidity/contracts/AddressUtils.sol",
|
||||
"absolutePath": "/Users/willpark/Desktop/bookwork-klaytn/project_codes/nftbapp/backend-nftdapp/node_modules/zeppelin-solidity/contracts/AddressUtils.sol",
|
||||
"exportedSymbols": {
|
||||
"AddressUtils": [
|
||||
413
|
||||
470
|
||||
]
|
||||
},
|
||||
"id": 414,
|
||||
"id": 471,
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 396,
|
||||
"id": 453,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"^",
|
||||
@@ -273,7 +273,7 @@
|
||||
".24"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "0:24:2"
|
||||
"src": "0:24:3"
|
||||
},
|
||||
{
|
||||
"baseContracts": [],
|
||||
@@ -281,29 +281,29 @@
|
||||
"contractKind": "library",
|
||||
"documentation": "Utility library of inline functions on addresses",
|
||||
"fullyImplemented": true,
|
||||
"id": 413,
|
||||
"id": 470,
|
||||
"linearizedBaseContracts": [
|
||||
413
|
||||
470
|
||||
],
|
||||
"name": "AddressUtils",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": {
|
||||
"id": 411,
|
||||
"id": 468,
|
||||
"nodeType": "Block",
|
||||
"src": "502:514:2",
|
||||
"src": "502:514:3",
|
||||
"statements": [
|
||||
{
|
||||
"assignments": [],
|
||||
"declarations": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 404,
|
||||
"id": 461,
|
||||
"name": "size",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 412,
|
||||
"src": "508:12:2",
|
||||
"scope": 469,
|
||||
"src": "508:12:3",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -311,10 +311,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 403,
|
||||
"id": 460,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "508:7:2",
|
||||
"src": "508:7:3",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@@ -324,36 +324,36 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"id": 405,
|
||||
"id": 462,
|
||||
"initialValue": null,
|
||||
"nodeType": "VariableDeclarationStatement",
|
||||
"src": "508:12:2"
|
||||
"src": "508:12:3"
|
||||
},
|
||||
{
|
||||
"externalReferences": [
|
||||
{
|
||||
"size": {
|
||||
"declaration": 404,
|
||||
"declaration": 461,
|
||||
"isOffset": false,
|
||||
"isSlot": false,
|
||||
"src": "963:4:2",
|
||||
"src": "963:4:3",
|
||||
"valueSize": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"_addr": {
|
||||
"declaration": 398,
|
||||
"declaration": 455,
|
||||
"isOffset": false,
|
||||
"isSlot": false,
|
||||
"src": "983:5:2",
|
||||
"src": "983:5:3",
|
||||
"valueSize": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": 406,
|
||||
"id": 463,
|
||||
"nodeType": "InlineAssembly",
|
||||
"operations": "{\n size := extcodesize(_addr)\n}",
|
||||
"src": "952:50:2"
|
||||
"src": "952:50:3"
|
||||
},
|
||||
{
|
||||
"expression": {
|
||||
@@ -362,19 +362,19 @@
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"id": 409,
|
||||
"id": 466,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": false,
|
||||
"lValueRequested": false,
|
||||
"leftExpression": {
|
||||
"argumentTypes": null,
|
||||
"id": 407,
|
||||
"id": 464,
|
||||
"name": "size",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 404,
|
||||
"src": "1003:4:2",
|
||||
"referencedDeclaration": 461,
|
||||
"src": "1003:4:3",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@@ -385,14 +385,14 @@
|
||||
"rightExpression": {
|
||||
"argumentTypes": null,
|
||||
"hexValue": "30",
|
||||
"id": 408,
|
||||
"id": 465,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"kind": "number",
|
||||
"lValueRequested": false,
|
||||
"nodeType": "Literal",
|
||||
"src": "1010:1:2",
|
||||
"src": "1010:1:3",
|
||||
"subdenomination": null,
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_rational_0_by_1",
|
||||
@@ -400,21 +400,21 @@
|
||||
},
|
||||
"value": "0"
|
||||
},
|
||||
"src": "1003:8:2",
|
||||
"src": "1003:8:3",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
}
|
||||
},
|
||||
"functionReturnParameters": 402,
|
||||
"id": 410,
|
||||
"functionReturnParameters": 459,
|
||||
"id": 467,
|
||||
"nodeType": "Return",
|
||||
"src": "996:15:2"
|
||||
"src": "996:15:3"
|
||||
}
|
||||
]
|
||||
},
|
||||
"documentation": "Returns whether the target address is a contract\n@dev This function will return false if invoked during the constructor of a contract,\nas the code is not actually created until after the constructor finishes.\n@param _addr address to check\n@return whether the target address is a contract",
|
||||
"id": 412,
|
||||
"id": 469,
|
||||
"implemented": true,
|
||||
"isConstructor": false,
|
||||
"isDeclaredConst": true,
|
||||
@@ -422,16 +422,16 @@
|
||||
"name": "isContract",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 399,
|
||||
"id": 456,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 398,
|
||||
"id": 455,
|
||||
"name": "_addr",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 412,
|
||||
"src": "458:13:2",
|
||||
"scope": 469,
|
||||
"src": "458:13:3",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -439,10 +439,10 @@
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 397,
|
||||
"id": 454,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "458:7:2",
|
||||
"src": "458:7:3",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
@@ -452,20 +452,20 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "457:15:2"
|
||||
"src": "457:15:3"
|
||||
},
|
||||
"payable": false,
|
||||
"returnParameters": {
|
||||
"id": 402,
|
||||
"id": 459,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 401,
|
||||
"id": 458,
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 412,
|
||||
"src": "496:4:2",
|
||||
"scope": 469,
|
||||
"src": "496:4:3",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -473,10 +473,10 @@
|
||||
"typeString": "bool"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 400,
|
||||
"id": 457,
|
||||
"name": "bool",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "496:4:2",
|
||||
"src": "496:4:3",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
@@ -486,20 +486,20 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "495:6:2"
|
||||
"src": "495:6:3"
|
||||
},
|
||||
"scope": 413,
|
||||
"src": "438:578:2",
|
||||
"scope": 470,
|
||||
"src": "438:578:3",
|
||||
"stateMutability": "view",
|
||||
"superFunction": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"scope": 414,
|
||||
"src": "87:932:2"
|
||||
"scope": 471,
|
||||
"src": "87:932:3"
|
||||
}
|
||||
],
|
||||
"src": "0:1020:2"
|
||||
"src": "0:1020:3"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
@@ -507,5 +507,5 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "2.0.2",
|
||||
"updatedAt": "2019-01-10T18:16:54.178Z"
|
||||
"updatedAt": "2020-03-25T02:14:16.713Z"
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -26,19 +26,19 @@
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "pragma solidity ^0.4.24;\n\n\n/**\n * @title ERC165\n * @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md\n */\ninterface ERC165 {\n\n /**\n * @notice Query if a contract implements an interface\n * @param _interfaceId The interface identifier, as specified in ERC-165\n * @dev Interface identification is specified in ERC-165. This function\n * uses less than 30,000 gas.\n */\n function supportsInterface(bytes4 _interfaceId)\n external\n view\n returns (bool);\n}\n",
|
||||
"sourcePath": "/Users/willpark/Desktop/bookwork-blockchain/testcodes/9nftdapp-new/backend-nftdapp/node_modules/zeppelin-solidity/contracts/introspection/ERC165.sol",
|
||||
"sourcePath": "/Users/willpark/Desktop/bookwork-klaytn/project_codes/nftbapp/backend-nftdapp/node_modules/zeppelin-solidity/contracts/introspection/ERC165.sol",
|
||||
"ast": {
|
||||
"absolutePath": "/Users/willpark/Desktop/bookwork-blockchain/testcodes/9nftdapp-new/backend-nftdapp/node_modules/zeppelin-solidity/contracts/introspection/ERC165.sol",
|
||||
"absolutePath": "/Users/willpark/Desktop/bookwork-klaytn/project_codes/nftbapp/backend-nftdapp/node_modules/zeppelin-solidity/contracts/introspection/ERC165.sol",
|
||||
"exportedSymbols": {
|
||||
"ERC165": [
|
||||
423
|
||||
480
|
||||
]
|
||||
},
|
||||
"id": 424,
|
||||
"id": 481,
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 415,
|
||||
"id": 472,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"^",
|
||||
@@ -46,7 +46,7 @@
|
||||
".24"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "0:24:3"
|
||||
"src": "0:24:4"
|
||||
},
|
||||
{
|
||||
"baseContracts": [],
|
||||
@@ -54,9 +54,9 @@
|
||||
"contractKind": "interface",
|
||||
"documentation": "@title ERC165\n@dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md",
|
||||
"fullyImplemented": false,
|
||||
"id": 423,
|
||||
"id": 480,
|
||||
"linearizedBaseContracts": [
|
||||
423
|
||||
480
|
||||
],
|
||||
"name": "ERC165",
|
||||
"nodeType": "ContractDefinition",
|
||||
@@ -64,7 +64,7 @@
|
||||
{
|
||||
"body": null,
|
||||
"documentation": "@notice Query if a contract implements an interface\n@param _interfaceId The interface identifier, as specified in ERC-165\n@dev Interface identification is specified in ERC-165. This function\nuses less than 30,000 gas.",
|
||||
"id": 422,
|
||||
"id": 479,
|
||||
"implemented": false,
|
||||
"isConstructor": false,
|
||||
"isDeclaredConst": true,
|
||||
@@ -72,16 +72,16 @@
|
||||
"name": "supportsInterface",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 418,
|
||||
"id": 475,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 417,
|
||||
"id": 474,
|
||||
"name": "_interfaceId",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 422,
|
||||
"src": "420:19:3",
|
||||
"scope": 479,
|
||||
"src": "420:19:4",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -89,10 +89,10 @@
|
||||
"typeString": "bytes4"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 416,
|
||||
"id": 473,
|
||||
"name": "bytes4",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "420:6:3",
|
||||
"src": "420:6:4",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes4",
|
||||
"typeString": "bytes4"
|
||||
@@ -102,20 +102,20 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "419:21:3"
|
||||
"src": "419:21:4"
|
||||
},
|
||||
"payable": false,
|
||||
"returnParameters": {
|
||||
"id": 421,
|
||||
"id": 478,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 420,
|
||||
"id": 477,
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 422,
|
||||
"src": "476:4:3",
|
||||
"scope": 479,
|
||||
"src": "476:4:4",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -123,10 +123,10 @@
|
||||
"typeString": "bool"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 419,
|
||||
"id": 476,
|
||||
"name": "bool",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "476:4:3",
|
||||
"src": "476:4:4",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
@@ -136,33 +136,33 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "475:6:3"
|
||||
"src": "475:6:4"
|
||||
},
|
||||
"scope": 423,
|
||||
"src": "393:89:3",
|
||||
"scope": 480,
|
||||
"src": "393:89:4",
|
||||
"stateMutability": "view",
|
||||
"superFunction": null,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 424,
|
||||
"src": "121:363:3"
|
||||
"scope": 481,
|
||||
"src": "121:363:4"
|
||||
}
|
||||
],
|
||||
"src": "0:485:3"
|
||||
"src": "0:485:4"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "/Users/willpark/Desktop/bookwork-blockchain/testcodes/9nftdapp-new/backend-nftdapp/node_modules/zeppelin-solidity/contracts/introspection/ERC165.sol",
|
||||
"absolutePath": "/Users/willpark/Desktop/bookwork-klaytn/project_codes/nftbapp/backend-nftdapp/node_modules/zeppelin-solidity/contracts/introspection/ERC165.sol",
|
||||
"exportedSymbols": {
|
||||
"ERC165": [
|
||||
423
|
||||
480
|
||||
]
|
||||
},
|
||||
"id": 424,
|
||||
"id": 481,
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 415,
|
||||
"id": 472,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"^",
|
||||
@@ -170,7 +170,7 @@
|
||||
".24"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "0:24:3"
|
||||
"src": "0:24:4"
|
||||
},
|
||||
{
|
||||
"baseContracts": [],
|
||||
@@ -178,9 +178,9 @@
|
||||
"contractKind": "interface",
|
||||
"documentation": "@title ERC165\n@dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md",
|
||||
"fullyImplemented": false,
|
||||
"id": 423,
|
||||
"id": 480,
|
||||
"linearizedBaseContracts": [
|
||||
423
|
||||
480
|
||||
],
|
||||
"name": "ERC165",
|
||||
"nodeType": "ContractDefinition",
|
||||
@@ -188,7 +188,7 @@
|
||||
{
|
||||
"body": null,
|
||||
"documentation": "@notice Query if a contract implements an interface\n@param _interfaceId The interface identifier, as specified in ERC-165\n@dev Interface identification is specified in ERC-165. This function\nuses less than 30,000 gas.",
|
||||
"id": 422,
|
||||
"id": 479,
|
||||
"implemented": false,
|
||||
"isConstructor": false,
|
||||
"isDeclaredConst": true,
|
||||
@@ -196,16 +196,16 @@
|
||||
"name": "supportsInterface",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 418,
|
||||
"id": 475,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 417,
|
||||
"id": 474,
|
||||
"name": "_interfaceId",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 422,
|
||||
"src": "420:19:3",
|
||||
"scope": 479,
|
||||
"src": "420:19:4",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -213,10 +213,10 @@
|
||||
"typeString": "bytes4"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 416,
|
||||
"id": 473,
|
||||
"name": "bytes4",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "420:6:3",
|
||||
"src": "420:6:4",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes4",
|
||||
"typeString": "bytes4"
|
||||
@@ -226,20 +226,20 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "419:21:3"
|
||||
"src": "419:21:4"
|
||||
},
|
||||
"payable": false,
|
||||
"returnParameters": {
|
||||
"id": 421,
|
||||
"id": 478,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 420,
|
||||
"id": 477,
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 422,
|
||||
"src": "476:4:3",
|
||||
"scope": 479,
|
||||
"src": "476:4:4",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -247,10 +247,10 @@
|
||||
"typeString": "bool"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 419,
|
||||
"id": 476,
|
||||
"name": "bool",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "476:4:3",
|
||||
"src": "476:4:4",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
@@ -260,20 +260,20 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "475:6:3"
|
||||
"src": "475:6:4"
|
||||
},
|
||||
"scope": 423,
|
||||
"src": "393:89:3",
|
||||
"scope": 480,
|
||||
"src": "393:89:4",
|
||||
"stateMutability": "view",
|
||||
"superFunction": null,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 424,
|
||||
"src": "121:363:3"
|
||||
"scope": 481,
|
||||
"src": "121:363:4"
|
||||
}
|
||||
],
|
||||
"src": "0:485:3"
|
||||
"src": "0:485:4"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
@@ -281,5 +281,5 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "2.0.2",
|
||||
"updatedAt": "2019-01-10T18:16:54.178Z"
|
||||
"updatedAt": "2020-03-25T02:14:16.711Z"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -38,19 +38,19 @@
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "pragma solidity ^0.4.24;\n\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ncontract ERC721Receiver {\n /**\n * @dev Magic value to be returned upon successful reception of an NFT\n * Equals to `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`,\n * which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`\n */\n bytes4 internal constant ERC721_RECEIVED = 0x150b7a02;\n\n /**\n * @notice Handle the receipt of an NFT\n * @dev The ERC721 smart contract calls this function on the recipient\n * after a `safetransfer`. This function MAY throw to revert and reject the\n * transfer. Return of other than the magic value MUST result in the\n * transaction being reverted.\n * Note: the contract address is always the message sender.\n * @param _operator The address which called `safeTransferFrom` function\n * @param _from The address which previously owned the token\n * @param _tokenId The NFT identifier which is being transferred\n * @param _data Additional data with no specified format\n * @return `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n */\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes _data\n )\n public\n returns(bytes4);\n}\n",
|
||||
"sourcePath": "/Users/willpark/Desktop/bookwork-blockchain/testcodes/9nftdapp-new/backend-nftdapp/node_modules/zeppelin-solidity/contracts/token/ERC721/ERC721Receiver.sol",
|
||||
"sourcePath": "/Users/willpark/Desktop/bookwork-klaytn/project_codes/nftbapp/backend-nftdapp/node_modules/zeppelin-solidity/contracts/token/ERC721/ERC721Receiver.sol",
|
||||
"ast": {
|
||||
"absolutePath": "/Users/willpark/Desktop/bookwork-blockchain/testcodes/9nftdapp-new/backend-nftdapp/node_modules/zeppelin-solidity/contracts/token/ERC721/ERC721Receiver.sol",
|
||||
"absolutePath": "/Users/willpark/Desktop/bookwork-klaytn/project_codes/nftbapp/backend-nftdapp/node_modules/zeppelin-solidity/contracts/token/ERC721/ERC721Receiver.sol",
|
||||
"exportedSymbols": {
|
||||
"ERC721Receiver": [
|
||||
1311
|
||||
1368
|
||||
]
|
||||
},
|
||||
"id": 1312,
|
||||
"id": 1369,
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 1294,
|
||||
"id": 1351,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"^",
|
||||
@@ -58,7 +58,7 @@
|
||||
".24"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "0:24:9"
|
||||
"src": "0:24:10"
|
||||
},
|
||||
{
|
||||
"baseContracts": [],
|
||||
@@ -66,20 +66,20 @@
|
||||
"contractKind": "contract",
|
||||
"documentation": "@title ERC721 token receiver interface\n@dev Interface for any contract that wants to support safeTransfers\nfrom ERC721 asset contracts.",
|
||||
"fullyImplemented": false,
|
||||
"id": 1311,
|
||||
"id": 1368,
|
||||
"linearizedBaseContracts": [
|
||||
1311
|
||||
1368
|
||||
],
|
||||
"name": "ERC721Receiver",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"constant": true,
|
||||
"id": 1297,
|
||||
"id": 1354,
|
||||
"name": "ERC721_RECEIVED",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 1311,
|
||||
"src": "463:53:9",
|
||||
"scope": 1368,
|
||||
"src": "463:53:10",
|
||||
"stateVariable": true,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -87,10 +87,10 @@
|
||||
"typeString": "bytes4"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 1295,
|
||||
"id": 1352,
|
||||
"name": "bytes4",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "463:6:9",
|
||||
"src": "463:6:10",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes4",
|
||||
"typeString": "bytes4"
|
||||
@@ -99,14 +99,14 @@
|
||||
"value": {
|
||||
"argumentTypes": null,
|
||||
"hexValue": "30783135306237613032",
|
||||
"id": 1296,
|
||||
"id": 1353,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"kind": "number",
|
||||
"lValueRequested": false,
|
||||
"nodeType": "Literal",
|
||||
"src": "506:10:9",
|
||||
"src": "506:10:10",
|
||||
"subdenomination": null,
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_rational_353073666_by_1",
|
||||
@@ -119,7 +119,7 @@
|
||||
{
|
||||
"body": null,
|
||||
"documentation": "@notice Handle the receipt of an NFT\n@dev The ERC721 smart contract calls this function on the recipient\nafter a `safetransfer`. This function MAY throw to revert and reject the\ntransfer. Return of other than the magic value MUST result in the\ntransaction being reverted.\nNote: the contract address is always the message sender.\n@param _operator The address which called `safeTransferFrom` function\n@param _from The address which previously owned the token\n@param _tokenId The NFT identifier which is being transferred\n@param _data Additional data with no specified format\n@return `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`",
|
||||
"id": 1310,
|
||||
"id": 1367,
|
||||
"implemented": false,
|
||||
"isConstructor": false,
|
||||
"isDeclaredConst": false,
|
||||
@@ -127,16 +127,16 @@
|
||||
"name": "onERC721Received",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 1306,
|
||||
"id": 1363,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 1299,
|
||||
"id": 1356,
|
||||
"name": "_operator",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 1310,
|
||||
"src": "1271:17:9",
|
||||
"scope": 1367,
|
||||
"src": "1271:17:10",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -144,10 +144,10 @@
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 1298,
|
||||
"id": 1355,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "1271:7:9",
|
||||
"src": "1271:7:10",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
@@ -158,11 +158,11 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 1301,
|
||||
"id": 1358,
|
||||
"name": "_from",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 1310,
|
||||
"src": "1294:13:9",
|
||||
"scope": 1367,
|
||||
"src": "1294:13:10",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -170,10 +170,10 @@
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 1300,
|
||||
"id": 1357,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "1294:7:9",
|
||||
"src": "1294:7:10",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
@@ -184,11 +184,11 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 1303,
|
||||
"id": 1360,
|
||||
"name": "_tokenId",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 1310,
|
||||
"src": "1313:16:9",
|
||||
"scope": 1367,
|
||||
"src": "1313:16:10",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -196,10 +196,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 1302,
|
||||
"id": 1359,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "1313:7:9",
|
||||
"src": "1313:7:10",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@@ -210,11 +210,11 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 1305,
|
||||
"id": 1362,
|
||||
"name": "_data",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 1310,
|
||||
"src": "1335:11:9",
|
||||
"scope": 1367,
|
||||
"src": "1335:11:10",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -222,10 +222,10 @@
|
||||
"typeString": "bytes"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 1304,
|
||||
"id": 1361,
|
||||
"name": "bytes",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "1335:5:9",
|
||||
"src": "1335:5:10",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes_storage_ptr",
|
||||
"typeString": "bytes"
|
||||
@@ -235,20 +235,20 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "1265:85:9"
|
||||
"src": "1265:85:10"
|
||||
},
|
||||
"payable": false,
|
||||
"returnParameters": {
|
||||
"id": 1309,
|
||||
"id": 1366,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 1308,
|
||||
"id": 1365,
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 1310,
|
||||
"src": "1374:6:9",
|
||||
"scope": 1367,
|
||||
"src": "1374:6:10",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -256,10 +256,10 @@
|
||||
"typeString": "bytes4"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 1307,
|
||||
"id": 1364,
|
||||
"name": "bytes4",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "1374:6:9",
|
||||
"src": "1374:6:10",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes4",
|
||||
"typeString": "bytes4"
|
||||
@@ -269,33 +269,33 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "1373:8:9"
|
||||
"src": "1373:8:10"
|
||||
},
|
||||
"scope": 1311,
|
||||
"src": "1240:142:9",
|
||||
"scope": 1368,
|
||||
"src": "1240:142:10",
|
||||
"stateMutability": "nonpayable",
|
||||
"superFunction": null,
|
||||
"visibility": "public"
|
||||
}
|
||||
],
|
||||
"scope": 1312,
|
||||
"src": "180:1204:9"
|
||||
"scope": 1369,
|
||||
"src": "180:1204:10"
|
||||
}
|
||||
],
|
||||
"src": "0:1385:9"
|
||||
"src": "0:1385:10"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "/Users/willpark/Desktop/bookwork-blockchain/testcodes/9nftdapp-new/backend-nftdapp/node_modules/zeppelin-solidity/contracts/token/ERC721/ERC721Receiver.sol",
|
||||
"absolutePath": "/Users/willpark/Desktop/bookwork-klaytn/project_codes/nftbapp/backend-nftdapp/node_modules/zeppelin-solidity/contracts/token/ERC721/ERC721Receiver.sol",
|
||||
"exportedSymbols": {
|
||||
"ERC721Receiver": [
|
||||
1311
|
||||
1368
|
||||
]
|
||||
},
|
||||
"id": 1312,
|
||||
"id": 1369,
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 1294,
|
||||
"id": 1351,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"^",
|
||||
@@ -303,7 +303,7 @@
|
||||
".24"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "0:24:9"
|
||||
"src": "0:24:10"
|
||||
},
|
||||
{
|
||||
"baseContracts": [],
|
||||
@@ -311,20 +311,20 @@
|
||||
"contractKind": "contract",
|
||||
"documentation": "@title ERC721 token receiver interface\n@dev Interface for any contract that wants to support safeTransfers\nfrom ERC721 asset contracts.",
|
||||
"fullyImplemented": false,
|
||||
"id": 1311,
|
||||
"id": 1368,
|
||||
"linearizedBaseContracts": [
|
||||
1311
|
||||
1368
|
||||
],
|
||||
"name": "ERC721Receiver",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"constant": true,
|
||||
"id": 1297,
|
||||
"id": 1354,
|
||||
"name": "ERC721_RECEIVED",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 1311,
|
||||
"src": "463:53:9",
|
||||
"scope": 1368,
|
||||
"src": "463:53:10",
|
||||
"stateVariable": true,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -332,10 +332,10 @@
|
||||
"typeString": "bytes4"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 1295,
|
||||
"id": 1352,
|
||||
"name": "bytes4",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "463:6:9",
|
||||
"src": "463:6:10",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes4",
|
||||
"typeString": "bytes4"
|
||||
@@ -344,14 +344,14 @@
|
||||
"value": {
|
||||
"argumentTypes": null,
|
||||
"hexValue": "30783135306237613032",
|
||||
"id": 1296,
|
||||
"id": 1353,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"kind": "number",
|
||||
"lValueRequested": false,
|
||||
"nodeType": "Literal",
|
||||
"src": "506:10:9",
|
||||
"src": "506:10:10",
|
||||
"subdenomination": null,
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_rational_353073666_by_1",
|
||||
@@ -364,7 +364,7 @@
|
||||
{
|
||||
"body": null,
|
||||
"documentation": "@notice Handle the receipt of an NFT\n@dev The ERC721 smart contract calls this function on the recipient\nafter a `safetransfer`. This function MAY throw to revert and reject the\ntransfer. Return of other than the magic value MUST result in the\ntransaction being reverted.\nNote: the contract address is always the message sender.\n@param _operator The address which called `safeTransferFrom` function\n@param _from The address which previously owned the token\n@param _tokenId The NFT identifier which is being transferred\n@param _data Additional data with no specified format\n@return `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`",
|
||||
"id": 1310,
|
||||
"id": 1367,
|
||||
"implemented": false,
|
||||
"isConstructor": false,
|
||||
"isDeclaredConst": false,
|
||||
@@ -372,16 +372,16 @@
|
||||
"name": "onERC721Received",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"parameters": {
|
||||
"id": 1306,
|
||||
"id": 1363,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 1299,
|
||||
"id": 1356,
|
||||
"name": "_operator",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 1310,
|
||||
"src": "1271:17:9",
|
||||
"scope": 1367,
|
||||
"src": "1271:17:10",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -389,10 +389,10 @@
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 1298,
|
||||
"id": 1355,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "1271:7:9",
|
||||
"src": "1271:7:10",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
@@ -403,11 +403,11 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 1301,
|
||||
"id": 1358,
|
||||
"name": "_from",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 1310,
|
||||
"src": "1294:13:9",
|
||||
"scope": 1367,
|
||||
"src": "1294:13:10",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -415,10 +415,10 @@
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 1300,
|
||||
"id": 1357,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "1294:7:9",
|
||||
"src": "1294:7:10",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
@@ -429,11 +429,11 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 1303,
|
||||
"id": 1360,
|
||||
"name": "_tokenId",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 1310,
|
||||
"src": "1313:16:9",
|
||||
"scope": 1367,
|
||||
"src": "1313:16:10",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -441,10 +441,10 @@
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 1302,
|
||||
"id": 1359,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "1313:7:9",
|
||||
"src": "1313:7:10",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
@@ -455,11 +455,11 @@
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 1305,
|
||||
"id": 1362,
|
||||
"name": "_data",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 1310,
|
||||
"src": "1335:11:9",
|
||||
"scope": 1367,
|
||||
"src": "1335:11:10",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -467,10 +467,10 @@
|
||||
"typeString": "bytes"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 1304,
|
||||
"id": 1361,
|
||||
"name": "bytes",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "1335:5:9",
|
||||
"src": "1335:5:10",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes_storage_ptr",
|
||||
"typeString": "bytes"
|
||||
@@ -480,20 +480,20 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "1265:85:9"
|
||||
"src": "1265:85:10"
|
||||
},
|
||||
"payable": false,
|
||||
"returnParameters": {
|
||||
"id": 1309,
|
||||
"id": 1366,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 1308,
|
||||
"id": 1365,
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"scope": 1310,
|
||||
"src": "1374:6:9",
|
||||
"scope": 1367,
|
||||
"src": "1374:6:10",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
@@ -501,10 +501,10 @@
|
||||
"typeString": "bytes4"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 1307,
|
||||
"id": 1364,
|
||||
"name": "bytes4",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "1374:6:9",
|
||||
"src": "1374:6:10",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes4",
|
||||
"typeString": "bytes4"
|
||||
@@ -514,20 +514,20 @@
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "1373:8:9"
|
||||
"src": "1373:8:10"
|
||||
},
|
||||
"scope": 1311,
|
||||
"src": "1240:142:9",
|
||||
"scope": 1368,
|
||||
"src": "1240:142:10",
|
||||
"stateMutability": "nonpayable",
|
||||
"superFunction": null,
|
||||
"visibility": "public"
|
||||
}
|
||||
],
|
||||
"scope": 1312,
|
||||
"src": "180:1204:9"
|
||||
"scope": 1369,
|
||||
"src": "180:1204:10"
|
||||
}
|
||||
],
|
||||
"src": "0:1385:9"
|
||||
"src": "0:1385:10"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
@@ -535,5 +535,5 @@
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "2.0.2",
|
||||
"updatedAt": "2019-01-10T18:16:54.179Z"
|
||||
"updatedAt": "2020-03-25T02:14:16.714Z"
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
pragma solidity ^0.4.23;
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
import "./MyNFT.sol";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
pragma solidity >=0.4.21 <0.6.0;
|
||||
pragma solidity >=0.4.21 <0.7.0;
|
||||
|
||||
contract Migrations {
|
||||
address public owner;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var Migrations = artifacts.require("./Migrations.sol");
|
||||
var Migrations = artifacts.require("Migrations");
|
||||
|
||||
module.exports = function(deployer) {
|
||||
deployer.deploy(Migrations);
|
||||
|
||||
@@ -2,6 +2,6 @@ const MyNFT = artifacts.require("./MyNFT.sol");
|
||||
const Auctions = artifacts.require("./Auctions.sol");
|
||||
|
||||
module.exports = async function(deployer) {
|
||||
deployer.deploy(MyNFT, "AvarCat", "ACat")
|
||||
deployer.deploy(MyNFT, "MyKlay", "MKlay")
|
||||
deployer.deploy(Auctions)
|
||||
};
|
||||
|
||||
2812
nftbapp/backend-nftdapp/package-lock.json
generated
2812
nftbapp/backend-nftdapp/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -8,8 +8,8 @@ const MyNFT = artifacts.require("MyNFT");
|
||||
contract('Test MyNFT contract', function(accounts) {
|
||||
|
||||
let token;
|
||||
const name = "AvarCat"
|
||||
const symbol = "ACat"
|
||||
const name = "MyKlay"
|
||||
const symbol = "MKlay"
|
||||
|
||||
const account1 = accounts[1]
|
||||
const tokenId1 = 1111;
|
||||
|
||||
@@ -27,6 +27,12 @@
|
||||
require('babel-register')
|
||||
require('babel-polyfill')
|
||||
|
||||
const HDWalletProvider = require("truffle-hdwallet-provider-klaytn");
|
||||
const NETWORK_ID = '1001'
|
||||
|
||||
const URL = 'https://api.baobab.klaytn.net:8651' // testnet
|
||||
const PRIVATE_KEY = '0x9452f902e6c2751c123db6480cff2d83597b077059be7cb3ab9b47fb555e7da5' //testnet
|
||||
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
@@ -51,13 +57,12 @@ module.exports = {
|
||||
// port: 8545, // Standard Ethereum port (default: none)
|
||||
// network_id: "*", // Any network (default: none)
|
||||
// },
|
||||
development: {
|
||||
host: 'localhost',
|
||||
port: 7545,
|
||||
gas: 3000000,
|
||||
gasPrice: 21,
|
||||
network_id: '*' // Match any network id
|
||||
}
|
||||
klaytn: {
|
||||
provider: () => new HDWalletProvider(PRIVATE_KEY, URL),
|
||||
network_id: NETWORK_ID,
|
||||
gas: '8500000',
|
||||
gasPrice: null,
|
||||
},
|
||||
|
||||
// Another network with more advanced options...
|
||||
// advanced: {
|
||||
|
||||
7275
nftbapp/frontend-nftdapp/package-lock.json
generated
7275
nftbapp/frontend-nftdapp/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -7,17 +7,22 @@
|
||||
"build": "vue-cli-service build"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.18.0",
|
||||
"vue": "^2.5.21",
|
||||
"vue-axios": "^2.1.4",
|
||||
"caver-js": "^1.3.2",
|
||||
"vue": "^2.6.10",
|
||||
"vue-router": "^3.0.2",
|
||||
"vuetify": "^1.4.1",
|
||||
"web3": "^0.20.6"
|
||||
"vuetify": "^2.2.18",
|
||||
"vuex": "^3.1.3",
|
||||
"axios": "^0.18.0",
|
||||
"vue-axios": "^2.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "^3.1.1",
|
||||
"@vue/cli-service": "^3.1.1",
|
||||
"vue-template-compiler": "^2.5.21"
|
||||
"sass": "^1.19.0",
|
||||
"sass-loader": "^8.0.0",
|
||||
"vue-cli-plugin-vuetify": "^2.0.5",
|
||||
"vue-template-compiler": "^2.5.21",
|
||||
"vuetify-loader": "^1.3.0"
|
||||
},
|
||||
"postcss": {
|
||||
"plugins": {
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
<link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons' rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
|
||||
<title>frontend-nftdapp</title>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<v-app light>
|
||||
<v-toolbar fixed color="teal lighten-2" app dark :clipped-left="true">
|
||||
<v-app>
|
||||
<v-app-bar app clipped-left dense>
|
||||
<v-toolbar-title>NFT APP</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<a href="/wallet">Wallet</a>
|
||||
<a href="/upload">Upload</a>
|
||||
</div>
|
||||
</v-toolbar>
|
||||
</v-app-bar>
|
||||
<v-content class="contentWrapper">
|
||||
<v-container fluid>
|
||||
<router-view></router-view>
|
||||
@@ -19,10 +19,35 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import 'vuetify/dist/vuetify.min.css'
|
||||
|
||||
import { mapMutations } from 'vuex'
|
||||
import KlaytnService from './klaytn/klaytnService'
|
||||
|
||||
export default {
|
||||
name: 'app'
|
||||
name: 'app',
|
||||
|
||||
async mounted () {
|
||||
await this.connect()
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapMutations('wallet', [
|
||||
'setKlaytn',
|
||||
'setIsConnectWallet',
|
||||
'setMyAddress'
|
||||
]),
|
||||
async connect () {
|
||||
const klaytn = new KlaytnService()
|
||||
this.setKlaytn(klaytn)
|
||||
const address = await klaytn.init()
|
||||
if (address) {
|
||||
this.setMyAddress(address)
|
||||
this.setIsConnectWallet(true)
|
||||
} else {
|
||||
this.setIsConnectWallet(false)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
1
nftbapp/frontend-nftdapp/src/assets/logo.svg
Normal file
1
nftbapp/frontend-nftdapp/src/assets/logo.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 87.5 100"><defs><style>.cls-1{fill:#1697f6;}.cls-2{fill:#7bc6ff;}.cls-3{fill:#1867c0;}.cls-4{fill:#aeddff;}</style></defs><title>Artboard 46</title><polyline class="cls-1" points="43.75 0 23.31 0 43.75 48.32"/><polygon class="cls-2" points="43.75 62.5 43.75 100 0 14.58 22.92 14.58 43.75 62.5"/><polyline class="cls-3" points="43.75 0 64.19 0 43.75 48.32"/><polygon class="cls-4" points="64.58 14.58 87.5 14.58 43.75 100 43.75 62.5 64.58 14.58"/></svg>
|
||||
|
After Width: | Height: | Size: 539 B |
@@ -1,57 +0,0 @@
|
||||
<template>
|
||||
<div class="hello">
|
||||
<h1>{{ msg }}</h1>
|
||||
<p>
|
||||
For a guide and recipes on how to configure / customize this project,<br>
|
||||
check out the
|
||||
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
||||
</p>
|
||||
<h3>Installed CLI Plugins</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
||||
</ul>
|
||||
<h3>Essential Links</h3>
|
||||
<ul>
|
||||
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
||||
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
||||
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
||||
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
||||
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
||||
</ul>
|
||||
<h3>Ecosystem</h3>
|
||||
<ul>
|
||||
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
||||
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
||||
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
||||
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'HelloWorld',
|
||||
props: {
|
||||
msg: String
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style scoped>
|
||||
h3 {
|
||||
margin: 40px 0 0;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
</style>
|
||||
@@ -17,47 +17,52 @@
|
||||
</v-container>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import KlaytnService from '@/klaytn/klaytnService'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ciMyNFT: null,
|
||||
ciAuctions: null,
|
||||
return {
|
||||
auctions: []
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.ciAuctions = this.$web3.eth.contract(this.$config.AUCTIONS_ABI).at(this.$config.AUCTIONS_CA)
|
||||
this.ciMyNFT = this.$web3.eth.contract(this.$config.MYNFT_ABI).at(this.$config.MYNFT_CA)
|
||||
mounted() {
|
||||
this.getAuctions()
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
getAuctions() {
|
||||
this.ciAuctions.getCount({}, (error, result) => {
|
||||
const count = result
|
||||
|
||||
for(let i=0; i<count; i++) {
|
||||
|
||||
this.ciAuctions.getAuctionById(i, {}, (err, result) => {
|
||||
|
||||
this.ciMyNFT.ownerOf(result[3], {}, (error, owner) => {
|
||||
|
||||
this.auctions.push({
|
||||
title: result[0],
|
||||
price: this.$web3.fromWei(result[1], 'ether'),
|
||||
image: 'https://gateway.ipfs.io/ipfs/'+result[2],
|
||||
tokenId: result[3],
|
||||
owner: owner,
|
||||
active: result[6],
|
||||
finalized: result[7]
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
const klaytn = new KlaytnService()
|
||||
klaytn.getAuctions((auctions) => {
|
||||
auctions.forEach(auction => {
|
||||
console.log(auction)
|
||||
})
|
||||
})
|
||||
|
||||
// this.ciAuctions.getCount({}, (error, result) => {
|
||||
// const count = result
|
||||
|
||||
// for(let i=0; i<count; i++) {
|
||||
|
||||
// this.ciAuctions.getAuctionById(i, {}, (err, result) => {
|
||||
|
||||
// this.ciMyNFT.ownerOf(result[3], {}, (error, owner) => {
|
||||
|
||||
// this.auctions.push({
|
||||
// title: result[0],
|
||||
// price: this.$web3.fromWei(result[1], 'ether'),
|
||||
// image: 'https://gateway.ipfs.io/ipfs/'+result[2],
|
||||
// tokenId: result[3],
|
||||
// owner: owner,
|
||||
// active: result[6],
|
||||
// finalized: result[7]
|
||||
// })
|
||||
// })
|
||||
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,13 +30,12 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import PostAuction from '@/components/PostAuction.vue'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
account: null,
|
||||
contractInstance: null,
|
||||
return {
|
||||
file: null,
|
||||
tokenId: null,
|
||||
isRegistered: false,
|
||||
@@ -48,10 +47,13 @@ export default {
|
||||
PostAuction
|
||||
},
|
||||
|
||||
async mounted() {
|
||||
this.account = await this.$getDefaultAccount()
|
||||
this.contractInstance = this.$web3.eth.contract(this.$config.MYNFT_ABI).at(this.$config.MYNFT_CA)
|
||||
|
||||
computed: {
|
||||
...mapGetters('wallet', [
|
||||
'klaytn',
|
||||
])
|
||||
},
|
||||
|
||||
async mounted() {
|
||||
this.tokenId = this._getRandomInt(123456789,999999999)
|
||||
},
|
||||
|
||||
@@ -91,58 +93,19 @@ export default {
|
||||
if(!this.dataURI){
|
||||
alert("Fill in dataURI on the input")
|
||||
return
|
||||
}
|
||||
|
||||
this.contractInstance.registerUniqueToken(this.account, this.tokenId, this.dataURI, {
|
||||
from: this.account,
|
||||
gas: this.$config.GAS_AMOUNT
|
||||
}, (error, result) => {
|
||||
console.log("result",result)
|
||||
})
|
||||
}
|
||||
|
||||
this.watchTokenRegistered((error, result) => {
|
||||
if(!error) {
|
||||
alert("Token registered...!")
|
||||
this.isRegistered = true
|
||||
}
|
||||
})
|
||||
this.klaytn.registerUniqueToken(this.tokenId, this.dataURI, (receipt) => {
|
||||
alert(`Token registered...! (#${receipt.blockNumber} ,${receipt.transactionHash})`)
|
||||
this.isRegistered = true
|
||||
})
|
||||
},
|
||||
|
||||
transferToCA() {
|
||||
this.contractInstance.transferFrom(this.account, this.$config.AUCTIONS_CA, this.tokenId, {
|
||||
from: this.account,
|
||||
gas: this.$config.GAS_AMOUNT
|
||||
}, (error, result) => {
|
||||
console.log("result",result)
|
||||
})
|
||||
|
||||
this.watchTransfered((error, result) => {
|
||||
if(!error) alert("Token transfered to CA...!")
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
async watchTokenRegistered(cb) {
|
||||
const currentBlock = await this.getCurrentBlock()
|
||||
const eventWatcher = this.contractInstance.TokenRegistered({}, {fromBlock: currentBlock - 1, toBlock: 'latest'})
|
||||
eventWatcher.watch(cb)
|
||||
},
|
||||
|
||||
async watchTransfered(cb) {
|
||||
const currentBlock = await this.getCurrentBlock()
|
||||
const eventWatcher = this.contractInstance.Transfer({}, {fromBlock: currentBlock - 1, toBlock: 'latest'})
|
||||
eventWatcher.watch(cb)
|
||||
},
|
||||
|
||||
getCurrentBlock() {
|
||||
return new Promise((resolve, reject ) => {
|
||||
this.$web3.eth.getBlockNumber((err, blocknumber) => {
|
||||
if(!err) resolve(blocknumber)
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
this.klaytn.transferFrom(this.tokenId, (receipt) => {
|
||||
alert(`Token transfered to CA...! (#${receipt.blockNumber} ,${receipt.transactionHash})`)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
<v-card class="cardG">
|
||||
<div>
|
||||
<p class="text-center address">
|
||||
{{account}} <span class="reftxt">(Address)</span>
|
||||
{{myaddress}} <span class="reftxt">(Address)</span>
|
||||
</p>
|
||||
<p class="text-center balance">
|
||||
{{balance}} Ether <span class="reftxt">(Balance)</span>
|
||||
{{balance}} Klay <span class="reftxt">(Balance)</span>
|
||||
</p>
|
||||
</div>
|
||||
</v-card>
|
||||
@@ -31,15 +31,11 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
account: '',
|
||||
balance: null,
|
||||
|
||||
ciMyNFT: null,
|
||||
ciAuctions: null,
|
||||
|
||||
return {
|
||||
auctionIds:[],
|
||||
toAddress: null,
|
||||
selectedAuction: null,
|
||||
@@ -53,37 +49,33 @@
|
||||
}
|
||||
},
|
||||
|
||||
async mounted() {
|
||||
this.account = await this.$getDefaultAccount()
|
||||
computed: {
|
||||
...mapGetters('wallet', [
|
||||
'klaytn',
|
||||
'isConnectWallet',
|
||||
'myaddress',
|
||||
'balance'
|
||||
])
|
||||
},
|
||||
|
||||
this.$web3.eth.getBalance(this.account, (error, result) => {
|
||||
this.balance = this.$web3.fromWei(result, 'ether')
|
||||
})
|
||||
|
||||
this.ciMyNFT = this.$web3.eth.contract(this.$config.MYNFT_ABI).at(this.$config.MYNFT_CA)
|
||||
this.ciAuctions = this.$web3.eth.contract(this.$config.AUCTIONS_ABI).at(this.$config.AUCTIONS_CA)
|
||||
|
||||
this.getMyAuctions()
|
||||
async mounted() {
|
||||
this.getBalance()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getMyAuctions() {
|
||||
this.ciAuctions.getAuctionsOf(this.account, {from: this.account, gas: this.$config.GAS_AMOUNT}, (error, result) => {
|
||||
this.auctionIds = result
|
||||
})
|
||||
async getBalance () {
|
||||
if (this.myaddress) {
|
||||
const balance = await this.klaytn.getBalance(this.myaddress)
|
||||
this.setBalance(balance)
|
||||
}
|
||||
},
|
||||
|
||||
getAuctionById() {
|
||||
this.ciAuctions.getAuctionById(this.selectedAuction, {from: this.account, gas: this.$config.GAS_AMOUNT}, (error, result) => {
|
||||
console.log(result)
|
||||
this.auctionInfo.title = result[0]
|
||||
this.auctionInfo.price = this.$web3.fromWei(result[1], 'ether')
|
||||
this.auctionInfo.tokenId = result[3]
|
||||
async getMyAuctions() {
|
||||
this.auctionIds = await this.klaytn.getAuctionsOf(this.myaddress)
|
||||
},
|
||||
|
||||
this.ciMyNFT.ownerOf(result[3], {}, (error, owner) => {
|
||||
this.auctionInfo.owner = owner
|
||||
})
|
||||
})
|
||||
async getAuctionById() {
|
||||
this.auctionInfo = await this.klaytn.getAuctionById(this.selectedAuction)
|
||||
},
|
||||
|
||||
finalizeAuction() {
|
||||
@@ -91,29 +83,12 @@
|
||||
alert("please fill in to Address")
|
||||
return
|
||||
}
|
||||
|
||||
this.ciAuctions.finalizeAuction(this.selectedAuction, this.toAddress, {from: this.account, gas: this.$config.GAS_AMOUNT}, (error, result) => {
|
||||
console.log(result)
|
||||
})
|
||||
|
||||
this.watchFinalized((error, result) => {
|
||||
if(!error) alert("Auction finalized...!")
|
||||
})
|
||||
},
|
||||
|
||||
async watchFinalized(cb) {
|
||||
const currentBlock = await this.getCurrentBlock()
|
||||
const eventWatcher = this.ciAuctions.AuctionFinalized({}, {fromBlock: currentBlock - 1, toBlock: 'latest'})
|
||||
eventWatcher.watch(cb)
|
||||
},
|
||||
|
||||
getCurrentBlock() {
|
||||
return new Promise((resolve, reject ) => {
|
||||
this.$web3.eth.getBlockNumber((err, blocknumber) => {
|
||||
if(!err) resolve(blocknumber)
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
this.klaytn.finalizeAuction(this.selectedAuction, this.toAddress, (receipt) => {
|
||||
alert(`Auction finalized...! (#${receipt.blockNumber} ,${receipt.transactionHash})`)
|
||||
}, (error) => {
|
||||
console.error(error)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,14 +24,12 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
props: ['tokenid', 'metadata'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
account: null,
|
||||
contractInstance: null,
|
||||
|
||||
return {
|
||||
auction: {
|
||||
auctionTitle: '',
|
||||
price: null
|
||||
@@ -39,41 +37,29 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters('wallet', [
|
||||
'klaytn',
|
||||
])
|
||||
},
|
||||
|
||||
async mounted() {
|
||||
this.account = await this.$getDefaultAccount()
|
||||
this.contractInstance = this.$web3.eth.contract(this.$config.AUCTIONS_ABI).at(this.$config.AUCTIONS_CA)
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
async createAuction() {
|
||||
async createAuction() {
|
||||
if(!this.tokenid) {
|
||||
alert("Check for tokenId")
|
||||
return
|
||||
}
|
||||
|
||||
const price = this.$web3.toWei(this.auction.price, 'ether')
|
||||
this.contractInstance.createAuction(this.$config.MYNFT_CA, this.tokenid, this.auction.auctionTitle, this.metadata, price, {from: this.account, gas: this.$config.GAS_AMOUNT}, (error, transactionHash) => {
|
||||
console.log("txhash",transactionHash)
|
||||
})
|
||||
this.watchCreated((error, result) => {
|
||||
if(!error) alert("Creation completed...!")
|
||||
})
|
||||
},
|
||||
|
||||
async watchCreated(cb) {
|
||||
const currentBlock = await this.getCurrentBlock()
|
||||
const eventWatcher = this.contractInstance.AuctionCreated({}, {fromBlock: currentBlock - 1, toBlock: 'latest'})
|
||||
eventWatcher.watch(cb)
|
||||
},
|
||||
|
||||
getCurrentBlock() {
|
||||
return new Promise((resolve, reject ) => {
|
||||
this.$web3.eth.getBlockNumber((err, blocknumber) => {
|
||||
if(!err) resolve(blocknumber)
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
this.klaytn.createAuction(this.tokenid, this.auction.auctionTitle, this.metadata, auction.price, (receipt) => {
|
||||
alert(`Creation completed...! (#${receipt.blockNumber} ,${receipt.transactionHash})`)
|
||||
}, error => {
|
||||
alert(error)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,12 +0,0 @@
|
||||
const MyNFT = require('./contracts/MyNFT')
|
||||
const Auctions = require('./contracts/Auctions')
|
||||
|
||||
export default {
|
||||
MYNFT_CA: '0x3cd92247e5331d3b51f6cbeff4e5d3ef420f1989',
|
||||
AUCTIONS_CA: '0x5ffc6ca35a7ee8ed33228b47b49c21310e67339c',
|
||||
|
||||
MYNFT_ABI: MyNFT.abi,
|
||||
AUCTIONS_ABI: Auctions.abi,
|
||||
|
||||
GAS_AMOUNT: 500000
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
36
nftbapp/frontend-nftdapp/src/klaytn/caver.js
Normal file
36
nftbapp/frontend-nftdapp/src/klaytn/caver.js
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* caver-js library helps making connection with klaytn node.
|
||||
* You can connect to specific klaytn node by setting 'rpcURL' value.
|
||||
* default rpcURL is 'https://api.baobab.klaytn.net:8651'.
|
||||
*/
|
||||
import Caver from 'caver-js'
|
||||
|
||||
const AuctionsABI = require('@/contracts/Auctions.json').abi
|
||||
const MyNFTABI = require('@/contracts/MyNFT.json').abi
|
||||
|
||||
const TEST_NET = 'https://api.baobab.klaytn.net:8651'
|
||||
|
||||
export const config = {
|
||||
rpcURL: TEST_NET
|
||||
}
|
||||
|
||||
const MYNFT_CA = '0xfd0d9aeaae3c10b1acd9db5a17f2ee2775493f64'
|
||||
const AUCTIONS_CA = '0x3a235ca1b8d08f2f5d6607f8b9f4fa33f540fed6'
|
||||
|
||||
const cav = new Caver(config.rpcURL)
|
||||
|
||||
const getMyNFTInstance = () => {
|
||||
const contractInstance = MyNFTABI
|
||||
&& MYNFT_CA
|
||||
&& new cav.klay.Contract(MyNFTABI, MYNFT_CA)
|
||||
return contractInstance
|
||||
}
|
||||
|
||||
const getAuctionsInstance = () => {
|
||||
const contractInstance = AuctionsABI
|
||||
&& AUCTIONS_CA
|
||||
&& new cav.klay.Contract(AuctionsABI, AUCTIONS_CA)
|
||||
return contractInstance
|
||||
}
|
||||
|
||||
export {cav, MYNFT_CA, AUCTIONS_CA, getMyNFTInstance, getAuctionsInstance}
|
||||
228
nftbapp/frontend-nftdapp/src/klaytn/klaytnService.js
Normal file
228
nftbapp/frontend-nftdapp/src/klaytn/klaytnService.js
Normal file
@@ -0,0 +1,228 @@
|
||||
import { cav, MYNFT_CA, AUCTIONS_CA, getMyNFTInstance, getAuctionsInstance } from './caver'
|
||||
|
||||
export default class KlaytnService {
|
||||
|
||||
constructor() {}
|
||||
|
||||
async init () {
|
||||
const walletFromSession = sessionStorage.getItem('walletInstance')
|
||||
|
||||
if (walletFromSession) {
|
||||
try {
|
||||
const address = JSON.parse(walletFromSession).address
|
||||
cav.klay.accounts.wallet.add(JSON.parse(walletFromSession))
|
||||
|
||||
return address
|
||||
} catch (e) {
|
||||
sessionStorage.removeItem('walletInstance')
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async getBlockNumber () {
|
||||
const blockNumber = await cav.klay.getBlockNumber()
|
||||
return blockNumber
|
||||
}
|
||||
|
||||
async getBalance (address) {
|
||||
const balance = await cav.klay.getBalance(address)
|
||||
return cav.utils.fromPeb(balance, "KLAY")
|
||||
}
|
||||
|
||||
async loginWithKeystore (keystore, password) {
|
||||
const { privateKey: privateKeyFromKeystore } = cav.klay.accounts.decrypt(keystore, password)
|
||||
await this.integrateWallet(privateKeyFromKeystore)
|
||||
return true
|
||||
}
|
||||
|
||||
integrateWallet (privateKey) {
|
||||
const walletInstance = cav.klay.accounts.privateKeyToAccount(privateKey)
|
||||
cav.klay.accounts.wallet.add(walletInstance)
|
||||
sessionStorage.setItem('walletInstance', JSON.stringify(walletInstance))
|
||||
return true
|
||||
}
|
||||
|
||||
removeWallet () {
|
||||
cav.klay.accounts.wallet.clear()
|
||||
sessionStorage.removeItem('walletInstance')
|
||||
return true
|
||||
}
|
||||
|
||||
getWallet () {
|
||||
if (cav.klay.accounts.wallet.length) {
|
||||
return cav.klay.accounts.wallet[0]
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
getAuctions (dispatch) {
|
||||
getAuctionsInstance().methods.getCount().call()
|
||||
.then(count => {
|
||||
if (!count) return []
|
||||
const auctions = []
|
||||
for (let i = count; i > 0; i--) {
|
||||
const auction = getAuctionsInstance().methods.getAuctionById(i).call()
|
||||
auctions.push(auction)
|
||||
}
|
||||
return Promise.all(auctions)
|
||||
})
|
||||
.then(auctions => {
|
||||
dispatch(auctions)
|
||||
})
|
||||
}
|
||||
|
||||
async getOwner (tokenId) {
|
||||
const owner = await getMyNFTInstance().methods.ownerOf(tokenId).call()
|
||||
return owner
|
||||
}
|
||||
|
||||
async getAuctionsOf (address) {
|
||||
const result = await getAuctionsInstance().methods.getAuctionsOf(address).call()
|
||||
return result
|
||||
}
|
||||
|
||||
async getAuctionById (auctionId) {
|
||||
const auction = await getAuctionsInstance().methods.getAuctionById(auctionId).call()
|
||||
const aucionInfo = {}
|
||||
auctionInfo.title = result[0]
|
||||
auctionInfo.price = cav.utils.fromPeb(result[1], "KLAY")
|
||||
auctionInfo.tokenId = result[3]
|
||||
auctionInfo.owner = await this.getOwner(result[3])
|
||||
|
||||
return auctionInfo
|
||||
}
|
||||
|
||||
createAuction (tokenId, title, metadata, price, dispatch, errorCb) {
|
||||
const walletInstance = cav.klay.accounts.wallet && cav.klay.accounts.wallet[0]
|
||||
|
||||
if (!walletInstance) {
|
||||
console.log('no walletInstance')
|
||||
return
|
||||
}
|
||||
|
||||
price = cav.utils.fromPeb(price, "KLAY")
|
||||
|
||||
const address = walletInstance.address
|
||||
getAuctionsInstance().methods.createAuction(MYNFT_CA, tokenId, title, metadata, price).send({
|
||||
from: address,
|
||||
gas: '100000000'
|
||||
})
|
||||
.once('transactionHash', (txHash) => {
|
||||
console.log(`
|
||||
Sending a transaction...
|
||||
txHash: ${txHash}
|
||||
`
|
||||
)
|
||||
})
|
||||
.once('receipt', (receipt) => {
|
||||
console.log(`
|
||||
Received receipt! (#${receipt.blockNumber} ,${receipt.transactionHash})
|
||||
`, receipt)
|
||||
|
||||
dispatch(receipt)
|
||||
})
|
||||
.once('error', (error) => {
|
||||
errorCb(error.message)
|
||||
})
|
||||
}
|
||||
|
||||
finalizeAuction (auctionId, toAddress, dispatch, errorCb) {
|
||||
const walletInstance = cav.klay.accounts.wallet && cav.klay.accounts.wallet[0]
|
||||
|
||||
if (!walletInstance) {
|
||||
console.log('no walletInstance')
|
||||
return
|
||||
}
|
||||
|
||||
const address = walletInstance.address
|
||||
getAuctionsInstance().methods.finalizeAuction(auctionId, toAddress).send({
|
||||
from: address,
|
||||
gas: '1000000'
|
||||
})
|
||||
.once('transactionHash', (txHash) => {
|
||||
console.log(`
|
||||
Sending a transaction...
|
||||
txHash: ${txHash}
|
||||
`
|
||||
)
|
||||
})
|
||||
.once('receipt', (receipt) => {
|
||||
console.log(`
|
||||
Received receipt! (#${receipt.blockNumber} ,${receipt.transactionHash})
|
||||
`, receipt)
|
||||
|
||||
dispatch(receipt)
|
||||
})
|
||||
.once('error', (error) => {
|
||||
errorCb(error.message)
|
||||
})
|
||||
}
|
||||
|
||||
registerUniqueToken (tokenId, dataURI, dispatch) {
|
||||
const walletInstance = cav.klay.accounts.wallet && cav.klay.accounts.wallet[0]
|
||||
|
||||
if (!walletInstance) {
|
||||
console.log('no walletInstance')
|
||||
return
|
||||
}
|
||||
|
||||
const address = walletInstance.address
|
||||
getMyNFTInstance().methods.registerUniqueToken(address, tokenId, dataURI).send({
|
||||
from: address,
|
||||
gas: '100000000',
|
||||
})
|
||||
.once('transactionHash', (txHash) => {
|
||||
console.log(`
|
||||
Sending a transaction...
|
||||
txHash: ${txHash}
|
||||
`
|
||||
)
|
||||
})
|
||||
.once('receipt', (receipt) => {
|
||||
console.log(`
|
||||
Received receipt! (#${receipt.blockNumber} ,${receipt.transactionHash})
|
||||
`, receipt)
|
||||
|
||||
dispatch(receipt)
|
||||
})
|
||||
.once('error', (error) => {
|
||||
errorCb(error.message)
|
||||
})
|
||||
}
|
||||
|
||||
transferFrom (tokenId) {
|
||||
const walletInstance = cav.klay.accounts.wallet && cav.klay.accounts.wallet[0]
|
||||
|
||||
if (!walletInstance) {
|
||||
console.log('no walletInstance')
|
||||
return
|
||||
}
|
||||
|
||||
const address = walletInstance.address
|
||||
getMyNFTInstance().methods.transferFrom(address, AUCTIONS_CA, tokenId).send({
|
||||
from: address,
|
||||
gas: '100000000',
|
||||
})
|
||||
.once('transactionHash', (txHash) => {
|
||||
console.log(`
|
||||
Sending a transaction...
|
||||
txHash: ${txHash}
|
||||
`
|
||||
)
|
||||
})
|
||||
.once('receipt', (receipt) => {
|
||||
console.log(`
|
||||
Received receipt! (#${receipt.blockNumber} ,${receipt.transactionHash})
|
||||
`, receipt)
|
||||
|
||||
dispatch(receipt)
|
||||
})
|
||||
.once('error', (error) => {
|
||||
errorCb(error.message)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,39 +1,18 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import store from './store'
|
||||
import router from './router'
|
||||
import Vuetify from 'vuetify'
|
||||
import vuetify from './plugins/vuetify';
|
||||
import axios from 'axios'
|
||||
import VueAxios from 'vue-axios'
|
||||
import Web3 from 'web3'
|
||||
|
||||
import Config from './config'
|
||||
|
||||
Vue.use(Vuetify)
|
||||
Vue.use(VueAxios, axios)
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
Vue.mixin({
|
||||
created() {
|
||||
const web3js = window.web3
|
||||
if(typeof web3js !== 'undefined') {
|
||||
this.$web3 = new Web3(web3js.currentProvider)
|
||||
}
|
||||
|
||||
this.$getDefaultAccount = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$web3.eth.getAccounts((err, data) => {
|
||||
if(!err) resolve(data[0])
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
this.$config = Config
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
new Vue({
|
||||
router,
|
||||
render: h => h(App),
|
||||
store,
|
||||
vuetify,
|
||||
render: h => h(App)
|
||||
}).$mount('#app')
|
||||
|
||||
7
nftbapp/frontend-nftdapp/src/plugins/vuetify.js
Normal file
7
nftbapp/frontend-nftdapp/src/plugins/vuetify.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import Vue from 'vue';
|
||||
import Vuetify from 'vuetify/lib';
|
||||
|
||||
Vue.use(Vuetify);
|
||||
|
||||
export default new Vuetify({
|
||||
});
|
||||
12
nftbapp/frontend-nftdapp/src/store/index.js
Normal file
12
nftbapp/frontend-nftdapp/src/store/index.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
|
||||
import wallet from '@/store/modules/wallet'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
export default new Vuex.Store({
|
||||
modules: {
|
||||
wallet
|
||||
}
|
||||
})
|
||||
41
nftbapp/frontend-nftdapp/src/store/modules/wallet.js
Normal file
41
nftbapp/frontend-nftdapp/src/store/modules/wallet.js
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
const state = {
|
||||
klaytn: null,
|
||||
isConnectWallet: false,
|
||||
myaddress: '',
|
||||
balance: 0
|
||||
}
|
||||
|
||||
const getters = {
|
||||
klaytn: (state) => state.klaytn,
|
||||
isConnectWallet: (state) => state.isConnectWallet,
|
||||
myaddress: (state) => state.myaddress,
|
||||
balance: (state) => state.balance
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
setKlaytn(state, klaytn) {
|
||||
state.klaytn = klaytn
|
||||
},
|
||||
setIsConnectWallet(state, isConnected) {
|
||||
state.isConnectWallet = isConnected
|
||||
},
|
||||
setMyAddress(state, address) {
|
||||
state.myaddress = address
|
||||
},
|
||||
setBalance(state, balance) {
|
||||
state.balance = balance
|
||||
}
|
||||
}
|
||||
|
||||
const actions = {
|
||||
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
getters,
|
||||
actions,
|
||||
mutations
|
||||
}
|
||||
5
nftbapp/frontend-nftdapp/vue.config.js
Normal file
5
nftbapp/frontend-nftdapp/vue.config.js
Normal file
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
"transpileDependencies": [
|
||||
"vuetify"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user