Update wiki (#4743)

- Added missing `creates` field.
- Removed deprecated methods.
This commit is contained in:
Maciej Hirsz 2017-03-03 14:55:04 +01:00 committed by Gav Wood
parent 4024100e74
commit d297ddbfe5
3 changed files with 92 additions and 141 deletions

View File

@ -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: { 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.', 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: [ params: [
@ -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: { getFilterChanges: {
desc: 'Polling method for a filter, which returns an array of logs which occurred since last poll.', desc: 'Polling method for a filter, which returns an array of logs which occurred since last poll.',
params: [ params: [

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>. // 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'; import { fromDecimal, withComment, Dummy } from '../helpers';
const SECTION_ACCOUNTS = 'Accounts (read-only) and Signatures'; const SECTION_ACCOUNTS = 'Accounts (read-only) and Signatures';
@ -27,86 +27,6 @@ const SECTION_VAULT = 'Account Vaults';
const SUBDOC_SET = 'set'; const SUBDOC_SET = 'set';
const SUBDOC_ACCOUNTS = 'accounts'; 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 { export default {
accountsInfo: { accountsInfo: {
section: SECTION_ACCOUNTS, section: SECTION_ACCOUNTS,
@ -634,7 +554,7 @@ export default {
returns: { returns: {
type: Array, type: Array,
desc: 'Transactions ordered by priority', desc: 'Transactions ordered by priority',
details: transactionDetails, details: TransactionResponse.details,
example: [ example: [
{ {
blockHash: null, blockHash: null,
@ -950,7 +870,7 @@ export default {
returns: { returns: {
type: Array, type: Array,
desc: 'Transaction list.', desc: 'Transaction list.',
details: transactionDetails, details: TransactionResponse.details,
example: [ example: [
{ {
hash: '0x80de421cd2e7e46824a91c343ca42b2ff339409eef09e2d9d73882462f8fce31', hash: '0x80de421cd2e7e46824a91c343ca42b2ff339409eef09e2d9d73882462f8fce31',

View File

@ -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`.'
}
}
}