tokenboost-solidity
Version:
Solidity contracts for TokenBoost
812 lines (811 loc) • 639 kB
JSON
{
"contractName": "ERC721BasicToken",
"abi": [
{
"constant": true,
"inputs": [
{
"name": "_interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "InterfaceId_ERC165",
"outputs": [
{
"name": "",
"type": "bytes4"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_from",
"type": "address"
},
{
"indexed": true,
"name": "_to",
"type": "address"
},
{
"indexed": true,
"name": "_tokenId",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_owner",
"type": "address"
},
{
"indexed": true,
"name": "_approved",
"type": "address"
},
{
"indexed": true,
"name": "_tokenId",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_owner",
"type": "address"
},
{
"indexed": true,
"name": "_operator",
"type": "address"
},
{
"indexed": false,
"name": "_approved",
"type": "bool"
}
],
"name": "ApprovalForAll",
"type": "event"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_tokenId",
"type": "uint256"
}
],
"name": "ownerOf",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_tokenId",
"type": "uint256"
}
],
"name": "exists",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_tokenId",
"type": "uint256"
}
],
"name": "approve",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_tokenId",
"type": "uint256"
}
],
"name": "getApproved",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_approved",
"type": "bool"
}
],
"name": "setApprovalForAll",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_operator",
"type": "address"
}
],
"name": "isApprovedForAll",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_tokenId",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_tokenId",
"type": "uint256"
}
],
"name": "safeTransferFrom",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_tokenId",
"type": "uint256"
},
{
"name": "_data",
"type": "bytes"
}
],
"name": "safeTransferFrom",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b506100437f01ffc9a7000000000000000000000000000000000000000000000000000000006401000000006100ac810204565b6100757f80ac58cd000000000000000000000000000000000000000000000000000000006401000000006100ac810204565b6100a77f4f558e79000000000000000000000000000000000000000000000000000000006401000000006100ac810204565b610118565b7fffffffff0000000000000000000000000000000000000000000000000000000080821614156100db57600080fd5b7fffffffff00000000000000000000000000000000000000000000000000000000166000908152602081905260409020805460ff19166001179055565b6109d5806101276000396000f3006080604052600436106100b95763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a781146100be578063081812fc146100f4578063095ea7b31461012857806319fa8f501461014e57806323b872dd1461018057806342842e0e146101aa5780634f558e79146101d45780636352211e146101ec57806370a0823114610204578063a22cb46514610237578063b88d4fde1461025d578063e985e9c5146102cc575b600080fd5b3480156100ca57600080fd5b506100e0600160e060020a0319600435166102f3565b604080519115158252519081900360200190f35b34801561010057600080fd5b5061010c600435610312565b60408051600160a060020a039092168252519081900360200190f35b34801561013457600080fd5b5061014c600160a060020a036004351660243561032d565b005b34801561015a57600080fd5b506101636103e3565b60408051600160e060020a03199092168252519081900360200190f35b34801561018c57600080fd5b5061014c600160a060020a0360043581169060243516604435610407565b3480156101b657600080fd5b5061014c600160a060020a03600435811690602435166044356104aa565b3480156101e057600080fd5b506100e06004356104cb565b3480156101f857600080fd5b5061010c6004356104e8565b34801561021057600080fd5b50610225600160a060020a0360043516610512565b60408051918252519081900360200190f35b34801561024357600080fd5b5061014c600160a060020a03600435166024351515610545565b34801561026957600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261014c94600160a060020a0381358116956024803590921695604435953695608494019181908401838280828437509497506105c99650505050505050565b3480156102d857600080fd5b506100e0600160a060020a03600435811690602435166105f1565b600160e060020a03191660009081526020819052604090205460ff1690565b600090815260026020526040902054600160a060020a031690565b6000610338826104e8565b9050600160a060020a03838116908216141561035357600080fd5b33600160a060020a038216148061036f575061036f81336105f1565b151561037a57600080fd5b600082815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b7f01ffc9a70000000000000000000000000000000000000000000000000000000081565b610411338261061f565b151561041c57600080fd5b600160a060020a038316151561043157600080fd5b600160a060020a038216151561044657600080fd5b610450838261067e565b61045a83826106ef565b6104648282610785565b8082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6104c683838360206040519081016040528060008152506105c9565b505050565b600090815260016020526040902054600160a060020a0316151590565b600081815260016020526040812054600160a060020a031680151561050c57600080fd5b92915050565b6000600160a060020a038216151561052957600080fd5b50600160a060020a031660009081526003602052604090205490565b600160a060020a03821633141561055b57600080fd5b336000818152600460209081526040808320600160a060020a03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b6105d4848484610407565b6105e084848484610815565b15156105eb57600080fd5b50505050565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205460ff1690565b60008061062b836104e8565b905080600160a060020a031684600160a060020a03161480610666575083600160a060020a031661065b84610312565b600160a060020a0316145b80610676575061067681856105f1565b949350505050565b81600160a060020a0316610691826104e8565b600160a060020a0316146106a457600080fd5b600081815260026020526040902054600160a060020a0316156106eb576000818152600260205260409020805473ffffffffffffffffffffffffffffffffffffffff191690555b5050565b81600160a060020a0316610702826104e8565b600160a060020a03161461071557600080fd5b600160a060020a03821660009081526003602052604090205461073f90600163ffffffff61098216565b600160a060020a03909216600090815260036020908152604080832094909455918152600190915220805473ffffffffffffffffffffffffffffffffffffffff19169055565b600081815260016020526040902054600160a060020a0316156107a757600080fd5b6000818152600160208181526040808420805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03881690811790915584526003909152909120546107f591610994565b600160a060020a0390921660009081526003602052604090209190915550565b60008061082a85600160a060020a03166109a1565b15156108395760019150610979565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03898116602485015260448401889052608060648501908152875160848601528751918a169463150b7a0294938c938b938b93909160a490910190602085019080838360005b838110156108cc5781810151838201526020016108b4565b50505050905090810190601f1680156108f95780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561091b57600080fd5b505af115801561092f573d6000803e3d6000fd5b505050506040513d602081101561094557600080fd5b5051600160e060020a031981167f150b7a020000000000000000000000000000000000000000000000000000000014925090505b50949350505050565b60008282111561098e57fe5b50900390565b8181018281101561050c57fe5b6000903b11905600a165627a7a7230582019ac72d910f3d78415dfbdd5d803097cd830ee1c38ae862e703d328fee837d320029",
"deployedBytecode": "0x6080604052600436106100b95763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a781146100be578063081812fc146100f4578063095ea7b31461012857806319fa8f501461014e57806323b872dd1461018057806342842e0e146101aa5780634f558e79146101d45780636352211e146101ec57806370a0823114610204578063a22cb46514610237578063b88d4fde1461025d578063e985e9c5146102cc575b600080fd5b3480156100ca57600080fd5b506100e0600160e060020a0319600435166102f3565b604080519115158252519081900360200190f35b34801561010057600080fd5b5061010c600435610312565b60408051600160a060020a039092168252519081900360200190f35b34801561013457600080fd5b5061014c600160a060020a036004351660243561032d565b005b34801561015a57600080fd5b506101636103e3565b60408051600160e060020a03199092168252519081900360200190f35b34801561018c57600080fd5b5061014c600160a060020a0360043581169060243516604435610407565b3480156101b657600080fd5b5061014c600160a060020a03600435811690602435166044356104aa565b3480156101e057600080fd5b506100e06004356104cb565b3480156101f857600080fd5b5061010c6004356104e8565b34801561021057600080fd5b50610225600160a060020a0360043516610512565b60408051918252519081900360200190f35b34801561024357600080fd5b5061014c600160a060020a03600435166024351515610545565b34801561026957600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261014c94600160a060020a0381358116956024803590921695604435953695608494019181908401838280828437509497506105c99650505050505050565b3480156102d857600080fd5b506100e0600160a060020a03600435811690602435166105f1565b600160e060020a03191660009081526020819052604090205460ff1690565b600090815260026020526040902054600160a060020a031690565b6000610338826104e8565b9050600160a060020a03838116908216141561035357600080fd5b33600160a060020a038216148061036f575061036f81336105f1565b151561037a57600080fd5b600082815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b7f01ffc9a70000000000000000000000000000000000000000000000000000000081565b610411338261061f565b151561041c57600080fd5b600160a060020a038316151561043157600080fd5b600160a060020a038216151561044657600080fd5b610450838261067e565b61045a83826106ef565b6104648282610785565b8082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6104c683838360206040519081016040528060008152506105c9565b505050565b600090815260016020526040902054600160a060020a0316151590565b600081815260016020526040812054600160a060020a031680151561050c57600080fd5b92915050565b6000600160a060020a038216151561052957600080fd5b50600160a060020a031660009081526003602052604090205490565b600160a060020a03821633141561055b57600080fd5b336000818152600460209081526040808320600160a060020a03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b6105d4848484610407565b6105e084848484610815565b15156105eb57600080fd5b50505050565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205460ff1690565b60008061062b836104e8565b905080600160a060020a031684600160a060020a03161480610666575083600160a060020a031661065b84610312565b600160a060020a0316145b80610676575061067681856105f1565b949350505050565b81600160a060020a0316610691826104e8565b600160a060020a0316146106a457600080fd5b600081815260026020526040902054600160a060020a0316156106eb576000818152600260205260409020805473ffffffffffffffffffffffffffffffffffffffff191690555b5050565b81600160a060020a0316610702826104e8565b600160a060020a03161461071557600080fd5b600160a060020a03821660009081526003602052604090205461073f90600163ffffffff61098216565b600160a060020a03909216600090815260036020908152604080832094909455918152600190915220805473ffffffffffffffffffffffffffffffffffffffff19169055565b600081815260016020526040902054600160a060020a0316156107a757600080fd5b6000818152600160208181526040808420805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03881690811790915584526003909152909120546107f591610994565b600160a060020a0390921660009081526003602052604090209190915550565b60008061082a85600160a060020a03166109a1565b15156108395760019150610979565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03898116602485015260448401889052608060648501908152875160848601528751918a169463150b7a0294938c938b938b93909160a490910190602085019080838360005b838110156108cc5781810151838201526020016108b4565b50505050905090810190601f1680156108f95780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561091b57600080fd5b505af115801561092f573d6000803e3d6000fd5b505050506040513d602081101561094557600080fd5b5051600160e060020a031981167f150b7a020000000000000000000000000000000000000000000000000000000014925090505b50949350505050565b60008282111561098e57fe5b50900390565b8181018281101561050c57fe5b6000903b11905600a165627a7a7230582019ac72d910f3d78415dfbdd5d803097cd830ee1c38ae862e703d328fee837d320029",
"sourceMap": "363:10428:31:-;;;1152:199;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;649:38:20;668:18;649;;;;:38;:::i;:::-;1258::31;1277:18;1258;;;;:38;:::i;:::-;1302:44;1321:24;1302:18;;;;:44;:::i;:::-;363:10428;;987:156:20;1065:26;;;;;;1057:35;;;;;;1098:33;;:19;:33;;;;;;;;;;:40;;-1:-1:-1;;1098:40:20;1134:4;1098:40;;;987:156::o;363:10428:31:-;;;;;;;",
"deployedSourceMap": "363:10428:31:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;775:142:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;775:142:20;-1:-1:-1;;;;;;775:142:20;;;;;;;;;;;;;;;;;;;;;;;3289:111:31;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3289:111:31;;;;;;;;;-1:-1:-1;;;;;3289:111:31;;;;;;;;;;;;;;2785:277;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2785:277:31;-1:-1:-1;;;;;2785:277:31;;;;;;;;;230:54:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;230:54:20;;;;;;;;-1:-1:-1;;;;;;230:54:20;;;;;;;;;;;;;;4780:370:31;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4780:370:31;-1:-1:-1;;;;;4780:370:31;;;;;;;;;;;;5766:199;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5766:199:31;-1:-1:-1;;;;;5766:199:31;;;;;;;;;;;;2240:140;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2240:140:31;;;;;1898:164;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1898:164:31;;;;;1543:142;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1543:142:31;-1:-1:-1;;;;;1543:142:31;;;;;;;;;;;;;;;;;;;;;3680:205;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3680:205:31;-1:-1:-1;;;;;3680:205:31;;;;;;;;;6647:276;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6647:276:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6647:276:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6647:276:31;;-1:-1:-1;6647:276:31;;-1:-1:-1;;;;;;;6647:276:31;4194:168;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4194:168:31;-1:-1:-1;;;;;4194:168:31;;;;;;;;;;775:142:20;-1:-1:-1;;;;;;879:33:20;858:4;879:33;;;;;;;;;;;;;;775:142::o;3289:111:31:-;3349:7;3371:24;;;:14;:24;;;;;;-1:-1:-1;;;;;3371:24:31;;3289:111::o;2785:277::-;2846:13;2862:17;2870:8;2862:7;:17::i;:::-;2846:33;-1:-1:-1;;;;;;2893:12:31;;;;;;;;2885:21;;;;;;2920:10;-1:-1:-1;;;;;2920:19:31;;;;:58;;;2943:35;2960:5;2967:10;2943:16;:35::i;:::-;2912:67;;;;;;;;2986:24;;;;:14;:24;;;;;;:30;;-1:-1:-1;;2986:30:31;-1:-1:-1;;;;;2986:30:31;;;;;;;;;3027;;2986:24;;3027:30;;;;;;;2785:277;;;:::o;230:54:20:-;;;:::o;4780:370:31:-;4891:39;4909:10;4921:8;4891:17;:39::i;:::-;4883:48;;;;;;;;-1:-1:-1;;;;;4945:19:31;;;;4937:28;;;;;;-1:-1:-1;;;;;4979:17:31;;;;4971:26;;;;;;5004:30;5018:5;5025:8;5004:13;:30::i;:::-;5040:32;5056:5;5063:8;5040:15;:32::i;:::-;5078:25;5089:3;5094:8;5078:10;:25::i;:::-;5136:8;5131:3;-1:-1:-1;;;;;5115:30:31;5124:5;-1:-1:-1;;;;;5115:30:31;;;;;;;;;;;4780:370;;;:::o;5766:199::-;5918:42;5935:5;5942:3;5947:8;5918:42;;;;;;;;;;;;;:16;:42::i;:::-;5766:199;;;:::o;2240:140::-;2295:4;2323:20;;;:10;:20;;;;;;-1:-1:-1;;;;;2323:20:31;2356:19;;;2240:140::o;1898:164::-;1954:7;1985:20;;;:10;:20;;;;;;-1:-1:-1;;;;;1985:20:31;2019:19;;;2011:28;;;;;;2052:5;1898:164;-1:-1:-1;;1898:164:31:o;1543:142::-;1599:7;-1:-1:-1;;;;;1622:20:31;;;;1614:29;;;;;;-1:-1:-1;;;;;;1656:24:31;;;;;:16;:24;;;;;;;1543:142::o;3680:205::-;-1:-1:-1;;;;;3757:17:31;;3764:10;3757:17;;3749:26;;;;;;3799:10;3781:29;;;;:17;:29;;;;;;;;-1:-1:-1;;;;;3781:34:31;;;;;;;;;;;;:46;;-1:-1:-1;;3781:46:31;;;;;;;;;;3838:42;;;;;;;3781:34;;3799:10;3838:42;;;;;;;;;;;3680:205;;:::o;6647:276::-;6771:34;6784:5;6791:3;6796:8;6771:12;:34::i;:::-;6864:53;6889:5;6896:3;6901:8;6911:5;6864:24;:53::i;:::-;6856:62;;;;;;;;6647:276;;;;:::o;4194:168::-;-1:-1:-1;;;;;4321:25:31;;;4300:4;4321:25;;;:17;:25;;;;;;;;:36;;;;;;;;;;;;;;;4194:168::o;7270:438::-;7380:4;7394:13;7410:17;7418:8;7410:7;:17::i;:::-;7394:33;;7606:5;-1:-1:-1;;;;;7594:17:31;:8;-1:-1:-1;;;;;7594:17:31;;:60;;;;7646:8;-1:-1:-1;;;;;7621:33:31;:21;7633:8;7621:11;:21::i;:::-;-1:-1:-1;;;;;7621:33:31;;7594:60;:103;;;;7664:33;7681:5;7688:8;7664:16;:33::i;:::-;7579:124;7270:438;-1:-1:-1;;;;7270:438:31:o;8762:214::-;8863:6;-1:-1:-1;;;;;8842:27:31;:17;8850:8;8842:7;:17::i;:::-;-1:-1:-1;;;;;8842:27:31;;8834:36;;;;;;8916:1;8880:24;;;:14;:24;;;;;;-1:-1:-1;;;;;8880:24:31;:38;8876:96;;8963:1;8928:24;;;:14;:24;;;;;:37;;-1:-1:-1;;8928:37:31;;;8876:96;8762:214;;:::o;9722:::-;9824:5;-1:-1:-1;;;;;9803:26:31;:17;9811:8;9803:7;:17::i;:::-;-1:-1:-1;;;;;9803:26:31;;9795:35;;;;;;-1:-1:-1;;;;;9862:23:31;;;;;;:16;:23;;;;;;:30;;9890:1;9862:30;:27;:30;:::i;:::-;-1:-1:-1;;;;;9836:23:31;;;;;;;:16;:23;;;;;;;;:56;;;;9898:20;;;:10;:20;;;;:33;;-1:-1:-1;;9898:33:31;;;9722:214::o;9239:204::-;9345:1;9313:20;;;:10;:20;;;;;;-1:-1:-1;;;;;9313:20:31;:34;9305:43;;;;;;9354:20;;;;:10;:20;;;;;;;;:26;;-1:-1:-1;;9354:26:31;-1:-1:-1;;;;;9354:26:31;;;;;;;;9410:21;;:16;:21;;;;;;;:28;;:25;:28::i;:::-;-1:-1:-1;;;;;9386:21:31;;;;;;;:16;:21;;;;;:52;;;;-1:-1:-1;9239:204:31:o;10442:347::-;10581:4;10649:13;10600:16;:3;-1:-1:-1;;;;;10600:14:31;;:16::i;:::-;10599:17;10595:49;;;10633:4;10626:11;;;;10595:49;10665:79;;;;;10709:10;10665:79;;;;;;-1:-1:-1;;;;;10665:79:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;:36;;;;;;10709:10;10721:5;;10728:8;;10738:5;;10665:79;;;;;;;;;;;;;;-1:-1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;10665:79:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10665:79:31;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10665:79:31;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10665:79:31;-1:-1:-1;;;;;;10758:25:31;;10768:15;10758:25;;-1:-1:-1;10665:79:31;-1:-1:-1;10442:347:31;;;;;;;;:::o;1060:116:21:-;1120:7;1142:8;;;;1135:16;;;;-1:-1:-1;1164:7:21;;;1060:116::o;1238:128::-;1319:7;;;1339;;;;1332:15;;;438:578:18;496:4;971:18;;1003:8;;438:578::o",
"source": "pragma solidity ^0.4.24;\n\nimport \"./ERC721Basic.sol\";\nimport \"./ERC721Receiver.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../AddressUtils.sol\";\nimport \"../../introspection/SupportsInterfaceWithLookup.sol\";\n\n\n/**\n * @title ERC721 Non-Fungible Token Standard basic implementation\n * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md\n */\ncontract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {\n\n using SafeMath for uint256;\n using AddressUtils for address;\n\n // Equals to `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`\n bytes4 private constant ERC721_RECEIVED = 0x150b7a02;\n\n // Mapping from token ID to owner\n mapping (uint256 => address) internal tokenOwner;\n\n // Mapping from token ID to approved address\n mapping (uint256 => address) internal tokenApprovals;\n\n // Mapping from owner to number of owned token\n mapping (address => uint256) internal ownedTokensCount;\n\n // Mapping from owner to operator approvals\n mapping (address => mapping (address => bool)) internal operatorApprovals;\n\n constructor()\n public\n {\n // register the supported interfaces to conform to ERC721 via ERC165\n _registerInterface(InterfaceId_ERC721);\n _registerInterface(InterfaceId_ERC721Exists);\n }\n\n /**\n * @dev Gets the balance of the specified address\n * @param _owner address to query the balance of\n * @return uint256 representing the amount owned by the passed address\n */\n function balanceOf(address _owner) public view returns (uint256) {\n require(_owner != address(0));\n return ownedTokensCount[_owner];\n }\n\n /**\n * @dev Gets the owner of the specified token ID\n * @param _tokenId uint256 ID of the token to query the owner of\n * @return owner address currently marked as the owner of the given token ID\n */\n function ownerOf(uint256 _tokenId) public view returns (address) {\n address owner = tokenOwner[_tokenId];\n require(owner != address(0));\n return owner;\n }\n\n /**\n * @dev Returns whether the specified token exists\n * @param _tokenId uint256 ID of the token to query the existence of\n * @return whether the token exists\n */\n function exists(uint256 _tokenId) public view returns (bool) {\n address owner = tokenOwner[_tokenId];\n return owner != address(0);\n }\n\n /**\n * @dev Approves another address to transfer the given token ID\n * The zero address indicates there is no approved address.\n * There can only be one approved address per token at a given time.\n * Can only be called by the token owner or an approved operator.\n * @param _to address to be approved for the given token ID\n * @param _tokenId uint256 ID of the token to be approved\n */\n function approve(address _to, uint256 _tokenId) public {\n address owner = ownerOf(_tokenId);\n require(_to != owner);\n require(msg.sender == owner || isApprovedForAll(owner, msg.sender));\n\n tokenApprovals[_tokenId] = _to;\n emit Approval(owner, _to, _tokenId);\n }\n\n /**\n * @dev Gets the approved address for a token ID, or zero if no address set\n * @param _tokenId uint256 ID of the token to query the approval of\n * @return address currently approved for the given token ID\n */\n function getApproved(uint256 _tokenId) public view returns (address) {\n return tokenApprovals[_tokenId];\n }\n\n /**\n * @dev Sets or unsets the approval of a given operator\n * An operator is allowed to transfer all tokens of the sender on their behalf\n * @param _to operator address to set the approval\n * @param _approved representing the status of the approval to be set\n */\n function setApprovalForAll(address _to, bool _approved) public {\n require(_to != msg.sender);\n operatorApprovals[msg.sender][_to] = _approved;\n emit ApprovalForAll(msg.sender, _to, _approved);\n }\n\n /**\n * @dev Tells whether an operator is approved by a given owner\n * @param _owner owner address which you want to query the approval of\n * @param _operator operator address which you want to query the approval of\n * @return bool whether the given operator is approved by the given owner\n */\n function isApprovedForAll(\n address _owner,\n address _operator\n )\n public\n view\n returns (bool)\n {\n return operatorApprovals[_owner][_operator];\n }\n\n /**\n * @dev Transfers the ownership of a given token ID to another address\n * Usage of this method is discouraged, use `safeTransferFrom` whenever possible\n * Requires the msg sender to be the owner, approved, or operator\n * @param _from current owner of the token\n * @param _to address to receive the ownership of the given token ID\n * @param _tokenId uint256 ID of the token to be transferred\n */\n function transferFrom(\n address _from,\n address _to,\n uint256 _tokenId\n )\n public\n {\n require(isApprovedOrOwner(msg.sender, _tokenId));\n require(_from != address(0));\n require(_to != address(0));\n\n clearApproval(_from, _tokenId);\n removeTokenFrom(_from, _tokenId);\n addTokenTo(_to, _tokenId);\n\n emit Transfer(_from, _to, _tokenId);\n }\n\n /**\n * @dev Safely transfers the ownership of a given token ID to another address\n * If the target address is a contract, it must implement `onERC721Received`,\n * which is called upon a safe transfer, and return the magic value\n * `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`; otherwise,\n * the transfer is reverted.\n *\n * Requires the msg sender to be the owner, approved, or operator\n * @param _from current owner of the token\n * @param _to address to receive the ownership of the given token ID\n * @param _tokenId uint256 ID of the token to be transferred\n */\n function safeTransferFrom(\n address _from,\n address _to,\n uint256 _tokenId\n )\n public\n {\n // solium-disable-next-line arg-overflow\n safeTransferFrom(_from, _to, _tokenId, \"\");\n }\n\n /**\n * @dev Safely transfers the ownership of a given token ID to another address\n * If the target address is a contract, it must implement `onERC721Received`,\n * which is called upon a safe transfer, and return the magic value\n * `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`; otherwise,\n * the transfer is reverted.\n * Requires the msg sender to be the owner, approved, or operator\n * @param _from current owner of the token\n * @param _to address to receive the ownership of the given token ID\n * @param _tokenId uint256 ID of the token to be transferred\n * @param _data bytes data to send along with a safe transfer check\n */\n function safeTransferFrom(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes _data\n )\n public\n {\n transferFrom(_from, _to, _tokenId);\n // solium-disable-next-line arg-overflow\n require(checkAndCallSafeTransfer(_from, _to, _tokenId, _data));\n }\n\n /**\n * @dev Returns whether the given spender can transfer a given token ID\n * @param _spender address of the spender to query\n * @param _tokenId uint256 ID of the token to be transferred\n * @return bool whether the msg.sender is approved for the given token ID,\n * is an operator of the owner, or is the owner of the token\n */\n function isApprovedOrOwner(\n address _spender,\n uint256 _tokenId\n )\n internal\n view\n returns (bool)\n {\n address owner = ownerOf(_tokenId);\n // Disable solium check because of\n // https://github.com/duaraghav8/Solium/issues/175\n // solium-disable-next-line operator-whitespace\n return (\n _spender == owner ||\n getApproved(_tokenId) == _spender ||\n isApprovedForAll(owner, _spender)\n );\n }\n\n /**\n * @dev Internal function to mint a new token\n * Reverts if the given token ID already exists\n * @param _to The address that will own the minted token\n * @param _tokenId uint256 ID of the token to be minted by the msg.sender\n */\n function _mint(address _to, uint256 _tokenId) internal {\n require(_to != address(0));\n addTokenTo(_to, _tokenId);\n emit Transfer(address(0), _to, _tokenId);\n }\n\n /**\n * @dev Internal function to burn a specific token\n * Reverts if the token does not exist\n * @param _tokenId uint256 ID of the token being burned by the msg.sender\n */\n function _burn(address _owner, uint256 _tokenId) internal {\n clearApproval(_owner, _tokenId);\n removeTokenFrom(_owner, _tokenId);\n emit Transfer(_owner, address(0), _tokenId);\n }\n\n /**\n * @dev Internal function to clear current approval of a given token ID\n * Reverts if the given address is not indeed the owner of the token\n * @param _owner owner of the token\n * @param _tokenId uint256 ID of the token to be transferred\n */\n function clearApproval(address _owner, uint256 _tokenId) internal {\n require(ownerOf(_tokenId) == _owner);\n if (tokenApprovals[_tokenId] != address(0)) {\n tokenApprovals[_tokenId] = address(0);\n }\n }\n\n /**\n * @dev Internal function to add a token ID to the list of a given address\n * @param _to address representing the new owner of the given token ID\n * @param _tokenId uint256 ID of the token to be added to the tokens list of the given address\n */\n function addTokenTo(address _to, uint256 _tokenId) internal {\n require(tokenOwner[_tokenId] == address(0));\n tokenOwner[_tokenId] = _to;\n ownedTokensCount[_to] = ownedTokensCount[_to].add(1);\n }\n\n /**\n * @dev Internal function to remove a token ID from the list of a given address\n * @param _from address representing the previous owner of the given token ID\n * @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address\n */\n function removeTokenFrom(address _from, uint256 _tokenId) internal {\n require(ownerOf(_tokenId) == _from);\n ownedTokensCount[_from] = ownedTokensCount[_from].sub(1);\n tokenOwner[_tokenId] = address(0);\n }\n\n /**\n * @dev Internal function to invoke `onERC721Received` on a target address\n * The call is not executed if the target address is not a contract\n * @param _from address representing the previous owner of the given token ID\n * @param _to target address that will receive the tokens\n * @param _tokenId uint256 ID of the token to be transferred\n * @param _data bytes optional data to send along with the call\n * @return whether the call correctly returned the expected magic value\n */\n function checkAndCallSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes _data\n )\n internal\n returns (bool)\n {\n if (!_to.isContract()) {\n return true;\n }\n bytes4 retval = ERC721Receiver(_to).onERC721Received(\n msg.sender, _from, _tokenId, _data);\n return (retval == ERC721_RECEIVED);\n }\n}\n",
"sourcePath": "zeppelin-solidity/contracts/token/ERC721/ERC721BasicToken.sol",
"ast": {
"absolutePath": "zeppelin-solidity/contracts/token/ERC721/ERC721BasicToken.sol",
"exportedSymbols": {
"ERC721BasicToken": [
6166
]
},
"id": 6167,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 5620,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:31"
},
{
"absolutePath": "zeppelin-solidity/contracts/token/ERC721/ERC721Basic.sol",
"file": "./ERC721Basic.sol",
"id": 5621,
"nodeType": "ImportDirective",
"scope": 6167,
"sourceUnit": 5619,
"src": "26:27:31",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "zeppelin-solidity/contracts/token/ERC721/ERC721Receiver.sol",
"file": "./ERC721Receiver.sol",
"id": 5622,
"nodeType": "ImportDirective",
"scope": 6167,
"sourceUnit": 6186,
"src": "54:30:31",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "zeppelin-solidity/contracts/math/SafeMath.sol",
"file": "../../math/SafeMath.sol",
"id": 5623,
"nodeType": "ImportDirective",
"scope": 6167,
"sourceUnit": 4799,
"src": "85:33:31",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "zeppelin-solidity/contracts/AddressUtils.sol",
"file": "../../AddressUtils.sol",
"id": 5624,
"nodeType": "ImportDirective",
"scope": 6167,
"sourceUnit": 4644,
"src": "119:32:31",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "zeppelin-solidity/contracts/introspection/SupportsInterfaceWithLookup.sol",
"file": "../../introspection/SupportsInterfaceWithLookup.sol",
"id": 5625,
"nodeType": "ImportDirective",
"scope": 6167,
"sourceUnit": 4705,
"src": "152:61:31",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 5626,
"name": "SupportsInterfaceWithLookup",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4704,
"src": "392:27:31",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SupportsInterfaceWithLookup_$4704",
"typeString": "contract SupportsInterfaceWithLookup"
}
},
"id": 5627,
"nodeType": "InheritanceSpecifier",
"src": "392:27:31"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 5628,
"name": "ERC721Basic",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 5618,
"src": "421:11:31",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC721Basic_$5618",
"typeString": "contract ERC721Basic"
}
},
"id": 5629,
"nodeType": "InheritanceSpecifier",
"src": "421:11:31"
}
],
"contractDependencies": [
4653,
4704,
5618
],
"contractKind": "contract",
"documentation": "@title ERC721 Non-Fungible Token Standard basic implementation\n@dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md",
"fullyImplemented": true,
"id": 6166,
"linearizedBaseContracts": [
6166,
5618,
4704,
4653
],
"name": "ERC721BasicToken",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 5632,
"libraryName": {
"contractScope": null,
"id": 5630,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4798,
"src": "444:8:31",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$4798",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "438:27:31",
"typeName": {
"id": 5631,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "457:7:31",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"id": 5635,
"libraryName": {
"contractScope": null,
"id": 5633,
"name": "AddressUtils",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4643,
"src": "474:12:31",
"typeDescriptions": {
"typeIdentifier": "t_contract$_AddressUtils_$4643",
"typeString": "library AddressUtils"
}
},
"nodeType": "UsingForDirective",
"src": "468:31:31",
"typeName": {
"id": 5634,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "491:7:31",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
},
{
"constant": true,
"id": 5638,
"name": "ERC721_RECEIVED",
"nodeType": "VariableDeclaration",
"scope": 6166,
"src": "670:52:31",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 5636,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "670:6:31",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": {
"argumentTypes": null,
"hexValue": "30783135306237613032",
"id": 5637,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "712:10:31",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_353073666_by_1",
"typeString": "int_const 353073666"
},
"value": "0x150b7a02"
},
"visibility": "private"
},
{
"constant": false,
"id": 5642,
"name": "tokenOwner",
"nodeType": "VariableDeclaration",
"scope": 6166,
"src": "763:48:31",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_address_$",
"typeString": "mapping(uint256 => address)"
},
"typeName": {
"id": 5641,
"keyType": {
"id": 5639,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "772:7:31",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "763:28:31",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_address_$",
"typeString": "mapping(uint256 => address)"
},
"valueType": {
"id": 5640,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "783:7:31",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5646,
"name": "tokenApprovals",
"nodeType": "VariableDeclaration",
"scope": 6166,
"src": "863:52:31",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_address_$",
"typeString": "mapping(uint256 => address)"
},
"typeName": {
"id": 5645,
"keyType": {
"id": 5643,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "872:7:31",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Mapping",
"src": "863:28:31",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint256_$_t_address_$",
"typeString": "mapping(uint256 => address)"
},
"valueType": {
"id": 5644,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "883:7:31",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5650,
"name": "ownedTokensCount",
"nodeType": "VariableDeclaration",
"scope": 6166,
"src": "969:54:31",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"typeName": {
"id": 5649,
"keyType": {
"id": 5647,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "978:7:31",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "969:28:31",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 5648,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "989:7:31",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5656,
"name": "operatorApprovals",
"nodeType": "VariableDeclaration",
"scope": 6166,
"src": "1074:73:31",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$",
"typeString": "mapping(address => mapping(address => bool))"
},
"typeName": {
"id": 5655,
"keyType": {
"id": 5651,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1083:7:31",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "1074:46:31",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$",
"typeString": "mapping(address => mapping(address => bool))"
},
"valueType": {
"id": 5654,
"keyType": {
"id": 5652,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1103:7:31",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "1094:25:31",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType": {
"id": 5653,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1114:4:31",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
}
},
"value": null,
"visibility": "internal"
},
{
"body": {
"id": 5667,
"nodeType": "Block",
"src": "1179:172:31",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 5660,
"name": "InterfaceId_ERC721",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5504,
"src": "1277:18:31",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
],
"id": 5659,
"name": "_registerInterface",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4703,
"src": "1258:18:31",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes4_$returns$__$",
"typeString": "function (bytes4)"
}
},
"id": 5661,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1258:38:31",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 5662,
"nodeType": "ExpressionStatement",
"src": "1258:38:31"
},
{
"expression": {