Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik committed May 8, 2024
2 parents 09383c4 + 27844ce commit 6dd5851
Show file tree
Hide file tree
Showing 20 changed files with 44 additions and 43 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
2 changes: 1 addition & 1 deletion packages/protocol/contracts/L1/TaikoData.sol
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ library TaikoData {
mapping(
uint64 blockId_mod_blockRingBufferSize
=> mapping(uint32 transitionId => TransitionState ts)
) transitions;
) transitions;
// Ring buffer for Ether deposits
bytes32 __reserve1;
SlotA slotA; // slot 5
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.

2 changes: 1 addition & 1 deletion packages/protocol/script/DeployERC20Airdrop.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ contract DeployERC20Airdrop is DeployCapability {
impl: address(new ERC20Airdrop()),
data: abi.encodeCall(
ERC20Airdrop.init, (address(0), 0, 0, bytes32(0), bridgedTko, vaultAddress)
)
)
})
);

Expand Down
10 changes: 5 additions & 5 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 Expand Up @@ -152,7 +152,7 @@ contract DeployOnL1 is DeployCapability {
impl: address(new TaikoToken()),
data: abi.encodeCall(
TaikoToken.init, (owner, vm.envAddress("TAIKO_TOKEN_PREMINT_RECIPIENT"))
),
),
registerTo: sharedAddressManager
});
}
Expand Down Expand Up @@ -263,7 +263,7 @@ contract DeployOnL1 is DeployCapability {
vm.envBytes32("L2_GENESIS_HASH"),
vm.envBool("PAUSE_TAIKO_L1")
)
),
),
registerTo: rollupAddressManager
});

Expand Down Expand Up @@ -330,7 +330,7 @@ contract DeployOnL1 is DeployCapability {
impl: automateDcapV3AttestationImpl,
data: abi.encodeCall(
AutomataDcapV3Attestation.init, (owner, address(sigVerifyLib), address(pemCertChainLib))
),
),
registerTo: rollupAddressManager
});

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
2 changes: 1 addition & 1 deletion packages/protocol/test/L2/DelegateOwner.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ contract TestDelegateOwner is TaikoTest {
impl: address(new DelegateOwner()),
data: abi.encodeCall(
DelegateOwner.init, (remoteOwner, address(addressManager), remoteChainId)
),
),
registerTo: address(addressManager)
})
);
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/test/L2/TaikoL2.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ contract TestTaikoL2 is TaikoTest {
impl: address(new TaikoL2EIP1559Configurable()),
data: abi.encodeCall(
TaikoL2.init, (address(0), addressManager, l1ChainId, gasExcess)
),
),
registerTo: addressManager
})
)
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/test/L2/TaikoL2NoFeeCheck.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ contract TestTaikoL2NoFeeCheck is TaikoTest {
impl: address(new SkipBasefeeCheckL2()),
data: abi.encodeCall(
TaikoL2.init, (address(0), addressManager, l1ChainId, gasExcess)
),
),
registerTo: addressManager
})
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ contract AttestationBase is Test, DcapTestUtils, V3QuoteParseUtils {
data: abi.encodeCall(
AutomataDcapV3Attestation.init,
(admin, address(sigVerifyLib), address(pemCertChainLib))
)
)
})
);

Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/test/bridge/Bridge.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ contract BridgeTest is TaikoTest {
impl: address(new DelegateOwner()),
data: abi.encodeCall(
DelegateOwner.init, (mockDAO, address(addressManager), l1ChainId)
)
)
})
)
);
Expand Down
4 changes: 2 additions & 2 deletions packages/protocol/test/team/airdrop/ERC20Airdrop.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ contract TestERC20Airdrop is TaikoTest {
data: abi.encodeCall(
BridgedERC20.init,
(address(0), address(addressManager), randAddress(), 100, 18, "TKO", "Taiko Token")
)
)
})
);

Expand All @@ -129,7 +129,7 @@ contract TestERC20Airdrop is TaikoTest {
data: abi.encodeCall(
ERC20Airdrop.init,
(address(0), claimStart, claimEnd, merkleRoot, address(token), address(vault))
)
)
})
);

Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/test/tokenvault/BridgedERC20.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ contract TestBridgedERC20 is TaikoTest {
data: abi.encodeCall(
BridgedERC20.init,
(owner, address(manager), srcToken, srcChainId, srcDecimals, name, name)
),
),
registerTo: manager
})
);
Expand Down
6 changes: 3 additions & 3 deletions packages/protocol/test/tokenvault/ERC20Vault.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ contract TestERC20Vault is TaikoTest {
data: abi.encodeCall(
BridgedERC20.init,
(address(0), address(addressManager), randAddress(), 100, 18, "USDC", "USDC coin")
)
)
})
);

Expand All @@ -188,7 +188,7 @@ contract TestERC20Vault is TaikoTest {
data: abi.encodeCall(
BridgedERC20.init,
(address(0), address(addressManager), randAddress(), 100, 18, "USDT", "USDT coin")
)
)
})
);

Expand All @@ -207,7 +207,7 @@ contract TestERC20Vault is TaikoTest {
"stETH",
"Lido Staked ETH"
)
)
)
})
);
vm.stopPrank();
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/test/verifiers/RiscZeroVerifier.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ contract TestRiscZeroVerifier is TaikoL1TestBase {
data: abi.encodeCall(
RiscZeroVerifier.init,
(address(0), address(addressManager), address(riscZeroRemoteVerifier))
)
)
})
);

Expand Down

0 comments on commit 6dd5851

Please sign in to comment.