Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Update wiki (#4743)
Browse files Browse the repository at this point in the history
- Added missing `creates` field.
- Removed deprecated methods.
  • Loading branch information
maciejhirsz authored and gavofyork committed Mar 3, 2017
1 parent 4024100 commit d297ddb
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 141 deletions.
58 changes: 0 additions & 58 deletions js/src/jsonrpc/interfaces/eth.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,54 +97,6 @@ The following options are possible for the \`defaultBlock\` parameter:
}
},

compileSerpent: {
desc: 'Returns compiled serpent code.',
params: [
{
type: String,
desc: 'The source code.',
example: '/* some serpent */'
}
],
returns: {
type: Data,
desc: 'The compiled source code.',
example: '0x603880600c6000396000f3006001600060e060020a600035048063c6888fa114601857005b6021600435602b565b8060005260206000f35b600081600702905091905056'
}
},

compileSolidity: {
desc: 'Returns compiled solidity code.',
params: [
{
type: String,
desc: 'The source code.',
example: 'contract test { function multiply(uint a) returns(uint d) { return a * 7; } }'
}
],
returns: {
type: Data,
desc: 'The compiled source code.',
example: '0x605880600c6000396000f3006000357c010000000000000000000000000000000000000000000000000000000090048063c6888fa114602e57005b603d6004803590602001506047565b8060005260206000f35b60006007820290506053565b91905056'
}
},

compileLLL: {
desc: 'Returns compiled LLL code.',
params: [
{
type: String,
desc: 'The source code.',
example: '(returnlll (suicide (caller)))'
}
],
returns: {
type: Data,
desc: 'The compiled source code.',
example: '0x603880600c6000396000f3006001600060e060020a600035048063c6888fa114601857005b6021600435602b565b8060005260206000f35b600081600702905091905056'
}
},

estimateGas: {
desc: 'Makes a call or transaction, which won\'t be added to the blockchain and returns the used gas, which can be used for estimating the used gas.',
params: [
Expand Down Expand Up @@ -415,16 +367,6 @@ The following options are possible for the \`defaultBlock\` parameter:
}
},

getCompilers: {
desc: 'Returns a list of available compilers in the client.',
params: [],
returns: {
type: Array,
desc: 'Array of available compilers.',
example: ['solidity', 'lll', 'serpent']
}
},

getFilterChanges: {
desc: 'Polling method for a filter, which returns an array of logs which occurred since last poll.',
params: [
Expand Down
86 changes: 3 additions & 83 deletions js/src/jsonrpc/interfaces/parity.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

import { Address, Data, Hash, Quantity, BlockNumber, TransactionRequest } from '../types';
import { Address, Data, Hash, Quantity, BlockNumber, TransactionRequest, TransactionResponse } from '../types';
import { fromDecimal, withComment, Dummy } from '../helpers';

const SECTION_ACCOUNTS = 'Accounts (read-only) and Signatures';
Expand All @@ -27,86 +27,6 @@ const SECTION_VAULT = 'Account Vaults';
const SUBDOC_SET = 'set';
const SUBDOC_ACCOUNTS = 'accounts';

const transactionDetails = {
hash: {
type: Hash,
desc: '32 Bytes - hash of the transaction.'
},
nonce: {
type: Quantity,
desc: 'The number of transactions made by the sender prior to this one.'
},
blockHash: {
type: Hash,
desc: '32 Bytes - hash of the block where this transaction was in. `null` when its pending.'
},
blockNumber: {
type: BlockNumber,
desc: 'Block number where this transaction was in. `null` when its pending.'
},
transactionIndex: {
type: Quantity,
desc: 'Integer of the transactions index position in the block. `null` when its pending.'
},
from: {
type: Address,
desc: '20 Bytes - address of the sender.'
},
to: {
type: Address,
desc: '20 Bytes - address of the receiver. `null` when its a contract creation transaction.'
},
value: {
type: Quantity,
desc: 'Value transferred in Wei.'
},
gasPrice: {
type: Quantity,
desc: 'Gas price provided by the sender in Wei.'
},
gas: {
type: Quantity,
desc: 'Gas provided by the sender.'
},
input: {
type: Data,
desc: 'The data send along with the transaction.'
},
raw: {
type: Data,
desc: 'Raw transaction data.'
},
publicKey: {
type: Data,
desc: 'Public key of the signer.'
},
networkId: {
type: Quantity,
desc: 'The network id of the transaction, if any.'
},
standardV: {
type: Quantity,
desc: 'The standardized V field of the signature (0 or 1).'
},
v: {
type: Quantity,
desc: 'The V field of the signature.'
},
r: {
type: Quantity,
desc: 'The R field of the signature.'
},
s: {
type: Quantity,
desc: 'The S field of the signature.'
},
condition: {
type: Object,
optional: true,
desc: 'Conditional submission, Block number in `block` or timestamp in `time` or `null`.'
}
};

export default {
accountsInfo: {
section: SECTION_ACCOUNTS,
Expand Down Expand Up @@ -634,7 +554,7 @@ export default {
returns: {
type: Array,
desc: 'Transactions ordered by priority',
details: transactionDetails,
details: TransactionResponse.details,
example: [
{
blockHash: null,
Expand Down Expand Up @@ -950,7 +870,7 @@ export default {
returns: {
type: Array,
desc: 'Transaction list.',
details: transactionDetails,
details: TransactionResponse.details,
example: [
{
hash: '0x80de421cd2e7e46824a91c343ca42b2ff339409eef09e2d9d73882462f8fce31',
Expand Down
89 changes: 89 additions & 0 deletions js/src/jsonrpc/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,92 @@ export class TransactionRequest {
}
}
}

export class TransactionResponse {
static print = '`Object`';

static details = {
hash: {
type: Hash,
desc: '32 Bytes - hash of the transaction.'
},
nonce: {
type: Quantity,
desc: 'The number of transactions made by the sender prior to this one.'
},
blockHash: {
type: Hash,
desc: '32 Bytes - hash of the block where this transaction was in. `null` when its pending.'
},
blockNumber: {
type: BlockNumber,
desc: 'Block number where this transaction was in. `null` when its pending.'
},
transactionIndex: {
type: Quantity,
desc: 'Integer of the transactions index position in the block. `null` when its pending.'
},
from: {
type: Address,
desc: '20 Bytes - address of the sender.'
},
to: {
type: Address,
desc: '20 Bytes - address of the receiver. `null` when its a contract creation transaction.'
},
value: {
type: Quantity,
desc: 'Value transferred in Wei.'
},
gasPrice: {
type: Quantity,
desc: 'Gas price provided by the sender in Wei.'
},
gas: {
type: Quantity,
desc: 'Gas provided by the sender.'
},
input: {
type: Data,
desc: 'The data send along with the transaction.'
},
creates: {
type: Address,
optional: true,
desc: 'Address of a created contract or `null`.'
},
raw: {
type: Data,
desc: 'Raw transaction data.'
},
publicKey: {
type: Data,
desc: 'Public key of the signer.'
},
networkId: {
type: Quantity,
desc: 'The network id of the transaction, if any.'
},
standardV: {
type: Quantity,
desc: 'The standardized V field of the signature (0 or 1).'
},
v: {
type: Quantity,
desc: 'The V field of the signature.'
},
r: {
type: Quantity,
desc: 'The R field of the signature.'
},
s: {
type: Quantity,
desc: 'The S field of the signature.'
},
condition: {
type: Object,
optional: true,
desc: 'Conditional submission, Block number in `block` or timestamp in `time` or `null`.'
}
}
}

0 comments on commit d297ddb

Please sign in to comment.