Commit b3c3a7e4 authored by XFT-dev's avatar XFT-dev
Browse files

added hardhat support

parent 6edd2b9c

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
<br/>
<p align="center">
<a href="https://chain.link/" target="_blank" color="#0d2990">
<img src="https://raw.githubusercontent.com/smartcontractkit/chainlink/develop/docs/logo-chainlink-blue.svg" width="225" alt="Chainlink logo">
</a>
</p>
<br/>
[![npm](https://img.shields.io/npm/v/@chainlink/contracts?style=flat-square)](https://www.npmjs.com/package/@chainlink/contracts)
[![GitHub license](https://img.shields.io/github/license/smartcontractkit/chainlink?style=flat-square)](https://github.com/smartcontractkit/chainlink/blob/master/LICENSE)
[![npm downloads](https://img.shields.io/npm/dt/@chainlink/contracts?style=flat-square)](https://npmjs.com/package/@chainlink/contracts)
## ⚠️ Migration Notice
This package stores all of chainlink's smart contracts, previously known as the `evm/` directory. The previous package was called `chainlink`, now it is `@chainlink/contracts`.
## Installation
```sh
# via Yarn
$ yarn add @chainlink/contracts
# via npm
$ npm install @chainlink/contracts --save
```
## Directory Structure
This package makes use of `@chainlink/belt` to output artifacts along with ethers.js and truffle contract abstractions from the smart contracts stored within `src`. The resulting structure of the package when published looks like:
```sh
contracts
├── abi # abi output from src/
│ ├── v0.4
│ ├── v0.5
│ ├── v0.6
│ ├── v0.7
│ └── v0.8
├── ethers # ethers contract abstractions codegenned from abis
│ ├── v0.4
│ ├── v0.5
│ ├── v0.6
│ ├── v0.7
│ └── v0.8
├── src # the contracts themselves, in .sol form
│ ├── v0.4
│ ├── v0.5
│ ├── v0.6
│ ├── v0.7
│ └── v0.8
└── truffle # truffle contract abstractions codegenned from abis
├── v0.4
├── v0.5
├── v0.6
├── v0.7
└── v0.8
```
## Usage
These smart contracts can be imported as a dependency in various ways described below.
### Solidity
The solidity smart contracts themselves can simply be imported via the `src` directory of `@chainlink/contracts`. If you wanted to consume the v0.4.x version of our Oracle smart contract, you could do the following:
```solidity
import "@chainlink/contracts/src/v0.4/Chainlinked.sol";
```
### Artifacts
JSON artifacts generated by [sol-compiler](https://sol-compiler.com/) are available under the `abi` directory. If you wanted to consume the v0.4.x version of our Oracle JSON artifact with Javascript, you could do the following:
```js
const OracleV4Json = require('@chainlink/contracts/abi/v0.4/Oracle.json')
```
### Ethers
This library ships with [ethers.js](https://github.com/ethers-io/ethers.js/) contract abstractions generated by [typechain](https://github.com/ethereum-ts/TypeChain). To use these, make sure you have ethers.js installed as a dependency:
```sh
# via Yarn
$ yarn add ethers@^4.0.44
# via npm
$ npm install ethers@^4.0.44 --save
```
If you wanted to consume the v0.4.x version of our Oracle with JavaScript, you could do the following:
```ts
import { OracleFactory } from '@chainlink/contracts/ethers/v0.4/OracleFactory'
```
This gives a fully typed (if using TypeScript) version of a ethers.js contract factory. See the [ethers.js](https://docs.ethers.io/ethers.js/html/api-contract.html) documentation on usage.
### Truffle
This library ships with [@truffle/contract](https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme) abstractions of each of our smart contracts. To use these, make sure you have @truffle/contract as a dependency.
```sh
# via Yarn
$ yarn add @truffle/contract@^4.1.8
# via npm
$ npm install @truffle/contract@^4.1.8 --save
```
If you wanted to consume the v0.4.x version of our Oracle with JavaScript, you could do the following:
```js
const { Oracle } = require('@chainlink/contracts/truffle/v0.4/Oracle')
```
For usage, see the [@truffle/contract](https://github.com/trufflesuite/truffle/tree/master/packages/contract#readme) documentation.
For ease of use with testing, if the environment variable `NODE_ENV` is set, the imported truffle contract abstraction will automatically set its provider to `web3.currentProvider`, avoiding the need to perform a `setProvider` call before using it during your truffle tests.
```sh
NODE_ENV=true yarn truffle test
```
## Development
Note: Contracts in `src/v0.7/dev` are under active development and not yet stable.
Please use them for testing and development only.
```bash
# Clone Chainlink repository
$ git clone https://github.com/smartcontractkit/chainlink.git
# Continuing via Yarn
$ yarn install
$ yarn setup:contracts
# Continuing via npm
$ npm install
$ npm run setup:contracts
```
## Testing
After completing the above [Development](#Development) commands, run tests with:
```sh
# From this directory, `evm-contracts` via Yarn
$ yarn test
# via npm
$ npm run test
# From project root
$ yarn wsrun @chainlink/contracts test
```
## Contributing
Contributions are welcome! Please refer to
[Chainlink's contributing guidelines](./docs/CONTRIBUTING.md) for detailed
contribution information.
Thank you!
## License
[MIT](https://choosealicense.com/licenses/mit/)
{
"schemaVersion": "2.0.0",
"contractName": "AggregatorInterface",
"compilerOutput": {
"abi": [
{
"constant": true,
"inputs": [],
"name": "latestAnswer",
"outputs": [
{
"name": "",
"type": "int256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "latestRound",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "latestTimestamp",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "roundId",
"type": "uint256"
}
],
"name": "getAnswer",
"outputs": [
{
"name": "",
"type": "int256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "roundId",
"type": "uint256"
}
],
"name": "getTimestamp",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "current",
"type": "int256"
},
{
"indexed": true,
"name": "roundId",
"type": "uint256"
},
{
"indexed": false,
"name": "timestamp",
"type": "uint256"
}
],
"name": "AnswerUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "roundId",
"type": "uint256"
},
{
"indexed": true,
"name": "startedBy",
"type": "address"
},
{
"indexed": false,
"name": "startedAt",
"type": "uint256"
}
],
"name": "NewRound",
"type": "event"
}
],
"devdoc": {
"methods": {}
},
"evm": {
"bytecode": {
"linkReferences": {},
"object": "0x",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"linkReferences": {},
"object": "0x",
"opcodes": "",
"sourceMap": ""
},
"methodIdentifiers": {
"getAnswer(uint256)": "b5ab58dc",
"getTimestamp(uint256)": "b633620c",
"latestAnswer()": "50d25bcd",
"latestRound()": "668a0f02",
"latestTimestamp()": "8205bf6a"
}
},
"metadata": "",
"userdoc": {
"methods": {}
}
},
"sources": {
"interfaces/AggregatorInterface.sol": {
"id": 9
}
},
"sourceCodes": {
"interfaces/AggregatorInterface.sol": "pragma solidity >=0.4.24;\n\ninterface AggregatorInterface {\n function latestAnswer() external view returns (int256);\n function latestTimestamp() external view returns (uint256);\n function latestRound() external view returns (uint256);\n function getAnswer(uint256 roundId) external view returns (int256);\n function getTimestamp(uint256 roundId) external view returns (uint256);\n\n event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp);\n event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt);\n}\n"
},
"sourceTreeHashHex": "0xb21fa756e241d3fbfe7546158a7e1bb4a98f261744751c4e9dfe5f474ea46338",
"compiler": {
"name": "solc",
"version": "soljson-v0.4.24+commit.e67f0147.js",
"settings": {
"optimizer": {
"runs": 1000000,
"enabled": true
},
"outputSelection": {
"*": {
"*": [
"abi",
"devdoc",
"userdoc",
"evm.bytecode.object",
"evm.bytecode.sourceMap",
"evm.deployedBytecode.object",
"evm.deployedBytecode.sourceMap",
"evm.methodIdentifiers",
"metadata"
]
}
},
"metadata": {
"bytecodeHash": "none"
},
"remappings": []
}
},
"chains": {}
}
\ No newline at end of file
{
"schemaVersion": "2.0.0",
"contractName": "AggregatorV3Interface",
"compilerOutput": {
"abi": [
{
"constant": true,
"inputs": [],
"name": "decimals",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "version",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "description",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_roundId",
"type": "uint80"
}
],
"name": "getRoundData",
"outputs": [
{
"name": "roundId",
"type": "uint80"
},
{
"name": "answer",
"type": "int256"
},
{
"name": "startedAt",
"type": "uint256"
},
{
"name": "updatedAt",
"type": "uint256"
},
{
"name": "answeredInRound",
"type": "uint80"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "latestRoundData",
"outputs": [
{
"name": "roundId",
"type": "uint80"
},
{
"name": "answer",
"type": "int256"
},
{
"name": "startedAt",
"type": "uint256"
},
{
"name": "updatedAt",
"type": "uint256"
},
{
"name": "answeredInRound",
"type": "uint80"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
"methods": {}
},
"evm": {
"bytecode": {
"linkReferences": {},
"object": "0x",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"linkReferences": {},
"object": "0x",
"opcodes": "",
"sourceMap": ""
},
"methodIdentifiers": {
"decimals()": "313ce567",
"description()": "7284e416",
"getRoundData(uint80)": "9a6fc8f5",
"latestRoundData()": "feaf968c",
"version()": "54fd4d50"
}
},
"metadata": "",
"userdoc": {
"methods": {}
}
},
"sources": {
"interfaces/AggregatorV3Interface.sol": {
"id": 10
}
},
"sourceCodes": {
"interfaces/AggregatorV3Interface.sol": "pragma solidity >=0.4.24;\n\ninterface AggregatorV3Interface {\n\n function decimals() external view returns (uint8);\n function description() external view returns (string memory);\n function version() external view returns (uint256);\n\n // getRoundData and latestRoundData should both raise \"No data present\"\n // if they do not have data to report, instead of returning unset values\n // which could be misinterpreted as actual reported values.\n function getRoundData(uint80 _roundId)\n external\n view\n returns (\n uint80 roundId,\n int256 answer,\n uint256 startedAt,\n uint256 updatedAt,\n uint80 answeredInRound\n );\n function latestRoundData()\n external\n view\n returns (\n uint80 roundId,\n int256 answer,\n uint256 startedAt,\n uint256 updatedAt,\n uint80 answeredInRound\n );\n\n}\n"
},
"sourceTreeHashHex": "0xbf26d0dca0e2815b7c0bd09bddc9ceca339b8c9c2319ca74b2555273f5cbc19c",
"compiler": {
"name": "solc",
"version": "soljson-v0.4.24+commit.e67f0147.js",
"settings": {
"optimizer": {
"runs": 1000000,
"enabled": true
},
"outputSelection": {
"*": {
"*": [
"abi",
"devdoc",
"userdoc",
"evm.bytecode.object",
"evm.bytecode.sourceMap",
"evm.deployedBytecode.object",
"evm.deployedBytecode.sourceMap",
"evm.methodIdentifiers",
"metadata"
]
}
},
"metadata": {
"bytecodeHash": "none"
},
"remappings": []
}
},
"chains": {}
}
\ No newline at end of file
{
"schemaVersion": "2.0.0",
"contractName": "BasicToken",
"compilerOutput": {
"abi": [
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "balance",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "from",
"type": "address"
},
{
"indexed": true,
"name": "to",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
}
],
"devdoc": {
"methods": {
"balanceOf(address)": {
"details": "Gets the balance of the specified address.",
"params": {
"_owner": "The address to query the the balance of. "
},
"return": "An uint256 representing the amount owned by the passed address."
},
"transfer(address,uint256)": {
"details": "transfer token for a specified address",
"params": {
"_to": "The address to transfer to.",
"_value": "The amount to be transferred."
}
}
},
"title": "Basic token"
},
"evm": {
"bytecode": {
"linkReferences": {},
"object": "0x608060405234801561001057600080fd5b5061023e806100206000396000f3006080604052600436106100565763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166318160ddd811461005b57806370a0823114610082578063a9059cbb146100b0575b600080fd5b34801561006757600080fd5b506100706100f5565b60408051918252519081900360200190f35b34801561008e57600080fd5b5061007073ffffffffffffffffffffffffffffffffffffffff600435166100fb565b3480156100bc57600080fd5b506100e173ffffffffffffffffffffffffffffffffffffffff60043516602435610123565b604080519115158252519081900360200190f35b60005481565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b33600090815260016020526040812054610143908363ffffffff6101ed16565b336000908152600160205260408082209290925573ffffffffffffffffffffffffffffffffffffffff851681522054610182908363ffffffff6101ff16565b73ffffffffffffffffffffffffffffffffffffffff84166000818152600160209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b6000828211156101f957fe5b50900390565b8181018281101561020c57fe5b929150505600a165627a7a723058208854a611dca7c4a32a3dbb96c79dd8b569af793b9cbb851759cb9acf8a4734060029",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x23E DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x56 JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x18160DDD DUP2 EQ PUSH2 0x5B JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x82 JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0xB0 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x67 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x70 PUSH2 0xF5 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x8E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x70 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0xFB JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xBC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xE1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x123 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD PUSH2 0x143 SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x1ED AND JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 SWAP3 SWAP1 SWAP3 SSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP6 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0x182 SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x1FF AND JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE DUP1 MLOAD DUP6 DUP2 MSTORE SWAP1 MLOAD SWAP2 SWAP3 CALLER SWAP3 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP3 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 GT ISZERO PUSH2 0x1F9 JUMPI INVALID JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST DUP2 DUP2 ADD DUP3 DUP2 LT ISZERO PUSH2 0x20C JUMPI INVALID JUMPDEST SWAP3 SWAP2 POP POP JUMP STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 DUP9 SLOAD 0xa6 GT 0xdc 0xa7 0xc4 LOG3 0x2a RETURNDATASIZE 0xbb SWAP7 0xc7 SWAP14 0xd8 0xb5 PUSH10 0xAF793B9CBB851759CB9A 0xcf DUP11 0x47 CALLVALUE MOD STOP 0x29 ",
"sourceMap": "274:809:32:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;274:809:32;;;;;;;"
},
"deployedBytecode": {
"linkReferences": {},
"object": "0x6080604052600436106100565763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166318160ddd811461005b57806370a0823114610082578063a9059cbb146100b0575b600080fd5b34801561006757600080fd5b506100706100f5565b60408051918252519081900360200190f35b34801561008e57600080fd5b5061007073ffffffffffffffffffffffffffffffffffffffff600435166100fb565b3480156100bc57600080fd5b506100e173ffffffffffffffffffffffffffffffffffffffff60043516602435610123565b604080519115158252519081900360200190f35b60005481565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b33600090815260016020526040812054610143908363ffffffff6101ed16565b336000908152600160205260408082209290925573ffffffffffffffffffffffffffffffffffffffff851681522054610182908363ffffffff6101ff16565b73ffffffffffffffffffffffffffffffffffffffff84166000818152600160209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b6000828211156101f957fe5b50900390565b8181018281101561020c57fe5b929150505600a165627a7a723058208854a611dca7c4a32a3dbb96c79dd8b569af793b9cbb851759cb9acf8a4734060029",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x56 JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x18160DDD DUP2 EQ PUSH2 0x5B JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x82 JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0xB0 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x67 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x70 PUSH2 0xF5 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x8E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x70 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0xFB JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xBC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xE1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x123 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD PUSH2 0x143 SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x1ED AND JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 SWAP3 SWAP1 SWAP3 SSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP6 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0x182 SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x1FF AND JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE DUP1 MLOAD DUP6 DUP2 MSTORE SWAP1 MLOAD SWAP2 SWAP3 CALLER SWAP3 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP3 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 GT ISZERO PUSH2 0x1F9 JUMPI INVALID JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST DUP2 DUP2 ADD DUP3 DUP2 LT ISZERO PUSH2 0x20C JUMPI INVALID JUMPDEST SWAP3 SWAP2 POP POP JUMP STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 DUP9 SLOAD 0xa6 GT 0xdc 0xa7 0xc4 LOG3 0x2a RETURNDATASIZE 0xbb SWAP7 0xc7 SWAP14 0xd8 0xb5 PUSH10 0xAF793B9CBB851759CB9A 0xcf DUP11 0x47 CALLVALUE MOD STOP 0x29 ",
"sourceMap": "274:809:32:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;179:26:14;;8:9:-1;5:2;;;30:1;27;20:12;5:2;179:26:14;;;;;;;;;;;;;;;;;;;;976:104:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;976:104:32;;;;;;;542:231;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;542:231:32;;;;;;;;;;;;;;;;;;;;;;;;;;;179:26:14;;;;:::o;976:104:32:-;1059:16;;1029:15;1059:16;;;:8;:16;;;;;;;976:104::o;542:231::-;642:10;598:4;633:20;;;:8;:20;;;;;;:32;;658:6;633:32;:24;:32;:::i;:::-;619:10;610:20;;;;:8;:20;;;;;;:55;;;;:20;687:13;;;;;;:25;;705:6;687:25;:17;:25;:::i;:::-;671:13;;;;;;;:8;:13;;;;;;;;;:41;;;;718:33;;;;;;;671:13;;727:10;;718:33;;;;;;;;;;-1:-1:-1;764:4:32;542:231;;;;:::o;1069:116:40:-;1129:7;1151:8;;;;1144:16;;;;-1:-1:-1;1173:7:40;;;1069:116::o;1247:128::-;1328:7;;;1348;;;;1341:15;;;;1247:128;;;;:::o"
},
"methodIdentifiers": {
"balanceOf(address)": "70a08231",
"totalSupply()": "18160ddd",
"transfer(address,uint256)": "a9059cbb"
}
},
"metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"balanceOf(address)\":{\"details\":\"Gets the balance of the specified address.\",\"params\":{\"_owner\":\"The address to query the the balance of. \"},\"return\":\"An uint256 representing the amount owned by the passed address.\"},\"transfer(address,uint256)\":{\"details\":\"transfer token for a specified address\",\"params\":{\"_to\":\"The address to transfer to.\",\"_value\":\"The amount to be transferred.\"}}},\"title\":\"Basic token\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/thomas/workspace/chainlink/evm-contracts/src/v0.4/vendor/BasicToken.sol\":\"BasicToken\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"/home/thomas/workspace/chainlink/evm-contracts/src/v0.4/interfaces/ERC20Basic.sol\":{\"keccak256\":\"0x5c0857cec6aebc5dfbafe5c0b3761952f0180c07f23200ed2b80051ccc6a6d6d\",\"urls\":[\"bzzr://658dc7a8924774d1009631c1ff7c546328ff32bf5a53274fb7651d5ca20e3e48\"]},\"/home/thomas/workspace/chainlink/evm-contracts/src/v0.4/vendor/BasicToken.sol\":{\"keccak256\":\"0xe024b5f9c509c6e630587c51beeb5417a7b147c4532b0cbf00763a01ff98ad45\",\"urls\":[\"bzzr://b898aa83d88a05011b5f6e4a7aedea29b0f8f27f742049efd7b9b89988901ae6\"]},\"/home/thomas/workspace/chainlink/evm-contracts/src/v0.4/vendor/SafeMathChainlink.sol\":{\"keccak256\":\"0xb822782dea15f1fa4992c27639e9f9e4a4758b2c2fd8b12ec90c4de336de9074\",\"urls\":[\"bzzr://1328bb1e33d56d48209e5bbea79fa18b212e8df3f449ac9a75d20962cc36cce5\"]}},\"version\":1}",
"userdoc": {
"methods": {}
}
},
"sources": {
"vendor/BasicToken.sol": {
"id": 32
},
"interfaces/ERC20Basic.sol": {
"id": 14
},
"vendor/SafeMathChainlink.sol": {
"id": 40
}
},
"sourceCodes": {
"vendor/BasicToken.sol": "pragma solidity ^0.4.24;\n\n\nimport { ERC20Basic as linkERC20Basic } from \"../interfaces/ERC20Basic.sol\";\nimport { SafeMathChainlink as linkSafeMath } from \"./SafeMathChainlink.sol\";\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances. \n */\ncontract BasicToken is linkERC20Basic {\n using linkSafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) returns (bool) {\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of. \n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) constant returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n",
"interfaces/ERC20Basic.sol": "pragma solidity ^0.4.11;\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n uint256 public totalSupply;\n function balanceOf(address who) constant returns (uint256);\n function transfer(address to, uint256 value) returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n",
"vendor/SafeMathChainlink.sol": "pragma solidity ^0.4.11;\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMathChainlink {\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"
},
"sourceTreeHashHex": "0x9f8ff4356f69a56c5746a24ff09adf403fecbb8fb77e02192ff473b84356014c",
"compiler": {
"name": "solc",
"version": "soljson-v0.4.24+commit.e67f0147.js",
"settings": {
"optimizer": {
"runs": 1000000,
"enabled": true
},
"outputSelection": {
"*": {
"*": [
"abi",
"devdoc",
"userdoc",
"evm.bytecode.object",
"evm.bytecode.sourceMap",
"evm.deployedBytecode.object",
"evm.deployedBytecode.sourceMap",
"evm.methodIdentifiers",
"metadata"
]
}
},
"metadata": {
"bytecodeHash": "none"
},
"remappings": []
}
},
"chains": {}
}
\ No newline at end of file
{
"schemaVersion": "2.0.0",
"contractName": "Buffer",
"compilerOutput": {
"abi": [],
"devdoc": {
"methods": {}
},
"evm": {
"bytecode": {
"linkReferences": {},
"object": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820cac330d9b33d6f30713da75d481e71f51c8b57fa7d9fb21b185db7c0b190400f0029",
"opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN STOP PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0xca 0xc3 ADDRESS 0xd9 0xb3 RETURNDATASIZE PUSH16 0x30713DA75D481E71F51C8B57FA7D9FB2 SHL XOR 0x5d 0xb7 0xc0 0xb1 SWAP1 BLOCKHASH 0xf STOP 0x29 ",
"sourceMap": "403:9250:33:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24"
},
"deployedBytecode": {
"linkReferences": {},
"object": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820cac330d9b33d6f30713da75d481e71f51c8b57fa7d9fb21b185db7c0b190400f0029",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0xca 0xc3 ADDRESS 0xd9 0xb3 RETURNDATASIZE PUSH16 0x30713DA75D481E71F51C8B57FA7D9FB2 SHL XOR 0x5d 0xb7 0xc0 0xb1 SWAP1 BLOCKHASH 0xf STOP 0x29 ",
"sourceMap": "403:9250:33:-;;;;;;;;"
},
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/thomas/workspace/chainlink/evm-contracts/src/v0.4/vendor/Buffer.sol\":\"Buffer\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"/home/thomas/workspace/chainlink/evm-contracts/src/v0.4/vendor/Buffer.sol\":{\"keccak256\":\"0x900b4c8ab35b4876d89835a8b050c96107ace250a70f64c5bba6a78a60f03883\",\"urls\":[\"bzzr://408340da4e8fa35e608196ee508f11f9d44f6f70a10f0db0083ab20b5a894d59\"]}},\"version\":1}",
"userdoc": {
"methods": {}
}
},
"sources": {
"vendor/Buffer.sol": {
"id": 33
}
},
"sourceCodes": {
"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"
},
"sourceTreeHashHex": "0x900b4c8ab35b4876d89835a8b050c96107ace250a70f64c5bba6a78a60f03883",
"compiler": {
"name": "solc",
"version": "soljson-v0.4.24+commit.e67f0147.js",
"settings": {
"optimizer": {
"runs": 1000000,
"enabled": true
},
"outputSelection": {
"*": {
"*": [
"abi",
"devdoc",
"userdoc",
"evm.bytecode.object",
"evm.bytecode.sourceMap",
"evm.deployedBytecode.object",
"evm.deployedBytecode.sourceMap",
"evm.methodIdentifiers",
"metadata"
]
}
},
"metadata": {
"bytecodeHash": "none"
},
"remappings": []
}
},
"chains": {}
}
\ No newline at end of file
{
"schemaVersion": "2.0.0",
"contractName": "CBOR",
"compilerOutput": {
"abi": [],
"devdoc": {
"methods": {}
},
"evm": {
"bytecode": {
"linkReferences": {},
"object": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058206283f5534e6d138d58aee25a4d0a11b73841d021b143b4251e368c82b06b31f10029",
"opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN STOP PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 PUSH3 0x83F553 0x4e PUSH14 0x138D58AEE25A4D0A11B73841D021 0xb1 NUMBER 0xb4 0x25 0x1e CALLDATASIZE DUP13 DUP3 0xb0 PUSH12 0x31F100290000000000000000 ",
"sourceMap": "127:3333:34:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24"
},
"deployedBytecode": {
"linkReferences": {},
"object": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058206283f5534e6d138d58aee25a4d0a11b73841d021b143b4251e368c82b06b31f10029",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 PUSH3 0x83F553 0x4e PUSH14 0x138D58AEE25A4D0A11B73841D021 0xb1 NUMBER 0xb4 0x25 0x1e CALLDATASIZE DUP13 DUP3 0xb0 PUSH12 0x31F100290000000000000000 ",
"sourceMap": "127:3333:34:-;;;;;;;;"
},
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/thomas/workspace/chainlink/evm-contracts/src/v0.4/vendor/CBOR.sol\":\"CBOR\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"/home/thomas/workspace/chainlink/evm-contracts/src/v0.4/vendor/Buffer.sol\":{\"keccak256\":\"0x900b4c8ab35b4876d89835a8b050c96107ace250a70f64c5bba6a78a60f03883\",\"urls\":[\"bzzr://408340da4e8fa35e608196ee508f11f9d44f6f70a10f0db0083ab20b5a894d59\"]},\"/home/thomas/workspace/chainlink/evm-contracts/src/v0.4/vendor/CBOR.sol\":{\"keccak256\":\"0x93faa5cd4bb12e81f73ee0edd3c1fe4fa6dbb0a0a7ab550e46b3c3d845268c9d\",\"urls\":[\"bzzr://c7f8bd088823a62b35a8138d5b2ff380d0527a030121a226c2a47559ea7d3679\"]}},\"version\":1}",
"userdoc": {
"methods": {}
}
},
"sources": {
"vendor/CBOR.sol": {
"id": 34
},
"vendor/Buffer.sol": {
"id": 33
}
},
"sourceCodes": {
"vendor/CBOR.sol": "// SPDX-License-Identifier: MIT\npragma solidity >= 0.4.19 < 0.7.0;\n\nimport { Buffer as BufferChainlink } from \"./Buffer.sol\";\n\nlibrary CBOR {\n using BufferChainlink for BufferChainlink.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_TAG = 6;\n uint8 private constant MAJOR_TYPE_CONTENT_FREE = 7;\n\n uint8 private constant TAG_TYPE_BIGNUM = 2;\n uint8 private constant TAG_TYPE_NEGATIVE_BIGNUM = 3;\n\n function encodeType(BufferChainlink.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(BufferChainlink.buffer memory buf, uint8 major) private pure {\n buf.appendUint8(uint8((major << 5) | 31));\n }\n\n function encodeUInt(BufferChainlink.buffer memory buf, uint value) internal pure {\n encodeType(buf, MAJOR_TYPE_INT, value);\n }\n\n function encodeInt(BufferChainlink.buffer memory buf, int value) internal pure {\n if(value < -0x10000000000000000) {\n encodeSignedBigNum(buf, value);\n } else if(value > 0xFFFFFFFFFFFFFFFF) {\n encodeBigNum(buf, value);\n } else 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(BufferChainlink.buffer memory buf, bytes memory value) internal pure {\n encodeType(buf, MAJOR_TYPE_BYTES, value.length);\n buf.append(value);\n }\n\n function encodeBigNum(BufferChainlink.buffer memory buf, int value) internal pure {\n buf.appendUint8(uint8((MAJOR_TYPE_TAG << 5) | TAG_TYPE_BIGNUM));\n encodeBytes(buf, abi.encode(uint(value)));\n }\n\n function encodeSignedBigNum(BufferChainlink.buffer memory buf, int input) internal pure {\n buf.appendUint8(uint8((MAJOR_TYPE_TAG << 5) | TAG_TYPE_NEGATIVE_BIGNUM));\n encodeBytes(buf, abi.encode(uint(-1 - input)));\n }\n\n function encodeString(BufferChainlink.buffer memory buf, string memory value) internal pure {\n encodeType(buf, MAJOR_TYPE_STRING, bytes(value).length);\n buf.append(bytes(value));\n }\n\n function startArray(BufferChainlink.buffer memory buf) internal pure {\n encodeIndefiniteLengthType(buf, MAJOR_TYPE_ARRAY);\n }\n\n function startMap(BufferChainlink.buffer memory buf) internal pure {\n encodeIndefiniteLengthType(buf, MAJOR_TYPE_MAP);\n }\n\n function endSequence(BufferChainlink.buffer memory buf) internal pure {\n encodeIndefiniteLengthType(buf, MAJOR_TYPE_CONTENT_FREE);\n }\n}\n",
"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"
},
"sourceTreeHashHex": "0xd51725b16dd157e4c8ea5b781e45f7b89e8bfac135ee2f433455f52bc45aaf94",
"compiler": {
"name": "solc",
"version": "soljson-v0.4.24+commit.e67f0147.js",
"settings": {
"optimizer": {
"runs": 1000000,
"enabled": true
},
"outputSelection": {
"*": {
"*": [
"abi",
"devdoc",
"userdoc",
"evm.bytecode.object",
"evm.bytecode.sourceMap",
"evm.deployedBytecode.object",
"evm.deployedBytecode.sourceMap",
"evm.methodIdentifiers",
"metadata"
]
}
},
"metadata": {
"bytecodeHash": "none"
},
"remappings": []
}
},
"chains": {}
}
\ No newline at end of file
{
"schemaVersion": "2.0.0",
"contractName": "ChainlinkRequestInterface",
"compilerOutput": {
"abi": [
{
"constant": false,
"inputs": [
{
"name": "sender",
"type": "address"
},
{
"name": "payment",
"type": "uint256"
},
{
"name": "id",
"type": "bytes32"
},
{
"name": "callbackAddress",
"type": "address"
},
{
"name": "callbackFunctionId",
"type": "bytes4"
},
{
"name": "nonce",
"type": "uint256"
},
{
"name": "version",
"type": "uint256"
},
{
"name": "data",
"type": "bytes"
}
],
"name": "oracleRequest",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "requestId",
"type": "bytes32"
},
{
"name": "payment",
"type": "uint256"
},
{
"name": "callbackFunctionId",
"type": "bytes4"
},
{
"name": "expiration",
"type": "uint256"
}
],
"name": "cancelOracleRequest",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"methods": {}
},
"evm": {
"bytecode": {
"linkReferences": {},
"object": "0x",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"linkReferences": {},
"object": "0x",
"opcodes": "",
"sourceMap": ""
},
"methodIdentifiers": {
"cancelOracleRequest(bytes32,uint256,bytes4,uint256)": "6ee4d553",
"oracleRequest(address,uint256,bytes32,address,bytes4,uint256,uint256,bytes)": "40429946"
}
},
"metadata": "",
"userdoc": {
"methods": {}
}
},
"sources": {
"interfaces/ChainlinkRequestInterface.sol": {
"id": 11
}
},
"sourceCodes": {
"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"
},
"sourceTreeHashHex": "0x7d3983584065248fba8f0ce75fd86feac43ade43784466f87ea502254ddec992",
"compiler": {
"name": "solc",
"version": "soljson-v0.4.24+commit.e67f0147.js",
"settings": {
"optimizer": {
"runs": 1000000,
"enabled": true
},
"outputSelection": {
"*": {
"*": [
"abi",
"devdoc",
"userdoc",
"evm.bytecode.object",
"evm.bytecode.sourceMap",
"evm.deployedBytecode.object",
"evm.deployedBytecode.sourceMap",
"evm.methodIdentifiers",
"metadata"
]
}
},
"metadata": {
"bytecodeHash": "none"
},
"remappings": []
}
},
"chains": {}
}
\ No newline at end of file
{
"schemaVersion": "2.0.0",
"contractName": "ENS",
"compilerOutput": {
"abi": [
{
"constant": true,
"inputs": [
{
"name": "node",
"type": "bytes32"
}
],
"name": "resolver",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "node",
"type": "bytes32"
}
],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "node",
"type": "bytes32"
},
{
"name": "label",
"type": "bytes32"
},
{
"name": "owner",
"type": "address"
}
],
"name": "setSubnodeOwner",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "node",
"type": "bytes32"
},
{
"name": "ttl",
"type": "uint64"
}
],
"name": "setTTL",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "node",
"type": "bytes32"
}
],
"name": "ttl",
"outputs": [
{
"name": "",
"type": "uint64"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "node",
"type": "bytes32"
},
{
"name": "resolver",
"type": "address"
}
],
"name": "setResolver",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "node",
"type": "bytes32"
},
{
"name": "owner",
"type": "address"
}
],
"name": "setOwner",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "node",
"type": "bytes32"
},
{
"indexed": true,
"name": "label",
"type": "bytes32"
},
{
"indexed": false,
"name": "owner",
"type": "address"
}
],
"name": "NewOwner",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "node",
"type": "bytes32"
},
{
"indexed": false,
"name": "owner",
"type": "address"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "node",
"type": "bytes32"
},
{
"indexed": false,
"name": "resolver",
"type": "address"
}
],
"name": "NewResolver",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "node",
"type": "bytes32"
},
{
"indexed": false,
"name": "ttl",
"type": "uint64"
}
],
"name": "NewTTL",
"type": "event"
}
],
"devdoc": {
"methods": {}
},
"evm": {
"bytecode": {
"linkReferences": {},
"object": "0x",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"linkReferences": {},
"object": "0x",
"opcodes": "",
"sourceMap": ""
},
"methodIdentifiers": {
"owner(bytes32)": "02571be3",
"resolver(bytes32)": "0178b8bf",
"setOwner(bytes32,address)": "5b0fc9c3",
"setResolver(bytes32,address)": "1896f70a",
"setSubnodeOwner(bytes32,bytes32,address)": "06ab5923",
"setTTL(bytes32,uint64)": "14ab9038",
"ttl(bytes32)": "16a25cbd"
}
},
"metadata": "",
"userdoc": {
"methods": {}
}
},
"sources": {
"vendor/ENS.sol": {
"id": 35
}
},
"sourceCodes": {
"vendor/ENS.sol": "pragma solidity ^0.4.24;\n\ninterface ENS {\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) public;\n function setResolver(bytes32 node, address resolver) public;\n function setOwner(bytes32 node, address owner) public;\n function setTTL(bytes32 node, uint64 ttl) public;\n function owner(bytes32 node) public view returns (address);\n function resolver(bytes32 node) public view returns (address);\n function ttl(bytes32 node) public view returns (uint64);\n\n}\n"
},
"sourceTreeHashHex": "0xcc83b20d8d1b27c26281cef49d7dd8543534b07b2107603f32778be9be04d6e1",
"compiler": {
"name": "solc",
"version": "soljson-v0.4.24+commit.e67f0147.js",
"settings": {
"optimizer": {
"runs": 1000000,
"enabled": true
},
"outputSelection": {
"*": {
"*": [
"abi",
"devdoc",
"userdoc",
"evm.bytecode.object",
"evm.bytecode.sourceMap",
"evm.deployedBytecode.object",
"evm.deployedBytecode.sourceMap",
"evm.methodIdentifiers",
"metadata"
]
}
},
"metadata": {
"bytecodeHash": "none"
},
"remappings": []
}
},
"chains": {}
}
\ No newline at end of file
{
"schemaVersion": "2.0.0",
"contractName": "ENSInterface",
"compilerOutput": {
"abi": [
{
"constant": true,
"inputs": [
{
"name": "node",
"type": "bytes32"
}
],
"name": "resolver",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "node",
"type": "bytes32"
}
],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "node",
"type": "bytes32"
},
{
"name": "label",
"type": "bytes32"
},
{
"name": "owner",
"type": "address"
}
],
"name": "setSubnodeOwner",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "node",
"type": "bytes32"
},
{
"name": "ttl",
"type": "uint64"
}
],
"name": "setTTL",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "node",
"type": "bytes32"
}
],
"name": "ttl",
"outputs": [
{
"name": "",
"type": "uint64"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "node",
"type": "bytes32"
},
{
"name": "resolver",
"type": "address"
}
],
"name": "setResolver",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "node",
"type": "bytes32"
},
{
"name": "owner",
"type": "address"
}
],
"name": "setOwner",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "node",
"type": "bytes32"
},
{
"indexed": true,
"name": "label",
"type": "bytes32"
},
{
"indexed": false,
"name": "owner",
"type": "address"
}
],
"name": "NewOwner",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "node",
"type": "bytes32"
},
{
"indexed": false,
"name": "owner",
"type": "address"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "node",
"type": "bytes32"
},
{
"indexed": false,
"name": "resolver",
"type": "address"
}
],
"name": "NewResolver",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "node",
"type": "bytes32"
},
{
"indexed": false,
"name": "ttl",
"type": "uint64"
}
],
"name": "NewTTL",
"type": "event"
}
],
"devdoc": {
"methods": {}
},
"evm": {
"bytecode": {
"linkReferences": {},
"object": "0x",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"linkReferences": {},
"object": "0x",
"opcodes": "",
"sourceMap": ""
},
"methodIdentifiers": {
"owner(bytes32)": "02571be3",
"resolver(bytes32)": "0178b8bf",
"setOwner(bytes32,address)": "5b0fc9c3",
"setResolver(bytes32,address)": "1896f70a",
"setSubnodeOwner(bytes32,bytes32,address)": "06ab5923",
"setTTL(bytes32,uint64)": "14ab9038",
"ttl(bytes32)": "16a25cbd"
}
},
"metadata": "",
"userdoc": {
"methods": {}
}
},
"sources": {
"interfaces/ENSInterface.sol": {
"id": 12
}
},
"sourceCodes": {
"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"
},
"sourceTreeHashHex": "0xd0b1a6134b5d6c0213bc4db5df8693ec41e13de3d97d43cc8d19639e516f9767",
"compiler": {
"name": "solc",
"version": "soljson-v0.4.24+commit.e67f0147.js",
"settings": {
"optimizer": {
"runs": 1000000,
"enabled": true
},
"outputSelection": {
"*": {
"*": [
"abi",
"devdoc",
"userdoc",
"evm.bytecode.object",
"evm.bytecode.sourceMap",
"evm.deployedBytecode.object",
"evm.deployedBytecode.sourceMap",
"evm.methodIdentifiers",
"metadata"
]
}
},
"metadata": {
"bytecodeHash": "none"
},
"remappings": []
}
},
"chains": {}
}
\ No newline at end of file
{
"schemaVersion": "2.0.0",
"contractName": "ENSResolver",
"compilerOutput": {
"abi": [
{
"constant": true,
"inputs": [
{
"name": "node",
"type": "bytes32"
}
],
"name": "addr",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
"methods": {}
},
"evm": {
"bytecode": {
"linkReferences": {},
"object": "0x",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"linkReferences": {},
"object": "0x",
"opcodes": "",
"sourceMap": ""
},
"methodIdentifiers": {
"addr(bytes32)": "3b3b57de"
}
},
"metadata": "",
"userdoc": {
"methods": {}
}
},
"sources": {
"vendor/ENSResolver.sol": {
"id": 37
}
},
"sourceCodes": {
"vendor/ENSResolver.sol": "pragma solidity 0.4.24;\n\ncontract ENSResolver {\n function addr(bytes32 node) public view returns (address);\n}\n"
},
"sourceTreeHashHex": "0x08965df63f00cb8d164d6fc36a0c388740725906b0bfb79b17391d5dfeabf683",
"compiler": {
"name": "solc",
"version": "soljson-v0.4.24+commit.e67f0147.js",
"settings": {
"optimizer": {
"runs": 1000000,
"enabled": true
},
"outputSelection": {
"*": {
"*": [
"abi",
"devdoc",
"userdoc",
"evm.bytecode.object",
"evm.bytecode.sourceMap",
"evm.deployedBytecode.object",
"evm.deployedBytecode.sourceMap",
"evm.methodIdentifiers",
"metadata"
]
}
},
"metadata": {
"bytecodeHash": "none"
},
"remappings": []
}
},
"chains": {}
}
\ No newline at end of file
{
"schemaVersion": "2.0.0",
"contractName": "ERC20",
"compilerOutput": {
"abi": [
{
"constant": false,
"inputs": [
{
"name": "spender",
"type": "address"
},
{
"name": "value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "from",
"type": "address"
},
{
"name": "to",
"type": "address"
},
{
"name": "value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "who",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "to",
"type": "address"
},
{
"name": "value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "owner",
"type": "address"
},
{
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "owner",
"type": "address"
},
{
"indexed": true,
"name": "spender",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "from",
"type": "address"
},
{
"indexed": true,
"name": "to",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
}
],
"devdoc": {
"methods": {},
"title": "ERC20 interface"
},
"evm": {
"bytecode": {
"linkReferences": {},
"object": "0x",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"linkReferences": {},
"object": "0x",
"opcodes": "",
"sourceMap": ""
},
"methodIdentifiers": {
"allowance(address,address)": "dd62ed3e",
"approve(address,uint256)": "095ea7b3",
"balanceOf(address)": "70a08231",
"totalSupply()": "18160ddd",
"transfer(address,uint256)": "a9059cbb",
"transferFrom(address,address,uint256)": "23b872dd"
}
},
"metadata": "",
"userdoc": {
"methods": {}
}
},
"sources": {
"interfaces/ERC20.sol": {
"id": 13
},
"interfaces/ERC20Basic.sol": {
"id": 14
}
},
"sourceCodes": {
"interfaces/ERC20.sol": "pragma solidity ^0.4.11;\n\n\nimport { ERC20Basic as linkERC20Basic } from \"./ERC20Basic.sol\";\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is linkERC20Basic {\n function allowance(address owner, address spender) constant returns (uint256);\n function transferFrom(address from, address to, uint256 value) returns (bool);\n function approve(address spender, uint256 value) returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n",
"interfaces/ERC20Basic.sol": "pragma solidity ^0.4.11;\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n uint256 public totalSupply;\n function balanceOf(address who) constant returns (uint256);\n function transfer(address to, uint256 value) returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n"
},
"sourceTreeHashHex": "0xc597ad81641c23618d27c52920f032b058f94144f688c910c427ec9a7ef4556c",
"compiler": {
"name": "solc",
"version": "soljson-v0.4.24+commit.e67f0147.js",
"settings": {
"optimizer": {
"runs": 1000000,
"enabled": true
},
"outputSelection": {
"*": {
"*": [
"abi",
"devdoc",
"userdoc",
"evm.bytecode.object",
"evm.bytecode.sourceMap",
"evm.deployedBytecode.object",
"evm.deployedBytecode.sourceMap",
"evm.methodIdentifiers",
"metadata"
]
}
},
"metadata": {
"bytecodeHash": "none"
},
"remappings": []
}
},
"chains": {}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment