Skip to content

Commit

Permalink
fix issues (neo-project#905)
Browse files Browse the repository at this point in the history
  • Loading branch information
Celia18305 committed Aug 19, 2019
1 parent 2b4d485 commit 59c1fb3
Show file tree
Hide file tree
Showing 8 changed files with 160 additions and 176 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Returns the block index in which the transaction is found.

## Parameter Description

Txid: Transaction ID

## Example

Request body:
Expand All @@ -10,16 +14,18 @@ Request body:
{
"jsonrpc": "2.0",
"method": "gettransactionheight",
"params": ["9c909e1e3ba03290553a68d862e002c7a21ba302e043fc492fe069bf6a134d29"],
"params": ["9ae1fd32d525eff2a1bb1fc8d0cd2cfb4cc97a06a232bb87fc58e4fe3bc2a845"],
"id": 1
}```
}
```

Response body:

```json
{
"jsonrpc": "2.0",
"id": 1,
"result": 10000
}```
"result": 251488
}
```

1 change: 1 addition & 0 deletions docs/en-us/tooldev/advanced/network-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Message's basic format is as follows:


> [!NOTE]
>
> - Uniqueness:Only one such message in message queue at the same time.
> - High priority:System need to guarantee higher priority to transmit for a message with higher priority.
Expand Down
5 changes: 4 additions & 1 deletion docs/en-us/tooldev/advanced/tx_execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ Occasions where transaction verification is needed:


> [!NOTE]
>
> - Provide parameters for scripts that need to be verified. Then execute the script in NVM. If Script passes verification then true is returned.
> - Every address is a code fragment with `OptCode.CHECKSIG`, so signature parameters are required upon execution. Similiarly, multi-signed address uses `OptCode.CHECKMULTISIG` method with specified quantity of signature parameters.
> - Every to-be-verified script within transactions contains tx.output.scriptHash (payee's address script of input transaction) pointed by input. This ensures only corresponding wallet is able to spend this UTXO.
Expand Down Expand Up @@ -398,6 +399,7 @@ Other processing steps are the same with a basic transaction.
Special transaction to issue assets. Assets can be issued by asset creator as long as its overall amount does not overpass the specified limit. Issued asset can be used in a transaction. Asset issuing consumes an amount of GAS as system fee.

> [!NOTE]
>
> - If version >= 1, system fee is 0.
> - If the assset type in output list is NEO or GAS, system fee is 0. Otherwise it is 500 GAS as defined in `protocol.json`.

Expand Down Expand Up @@ -578,11 +580,12 @@ Special transaction for smart contract publishing. Processing steps are the same
Special transaction for smart contract invocation. With `invoke/invokefunction/invokescript` command in NEO API or NEO GUI, user can create InvocationTransaction object according to input smart contract information. Note, InvocationTransaction is actually used for GUI asset creation and smart contract publishing.

| InvokeTransaction Usage | Script | Attributes | Attribute content |
|--------------|------------|--------------|
|----|-------|------|------|
| Invoking smart contract | contract script | null | |
| Publishing smart contract | Neo.Contract.Create | null | |
| Asset Registration | Neo.Asset.Create | not null | TransactionAttributeUsage.Script, Asset holder's address scripthash. |
| GUI transferring | NEP-5 asset: transaferring script <br/>Global asset: null | not null | TransactionAttributeUsage.Script,transferring payee address(es) <br/> TransactionAttributeUsage.Remark, remark data |
**Transaction creating**
1. Construct corresponding execution script according to usage, and assign to `InvocationTransaction.Script`.
Expand Down
30 changes: 15 additions & 15 deletions docs/en-us/tooldev/concept/cryptography/encode_algorithm.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ Neo's base58 alphabet is as follows: **123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefgh

Interface definition:

1. Encoding method: Encoding byte[] format data into Base58 string format.
1. Encoding method: Encoding byte[] format data into Base58 string format.

```c#
string Encode(byte[] input)
```
```c#
string Encode(byte[] input)
```


2. Decoding Method: Decoding Base58 string format data into byte[] format
2. Decoding Method: Decoding Base58 string format data into byte[] format

```c#
byte[] Decode(string input)
```
```c#
byte[] Decode(string input)
```


**Encoding Steps**
Expand Down Expand Up @@ -63,15 +63,15 @@ Interface definition:

1. Encoding method: encode byte array data into checkable Base58 string format.

```c#
string Base58CheckEncode(byte[] input)
```
```c#
string Base58CheckEncode(byte[] input)
```

2. Decoding method:decode checkable Base58 string data into byte array format.
2. Decoding methoddecode checkable Base58 string data into byte array format.

```c#
byte[] Base58CheckDecode(string input)
```
```c#
byte[] Base58CheckDecode(string input)
```
**Encoding Steps**:

1. Encode input byte array twice with Sha256 to get a hashed byte array. Take the first 4 bytes of the hash as checksum and append it to the end of original byte array.
Expand Down
Loading

0 comments on commit 59c1fb3

Please sign in to comment.