Skip to content

Commit

Permalink
Merge branch 'main' into quota_logic
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik authored May 8, 2024
2 parents 00958b7 + 27844ce commit 4bf2d7a
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 15,287 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
},
"mintable": {
"type": "boolean"
},
"wrapped": {
"type": "boolean"
}
},
"required": ["name", "addresses", "symbol", "decimals", "type", "logoURI"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import { destNetwork as destChain, enteredAmount, selectedToken } from '$components/Bridge/state';
import { PUBLIC_SLOW_L1_BRIDGING_WARNING } from '$env/static/public';
import { LayerType } from '$libs/chain';
import { isWrapped, type Token } from '$libs/token';
import { connectedSourceChain } from '$stores/network';
export let hasEnoughEth: boolean = false;
Expand All @@ -21,6 +22,10 @@
$: displayL1Warning = slowL1Warning && $destChain?.id && chainConfig[$destChain.id].type === LayerType.L1;
$: wrapped = $selectedToken !== null && isWrapped($selectedToken as Token);
$: wrappedAssetWarning = $t('bridge.alerts.wrapped_eth');
const dispatch = createEventDispatcher();
const editTransactionDetails = () => {
Expand Down Expand Up @@ -64,6 +69,11 @@
<Alert type="warning">{$t('bridge.alerts.slow_bridging')}</Alert>
{/if}

{#if wrapped}
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
<Alert type="warning">{@html wrappedAssetWarning}</Alert>
{/if}

<div class="h-sep" />
<!--
Recipient & Processing Fee
Expand Down
9 changes: 5 additions & 4 deletions packages/bridge-ui/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"nft_scan_again": "Scan again"
},
"alerts": {
"slow_bridging": "Please note: Bridging to L1 will take around 24hrs!"
"slow_bridging": "Please note: Bridging to L1 will take around 24hrs!",
"wrapped_eth": "You are bridging wrapped ETH. Please be aware that un-wrapping will only work on the original chain of the token, <span class=\"font-bold\">NOT</span> on the destination."
},
"button": {
"approve": "Approve",
Expand Down Expand Up @@ -361,10 +362,10 @@
"transactions": "Transactions"
},
"paginator": {
"of": "of",
"page": "Page",
"everything_loaded": "Everything loaded",
"more": "Fetch more...",
"everything_loaded": "Everything loaded"
"of": "of",
"page": "Page"
},
"paused_modal": {
"description": "The bridge is currently not available. Follow our official communication channels for more information. ",
Expand Down
4 changes: 4 additions & 0 deletions packages/bridge-ui/src/libs/token/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ export const testNFT: Token[] = customToken.filter(
);

export const tokens = [ETHToken, ...testERC20Tokens];

export const getTokensByType = (type: TokenType): Token[] => tokens.filter((token) => token.type === type);

export const isWrapped = (token: Token): boolean => tokens.find((token) => token.wrapped === true) === token;
1 change: 1 addition & 0 deletions packages/bridge-ui/src/libs/token/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export type Token = {
imported?: boolean;
mintable?: boolean;
balance?: bigint;
wrapped?: boolean;
};

export type NFT = Token & {
Expand Down
Binary file removed packages/protocol/docs/images/native_support.png
Binary file not shown.
20 changes: 0 additions & 20 deletions packages/protocol/docs/native_token_support.md

This file was deleted.

4 changes: 2 additions & 2 deletions packages/protocol/script/DeployOnL1.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import { P256Verifier } from "p256-verifier/src/P256Verifier.sol";
/// @notice This script deploys the core Taiko protocol smart contract on L1,
/// initializing the rollup.
contract DeployOnL1 is DeployCapability {
uint256 public constant NUM_MIN_MAJORITY_GUARDIANS = 7;
uint256 public constant NUM_MIN_MINORITY_GUARDIANS = 2;
uint256 public NUM_MIN_MAJORITY_GUARDIANS = vm.envUint("NUM_MIN_MAJORITY_GUARDIANS");
uint256 public NUM_MIN_MINORITY_GUARDIANS = vm.envUint("NUM_MIN_MINORITY_GUARDIANS");

address public constant MAINNET_CONTRACT_OWNER = 0x9CBeE534B5D8a6280e01a14844Ee8aF350399C7F; // admin.taiko.eth

Expand Down
2 changes: 2 additions & 0 deletions packages/protocol/script/test_deploy_on_l1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ SHARED_ADDRESS_MANAGER=0x0000000000000000000000000000000000000000 \
L2_GENESIS_HASH=0xee1950562d42f0da28bd4550d88886bc90894c77c9c9eaefef775d4c8223f259 \
PAUSE_TAIKO_L1=true \
PAUSE_BRIDGE=true \
NUM_MIN_MAJORITY_GUARDIANS=7 \
NUM_MIN_MINORITY_GUARDIANS=2 \
TIER_PROVIDER="devnet" \
forge script script/DeployOnL1.s.sol:DeployOnL1 \
--fork-url http://localhost:8545 \
Expand Down
Loading

0 comments on commit 4bf2d7a

Please sign in to comment.