Skip to content

Commit

Permalink
feat: update native token on devnet (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
nrsirapop authored Jul 22, 2024
1 parent b9ead05 commit c44e2e0
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 27 deletions.
20 changes: 10 additions & 10 deletions config/assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5837,27 +5837,27 @@ stagenet:


devnet-amplifier:
uaxl:
denom: "uaxl"
uamplifier:
denom: "uamplifier"
native_chain: "axelarnet"
name: "Axelar"
symbol: "AXL"
name: "Amplifier"
symbol: "AMPLIFIER"
decimals: 6
image: "/logos/assets/axl.svg"
addresses:
axelarnet:
ibc_denom: "uaxl"
ibc_denom: "uamplifier"



devnet-verifiers:
uaxl:
denom: "uaxl"
uverifiers:
denom: "uverifiers"
native_chain: "axelarnet"
name: "Axelar"
symbol: "AXL"
name: "Verifiers"
symbol: "VERIFIERS"
decimals: 6
image: "/logos/assets/axl.svg"
addresses:
axelarnet:
ibc_denom: "uaxl"
ibc_denom: "uverifiers"
12 changes: 6 additions & 6 deletions config/chains.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4331,9 +4331,9 @@ devnet-amplifier:
timeout:
lcd: 3000
native_token:
name: "Axelar"
symbol: "AXL"
denom: "uaxl"
name: "Amplifier"
symbol: "AMPLIFIER"
denom: "uamplifier"
decimals: 6
name: "Axelar"
short_name: "AXELAR"
Expand Down Expand Up @@ -4478,9 +4478,9 @@ devnet-verifiers:
timeout:
lcd: 3000
native_token:
name: "Axelar"
symbol: "AXL"
denom: "uaxl"
name: "Verifiers"
symbol: "VERIFIERS"
denom: "uverifiers"
decimals: 6
name: "Axelar"
short_name: "AXELAR"
Expand Down
10 changes: 10 additions & 0 deletions config/tokens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ TIMX:
AXL:
coingecko_id: "axelar"
decimals: 6
VERIFIERS:
coingecko_id: "axelar"
decimals: 6
AMPLIFIER:
coingecko_id: "axelar"
decimals: 6
OSMO:
coingecko_id: "osmosis"
decimals: 6
Expand Down Expand Up @@ -563,6 +569,10 @@ axlSOMM:

uaxl:
redirect: "AXL"
uverifiers:
redirect: "VERIFIERS"
uamplifier:
redirect: "AMPLIFIER"
uusdc:
redirect: "USDC"
polygon-uusdc:
Expand Down
4 changes: 2 additions & 2 deletions methods/axelar/getNetworkParameters.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { getLCD } = require('../../utils/config');
const { ENVIRONMENT, getLCD } = require('../../utils/config');
const { request } = require('../../utils/http');
const { toArray } = require('../../utils/parser');

Expand All @@ -10,7 +10,7 @@ module.exports = async () => {
resolve([k, (await request(getLCD(), { path: '/cosmos/staking/v1beta1/params' }))?.params]);
break;
case 'bankSupply':
resolve([k, (await request(getLCD(), { path: '/cosmos/bank/v1beta1/supply/uaxl' }))?.amount]);
resolve([k, (await request(getLCD(), { path: `/cosmos/bank/v1beta1/supply/${ENVIRONMENT === 'devnet-verifiers' ? 'uverifiers' : ENVIRONMENT === 'devnet-amplifier' ? 'uamplifier' : 'uaxl'}` }))?.amount]);
break;
case 'stakingPool':
resolve([k, (await request(getLCD(), { path: '/cosmos/staking/v1beta1/pool' }))?.pool]);
Expand Down
2 changes: 1 addition & 1 deletion methods/axelar/getTokenInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = async params => {
const { price } = { ...(data?.[symbol] || Object.values({ ...data }).find(d => d.denom === symbol)) };
const supplyData = await getCirculatingSupply({ symbol, debug: true });
const circulatingSupply = supplyData?.circulating_supply;
const totalSupply = denom === 'uaxl' ? await getTotalSupply({ asset: denom }) : null;
const totalSupply = ['uaxl', 'uverifiers', 'uamplifier'].includes(denom) ? await getTotalSupply({ asset: denom }) : null;
const updatedAt = supplyData?.updated_at || updated_at || moment().valueOf();

switch (agent) {
Expand Down
4 changes: 2 additions & 2 deletions methods/axelar/getTotalSupply.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const { getAssetData, getLCD } = require('../../utils/config');
const { ENVIRONMENT, getAssetData, getLCD } = require('../../utils/config');
const { request } = require('../../utils/http');
const { formatUnits } = require('../../utils/number');

module.exports = async params => {
const { asset } = { ...params };
const { decimals, addresses } = { ...await getAssetData(asset || 'uaxl') };
const { decimals, addresses } = { ...await getAssetData(asset || (ENVIRONMENT === 'devnet-verifiers' ? 'uverifiers' : ENVIRONMENT === 'devnet-amplifier' ? 'uamplifier' : 'uaxl')) };
const { ibc_denom } = { ...addresses?.axelarnet };
if (!ibc_denom) return;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "axelarscan-api",
"version": "0.0.38",
"version": "0.0.39",
"description": "Axelarscan API",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion terraform/devnet-amplifier/variables.tf.example
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ variable "log_level" {

variable "app_version" {
description = "App version, same as docker image version"
default = "0.0.38"
default = "0.0.39"
validation {
error_message = "Must be valid semantic version. $Major.$Minor.$Patch"
condition = can(regex("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", var.app_version))
Expand Down
2 changes: 1 addition & 1 deletion terraform/devnet-verifiers/variables.tf.example
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ variable "log_level" {

variable "app_version" {
description = "App version, same as docker image version"
default = "0.0.38"
default = "0.0.39"
validation {
error_message = "Must be valid semantic version. $Major.$Minor.$Patch"
condition = can(regex("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", var.app_version))
Expand Down
2 changes: 1 addition & 1 deletion terraform/mainnet/variables.tf.example
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ variable "log_level" {

variable "app_version" {
description = "App version, same as docker image version"
default = "0.0.38"
default = "0.0.39"
validation {
error_message = "Must be valid semantic version. $Major.$Minor.$Patch"
condition = can(regex("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", var.app_version))
Expand Down
2 changes: 1 addition & 1 deletion terraform/stagenet/variables.tf.example
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ variable "log_level" {

variable "app_version" {
description = "App version, same as docker image version"
default = "0.0.38"
default = "0.0.39"
validation {
error_message = "Must be valid semantic version. $Major.$Minor.$Patch"
condition = can(regex("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", var.app_version))
Expand Down
2 changes: 1 addition & 1 deletion terraform/testnet/variables.tf.example
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ variable "log_level" {

variable "app_version" {
description = "App version, same as docker image version"
default = "0.0.38"
default = "0.0.39"
validation {
error_message = "Must be valid semantic version. $Major.$Minor.$Patch"
condition = can(regex("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", var.app_version))
Expand Down

0 comments on commit c44e2e0

Please sign in to comment.