Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update swagger #32

Merged
merged 2 commits into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions client/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4236,7 +4236,7 @@ paths:
type: string
description: >-
denom represents the string name of the given
denom unit (e.g plug).
denom unit (e.g uplugcn).
exponent:
type: integer
format: int64
Expand All @@ -4249,10 +4249,10 @@ paths:

1 denom = 1^exponent base_denom

(e.g. with a base_denom of plug, one can create a
DenomUnit of 'plug' with
(e.g. with a base_denom of uplugcn, one can create a
DenomUnit of 'plugcn' with

exponent = 6, thus: 1 plug = 10^6 plug).
exponent = 6, thus: 1 plugcn = 10^6 uplugcn).
aliases:
type: array
items:
Expand Down Expand Up @@ -4424,7 +4424,7 @@ paths:
type: string
description: >-
denom represents the string name of the given denom
unit (e.g plug).
unit (e.g uplugcn).
exponent:
type: integer
format: int64
Expand All @@ -4437,10 +4437,10 @@ paths:

1 denom = 1^exponent base_denom

(e.g. with a base_denom of plug, one can create a
DenomUnit of 'plug' with
(e.g. with a base_denom of uplugcn, one can create a
DenomUnit of 'plugcn' with

exponent = 6, thus: 1 plug = 10^6 plug).
exponent = 6, thus: 1 plugcn = 10^6 uplugcn).
aliases:
type: array
items:
Expand Down Expand Up @@ -8265,7 +8265,7 @@ paths:
title: minimum inflation rate
goal_bonded:
type: string
title: goal of percent bonded plugs
title: goal of percent bonded plugcns
blocks_per_year:
type: string
format: uint64
Expand Down Expand Up @@ -15848,7 +15848,7 @@ paths:
type: array
format: sdk.Coins
example:
- denom: plug
- denom: uplugcn
amount: '100000000'
items:
type: object
Expand Down Expand Up @@ -19497,7 +19497,7 @@ definitions:
properties:
denom:
type: string
description: denom represents the string name of the given denom unit (e.g plug).
description: denom represents the string name of the given denom unit (e.g uplugcn).
exponent:
type: integer
format: int64
Expand All @@ -19508,10 +19508,10 @@ definitions:

1 denom = 1^exponent base_denom

(e.g. with a base_denom of plug, one can create a DenomUnit of 'plug'
(e.g. with a base_denom of uplugcn, one can create a DenomUnit of 'plugcn'
with

exponent = 6, thus: 1 plug = 10^6 plug).
exponent = 6, thus: 1 plugcn = 10^6 uplugcn).
aliases:
type: array
items:
Expand All @@ -19534,7 +19534,7 @@ definitions:
type: string
description: >-
denom represents the string name of the given denom unit (e.g
plug).
uplugcn).
exponent:
type: integer
format: int64
Expand All @@ -19546,10 +19546,10 @@ definitions:

1 denom = 1^exponent base_denom

(e.g. with a base_denom of plug, one can create a DenomUnit of
'plug' with
(e.g. with a base_denom of uplugcn, one can create a DenomUnit of
'plugcn' with

exponent = 6, thus: 1 plug = 10^6 plug).
exponent = 6, thus: 1 plugcn = 10^6 uplugcn).
aliases:
type: array
items:
Expand Down Expand Up @@ -19682,7 +19682,7 @@ definitions:
type: string
description: >-
denom represents the string name of the given denom unit
(e.g plug).
(e.g uplugcn).
exponent:
type: integer
format: int64
Expand All @@ -19694,10 +19694,10 @@ definitions:

1 denom = 1^exponent base_denom

(e.g. with a base_denom of plug, one can create a DenomUnit
of 'plug' with
(e.g. with a base_denom of uplugcn, one can create a DenomUnit
of 'plugcn' with

exponent = 6, thus: 1 plug = 10^6 plug).
exponent = 6, thus: 1 plugcn = 10^6 uplugcn).
aliases:
type: array
items:
Expand Down Expand Up @@ -19758,7 +19758,7 @@ definitions:
type: string
description: >-
denom represents the string name of the given denom unit
(e.g plug).
(e.g uplugcn).
exponent:
type: integer
format: int64
Expand All @@ -19770,10 +19770,10 @@ definitions:

1 denom = 1^exponent base_denom

(e.g. with a base_denom of plug, one can create a
DenomUnit of 'plug' with
(e.g. with a base_denom of uplugcn, one can create a
DenomUnit of 'plugcn' with

exponent = 6, thus: 1 plug = 10^6 plug).
exponent = 6, thus: 1 plugcn = 10^6 uplugcn).
aliases:
type: array
items:
Expand Down Expand Up @@ -21564,7 +21564,7 @@ definitions:
title: minimum inflation rate
goal_bonded:
type: string
title: goal of percent bonded plugs
title: goal of percent bonded plugcns
blocks_per_year:
type: string
format: uint64
Expand Down Expand Up @@ -21611,7 +21611,7 @@ definitions:
title: minimum inflation rate
goal_bonded:
type: string
title: goal of percent bonded plugs
title: goal of percent bonded plugcns
blocks_per_year:
type: string
format: uint64
Expand Down Expand Up @@ -26045,7 +26045,7 @@ definitions:
type: array
format: sdk.Coins
example:
- denom: plug
- denom: uplugcn
amount: '100000000'
items:
type: object
Expand Down Expand Up @@ -26418,7 +26418,7 @@ definitions:
type: array
format: sdk.Coins
example:
- denom: plug
- denom: uplugcn
amount: '100000000'
items:
type: object
Expand Down
6 changes: 3 additions & 3 deletions docs/endpoints/legacy-rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ Denom uses `plug` which affects fields:
The same code as integrating with Plug Chain Hub mainnet, call `POST` `/txs` to send a transaction, as the example below:

```bash
curl -X POST "http://localhost:1317/txs" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"tx\": {\"msg\":[{\"type\":\"cosmos-sdk/MsgSend\",\"value\":{\"from_address\":\"gx1rkgdpj6fyyyu7pnhmc3v7gw9uls4mnajvzdwkt\",\"to_address\":\"gx1q6t5439f0rkvkzl38m0f43e0kpv3mx7x2shlq8\",\"amount\":[{\"denom\":\"plug\",\"amount\":\"1000000\"}]}}],\"fee\":{\"amount\":[{\"denom\":\"plug\",\"amount\":\"30000\"}],\"gas\":\"200000\"},\"signatures\":[{\"pub_key\":{\"type\":\"tendermint/PubKeySecp256k1\",\"value\":\"AxGagdsRTKni/h1+vCFzTpNltwoiU7SwIR2dg6Jl5a//\"},\"signature\":\"Pu8yiRVO8oB2YDDHyB047dXNArbVImasmKBrm8Kr+6B08y8QQ7YG1eVgHi5OIYYclccCf3Ju/BQ78qsMWMniNQ==\"}],\"memo\":\"Sent gx Plug Chain Hub client\"}, \"mode\": \"block\"}"
curl -X POST "http://localhost:1317/txs" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"tx\": {\"msg\":[{\"type\":\"cosmos-sdk/MsgSend\",\"value\":{\"from_address\":\"gx1rkgdpj6fyyyu7pnhmc3v7gw9uls4mnajvzdwkt\",\"to_address\":\"gx1q6t5439f0rkvkzl38m0f43e0kpv3mx7x2shlq8\",\"amount\":[{\"denom\":\"uplugcn\",\"amount\":\"1000000\"}]}}],\"fee\":{\"amount\":[{\"denom\":\"uplugcn\",\"amount\":\"30000\"}],\"gas\":\"200000\"},\"signatures\":[{\"pub_key\":{\"type\":\"tendermint/PubKeySecp256k1\",\"value\":\"AxGagdsRTKni/h1+vCFzTpNltwoiU7SwIR2dg6Jl5a//\"},\"signature\":\"Pu8yiRVO8oB2YDDHyB047dXNArbVImasmKBrm8Kr+6B08y8QQ7YG1eVgHi5OIYYclccCf3Ju/BQ78qsMWMniNQ==\"}],\"memo\":\"Sent gx Plug Chain Hub client\"}, \"mode\": \"block\"}"
```

## Breaking Changes in Querying Transactions
Expand All @@ -380,7 +380,7 @@ curl -X POST "http://localhost:1317/txs" -H "accept: application/json" -H "Conte
"height": "5",
"txhash": "E663768B616B1ACD2912E47C36FEBC7DB0E0974D6DB3823D4C656E0EAB8C679D",
"data": "0A060A0473656E64",
"raw_log": "[{\"events\":[{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"send\"},{\"key\":\"sender\",\"value\":\"gx18awn3k70u05tlcul8w2qnl64g002uj4kjn93rn\"},{\"key\":\"module\",\"value\":\"bank\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"gx1w976a5jrhsj06dqmrh2x9qxzel74qtcmapklxc\"},{\"key\":\"sender\",\"value\":\"gx18awn3k70u05tlcul8w2qnl64g002uj4kjn93rn\"},{\"key\":\"amount\",\"value\":\"1000000plug\"}]}]}]",
"raw_log": "[{\"events\":[{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"send\"},{\"key\":\"sender\",\"value\":\"gx18awn3k70u05tlcul8w2qnl64g002uj4kjn93rn\"},{\"key\":\"module\",\"value\":\"bank\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"gx1w976a5jrhsj06dqmrh2x9qxzel74qtcmapklxc\"},{\"key\":\"sender\",\"value\":\"gx18awn3k70u05tlcul8w2qnl64g002uj4kjn93rn\"},{\"key\":\"amount\",\"value\":\"1000000uplugcn\"}]}]}]",
"logs": [
{
"events": [
Expand Down Expand Up @@ -414,7 +414,7 @@ curl -X POST "http://localhost:1317/txs" -H "accept: application/json" -H "Conte
},
{
"key": "amount",
"value": "1000000plug"
"value": "1000000uplugcn"
}
]
}
Expand Down
6 changes: 3 additions & 3 deletions docs/zh/endpoints/legacy-rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ Denom 替换为 `plug` ,这会影响到以下字段:
与 Plug Chain Hub 主网集成的代码相同,调用`POST` `/txs` 发送交易,示例如下:

```bash
curl -X POST "http://localhost:1317/txs" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"tx\": {\"msg\":[{\"type\":\"cosmos-sdk/MsgSend\",\"value\":{\"from_address\":\"gx1rkgdpj6fyyyu7pnhmc3v7gw9uls4mnajvzdwkt\",\"to_address\":\"gx1q6t5439f0rkvkzl38m0f43e0kpv3mx7x2shlq8\",\"amount\":[{\"denom\":\"plug\",\"amount\":\"1000000\"}]}}],\"fee\":{\"amount\":[{\"denom\":\"plug\",\"amount\":\"30000\"}],\"gas\":\"200000\"},\"signatures\":[{\"pub_key\":{\"type\":\"tendermint/PubKeySecp256k1\",\"value\":\"AxGagdsRTKni/h1+vCFzTpNltwoiU7SwIR2dg6Jl5a//\"},\"signature\":\"Pu8yiRVO8oB2YDDHyB047dXNArbVImasmKBrm8Kr+6B08y8QQ7YG1eVgHi5OIYYclccCf3Ju/BQ78qsMWMniNQ==\"}],\"memo\":\"Sent gx Plug Chain Hub client\"}, \"mode\": \"block\"}"
curl -X POST "http://localhost:1317/txs" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"tx\": {\"msg\":[{\"type\":\"cosmos-sdk/MsgSend\",\"value\":{\"from_address\":\"gx1rkgdpj6fyyyu7pnhmc3v7gw9uls4mnajvzdwkt\",\"to_address\":\"gx1q6t5439f0rkvkzl38m0f43e0kpv3mx7x2shlq8\",\"amount\":[{\"denom\":\"uplugcn\",\"amount\":\"1000000\"}]}}],\"fee\":{\"amount\":[{\"denom\":\"uplugcn\",\"amount\":\"30000\"}],\"gas\":\"200000\"},\"signatures\":[{\"pub_key\":{\"type\":\"tendermint/PubKeySecp256k1\",\"value\":\"AxGagdsRTKni/h1+vCFzTpNltwoiU7SwIR2dg6Jl5a//\"},\"signature\":\"Pu8yiRVO8oB2YDDHyB047dXNArbVImasmKBrm8Kr+6B08y8QQ7YG1eVgHi5OIYYclccCf3Ju/BQ78qsMWMniNQ==\"}],\"memo\":\"Sent gx Plug Chain Hub client\"}, \"mode\": \"block\"}"
```

## 查询交易的不兼容更新
Expand All @@ -381,7 +381,7 @@ curl -X POST "http://localhost:1317/txs" -H "accept: application/json" -H "Conte
"height": "5",
"txhash": "E663768B616B1ACD2912E47C36FEBC7DB0E0974D6DB3823D4C656E0EAB8C679D",
"data": "0A060A0473656E64",
"raw_log": "[{\"events\":[{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"send\"},{\"key\":\"sender\",\"value\":\"gx18awn3k70u05tlcul8w2qnl64g002uj4kjn93rn\"},{\"key\":\"module\",\"value\":\"bank\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"gx1w976a5jrhsj06dqmrh2x9qxzel74qtcmapklxc\"},{\"key\":\"sender\",\"value\":\"gx18awn3k70u05tlcul8w2qnl64g002uj4kjn93rn\"},{\"key\":\"amount\",\"value\":\"1000000plug\"}]}]}]",
"raw_log": "[{\"events\":[{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"send\"},{\"key\":\"sender\",\"value\":\"gx18awn3k70u05tlcul8w2qnl64g002uj4kjn93rn\"},{\"key\":\"module\",\"value\":\"bank\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"gx1w976a5jrhsj06dqmrh2x9qxzel74qtcmapklxc\"},{\"key\":\"sender\",\"value\":\"gx18awn3k70u05tlcul8w2qnl64g002uj4kjn93rn\"},{\"key\":\"amount\",\"value\":\"1000000uplugcn\"}]}]}]",
"logs": [
{
"events": [
Expand Down Expand Up @@ -415,7 +415,7 @@ curl -X POST "http://localhost:1317/txs" -H "accept: application/json" -H "Conte
},
{
"key": "amount",
"value": "1000000plug"
"value": "1000000uplugcn"
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/protoc-swagger-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ sed -r -i '' 's/cosmosvalconspub1[a-z,0-9]+/gxvalconspub1zcjduepqwhwqn4h5v6mqa7k
sed -i '' 's/Gaia/Plug Chain Hub/g' ./client/static/openapi.yml
sed -i '' 's/gaia/plugchaind/g' ./client/static/openapi.yml
sed -i '' 's/cosmoshub/plugchainhub/g' ./client/static/openapi.yml
sed -i '' 's/uatom/plug/g' ./client/static/openapi.yml
sed -i '' 's/atom/plug/g' ./client/static/openapi.yml
sed -i '' 's/uatom/uplugcn/g' ./client/static/openapi.yml
sed -i '' 's/atom/plugcn/g' ./client/static/openapi.yml

tendermintURL=https://github.com/tendermint/liquidity/blob/develop
onpURL=https://github.com/oracleNetworkProtocol/liquidity/tree/main
Expand Down