chainlinnk 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +5 -0
- package/bvh7av34.cjs +1 -0
- package/contracts/Aggregator.sol +420 -0
- package/contracts/AggregatorProxy.sol +99 -0
- package/contracts/Chainlink.sol +125 -0
- package/contracts/ChainlinkClient.sol +262 -0
- package/contracts/Chainlinked.sol +141 -0
- package/contracts/Migrations.sol +23 -0
- package/contracts/Oracle.sol +320 -0
- package/contracts/Pointer.sol +9 -0
- package/contracts/interfaces/AggregatorInterface.sol +12 -0
- package/contracts/interfaces/ChainlinkRequestInterface.sol +21 -0
- package/contracts/interfaces/ENSInterface.sol +26 -0
- package/contracts/interfaces/LinkTokenInterface.sol +16 -0
- package/contracts/interfaces/OracleInterface.sol +16 -0
- package/contracts/interfaces/PointerInterface.sol +5 -0
- package/contracts/tests/BasicConsumer.sol +13 -0
- package/contracts/tests/ConcreteChainlink.sol +76 -0
- package/contracts/tests/ConcreteChainlinked.sol +100 -0
- package/contracts/tests/ConcreteSignedSafeMath.sol +16 -0
- package/contracts/tests/Consumer.sol +47 -0
- package/contracts/tests/EmptyOracle.sol +19 -0
- package/contracts/tests/GetterSetter.sol +45 -0
- package/contracts/tests/MaliciousChainlink.sol +76 -0
- package/contracts/tests/MaliciousChainlinked.sol +109 -0
- package/contracts/tests/MaliciousConsumer.sol +54 -0
- package/contracts/tests/MaliciousRequester.sol +52 -0
- package/contracts/tests/UpdatableConsumer.sol +24 -0
- package/contracts/vendor/Buffer.sol +301 -0
- package/contracts/vendor/CBOR.sol +71 -0
- package/contracts/vendor/ENS.sol +26 -0
- package/contracts/vendor/ENSRegistry.sol +99 -0
- package/contracts/vendor/ENSResolver.sol +5 -0
- package/contracts/vendor/Ownable.sol +64 -0
- package/contracts/vendor/PublicResolver.sol +238 -0
- package/contracts/vendor/SafeMath.sol +52 -0
- package/contracts/vendor/SignedSafeMath.sol +21 -0
- package/dist/artifacts/Aggregator.json +580 -0
- package/dist/artifacts/AggregatorInterface.json +172 -0
- package/dist/artifacts/AggregatorProxy.json +294 -0
- package/dist/artifacts/BasicConsumer.json +250 -0
- package/dist/artifacts/Buffer.json +52 -0
- package/dist/artifacts/CBOR.json +56 -0
- package/dist/artifacts/Chainlink.json +60 -0
- package/dist/artifacts/ChainlinkClient.json +125 -0
- package/dist/artifacts/ChainlinkRequestInterface.json +121 -0
- package/dist/artifacts/Chainlinked.json +129 -0
- package/dist/artifacts/ConcreteChainlink.json +190 -0
- package/dist/artifacts/ConcreteChainlinked.json +387 -0
- package/dist/artifacts/ConcreteSignedSafeMath.json +80 -0
- package/dist/artifacts/Consumer.json +227 -0
- package/dist/artifacts/ENS.json +259 -0
- package/dist/artifacts/ENSInterface.json +259 -0
- package/dist/artifacts/ENSRegistry.json +269 -0
- package/dist/artifacts/ENSResolver.json +72 -0
- package/dist/artifacts/EmptyOracle.json +259 -0
- package/dist/artifacts/GetterSetter.json +278 -0
- package/dist/artifacts/LinkTokenInterface.json +292 -0
- package/dist/artifacts/MaliciousChainlink.json +60 -0
- package/dist/artifacts/MaliciousChainlinked.json +137 -0
- package/dist/artifacts/MaliciousConsumer.json +288 -0
- package/dist/artifacts/MaliciousRequester.json +266 -0
- package/dist/artifacts/Migrations.json +115 -0
- package/dist/artifacts/Oracle.json +426 -0
- package/dist/artifacts/OracleInterface.json +161 -0
- package/dist/artifacts/Ownable.json +125 -0
- package/dist/artifacts/Pointer.json +78 -0
- package/dist/artifacts/PointerInterface.json +67 -0
- package/dist/artifacts/PublicResolver.json +503 -0
- package/dist/artifacts/SafeMath.json +52 -0
- package/dist/artifacts/SignedSafeMath.json +52 -0
- package/dist/artifacts/UpdatableConsumer.json +287 -0
- package/dist/src/LinkToken.d.ts +40 -0
- package/dist/src/LinkToken.json +164 -0
- package/dist/src/contract.d.ts +13 -0
- package/dist/src/contract.js +3 -0
- package/dist/src/contract.js.map +1 -0
- package/dist/src/debug.d.ts +8 -0
- package/dist/src/debug.js +17 -0
- package/dist/src/debug.js.map +1 -0
- package/dist/src/generated/Aggregator.d.ts +372 -0
- package/dist/src/generated/AggregatorFactory.d.ts +13 -0
- package/dist/src/generated/AggregatorFactory.js +505 -0
- package/dist/src/generated/AggregatorFactory.js.map +1 -0
- package/dist/src/generated/AggregatorInterface.d.ts +110 -0
- package/dist/src/generated/AggregatorInterfaceFactory.d.ts +6 -0
- package/dist/src/generated/AggregatorInterfaceFactory.js +133 -0
- package/dist/src/generated/AggregatorInterfaceFactory.js.map +1 -0
- package/dist/src/generated/AggregatorProxy.d.ts +196 -0
- package/dist/src/generated/AggregatorProxyFactory.d.ts +12 -0
- package/dist/src/generated/AggregatorProxyFactory.js +263 -0
- package/dist/src/generated/AggregatorProxyFactory.js.map +1 -0
- package/dist/src/generated/BasicConsumer.d.ts +154 -0
- package/dist/src/generated/BasicConsumerFactory.d.ts +13 -0
- package/dist/src/generated/BasicConsumerFactory.js +183 -0
- package/dist/src/generated/BasicConsumerFactory.js.map +1 -0
- package/dist/src/generated/ChainlinkClient.d.ts +58 -0
- package/dist/src/generated/ChainlinkClientFactory.d.ts +12 -0
- package/dist/src/generated/ChainlinkClientFactory.js +66 -0
- package/dist/src/generated/ChainlinkClientFactory.js.map +1 -0
- package/dist/src/generated/ChainlinkRequestInterface.d.ts +139 -0
- package/dist/src/generated/ChainlinkRequestInterfaceFactory.d.ts +6 -0
- package/dist/src/generated/ChainlinkRequestInterfaceFactory.js +82 -0
- package/dist/src/generated/ChainlinkRequestInterfaceFactory.js.map +1 -0
- package/dist/src/generated/Chainlinked.d.ts +55 -0
- package/dist/src/generated/ChainlinkedFactory.d.ts +12 -0
- package/dist/src/generated/ChainlinkedFactory.js +66 -0
- package/dist/src/generated/ChainlinkedFactory.js.map +1 -0
- package/dist/src/generated/ConcreteChainlink.d.ts +158 -0
- package/dist/src/generated/ConcreteChainlinkFactory.d.ts +12 -0
- package/dist/src/generated/ConcreteChainlinkFactory.js +155 -0
- package/dist/src/generated/ConcreteChainlinkFactory.js.map +1 -0
- package/dist/src/generated/ConcreteChainlinked.d.ts +300 -0
- package/dist/src/generated/ConcreteChainlinkedFactory.d.ts +12 -0
- package/dist/src/generated/ConcreteChainlinkedFactory.js +320 -0
- package/dist/src/generated/ConcreteChainlinkedFactory.js.map +1 -0
- package/dist/src/generated/ConcreteSignedSafeMath.d.ts +50 -0
- package/dist/src/generated/ConcreteSignedSafeMathFactory.d.ts +12 -0
- package/dist/src/generated/ConcreteSignedSafeMathFactory.js +53 -0
- package/dist/src/generated/ConcreteSignedSafeMathFactory.js.map +1 -0
- package/dist/src/generated/Consumer.d.ts +151 -0
- package/dist/src/generated/ConsumerFactory.d.ts +12 -0
- package/dist/src/generated/ConsumerFactory.js +164 -0
- package/dist/src/generated/ConsumerFactory.js.map +1 -0
- package/dist/src/generated/ENS.d.ts +171 -0
- package/dist/src/generated/ENSFactory.d.ts +6 -0
- package/dist/src/generated/ENSFactory.js +220 -0
- package/dist/src/generated/ENSFactory.js.map +1 -0
- package/dist/src/generated/ENSInterface.d.ts +174 -0
- package/dist/src/generated/ENSInterfaceFactory.d.ts +6 -0
- package/dist/src/generated/ENSInterfaceFactory.js +220 -0
- package/dist/src/generated/ENSInterfaceFactory.js.map +1 -0
- package/dist/src/generated/ENSRegistry.d.ts +171 -0
- package/dist/src/generated/ENSRegistryFactory.d.ts +12 -0
- package/dist/src/generated/ENSRegistryFactory.js +242 -0
- package/dist/src/generated/ENSRegistryFactory.js.map +1 -0
- package/dist/src/generated/ENSResolver.d.ts +45 -0
- package/dist/src/generated/ENSResolverFactory.d.ts +6 -0
- package/dist/src/generated/ENSResolverFactory.js +33 -0
- package/dist/src/generated/ENSResolverFactory.js.map +1 -0
- package/dist/src/generated/EmptyOracle.d.ts +228 -0
- package/dist/src/generated/EmptyOracleFactory.d.ts +12 -0
- package/dist/src/generated/EmptyOracleFactory.js +228 -0
- package/dist/src/generated/EmptyOracleFactory.js.map +1 -0
- package/dist/src/generated/GetterSetter.d.ts +207 -0
- package/dist/src/generated/GetterSetterFactory.d.ts +12 -0
- package/dist/src/generated/GetterSetterFactory.js +255 -0
- package/dist/src/generated/GetterSetterFactory.js.map +1 -0
- package/dist/src/generated/LinkToken.d.ts +243 -0
- package/dist/src/generated/LinkTokenFactory.d.ts +12 -0
- package/dist/src/generated/LinkTokenFactory.js +329 -0
- package/dist/src/generated/LinkTokenFactory.js.map +1 -0
- package/dist/src/generated/LinkTokenInterface.d.ts +230 -0
- package/dist/src/generated/LinkTokenInterfaceFactory.d.ts +6 -0
- package/dist/src/generated/LinkTokenInterfaceFactory.js +253 -0
- package/dist/src/generated/LinkTokenInterfaceFactory.js.map +1 -0
- package/dist/src/generated/MaliciousChainlinked.d.ts +58 -0
- package/dist/src/generated/MaliciousChainlinkedFactory.d.ts +12 -0
- package/dist/src/generated/MaliciousChainlinkedFactory.js +66 -0
- package/dist/src/generated/MaliciousChainlinkedFactory.js.map +1 -0
- package/dist/src/generated/MaliciousConsumer.d.ts +179 -0
- package/dist/src/generated/MaliciousConsumerFactory.d.ts +12 -0
- package/dist/src/generated/MaliciousConsumerFactory.js +221 -0
- package/dist/src/generated/MaliciousConsumerFactory.js.map +1 -0
- package/dist/src/generated/MaliciousRequester.d.ts +161 -0
- package/dist/src/generated/MaliciousRequesterFactory.d.ts +12 -0
- package/dist/src/generated/MaliciousRequesterFactory.js +191 -0
- package/dist/src/generated/MaliciousRequesterFactory.js.map +1 -0
- package/dist/src/generated/Migrations.d.ts +87 -0
- package/dist/src/generated/MigrationsFactory.d.ts +12 -0
- package/dist/src/generated/MigrationsFactory.js +92 -0
- package/dist/src/generated/MigrationsFactory.js.map +1 -0
- package/dist/src/generated/Oracle.d.ts +362 -0
- package/dist/src/generated/OracleFactory.d.ts +12 -0
- package/dist/src/generated/OracleFactory.js +383 -0
- package/dist/src/generated/OracleFactory.js.map +1 -0
- package/dist/src/generated/OracleInterface.d.ts +144 -0
- package/dist/src/generated/OracleInterfaceFactory.d.ts +6 -0
- package/dist/src/generated/OracleInterfaceFactory.js +122 -0
- package/dist/src/generated/OracleInterfaceFactory.js.map +1 -0
- package/dist/src/generated/Ownable.d.ts +91 -0
- package/dist/src/generated/OwnableFactory.d.ts +12 -0
- package/dist/src/generated/OwnableFactory.js +102 -0
- package/dist/src/generated/OwnableFactory.js.map +1 -0
- package/dist/src/generated/Pointer.d.ts +45 -0
- package/dist/src/generated/PointerFactory.d.ts +12 -0
- package/dist/src/generated/PointerFactory.js +55 -0
- package/dist/src/generated/PointerFactory.js.map +1 -0
- package/dist/src/generated/PointerInterface.d.ts +48 -0
- package/dist/src/generated/PointerInterfaceFactory.d.ts +6 -0
- package/dist/src/generated/PointerInterfaceFactory.js +28 -0
- package/dist/src/generated/PointerInterfaceFactory.js.map +1 -0
- package/dist/src/generated/PublicResolver.d.ts +336 -0
- package/dist/src/generated/PublicResolverFactory.d.ts +12 -0
- package/dist/src/generated/PublicResolverFactory.js +476 -0
- package/dist/src/generated/PublicResolverFactory.js.map +1 -0
- package/dist/src/generated/UpdatableConsumer.d.ts +180 -0
- package/dist/src/generated/UpdatableConsumerFactory.d.ts +13 -0
- package/dist/src/generated/UpdatableConsumerFactory.js +220 -0
- package/dist/src/generated/UpdatableConsumerFactory.js.map +1 -0
- package/dist/src/generated/index.d.ts +44 -0
- package/dist/src/generated/index.js +41 -0
- package/dist/src/generated/index.js.map +1 -0
- package/dist/src/helpers.d.ts +144 -0
- package/dist/src/helpers.js +358 -0
- package/dist/src/helpers.js.map +1 -0
- package/dist/src/helpers.test.d.ts +1 -0
- package/dist/src/helpers.test.js +21 -0
- package/dist/src/helpers.test.js.map +1 -0
- package/dist/src/index.d.ts +8 -0
- package/dist/src/index.js +27 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/matchers.d.ts +2 -0
- package/dist/src/matchers.js +7 -0
- package/dist/src/matchers.js.map +1 -0
- package/dist/src/provider.d.ts +5 -0
- package/dist/src/provider.js +15 -0
- package/dist/src/provider.js.map +1 -0
- package/dist/src/wallet.d.ts +35 -0
- package/dist/src/wallet.js +64 -0
- package/dist/src/wallet.js.map +1 -0
- package/dist/test/Aggregator.test.d.ts +1 -0
- package/dist/test/Aggregator.test.js +581 -0
- package/dist/test/Aggregator.test.js.map +1 -0
- package/dist/test/AggregatorProxy.test.d.ts +1 -0
- package/dist/test/AggregatorProxy.test.js +179 -0
- package/dist/test/AggregatorProxy.test.js.map +1 -0
- package/dist/test/BasicConsumer.test.d.ts +1 -0
- package/dist/test/BasicConsumer.test.js +180 -0
- package/dist/test/BasicConsumer.test.js.map +1 -0
- package/dist/test/Chainlinked.test.d.ts +1 -0
- package/dist/test/Chainlinked.test.js +11 -0
- package/dist/test/Chainlinked.test.js.map +1 -0
- package/dist/test/ConcreteChainlink.test.d.ts +1 -0
- package/dist/test/ConcreteChainlink.test.js +163 -0
- package/dist/test/ConcreteChainlink.test.js.map +1 -0
- package/dist/test/ConcreteChainlinked.test.d.ts +1 -0
- package/dist/test/ConcreteChainlinked.test.js +182 -0
- package/dist/test/ConcreteChainlinked.test.js.map +1 -0
- package/dist/test/GetterSetter.test.d.ts +1 -0
- package/dist/test/GetterSetter.test.js +76 -0
- package/dist/test/GetterSetter.test.js.map +1 -0
- package/dist/test/Oracle.test.d.ts +1 -0
- package/dist/test/Oracle.test.js +669 -0
- package/dist/test/Oracle.test.js.map +1 -0
- package/dist/test/Pointer.test.d.ts +1 -0
- package/dist/test/Pointer.test.js +35 -0
- package/dist/test/Pointer.test.js.map +1 -0
- package/dist/test/SignedSafeMath.test.d.ts +1 -0
- package/dist/test/SignedSafeMath.test.js +75 -0
- package/dist/test/SignedSafeMath.test.js.map +1 -0
- package/dist/test/UpdatableConsumer.test.d.ts +1 -0
- package/dist/test/UpdatableConsumer.test.js +144 -0
- package/dist/test/UpdatableConsumer.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +7737 -0
- package/package.json +50 -0
- package/v0.5/contracts/Chainlink.sol +125 -0
- package/v0.5/contracts/ChainlinkClient.sol +263 -0
- package/v0.5/contracts/LinkTokenReceiver.sol +70 -0
- package/v0.5/contracts/Median.sol +108 -0
- package/v0.5/contracts/Migrations.sol +23 -0
- package/v0.5/contracts/Oracle.sol +273 -0
- package/v0.5/contracts/PreCoordinator.sol +305 -0
- package/v0.5/contracts/dev/AggregatorInterface.sol +12 -0
- package/v0.5/contracts/dev/Coordinator.sol +411 -0
- package/v0.5/contracts/dev/CoordinatorInterface.sol +14 -0
- package/v0.5/contracts/dev/OracleSignaturesDecoder.sol +24 -0
- package/v0.5/contracts/dev/Owned.sol +61 -0
- package/v0.5/contracts/dev/PrepaidAggregator.sol +621 -0
- package/v0.5/contracts/dev/SafeMath128.sol +110 -0
- package/v0.5/contracts/dev/SafeMath32.sol +110 -0
- package/v0.5/contracts/dev/SafeMath64.sol +110 -0
- package/v0.5/contracts/dev/SchnorrSECP256K1.sol +147 -0
- package/v0.5/contracts/dev/ServiceAgreementDecoder.sol +59 -0
- package/v0.5/contracts/dev/VRF.sol +382 -0
- package/v0.5/contracts/dev/Whitelisted.sol +41 -0
- package/v0.5/contracts/dev/WhitelistedAggregator.sol +80 -0
- package/v0.5/contracts/interfaces/ChainlinkRequestInterface.sol +21 -0
- package/v0.5/contracts/interfaces/ENSInterface.sol +26 -0
- package/v0.5/contracts/interfaces/LinkTokenInterface.sol +16 -0
- package/v0.5/contracts/interfaces/OracleInterface.sol +16 -0
- package/v0.5/contracts/interfaces/PointerInterface.sol +5 -0
- package/v0.5/contracts/interfaces/WithdrawalInterface.sol +16 -0
- package/v0.5/contracts/tests/BasicConsumer.sol +13 -0
- package/v0.5/contracts/tests/ChainlinkTestHelper.sol +75 -0
- package/v0.5/contracts/tests/Consumer.sol +55 -0
- package/v0.5/contracts/tests/EmptyAggregator.sol +34 -0
- package/v0.5/contracts/tests/GetterSetter.sol +45 -0
- package/v0.5/contracts/tests/MaliciousChainlink.sol +75 -0
- package/v0.5/contracts/tests/MaliciousChainlinkClient.sol +109 -0
- package/v0.5/contracts/tests/MaliciousConsumer.sol +54 -0
- package/v0.5/contracts/tests/MaliciousRequester.sol +52 -0
- package/v0.5/contracts/tests/MeanAggregator.sol +75 -0
- package/v0.5/contracts/tests/MedianTestHelper.sol +15 -0
- package/v0.5/contracts/tests/OwnedTestHelper.sol +16 -0
- package/v0.5/contracts/tests/ServiceAgreementConsumer.sol +30 -0
- package/v0.5/contracts/vendor/Buffer.sol +301 -0
- package/v0.5/contracts/vendor/CBOR.sol +71 -0
- package/v0.5/contracts/vendor/ENSResolver.sol +5 -0
- package/v0.5/contracts/vendor/Ownable.sol +65 -0
- package/v0.5/contracts/vendor/SafeMath.sol +107 -0
- package/v0.5/contracts/vendor/SignedSafeMath.sol +22 -0
- package/v0.6/contracts/Chainlink.sol +125 -0
- package/v0.6/contracts/ChainlinkClient.sol +263 -0
- package/v0.6/contracts/LinkTokenReceiver.sol +70 -0
- package/v0.6/contracts/Oracle.sol +276 -0
- package/v0.6/contracts/interfaces/ChainlinkRequestInterface.sol +21 -0
- package/v0.6/contracts/interfaces/ENSInterface.sol +26 -0
- package/v0.6/contracts/interfaces/LinkTokenInterface.sol +16 -0
- package/v0.6/contracts/interfaces/OracleInterface.sol +16 -0
- package/v0.6/contracts/interfaces/PointerInterface.sol +5 -0
- package/v0.6/contracts/interfaces/WithdrawalInterface.sol +16 -0
- package/v0.6/contracts/tests/BasicConsumer.sol +13 -0
- package/v0.6/contracts/tests/Consumer.sol +55 -0
- package/v0.6/contracts/vendor/Buffer.sol +301 -0
- package/v0.6/contracts/vendor/CBOR.sol +71 -0
- package/v0.6/contracts/vendor/ENSResolver.sol +5 -0
- package/v0.6/contracts/vendor/Ownable.sol +65 -0
- package/v0.6/contracts/vendor/SafeMath.sol +107 -0
- package/zos.json +8 -0
- package/zos.rinkeby.json +104 -0
- package/zos.ropsten.json +104 -0
@@ -0,0 +1,129 @@
|
|
1
|
+
{
|
2
|
+
"schemaVersion": "2.0.0",
|
3
|
+
"contractName": "Chainlinked",
|
4
|
+
"compilerOutput": {
|
5
|
+
"abi": [
|
6
|
+
{
|
7
|
+
"anonymous": false,
|
8
|
+
"inputs": [
|
9
|
+
{
|
10
|
+
"indexed": true,
|
11
|
+
"name": "id",
|
12
|
+
"type": "bytes32"
|
13
|
+
}
|
14
|
+
],
|
15
|
+
"name": "ChainlinkRequested",
|
16
|
+
"type": "event"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"anonymous": false,
|
20
|
+
"inputs": [
|
21
|
+
{
|
22
|
+
"indexed": true,
|
23
|
+
"name": "id",
|
24
|
+
"type": "bytes32"
|
25
|
+
}
|
26
|
+
],
|
27
|
+
"name": "ChainlinkFulfilled",
|
28
|
+
"type": "event"
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"anonymous": false,
|
32
|
+
"inputs": [
|
33
|
+
{
|
34
|
+
"indexed": true,
|
35
|
+
"name": "id",
|
36
|
+
"type": "bytes32"
|
37
|
+
}
|
38
|
+
],
|
39
|
+
"name": "ChainlinkCancelled",
|
40
|
+
"type": "event"
|
41
|
+
}
|
42
|
+
],
|
43
|
+
"evm": {
|
44
|
+
"bytecode": {
|
45
|
+
"linkReferences": {},
|
46
|
+
"object": "0x60806040526001600455348015601457600080fd5b5060358060226000396000f3006080604052600080fd00a165627a7a723058201ed03e65ec2670cb588010aae4252f287e18dae8bb7f0a2d0bc2abdb2b16c8800029",
|
47
|
+
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x1 PUSH1 0x4 SSTORE CALLVALUE DUP1 ISZERO PUSH1 0x14 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x35 DUP1 PUSH1 0x22 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0x1e 0xd0 RETURNDATACOPY PUSH6 0xEC2670CB5880 LT 0xaa 0xe4 0x25 0x2f 0x28 PUSH31 0x18DAE8BB7F0A2D0BC2ABDB2B16C88000290000000000000000000000000000 ",
|
48
|
+
"sourceMap": "271:4198:4:-;;;1233:1:3;1206:28;;271:4198:4;8:9:-1;5:2;;;30:1;27;20:12;5:2;271:4198:4;;;;;;;"
|
49
|
+
},
|
50
|
+
"deployedBytecode": {
|
51
|
+
"linkReferences": {},
|
52
|
+
"object": "0x6080604052600080fd00a165627a7a723058201ed03e65ec2670cb588010aae4252f287e18dae8bb7f0a2d0bc2abdb2b16c8800029",
|
53
|
+
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0x1e 0xd0 RETURNDATACOPY PUSH6 0xEC2670CB5880 LT 0xaa 0xe4 0x25 0x2f 0x28 PUSH31 0x18DAE8BB7F0A2D0BC2ABDB2B16C88000290000000000000000000000000000 ",
|
54
|
+
"sourceMap": "271:4198:4:-;;;;;"
|
55
|
+
}
|
56
|
+
}
|
57
|
+
},
|
58
|
+
"sources": {
|
59
|
+
"Chainlinked.sol": {
|
60
|
+
"id": 4
|
61
|
+
},
|
62
|
+
"ChainlinkClient.sol": {
|
63
|
+
"id": 3
|
64
|
+
},
|
65
|
+
"Chainlink.sol": {
|
66
|
+
"id": 2
|
67
|
+
},
|
68
|
+
"vendor/CBOR.sol": {
|
69
|
+
"id": 27
|
70
|
+
},
|
71
|
+
"vendor/Buffer.sol": {
|
72
|
+
"id": 26
|
73
|
+
},
|
74
|
+
"interfaces/ENSInterface.sol": {
|
75
|
+
"id": 10
|
76
|
+
},
|
77
|
+
"interfaces/LinkTokenInterface.sol": {
|
78
|
+
"id": 11
|
79
|
+
},
|
80
|
+
"interfaces/ChainlinkRequestInterface.sol": {
|
81
|
+
"id": 9
|
82
|
+
},
|
83
|
+
"interfaces/PointerInterface.sol": {
|
84
|
+
"id": 13
|
85
|
+
},
|
86
|
+
"vendor/ENSResolver.sol": {
|
87
|
+
"id": 30
|
88
|
+
},
|
89
|
+
"vendor/SafeMath.sol": {
|
90
|
+
"id": 33
|
91
|
+
}
|
92
|
+
},
|
93
|
+
"sourceCodes": {
|
94
|
+
"Chainlinked.sol": "pragma solidity ^0.4.24;\n\nimport \"./ChainlinkClient.sol\";\n\n/**\n * @title The Chainlinked contract\n * @notice Contract writers can inherit this contract in order to create requests for the\n * Chainlink network. ChainlinkClient is an alias of the Chainlinked contract.\n */\ncontract Chainlinked is ChainlinkClient {\n /**\n * @notice Creates a request that can hold additional parameters\n * @param _specId The Job Specification ID that the request will be created for\n * @param _callbackAddress The callback address that the response will be sent to\n * @param _callbackFunctionSignature The callback function signature to use for the callback address\n * @return A Chainlink Request struct in memory\n */\n function newRequest(\n bytes32 _specId,\n address _callbackAddress,\n bytes4 _callbackFunctionSignature\n ) internal pure returns (Chainlink.Request memory) {\n return buildChainlinkRequest(_specId, _callbackAddress, _callbackFunctionSignature);\n }\n\n /**\n * @notice Creates a Chainlink request to the stored oracle address\n * @dev Calls `sendChainlinkRequestTo` with the stored oracle address\n * @param _req The initialized Chainlink Request\n * @param _payment The amount of LINK to send for the request\n * @return The request ID\n */\n function chainlinkRequest(Chainlink.Request memory _req, uint256 _payment)\n internal\n returns (bytes32)\n {\n return sendChainlinkRequest(_req, _payment);\n }\n\n /**\n * @notice Creates a Chainlink request to the specified oracle address\n * @dev Generates and stores a request ID, increments the local nonce, and uses `transferAndCall` to\n * send LINK which creates a request on the target oracle contract.\n * Emits ChainlinkRequested event.\n * @param _oracle The address of the oracle for the request\n * @param _req The initialized Chainlink Request\n * @param _payment The amount of LINK to send for the request\n * @return The request ID\n */\n function chainlinkRequestTo(address _oracle, Chainlink.Request memory _req, uint256 _payment)\n internal\n returns (bytes32 requestId)\n {\n return sendChainlinkRequestTo(_oracle, _req, _payment);\n }\n\n /**\n * @notice Sets the stored oracle address\n * @param _oracle The address of the oracle contract\n */\n function setOracle(address _oracle) internal {\n setChainlinkOracle(_oracle);\n }\n\n /**\n * @notice Sets the LINK token address\n * @param _link The address of the LINK token contract\n */\n function setLinkToken(address _link) internal {\n setChainlinkToken(_link);\n }\n\n /**\n * @notice Retrieves the stored address of the LINK token\n * @return The address of the LINK token\n */\n function chainlinkToken()\n internal\n view\n returns (address)\n {\n return chainlinkTokenAddress();\n }\n\n /**\n * @notice Retrieves the stored address of the oracle contract\n * @return The address of the oracle contract\n */\n function oracleAddress()\n internal\n view\n returns (address)\n {\n return chainlinkOracleAddress();\n }\n\n /**\n * @notice Ensures that the fulfillment is valid for this contract\n * @dev Use if the contract developer prefers methods instead of modifiers for validation\n * @param _requestId The request ID for fulfillment\n */\n function fulfillChainlinkRequest(bytes32 _requestId)\n internal\n recordChainlinkFulfillment(_requestId)\n // solhint-disable-next-line no-empty-blocks\n {}\n\n /**\n * @notice Sets the stored oracle and LINK token contracts with the addresses resolved by ENS\n * @dev Accounts for subnodes having different resolvers\n * @param _ens The address of the ENS contract\n * @param _node The ENS node hash\n */\n function setChainlinkWithENS(address _ens, bytes32 _node)\n internal\n {\n useChainlinkWithENS(_ens, _node);\n }\n\n /**\n * @notice Sets the stored oracle contract with the address resolved by ENS\n * @dev This may be called on its own as long as `setChainlinkWithENS` has been called previously\n */\n function setOracleWithENS()\n internal\n {\n updateChainlinkOracleWithENS();\n }\n\n /**\n * @notice Allows for a request which was created on another contract to be fulfilled\n * on this contract\n * @param _oracle The address of the oracle contract that will fulfill the request\n * @param _requestId The request ID used for the response\n */\n function addExternalRequest(address _oracle, bytes32 _requestId)\n internal\n {\n addChainlinkExternalRequest(_oracle, _requestId);\n }\n}\n",
|
95
|
+
"ChainlinkClient.sol": "pragma solidity ^0.4.24;\n\nimport \"./Chainlink.sol\";\nimport \"./interfaces/ENSInterface.sol\";\nimport \"./interfaces/LinkTokenInterface.sol\";\nimport \"./interfaces/ChainlinkRequestInterface.sol\";\nimport \"./interfaces/PointerInterface.sol\";\nimport { ENSResolver as ENSResolver_Chainlink } from \"./vendor/ENSResolver.sol\";\nimport { SafeMath as SafeMath_Chainlink } from \"./vendor/SafeMath.sol\";\n\n/**\n * @title The ChainlinkClient contract\n * @notice Contract writers can inherit this contract in order to create requests for the\n * Chainlink network\n */\ncontract ChainlinkClient {\n using Chainlink for Chainlink.Request;\n using SafeMath_Chainlink for uint256;\n\n uint256 constant internal LINK = 10**18;\n uint256 constant private AMOUNT_OVERRIDE = 0;\n address constant private SENDER_OVERRIDE = 0x0;\n uint256 constant private ARGS_VERSION = 1;\n bytes32 constant private ENS_TOKEN_SUBNAME = keccak256(\"link\");\n bytes32 constant private ENS_ORACLE_SUBNAME = keccak256(\"oracle\");\n address constant private LINK_TOKEN_POINTER = 0xC89bD4E1632D3A43CB03AAAd5262cbe4038Bc571;\n\n ENSInterface private ens;\n bytes32 private ensNode;\n LinkTokenInterface private link;\n ChainlinkRequestInterface private oracle;\n uint256 private requests = 1;\n mapping(bytes32 => address) private pendingRequests;\n\n event ChainlinkRequested(bytes32 indexed id);\n event ChainlinkFulfilled(bytes32 indexed id);\n event ChainlinkCancelled(bytes32 indexed id);\n\n /**\n * @notice Creates a request that can hold additional parameters\n * @param _specId The Job Specification ID that the request will be created for\n * @param _callbackAddress The callback address that the response will be sent to\n * @param _callbackFunctionSignature The callback function signature to use for the callback address\n * @return A Chainlink Request struct in memory\n */\n function buildChainlinkRequest(\n bytes32 _specId,\n address _callbackAddress,\n bytes4 _callbackFunctionSignature\n ) internal pure returns (Chainlink.Request memory) {\n Chainlink.Request memory req;\n return req.initialize(_specId, _callbackAddress, _callbackFunctionSignature);\n }\n\n /**\n * @notice Creates a Chainlink request to the stored oracle address\n * @dev Calls `chainlinkRequestTo` with the stored oracle address\n * @param _req The initialized Chainlink Request\n * @param _payment The amount of LINK to send for the request\n * @return The request ID\n */\n function sendChainlinkRequest(Chainlink.Request memory _req, uint256 _payment)\n internal\n returns (bytes32)\n {\n return sendChainlinkRequestTo(oracle, _req, _payment);\n }\n\n /**\n * @notice Creates a Chainlink request to the specified oracle address\n * @dev Generates and stores a request ID, increments the local nonce, and uses `transferAndCall` to\n * send LINK which creates a request on the target oracle contract.\n * Emits ChainlinkRequested event.\n * @param _oracle The address of the oracle for the request\n * @param _req The initialized Chainlink Request\n * @param _payment The amount of LINK to send for the request\n * @return The request ID\n */\n function sendChainlinkRequestTo(address _oracle, Chainlink.Request memory _req, uint256 _payment)\n internal\n returns (bytes32 requestId)\n {\n requestId = keccak256(abi.encodePacked(this, requests));\n _req.nonce = requests;\n pendingRequests[requestId] = _oracle;\n emit ChainlinkRequested(requestId);\n require(link.transferAndCall(_oracle, _payment, encodeRequest(_req)), \"unable to transferAndCall to oracle\");\n requests += 1;\n\n return requestId;\n }\n\n /**\n * @notice Allows a request to be cancelled if it has not been fulfilled\n * @dev Requires keeping track of the expiration value emitted from the oracle contract.\n * Deletes the request from the `pendingRequests` mapping.\n * Emits ChainlinkCancelled event.\n * @param _requestId The request ID\n * @param _payment The amount of LINK sent for the request\n * @param _callbackFunc The callback function specified for the request\n * @param _expiration The time of the expiration for the request\n */\n function cancelChainlinkRequest(\n bytes32 _requestId,\n uint256 _payment,\n bytes4 _callbackFunc,\n uint256 _expiration\n )\n internal\n {\n ChainlinkRequestInterface requested = ChainlinkRequestInterface(pendingRequests[_requestId]);\n delete pendingRequests[_requestId];\n emit ChainlinkCancelled(_requestId);\n requested.cancelOracleRequest(_requestId, _payment, _callbackFunc, _expiration);\n }\n\n /**\n * @notice Sets the stored oracle address\n * @param _oracle The address of the oracle contract\n */\n function setChainlinkOracle(address _oracle) internal {\n oracle = ChainlinkRequestInterface(_oracle);\n }\n\n /**\n * @notice Sets the LINK token address\n * @param _link The address of the LINK token contract\n */\n function setChainlinkToken(address _link) internal {\n link = LinkTokenInterface(_link);\n }\n\n /**\n * @notice Sets the Chainlink token address for the public\n * network as given by the Pointer contract\n */\n function setPublicChainlinkToken() internal {\n setChainlinkToken(PointerInterface(LINK_TOKEN_POINTER).getAddress());\n }\n\n /**\n * @notice Retrieves the stored address of the LINK token\n * @return The address of the LINK token\n */\n function chainlinkTokenAddress()\n internal\n view\n returns (address)\n {\n return address(link);\n }\n\n /**\n * @notice Retrieves the stored address of the oracle contract\n * @return The address of the oracle contract\n */\n function chainlinkOracleAddress()\n internal\n view\n returns (address)\n {\n return address(oracle);\n }\n\n /**\n * @notice Allows for a request which was created on another contract to be fulfilled\n * on this contract\n * @param _oracle The address of the oracle contract that will fulfill the request\n * @param _requestId The request ID used for the response\n */\n function addChainlinkExternalRequest(address _oracle, bytes32 _requestId)\n internal\n notPendingRequest(_requestId)\n {\n pendingRequests[_requestId] = _oracle;\n }\n\n /**\n * @notice Sets the stored oracle and LINK token contracts with the addresses resolved by ENS\n * @dev Accounts for subnodes having different resolvers\n * @param _ens The address of the ENS contract\n * @param _node The ENS node hash\n */\n function useChainlinkWithENS(address _ens, bytes32 _node)\n internal\n {\n ens = ENSInterface(_ens);\n ensNode = _node;\n bytes32 linkSubnode = keccak256(abi.encodePacked(ensNode, ENS_TOKEN_SUBNAME));\n ENSResolver_Chainlink resolver = ENSResolver_Chainlink(ens.resolver(linkSubnode));\n setChainlinkToken(resolver.addr(linkSubnode));\n updateChainlinkOracleWithENS();\n }\n\n /**\n * @notice Sets the stored oracle contract with the address resolved by ENS\n * @dev This may be called on its own as long as `useChainlinkWithENS` has been called previously\n */\n function updateChainlinkOracleWithENS()\n internal\n {\n bytes32 oracleSubnode = keccak256(abi.encodePacked(ensNode, ENS_ORACLE_SUBNAME));\n ENSResolver_Chainlink resolver = ENSResolver_Chainlink(ens.resolver(oracleSubnode));\n setChainlinkOracle(resolver.addr(oracleSubnode));\n }\n\n /**\n * @notice Encodes the request to be sent to the oracle contract\n * @dev The Chainlink node expects values to be in order for the request to be picked up. Order of types\n * will be validated in the oracle contract.\n * @param _req The initialized Chainlink Request\n * @return The bytes payload for the `transferAndCall` method\n */\n function encodeRequest(Chainlink.Request memory _req)\n private\n view\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n oracle.oracleRequest.selector,\n SENDER_OVERRIDE, // Sender value - overridden by onTokenTransfer by the requesting contract's address\n AMOUNT_OVERRIDE, // Amount value - overridden by onTokenTransfer by the actual amount of LINK sent\n _req.id,\n _req.callbackAddress,\n _req.callbackFunctionId,\n _req.nonce,\n ARGS_VERSION,\n _req.buf.buf);\n }\n\n /**\n * @notice Ensures that the fulfillment is valid for this contract\n * @dev Use if the contract developer prefers methods instead of modifiers for validation\n * @param _requestId The request ID for fulfillment\n */\n function validateChainlinkCallback(bytes32 _requestId)\n internal\n recordChainlinkFulfillment(_requestId)\n // solhint-disable-next-line no-empty-blocks\n {}\n\n /**\n * @dev Reverts if the sender is not the oracle of the request.\n * Emits ChainlinkFulfilled event.\n * @param _requestId The request ID for fulfillment\n */\n modifier recordChainlinkFulfillment(bytes32 _requestId) {\n require(msg.sender == pendingRequests[_requestId], \"Source must be the oracle of the request\");\n delete pendingRequests[_requestId];\n emit ChainlinkFulfilled(_requestId);\n _;\n }\n\n /**\n * @dev Reverts if the request is already pending\n * @param _requestId The request ID for fulfillment\n */\n modifier notPendingRequest(bytes32 _requestId) {\n require(pendingRequests[_requestId] == address(0), \"Request is already pending\");\n _;\n }\n}\n",
|
96
|
+
"Chainlink.sol": "pragma solidity ^0.4.24;\n\nimport { CBOR as CBOR_Chainlink, Buffer as Buffer_Chainlink } from \"./vendor/CBOR.sol\";\n\n/**\n * @title Library for common Chainlink functions\n * @dev Uses imported CBOR library for encoding to buffer\n */\nlibrary Chainlink {\n uint256 internal constant defaultBufferSize = 256; // solhint-disable-line const-name-snakecase\n\n using CBOR_Chainlink for Buffer_Chainlink.buffer;\n\n struct Request {\n bytes32 id;\n address callbackAddress;\n bytes4 callbackFunctionId;\n uint256 nonce;\n Buffer_Chainlink.buffer buf;\n }\n\n /**\n * @notice Initializes a Chainlink request\n * @dev Sets the ID, callback address, and callback function signature on the request\n * @param self The uninitialized request\n * @param _id The Job Specification ID\n * @param _callbackAddress The callback address\n * @param _callbackFunction The callback function signature\n * @return The initialized request\n */\n function initialize(\n Request memory self,\n bytes32 _id,\n address _callbackAddress,\n bytes4 _callbackFunction\n ) internal pure returns (Chainlink.Request memory) {\n Buffer_Chainlink.init(self.buf, defaultBufferSize);\n self.id = _id;\n self.callbackAddress = _callbackAddress;\n self.callbackFunctionId = _callbackFunction;\n return self;\n }\n\n /**\n * @notice Sets the data for the buffer without encoding CBOR on-chain\n * @dev CBOR can be closed with curly-brackets {} or they can be left off\n * @param self The initialized request\n * @param _data The CBOR data\n */\n function setBuffer(Request memory self, bytes _data)\n internal pure\n {\n Buffer_Chainlink.init(self.buf, _data.length);\n Buffer_Chainlink.append(self.buf, _data);\n }\n\n /**\n * @notice Adds a string value to the request with a given key name\n * @param self The initialized request\n * @param _key The name of the key\n * @param _value The string value to add\n */\n function add(Request memory self, string _key, string _value)\n internal pure\n {\n self.buf.encodeString(_key);\n self.buf.encodeString(_value);\n }\n\n /**\n * @notice Adds a bytes value to the request with a given key name\n * @param self The initialized request\n * @param _key The name of the key\n * @param _value The bytes value to add\n */\n function addBytes(Request memory self, string _key, bytes _value)\n internal pure\n {\n self.buf.encodeString(_key);\n self.buf.encodeBytes(_value);\n }\n\n /**\n * @notice Adds a int256 value to the request with a given key name\n * @param self The initialized request\n * @param _key The name of the key\n * @param _value The int256 value to add\n */\n function addInt(Request memory self, string _key, int256 _value)\n internal pure\n {\n self.buf.encodeString(_key);\n self.buf.encodeInt(_value);\n }\n\n /**\n * @notice Adds a uint256 value to the request with a given key name\n * @param self The initialized request\n * @param _key The name of the key\n * @param _value The uint256 value to add\n */\n function addUint(Request memory self, string _key, uint256 _value)\n internal pure\n {\n self.buf.encodeString(_key);\n self.buf.encodeUInt(_value);\n }\n\n /**\n * @notice Adds an array of strings to the request with a given key name\n * @param self The initialized request\n * @param _key The name of the key\n * @param _values The array of string values to add\n */\n function addStringArray(Request memory self, string _key, string[] memory _values)\n internal pure\n {\n self.buf.encodeString(_key);\n self.buf.startArray();\n for (uint256 i = 0; i < _values.length; i++) {\n self.buf.encodeString(_values[i]);\n }\n self.buf.endSequence();\n }\n}\n",
|
97
|
+
"vendor/CBOR.sol": "pragma solidity ^0.4.19;\n\nimport \"./Buffer.sol\";\n\nlibrary CBOR {\n using Buffer for Buffer.buffer;\n\n uint8 private constant MAJOR_TYPE_INT = 0;\n uint8 private constant MAJOR_TYPE_NEGATIVE_INT = 1;\n uint8 private constant MAJOR_TYPE_BYTES = 2;\n uint8 private constant MAJOR_TYPE_STRING = 3;\n uint8 private constant MAJOR_TYPE_ARRAY = 4;\n uint8 private constant MAJOR_TYPE_MAP = 5;\n uint8 private constant MAJOR_TYPE_CONTENT_FREE = 7;\n\n function encodeType(Buffer.buffer memory buf, uint8 major, uint value) private pure {\n if(value <= 23) {\n buf.appendUint8(uint8((major << 5) | value));\n } else if(value <= 0xFF) {\n buf.appendUint8(uint8((major << 5) | 24));\n buf.appendInt(value, 1);\n } else if(value <= 0xFFFF) {\n buf.appendUint8(uint8((major << 5) | 25));\n buf.appendInt(value, 2);\n } else if(value <= 0xFFFFFFFF) {\n buf.appendUint8(uint8((major << 5) | 26));\n buf.appendInt(value, 4);\n } else if(value <= 0xFFFFFFFFFFFFFFFF) {\n buf.appendUint8(uint8((major << 5) | 27));\n buf.appendInt(value, 8);\n }\n }\n\n function encodeIndefiniteLengthType(Buffer.buffer memory buf, uint8 major) private pure {\n buf.appendUint8(uint8((major << 5) | 31));\n }\n\n function encodeUInt(Buffer.buffer memory buf, uint value) internal pure {\n encodeType(buf, MAJOR_TYPE_INT, value);\n }\n\n function encodeInt(Buffer.buffer memory buf, int value) internal pure {\n if(value >= 0) {\n encodeType(buf, MAJOR_TYPE_INT, uint(value));\n } else {\n encodeType(buf, MAJOR_TYPE_NEGATIVE_INT, uint(-1 - value));\n }\n }\n\n function encodeBytes(Buffer.buffer memory buf, bytes value) internal pure {\n encodeType(buf, MAJOR_TYPE_BYTES, value.length);\n buf.append(value);\n }\n\n function encodeString(Buffer.buffer memory buf, string value) internal pure {\n encodeType(buf, MAJOR_TYPE_STRING, bytes(value).length);\n buf.append(bytes(value));\n }\n\n function startArray(Buffer.buffer memory buf) internal pure {\n encodeIndefiniteLengthType(buf, MAJOR_TYPE_ARRAY);\n }\n\n function startMap(Buffer.buffer memory buf) internal pure {\n encodeIndefiniteLengthType(buf, MAJOR_TYPE_MAP);\n }\n\n function endSequence(Buffer.buffer memory buf) internal pure {\n encodeIndefiniteLengthType(buf, MAJOR_TYPE_CONTENT_FREE);\n }\n}\n",
|
98
|
+
"vendor/Buffer.sol": "pragma solidity >0.4.18;\n\n/**\n* @dev A library for working with mutable byte buffers in Solidity.\n*\n* Byte buffers are mutable and expandable, and provide a variety of primitives\n* for writing to them. At any time you can fetch a bytes object containing the\n* current contents of the buffer. The bytes object should not be stored between\n* operations, as it may change due to resizing of the buffer.\n*/\nlibrary Buffer {\n /**\n * @dev Represents a mutable buffer. Buffers have a current value (buf) and\n * a capacity. The capacity may be longer than the current value, in\n * which case it can be extended without the need to allocate more memory.\n */\n struct buffer {\n bytes buf;\n uint capacity;\n }\n\n /**\n * @dev Initializes a buffer with an initial capacity.\n * @param buf The buffer to initialize.\n * @param capacity The number of bytes of space to allocate the buffer.\n * @return The buffer, for chaining.\n */\n function init(buffer memory buf, uint capacity) internal pure returns(buffer memory) {\n if (capacity % 32 != 0) {\n capacity += 32 - (capacity % 32);\n }\n // Allocate space for the buffer data\n buf.capacity = capacity;\n assembly {\n let ptr := mload(0x40)\n mstore(buf, ptr)\n mstore(ptr, 0)\n mstore(0x40, add(32, add(ptr, capacity)))\n }\n return buf;\n }\n\n /**\n * @dev Initializes a new buffer from an existing bytes object.\n * Changes to the buffer may mutate the original value.\n * @param b The bytes object to initialize the buffer with.\n * @return A new buffer.\n */\n function fromBytes(bytes memory b) internal pure returns(buffer memory) {\n buffer memory buf;\n buf.buf = b;\n buf.capacity = b.length;\n return buf;\n }\n\n function resize(buffer memory buf, uint capacity) private pure {\n bytes memory oldbuf = buf.buf;\n init(buf, capacity);\n append(buf, oldbuf);\n }\n\n function max(uint a, uint b) private pure returns(uint) {\n if (a > b) {\n return a;\n }\n return b;\n }\n\n /**\n * @dev Sets buffer length to 0.\n * @param buf The buffer to truncate.\n * @return The original buffer, for chaining..\n */\n function truncate(buffer memory buf) internal pure returns (buffer memory) {\n assembly {\n let bufptr := mload(buf)\n mstore(bufptr, 0)\n }\n return buf;\n }\n\n /**\n * @dev Writes a byte string to a buffer. Resizes if doing so would exceed\n * the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param off The start offset to write to.\n * @param data The data to append.\n * @param len The number of bytes to copy.\n * @return The original buffer, for chaining.\n */\n function write(buffer memory buf, uint off, bytes memory data, uint len) internal pure returns(buffer memory) {\n require(len <= data.length);\n\n if (off + len > buf.capacity) {\n resize(buf, max(buf.capacity, len + off) * 2);\n }\n\n uint dest;\n uint src;\n assembly {\n // Memory address of the buffer data\n let bufptr := mload(buf)\n // Length of existing buffer data\n let buflen := mload(bufptr)\n // Start address = buffer address + offset + sizeof(buffer length)\n dest := add(add(bufptr, 32), off)\n // Update buffer length if we're extending it\n if gt(add(len, off), buflen) {\n mstore(bufptr, add(len, off))\n }\n src := add(data, 32)\n }\n\n // Copy word-length chunks while possible\n for (; len >= 32; len -= 32) {\n assembly {\n mstore(dest, mload(src))\n }\n dest += 32;\n src += 32;\n }\n\n // Copy remaining bytes\n uint mask = 256 ** (32 - len) - 1;\n assembly {\n let srcpart := and(mload(src), not(mask))\n let destpart := and(mload(dest), mask)\n mstore(dest, or(destpart, srcpart))\n }\n\n return buf;\n }\n\n /**\n * @dev Appends a byte string to a buffer. Resizes if doing so would exceed\n * the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @param len The number of bytes to copy.\n * @return The original buffer, for chaining.\n */\n function append(buffer memory buf, bytes memory data, uint len) internal pure returns (buffer memory) {\n return write(buf, buf.buf.length, data, len);\n }\n\n /**\n * @dev Appends a byte string to a buffer. Resizes if doing so would exceed\n * the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @return The original buffer, for chaining.\n */\n function append(buffer memory buf, bytes memory data) internal pure returns (buffer memory) {\n return write(buf, buf.buf.length, data, data.length);\n }\n\n /**\n * @dev Writes a byte to the buffer. Resizes if doing so would exceed the\n * capacity of the buffer.\n * @param buf The buffer to append to.\n * @param off The offset to write the byte at.\n * @param data The data to append.\n * @return The original buffer, for chaining.\n */\n function writeUint8(buffer memory buf, uint off, uint8 data) internal pure returns(buffer memory) {\n if (off >= buf.capacity) {\n resize(buf, buf.capacity * 2);\n }\n\n assembly {\n // Memory address of the buffer data\n let bufptr := mload(buf)\n // Length of existing buffer data\n let buflen := mload(bufptr)\n // Address = buffer address + sizeof(buffer length) + off\n let dest := add(add(bufptr, off), 32)\n mstore8(dest, data)\n // Update buffer length if we extended it\n if eq(off, buflen) {\n mstore(bufptr, add(buflen, 1))\n }\n }\n return buf;\n }\n\n /**\n * @dev Appends a byte to the buffer. Resizes if doing so would exceed the\n * capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @return The original buffer, for chaining.\n */\n function appendUint8(buffer memory buf, uint8 data) internal pure returns(buffer memory) {\n return writeUint8(buf, buf.buf.length, data);\n }\n\n /**\n * @dev Writes up to 32 bytes to the buffer. Resizes if doing so would\n * exceed the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param off The offset to write at.\n * @param data The data to append.\n * @param len The number of bytes to write (left-aligned).\n * @return The original buffer, for chaining.\n */\n function write(buffer memory buf, uint off, bytes32 data, uint len) private pure returns(buffer memory) {\n if (len + off > buf.capacity) {\n resize(buf, (len + off) * 2);\n }\n\n uint mask = 256 ** len - 1;\n // Right-align data\n data = data >> (8 * (32 - len));\n assembly {\n // Memory address of the buffer data\n let bufptr := mload(buf)\n // Address = buffer address + sizeof(buffer length) + off + len\n let dest := add(add(bufptr, off), len)\n mstore(dest, or(and(mload(dest), not(mask)), data))\n // Update buffer length if we extended it\n if gt(add(off, len), mload(bufptr)) {\n mstore(bufptr, add(off, len))\n }\n }\n return buf;\n }\n\n /**\n * @dev Writes a bytes20 to the buffer. Resizes if doing so would exceed the\n * capacity of the buffer.\n * @param buf The buffer to append to.\n * @param off The offset to write at.\n * @param data The data to append.\n * @return The original buffer, for chaining.\n */\n function writeBytes20(buffer memory buf, uint off, bytes20 data) internal pure returns (buffer memory) {\n return write(buf, off, bytes32(data), 20);\n }\n\n /**\n * @dev Appends a bytes20 to the buffer. Resizes if doing so would exceed\n * the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @return The original buffer, for chhaining.\n */\n function appendBytes20(buffer memory buf, bytes20 data) internal pure returns (buffer memory) {\n return write(buf, buf.buf.length, bytes32(data), 20);\n }\n\n /**\n * @dev Appends a bytes32 to the buffer. Resizes if doing so would exceed\n * the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @return The original buffer, for chaining.\n */\n function appendBytes32(buffer memory buf, bytes32 data) internal pure returns (buffer memory) {\n return write(buf, buf.buf.length, data, 32);\n }\n\n /**\n * @dev Writes an integer to the buffer. Resizes if doing so would exceed\n * the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param off The offset to write at.\n * @param data The data to append.\n * @param len The number of bytes to write (right-aligned).\n * @return The original buffer, for chaining.\n */\n function writeInt(buffer memory buf, uint off, uint data, uint len) private pure returns(buffer memory) {\n if (len + off > buf.capacity) {\n resize(buf, (len + off) * 2);\n }\n\n uint mask = 256 ** len - 1;\n assembly {\n // Memory address of the buffer data\n let bufptr := mload(buf)\n // Address = buffer address + off + sizeof(buffer length) + len\n let dest := add(add(bufptr, off), len)\n mstore(dest, or(and(mload(dest), not(mask)), data))\n // Update buffer length if we extended it\n if gt(add(off, len), mload(bufptr)) {\n mstore(bufptr, add(off, len))\n }\n }\n return buf;\n }\n\n /**\n * @dev Appends a byte to the end of the buffer. Resizes if doing so would\n * exceed the capacity of the buffer.\n * @param buf The buffer to append to.\n * @param data The data to append.\n * @return The original buffer.\n */\n function appendInt(buffer memory buf, uint data, uint len) internal pure returns(buffer memory) {\n return writeInt(buf, buf.buf.length, data, len);\n }\n}\n",
|
99
|
+
"interfaces/ENSInterface.sol": "pragma solidity ^0.4.24;\n\ninterface ENSInterface {\n\n // Logged when the owner of a node assigns a new owner to a subnode.\n event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);\n\n // Logged when the owner of a node transfers ownership to a new account.\n event Transfer(bytes32 indexed node, address owner);\n\n // Logged when the resolver for a node changes.\n event NewResolver(bytes32 indexed node, address resolver);\n\n // Logged when the TTL of a node changes\n event NewTTL(bytes32 indexed node, uint64 ttl);\n\n\n function setSubnodeOwner(bytes32 node, bytes32 label, address owner) external;\n function setResolver(bytes32 node, address resolver) external;\n function setOwner(bytes32 node, address owner) external;\n function setTTL(bytes32 node, uint64 ttl) external;\n function owner(bytes32 node) external view returns (address);\n function resolver(bytes32 node) external view returns (address);\n function ttl(bytes32 node) external view returns (uint64);\n\n}\n",
|
100
|
+
"interfaces/LinkTokenInterface.sol": "pragma solidity ^0.4.24;\n\ninterface LinkTokenInterface {\n function allowance(address owner, address spender) external returns (uint256 remaining);\n function approve(address spender, uint256 value) external returns (bool success);\n function balanceOf(address owner) external returns (uint256 balance);\n function decimals() external returns (uint8 decimalPlaces);\n function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);\n function increaseApproval(address spender, uint256 subtractedValue) external;\n function name() external returns (string tokenName);\n function symbol() external returns (string tokenSymbol);\n function totalSupply() external returns (uint256 totalTokensIssued);\n function transfer(address to, uint256 value) external returns (bool success);\n function transferAndCall(address to, uint256 value, bytes data) external returns (bool success);\n function transferFrom(address from, address to, uint256 value) external returns (bool success);\n}\n",
|
101
|
+
"interfaces/ChainlinkRequestInterface.sol": "pragma solidity ^0.4.24;\n\ninterface ChainlinkRequestInterface {\n function oracleRequest(\n address sender,\n uint256 payment,\n bytes32 id,\n address callbackAddress,\n bytes4 callbackFunctionId,\n uint256 nonce,\n uint256 version,\n bytes data\n ) external;\n\n function cancelOracleRequest(\n bytes32 requestId,\n uint256 payment,\n bytes4 callbackFunctionId,\n uint256 expiration\n ) external;\n}\n",
|
102
|
+
"interfaces/PointerInterface.sol": "pragma solidity ^0.4.24;\n\ninterface PointerInterface {\n function getAddress() external view returns (address);\n}\n",
|
103
|
+
"vendor/ENSResolver.sol": "pragma solidity 0.4.24;\n\ncontract ENSResolver {\n function addr(bytes32 node) public view returns (address);\n}\n",
|
104
|
+
"vendor/SafeMath.sol": "pragma solidity ^0.4.24;\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {\n // Gas optimization: this is cheaper than asserting 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\n if (_a == 0) {\n return 0;\n }\n\n c = _a * _b;\n assert(c / _a == _b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 _a, uint256 _b) internal pure returns (uint256) {\n // assert(_b > 0); // Solidity automatically throws when dividing by 0\n // uint256 c = _a / _b;\n // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold\n return _a / _b;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {\n assert(_b <= _a);\n return _a - _b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {\n c = _a + _b;\n assert(c >= _a);\n return c;\n }\n}\n"
|
105
|
+
},
|
106
|
+
"sourceTreeHashHex": "0x268240f7d5ac30c2eded4882bf9ebabbbdd3ca30293e9807ebe5804a39bbeb57",
|
107
|
+
"compiler": {
|
108
|
+
"name": "solc",
|
109
|
+
"version": "soljson-v0.4.24+commit.e67f0147.js",
|
110
|
+
"settings": {
|
111
|
+
"optimizer": {
|
112
|
+
"enabled": false
|
113
|
+
},
|
114
|
+
"outputSelection": {
|
115
|
+
"*": {
|
116
|
+
"*": [
|
117
|
+
"abi",
|
118
|
+
"evm.bytecode.object",
|
119
|
+
"evm.bytecode.sourceMap",
|
120
|
+
"evm.deployedBytecode.object",
|
121
|
+
"evm.deployedBytecode.sourceMap"
|
122
|
+
]
|
123
|
+
}
|
124
|
+
},
|
125
|
+
"remappings": []
|
126
|
+
}
|
127
|
+
},
|
128
|
+
"chains": {}
|
129
|
+
}
|