Skip to content

Commit

Permalink
Update the constantine.archway.tech endpoint to constantine.archway.io (
Browse files Browse the repository at this point in the history
  • Loading branch information
emperorjm authored Jan 9, 2024
1 parent e4dcf24 commit 7ca2fbf
Show file tree
Hide file tree
Showing 31 changed files with 82 additions and 82 deletions.
4 changes: 2 additions & 2 deletions config/constantine.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ const chainInfo: ChainInfo = {
},
},
],
rest: 'https://api.constantine.archway.tech',
rpc: 'https://rpc.constantine.archway.tech',
rest: 'https://api.constantine.archway.io',
rpc: 'https://rpc.constantine.archway.io',
stakeCurrency: currency,
nodeProvider: {
name: 'Phi Labs',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The **gas price** in Archway determines the cost of each unit of computational r

To prevent validators from accepting transactions with low fees that might lead to spamming the network and additional security issues, a [Minimum Price of Gas](https://github.com/archway-network/archway/blob/main/docs/adr/ADR-005-minimum-price-of-gas.md) system was put in place. Consequently, transactions will fail if the set gas price falls beneath this threshold. Therefore, it's not ideal to set the gas price manually but instead utilize the endpoint or CLI command that returns the minimum price of gas and then use this value as the gas price. This falls under the **estimate fees** feature of the **rewards** module.

You can pull in the minimum price of gas via the following API endpoint https://api.constantine.archway.tech/archway/rewards/v1/estimate_tx_fees. You can find the details of this endpoint [here](https://github.com/archway-network/archway/blob/main/docs/client/archway/rewards/v1/query.swagger.json#L69).
You can pull in the minimum price of gas via the following API endpoint https://api.constantine.archway.io/archway/rewards/v1/estimate_tx_fees. You can find the details of this endpoint [here](https://github.com/archway-network/archway/blob/main/docs/client/archway/rewards/v1/query.swagger.json#L69).

Commands executed via the **archwayd** CLI can pull in the minimum price of gas by accessing the **estimate-fees** command:

Expand All @@ -48,7 +48,7 @@ testnet
::highlight-card

```bash
$(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.tech:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)')
$(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.io:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)')
```


Expand Down Expand Up @@ -82,7 +82,7 @@ testnet
::highlight-card

```bash
archwayd tx bank send archway1e2ntjy39x4gqn3tqu09ztjpjp4hf9q6u47w30u archway19vprdtfha0xsls0qlwqj2sas32nqqtf4ee9z58 1000000000000000000000aconst --chain-id constantine-3 --from my-wallet --node https://rpc.constantine.archway.tech:443 --gas auto --gas-adjustment 1.4 --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.tech:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)')
archwayd tx bank send archway1e2ntjy39x4gqn3tqu09ztjpjp4hf9q6u47w30u archway19vprdtfha0xsls0qlwqj2sas32nqqtf4ee9z58 1000000000000000000000aconst --chain-id constantine-3 --from my-wallet --node https://rpc.constantine.archway.io:443 --gas auto --gas-adjustment 1.4 --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.io:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)')
```
::

Expand Down
18 changes: 9 additions & 9 deletions content/2.developers/2.developer-tools/3.daemon.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ testnet
::highlight-card
```bash
archwayd query bank balances <account-address> --node "https://rpc.constantine.archway.tech:443" --chain-id constantine-3
archwayd query bank balances <account-address> --node "https://rpc.constantine.archway.io:443" --chain-id constantine-3
```
Expand Down Expand Up @@ -234,7 +234,7 @@ testnet
::highlight-card
```bash
archwayd tx wasm store path_to_wasm/my_wasm_file.wasm --gas auto --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.tech:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)') --gas-adjustment 1.4 --from <wallet-label> --chain-id constantine-3 --node https://rpc.constantine.archway.tech:443 --broadcast-mode sync --output json -y
archwayd tx wasm store path_to_wasm/my_wasm_file.wasm --gas auto --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.io:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)') --gas-adjustment 1.4 --from <wallet-label> --chain-id constantine-3 --node https://rpc.constantine.archway.io:443 --broadcast-mode sync --output json -y
```
::
Expand Down Expand Up @@ -268,7 +268,7 @@ testnet
::highlight-card
```bash
archwayd tx wasm instantiate <code.id> '{"entrypoint":"value"}' --from <wallet-label> --label "A human readable label for this deployment" --gas auto --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.tech:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)') --gas-adjustment 1.4 --chain-id constantine-3 --node https://rpc.constantine.archway.tech:443 --broadcast-mode sync --output json -y
archwayd tx wasm instantiate <code.id> '{"entrypoint":"value"}' --from <wallet-label> --label "A human readable label for this deployment" --gas auto --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.io:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)') --gas-adjustment 1.4 --chain-id constantine-3 --node https://rpc.constantine.archway.io:443 --broadcast-mode sync --output json -y
```
::
Expand Down Expand Up @@ -306,7 +306,7 @@ testnet
::highlight-card
```bash
archwayd tx gastracker set-contract-metadata <contract-address> '{ "owner_address": <admin-address>, "reward_address": <rewards-receiver-address>, "collect_premium": false, "premium_percentage_charged": 0, "gas_rebate_to_user": false }' --gas auto --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.tech:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)') --gas-adjustment 1.4 --from <wallet-label> --chain-id "constantine-3" --node https://rpc.constantine.archway.tech:443 --broadcast-mode sync --output json -y
archwayd tx gastracker set-contract-metadata <contract-address> '{ "owner_address": <admin-address>, "reward_address": <rewards-receiver-address>, "collect_premium": false, "premium_percentage_charged": 0, "gas_rebate_to_user": false }' --gas auto --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.io:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)') --gas-adjustment 1.4 --from <wallet-label> --chain-id "constantine-3" --node https://rpc.constantine.archway.io:443 --broadcast-mode sync --output json -y
```
::
Expand Down Expand Up @@ -347,7 +347,7 @@ testnet
::highlight-card
```bash
archwayd query txs --events 'wasm._contract_address=<contract-address>' --node "https://rpc.constantine.archway.tech:443" --chain-id constantine-3
archwayd query txs --events 'wasm._contract_address=<contract-address>' --node "https://rpc.constantine.archway.io:443" --chain-id constantine-3
```
Expand Down Expand Up @@ -383,7 +383,7 @@ testnet
::highlight-card
```bash
archwayd query txs --events 'message.sender=<developer-wallet-address>&message.action=/cosmwasm.wasm.v1.MsgInstantiateContract' --node https://rpc.constantine.archway.tech:443 --chain-id constantine-3
archwayd query txs --events 'message.sender=<developer-wallet-address>&message.action=/cosmwasm.wasm.v1.MsgInstantiateContract' --node https://rpc.constantine.archway.io:443 --chain-id constantine-3
```
::
Expand Down Expand Up @@ -424,7 +424,7 @@ testnet
```bash
archwayd query wasm contract <contract-address> --node https://rpc.constantine.archway.tech:443 --chain-id constantine-3
archwayd query wasm contract <contract-address> --node https://rpc.constantine.archway.io:443 --chain-id constantine-3
```
Expand Down Expand Up @@ -461,7 +461,7 @@ testnet
::highlight-card

```bash
archwayd query wasm contract-history <contract-address> --node https://rpc.constantine.archway.tech:443 --chain-id constantine-3
archwayd query wasm contract-history <contract-address> --node https://rpc.constantine.archway.io:443 --chain-id constantine-3
```


Expand Down Expand Up @@ -493,7 +493,7 @@ testnet
#desc1
::highlight-card
```bash
archwayd query wasm list-contract-by-code <code-id> --node https://rpc.constantine.archway.tech:443 --chain-id constantine-3
archwayd query wasm list-contract-by-code <code-id> --node https://rpc.constantine.archway.io:443 --chain-id constantine-3
```

::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ testnet

```javascript
const offlineSigner = window.keplr.getOfflineSignerAuto("constantine-3");
const signingClient = await SigningArchwayClient.connectWithSigner("https://rpc.constantine.archway.tech", offlineSigner, {
const signingClient = await SigningArchwayClient.connectWithSigner("https://rpc.constantine.archway.io", offlineSigner, {
gasPrice: GasPrice.fromString('0.02aconst'),
});
```
Expand Down Expand Up @@ -109,7 +109,7 @@ testnet
::highlight-card
```javascript
const offlineSigner = window.keplr.getOfflineSignerAuto("constantine-3");
const signingClient = await SigningArchwayClient.connectWithSigner("https://rpc.constantine.archway.tech", offlineSigner);
const signingClient = await SigningArchwayClient.connectWithSigner("https://rpc.constantine.archway.io", offlineSigner);
```


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ testnet
```js
import { ArchwayClient } from '@archwayhq/arch3.js';

const client = await ArchwayClient.connect('https://rpc.constantine.archway.tech');
const client = await ArchwayClient.connect('https://rpc.constantine.archway.io');

const contractAddress = 'archway1ce97k929shkfzp633edt34hhv3uaqlkgsu3j4xqwjlg2fmg8y5hsw4lewj';

Expand Down Expand Up @@ -141,7 +141,7 @@ const contractAddress =
// replace with your contract's address
const query = { "custom_query": { "data": "" } }; // replace with your query

axios.get(`https://api.constantine.archway.tech/cosmwasm/wasm/v1/contract/${contractAddress}/smart`, {
axios.get(`https://api.constantine.archway.io/cosmwasm/wasm/v1/contract/${contractAddress}/smart`, {
params: {
query: query,
},
Expand Down Expand Up @@ -213,7 +213,7 @@ testnet
```js
import { ArchwayClient, SigningArchwayClient } from '@archwayhq/arch3.js';

const signingClient = await ArchwayClient.connect('https://rpc.constantine.archway.tech');
const signingClient = await ArchwayClient.connect('https://rpc.constantine.archway.io');

const validators = await signingClient.tmClient.validatorsAll();
console.log(validators);
Expand Down Expand Up @@ -262,7 +262,7 @@ testnet
```js
import axios from 'axios';

let apiEnpoint = 'https://api.constantine.archway.tech';
let apiEnpoint = 'https://api.constantine.archway.io';

axios.get(apiEnpoint + '/cosmos/staking/v1beta1/validators')
.then(response => {
Expand Down Expand Up @@ -342,7 +342,7 @@ import { DirectSecp256k1HdWallet } from '@cosmjs/proto-signing';

const network = {
chainId: 'constantine-3',
endpoint: 'https://rpc.constantine.archway.tech',
endpoint: 'https://rpc.constantine.archway.io',
prefix: 'archway',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ testnet
```javascript
const network = {
chainId: 'constantine-3',
endpoint: 'https://rpc.constantine.archway.tech',
endpoint: 'https://rpc.constantine.archway.io',
prefix: 'constantine',
};
```
Expand Down Expand Up @@ -395,7 +395,7 @@ dotenv.config();
async function main() {
const network = {
chainId: 'constantine-3',
endpoint: 'https://rpc.constantine.archway.tech',
endpoint: 'https://rpc.constantine.archway.io',
prefix: 'archway',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ testnet
```js
const network = {
chainId: 'constantine-3',
endpoint: 'https://rpc.constantine.archway.tech',
endpoint: 'https://rpc.constantine.archway.io',
prefix: 'archway',
};
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ const currency = {
const ChainInfo = {
chainId: 'constantine-3',
chainName: 'Constantine',
rpc: 'https://rpc.constantine.archway.tech',
rest: 'https://api.constantine.archway.tech',
rpc: 'https://rpc.constantine.archway.io',
rest: 'https://api.constantine.archway.io',
stakeCurrency: currency,
bip44: {
coinType: 118,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ let wsQuery;
const queryForBalanceUpdate = () => {
try {
// Open a new WebSocket connection to the specified URL.
websocket = new WebSocket('wss://rpc.constantine.archway.tech:443/websocket');
websocket = new WebSocket('wss://rpc.constantine.archway.io:443/websocket');

// Define the subscription request. It asks for transactions where the recipient address, and checks for transactions to be published.
wsQuery = {
Expand Down Expand Up @@ -150,13 +150,13 @@ The essential part of the script is the **queryForBalanceUpdate** function, whic

The query parameters can be set to subscribe to transactions where the recipient's address, the IBC destination channel, and the fungible token denom match the specified values. In this case we are listening to all the transactions for a specific archway address `${address}`**`. The WebSocket connection is closed by calling the disconnect method.

Note that we are using the **wss://rpc.constantine.archway.tech:443/websocket** endpoint for testnet, and the **wss:///rpc.mainnet.archway.io:443** for mainnet. Make sure to check the [networks page](/resources/networks) for details on the available RPC endpoints.
Note that we are using the **wss://rpc.constantine.archway.io:443/websocket** endpoint for testnet, and the **wss:///rpc.mainnet.archway.io:443** for mainnet. Make sure to check the [networks page](/resources/networks) for details on the available RPC endpoints.



The provided code sets up a WebSocket client to connect to a Tendermint RPC server and subscribes to transaction events by using the native WebSocket object from the **ws** Node.js library to interact with the Archway network via WebSocket. This code logs the details of transactions that match the subscription query as they occur.

The core of the script is the **queryForBalanceUpdate** function, which establishes a WebSocket connection to the **wss://rpc.constantine.archway.tech:443/websocket** endpoint. It then sends a JSON-RPC 2.0 request with a method of **subscribe** and a specific query to listen for matching transactions.
The core of the script is the **queryForBalanceUpdate** function, which establishes a WebSocket connection to the **wss://rpc.constantine.archway.io:443/websocket** endpoint. It then sends a JSON-RPC 2.0 request with a method of **subscribe** and a specific query to listen for matching transactions.

The query parameters are set to subscribe to transactions where the recipient's address, the IBC destination channel, and the fungible token denom all match the specified values. Specifically, it listens for transactions where the recipient's address is `${address}`, the IBC destination channel is `${channel}`, and the fungible token denom is `${externalDenom}`.

Expand Down
2 changes: 1 addition & 1 deletion content/2.developers/2.developer-tools/5.swagger.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The Swagger specification serves as the contract for the API. It includes detail

Each endpoint uses the HTTP GET method. Every operation returns either a successful HTTP 200 response with a defined schema or a default error response.

Swagger is provided for both <a href="https://api.mainnet.archway.io/swagger/" target="_blank" >mainnet</a> and <a href="https://api.constantine.archway.tech/swagger/" target="_blank" >testnet</a>.
Swagger is provided for both <a href="https://api.mainnet.archway.io/swagger/" target="_blank" >mainnet</a> and <a href="https://api.constantine.archway.io/swagger/" target="_blank" >testnet</a>.



Expand Down
4 changes: 2 additions & 2 deletions content/2.developers/2.developer-tools/7.FAQs.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ testnet
::highlight-card

```bash
https://rpc.constantine.archway.tech/tx_search?query=message.sender=<address>ANDmessage.action=/cosmwasm.wasm.v1.MsgInstantiateContract&order_by=desc
https://rpc.constantine.archway.io/tx_search?query=message.sender=<address>ANDmessage.action=/cosmwasm.wasm.v1.MsgInstantiateContract&order_by=desc
```

::
Expand Down Expand Up @@ -111,7 +111,7 @@ testnet
::highlight-card

```bash
archwayd query txs --events 'message.action=/cosmos.bank.v1beta1.MsgSend' --node https://rpc.constantine.archway.tech:443
archwayd query txs --events 'message.action=/cosmos.bank.v1beta1.MsgSend' --node https://rpc.constantine.archway.io:443

```
::
Expand Down
4 changes: 2 additions & 2 deletions content/2.developers/2.rewards/2.managing-rewards.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ testnet
::highlight-card

```bash
archwayd tx rewards withdraw-rewards --records-limit 100000 --from "${rewards_address}" --node https://rpc.constantine.archway.tech:443 --chain-id constantine-3
archwayd tx rewards withdraw-rewards --records-limit 100000 --from "${rewards_address}" --node https://rpc.constantine.archway.io:443 --chain-id constantine-3

```

Expand Down Expand Up @@ -253,7 +253,7 @@ testnet


```bash
archwayd q rewards outstanding-rewards "${rewards_address}" --node https://rpc.constantine.archway.tech:443 --chain-id constantine-3 --output json | jq .
archwayd q rewards outstanding-rewards "${rewards_address}" --node https://rpc.constantine.archway.io:443 --chain-id constantine-3 --output json | jq .
```


Expand Down
2 changes: 1 addition & 1 deletion content/2.developers/2.rewards/3.rewards-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ testnet
::highlight-card

```bash
archwayd tx rewards withdraw-rewards --chain-id constantine-3 --node https://rpc.constantine.archway.tech:443 --records-limit 100 --from mywallet --gas auto --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.tech:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)') --gas-adjustment 1.4 --broadcast-mode sync --output json -y
archwayd tx rewards withdraw-rewards --chain-id constantine-3 --node https://rpc.constantine.archway.io:443 --records-limit 100 --from mywallet --gas auto --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.io:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)') --gas-adjustment 1.4 --broadcast-mode sync --output json -y
```

::
Expand Down
4 changes: 2 additions & 2 deletions content/2.developers/3.guides/3.my-first-dapp/3.deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ testnet
::highlight-card

```bash
archwayd tx wasm store artifacts/test_project2.wasm --from my-wallet --node https://rpc.constantine.archway.tech:443 --chain-id constantine-3 --gas auto --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.tech:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)') --gas-adjustment 1.4
archwayd tx wasm store artifacts/test_project2.wasm --from my-wallet --node https://rpc.constantine.archway.io:443 --chain-id constantine-3 --gas auto --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.io:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)') --gas-adjustment 1.4
```

::
Expand Down Expand Up @@ -102,7 +102,7 @@ testnet
::highlight-card

```bash
archwayd tx wasm instantiate 795 '{"count":0}' --from my-wallet --node https://rpc.constantine.archway.tech:443 --chain-id constantine-3 --label testdev --admin archway1c23y29x9fcs4zlfv5tvl4nrq56p6gywq0snrxl --gas auto --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.tech:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)') --gas-adjustment 1.3
archwayd tx wasm instantiate 795 '{"count":0}' --from my-wallet --node https://rpc.constantine.archway.io:443 --chain-id constantine-3 --label testdev --admin archway1c23y29x9fcs4zlfv5tvl4nrq56p6gywq0snrxl --gas auto --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.io:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)') --gas-adjustment 1.3
```

::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ testnet
::highlight-card

```bash
archwayd tx wasm execute --chain-id constantine-3 archway188u72zstacfq4uknszr0cqry8vn68ynrcfcee4xjlmk6v2vhewysnkr798 '{"increment": {}}' --from my-wallet --node https://rpc.constantine.archway.tech:443 --gas auto --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.tech:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)') --gas-adjustment 1.3
archwayd tx wasm execute --chain-id constantine-3 archway188u72zstacfq4uknszr0cqry8vn68ynrcfcee4xjlmk6v2vhewysnkr798 '{"increment": {}}' --from my-wallet --node https://rpc.constantine.archway.io:443 --gas auto --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.io:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)') --gas-adjustment 1.3
```

::
Expand Down
4 changes: 2 additions & 2 deletions content/2.developers/3.guides/3.my-first-dapp/5.dapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Keplr also needs specific metadata regarding the chain it is connecting to. Belo
const ChainInfo = {
chainId: 'constantine-3',
chainName: 'Constantine Testnet',
rpc: 'https://rpc.constantine.archway.tech',
rest: 'https://api.constantine.archway.tech',
rpc: 'https://rpc.constantine.archway.io',
rest: 'https://api.constantine.archway.io',
stakeCurrency: { coinDenom: 'CONST', coinMinimalDenom: 'aconst', coinDecimals: 18 },
bip44: { coinType: 118 },
bech32Config: {
Expand Down
Loading

0 comments on commit 7ca2fbf

Please sign in to comment.