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 Production from Dev #803

Merged
merged 4 commits into from
May 1, 2024
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
1 change: 1 addition & 0 deletions src/antelope/chains/EVMChainSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ export default abstract class EVMChainSettings implements ChainSettings {
abstract getWeiPrecision(): number;
abstract getExplorerUrl(): string;
abstract getEcosystemUrl(): string;
abstract getBridgeUrl(): string;
abstract getTrustedContractsBucket(): string;
abstract getSystemTokens(): TokenClass[];
abstract getIndexerApiEndpoint(): string;
Expand Down
6 changes: 6 additions & 0 deletions src/antelope/chains/evm/telos-evm-testnet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ const API_ENDPOINT = 'https://api-dev.telos.net/v1';
const WEI_PRECISION = 18;
const EXPLORER_URL = 'https://testnet.teloscan.io';
const ECOSYSTEM_URL = 'https://www.telos.net/ecosystem';
const BRIDGE_URL = 'https://telos-bridge-testnet.netlify.app/bridge';

const NETWORK_EVM_ENDPOINT = 'https://testnet.telos.net';
const INDEXER_ENDPOINT = 'https://api.testnet.teloscan.io';
const CONTRACTS_BUCKET = 'https://verified-evm-contracts-testnet.s3.amazonaws.com';
Expand Down Expand Up @@ -144,6 +146,10 @@ export default class TelosEVMTestnet extends EVMChainSettings {
return ECOSYSTEM_URL;
}

getBridgeUrl(): string {
return BRIDGE_URL;
}

getTrustedContractsBucket(): string {
return CONTRACTS_BUCKET;
}
Expand Down
5 changes: 5 additions & 0 deletions src/antelope/chains/evm/telos-evm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const API_ENDPOINT = 'https://api.telos.net/v1';
const WEI_PRECISION = 18;
const EXPLORER_URL = 'https://teloscan.io';
const ECOSYSTEM_URL = 'https://www.telos.net/ecosystem';
const BRIDGE_URL = 'https://bridge.telos.net/bridge';
const NETWORK_EVM_ENDPOINT = 'https://mainnet.telos.net';
const INDEXER_ENDPOINT = 'https://api.teloscan.io';
const CONTRACTS_BUCKET = 'https://verified-evm-contracts.s3.amazonaws.com';
Expand Down Expand Up @@ -140,6 +141,10 @@ export default class TelosEVMTestnet extends EVMChainSettings {
return ECOSYSTEM_URL;
}

getBridgeUrl(): string {
return BRIDGE_URL;
}

getTrustedContractsBucket(): string {
return CONTRACTS_BUCKET;
}
Expand Down
1 change: 1 addition & 0 deletions src/antelope/stores/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export const useChainStore = defineStore(store_name, {
// https://github.com/telosnetwork/telos-wallet/issues/246
getExplorerUrl: () => (network: string) => (settings[network] as EVMChainSettings).getExplorerUrl(),
getEcosystemUrl: () => (network: string) => (settings[network] as EVMChainSettings).getEcosystemUrl(),
getBridgeUrl: () => (network: string) => (settings[network] as EVMChainSettings).getBridgeUrl(),
getNetworkSettings: () => (network: string) => settings[network],
getStakedRatio: state => (label: string) => (state.__chains[label] as EvmChainModel).stakeRatio ?? ethers.constants.Zero,
getUnstakedRatio: state => (label: string) => (state.__chains[label] as EvmChainModel).unstakeRatio ?? ethers.constants.Zero,
Expand Down
16 changes: 15 additions & 1 deletion src/components/evm/AppNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ export default defineComponent({
const network = this.loggedAccount.network;
window.open(chainStore.getExplorerUrl(network), '_blank');
},
goToTelosBridge() {
const network = this.loggedAccount.network;
window.open(chainStore.getBridgeUrl(network), '_blank');
},
},
});
</script>
Expand Down Expand Up @@ -389,6 +393,16 @@ export default defineComponent({
{{ $t('nav.teloscan') }}
<q-icon size="16px" name="launch" />
</li>
<li
class="c-app-nav__menu-link"
role="menuitem"
:tabindex="menuItemTabIndex"
@click="goToTelosBridge()"
@keypress.space.enter="goToTelosBridge()"
>
{{ $t('nav.bridge') }}
<q-icon size="16px" name="launch" />
</li>
</ul>

<div v-if="!isProduction" class="c-app-nav__demos-link">
Expand Down Expand Up @@ -573,7 +587,7 @@ export default defineComponent({
}

&__menu-link {
@include text--small-bold;
@include text--paragraph-bold;

cursor: pointer;
display: flex;
Expand Down
1 change: 1 addition & 0 deletions src/i18n/en-us/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export default {
login: 'Connect Wallet',
teloscan: 'Teloscan',
ecosystem: 'Ecosystem',
bridge: 'Bridge',
nfts: 'Digital Collectibles',
allowances: 'Approvals',
},
Expand Down
Loading