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

Refine v2 descriptions and remote chain styling #110

Merged
merged 2 commits into from
Feb 22, 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
2 changes: 1 addition & 1 deletion packages/frontend/src/view/components/InfoTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface Props {

export function InfoTooltip(props: Props) {
return (
<span className="flex items-center gap-1 ">
<span className="flex items-center gap-1">
{props.children}
<Tooltip text={props.text} variant="text">
<InfoSquareIcon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function EndpointV2Contract(props: Props) {
<V2Badge />
</div>
}
description="V2 variant of the Endpoint Contract backward compatible with V1. Contract handles the cross-chain messages transmission, verification, and receipt. It routes messages to the correct messaging library and keeps all message payloads across versions. Ownership of the contract can be renounced by the owner. Contract implements a standardized interface for Omnichain Applications (OApps) to manage security configurations and seamlessly send and receive messages."
description="V2 variant of the Endpoint Contract - backward compatible with V1. Contract handles the cross-chain messages transmission, verification, and receipt. It routes messages to the correct messaging library. Contract implements a standardized interface for Omnichain Applications (OApps) to manage security configurations and seamlessly send and receive messages."
subtitle={<BlockchainAddress address={props.address} full />}
isLoading={props.isLoading}
>
Expand All @@ -39,13 +39,13 @@ export function EndpointV2Contract(props: Props) {
<Subsection>
<Row
label={
<InfoTooltip text="Owner of the Endpoint Contract">
<InfoTooltip text="Owner of the Endpoint Contract.">
Owner
</InfoTooltip>
}
value={
<BlockchainAddress
warnOnEoa="This contract is owned by an EOA"
warnOnEoa="This contract is owned by an EOA."
address={props.owner}
/>
}
Expand All @@ -54,7 +54,7 @@ export function EndpointV2Contract(props: Props) {
<Row
hideBorder
label={
<InfoTooltip text="Library that reverts both on send and quote. Can be assigned as a default one actively stopping the message flow. It is configured upon contract construction and cannot be changed afterwards.">
<InfoTooltip text="A library that reverts both on send and quote. It can be assigned as a default one actively stopping the message flow. It is configured upon contract construction and cannot be changed afterward.">
Blocked library
</InfoTooltip>
}
Expand All @@ -65,10 +65,17 @@ export function EndpointV2Contract(props: Props) {
defaultSendLibraries={props.defaultSendLibraries}
/>

<Row label="EID" value={props.eid} />
<Row
label={
<InfoTooltip text="List of all registered message libraries. Message library must be appended to this registry before it can be used.">
<InfoTooltip text="Endpoint ID - the chain-id-like number used for in-LZ unique identification of endpoints across different chains.">
EID
</InfoTooltip>
}
value={props.eid}
/>
<Row
label={
<InfoTooltip text="Append-only list of all registered message libraries. Message library must be appended to this registry before it can be used.">
Registered libraries
</InfoTooltip>
}
Expand All @@ -82,11 +89,19 @@ export function EndpointV2Contract(props: Props) {
/>

<Row
label="LayerZero token"
label={
<InfoTooltip text="The fee token, if set. Can be used as an alternative payment for protocol fees. The owner of EndpointV2 can set a new token.">
LayerZero token
</InfoTooltip>
}
value={<BlockchainAddress address={props.lzToken} />}
/>
<Row
label="Native token"
label={
<InfoTooltip text="The fee token fees can be paid in.">
Native token
</InfoTooltip>
}
value={<BlockchainAddress address={props.nativeToken} />}
/>
</Subsection>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ export function ReceiveUln301Contract(props: Props) {
<Row
hideBorder
label={
<InfoTooltip text="Owner of this contract">Owner</InfoTooltip>
<InfoTooltip text="Owner of this contract.">Owner</InfoTooltip>
}
value={
<BlockchainAddress
warnOnEoa="This contract is owned by an EOA"
warnOnEoa="This contract is owned by an EOA."
address={props.owner}
/>
}
Expand Down Expand Up @@ -108,6 +108,7 @@ function ReceiveUln301RemoteChains(props: {
<RemoteSection>
<Block title="Default executor">
<Row
dense
label={
<InfoTooltip text="Party responsible for dispatching the message to the target chain after it has been signed-off by the security stack.">
Executor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ export function ReceiveUln302Contract(props: Props) {
<Row
hideBorder
label={
<InfoTooltip text="Owner of this contract">Owner</InfoTooltip>
<InfoTooltip text="Owner of this contract.">Owner</InfoTooltip>
}
value={
<BlockchainAddress
warnOnEoa="This contract is owned by an EOA"
warnOnEoa="This contract is owned by an EOA."
address={props.owner}
/>
}
Expand All @@ -55,7 +55,7 @@ export function ReceiveUln302Contract(props: Props) {
/>
<Row
label={
<InfoTooltip text="Indicates for which direction library is used. Can be send, receive or both">
<InfoTooltip text="Indicates for which direction library is used. Can be send, receive or both.">
Message lib type
</InfoTooltip>
}
Expand Down
6 changes: 3 additions & 3 deletions packages/frontend/src/view/components/protocol/SendUln301.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ export function SendUln301Contract(props: Props) {
<Row
hideBorder
label={
<InfoTooltip text="Owner of this contract">Owner</InfoTooltip>
<InfoTooltip text="Owner of this contract.">Owner</InfoTooltip>
}
value={
<BlockchainAddress
warnOnEoa="This contract is owned by an EOA"
warnOnEoa="This contract is owned by an EOA."
address={props.owner}
/>
}
Expand All @@ -57,7 +57,7 @@ export function SendUln301Contract(props: Props) {
/>
<Row
label={
<InfoTooltip text="The contract where all the fees are received. The owner can set a new treasury address.">
<InfoTooltip text="The contract where all the fees are stored. The owner can set a new treasury address.">
Treasury Contract
</InfoTooltip>
}
Expand Down
8 changes: 4 additions & 4 deletions packages/frontend/src/view/components/protocol/SendUln302.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ export function SendUln302Contract(props: Props) {
<Row
hideBorder
label={
<InfoTooltip text="Owner of this contract">Owner</InfoTooltip>
<InfoTooltip text="Owner of this contract.">Owner</InfoTooltip>
}
value={
<BlockchainAddress
warnOnEoa="This contract is owned by an EOA"
warnOnEoa="This contract is owned by an EOA."
address={props.owner}
/>
}
Expand All @@ -57,15 +57,15 @@ export function SendUln302Contract(props: Props) {
/>
<Row
label={
<InfoTooltip text="The contract where all the fees are received. The owner can set a new treasury address.">
<InfoTooltip text="The contract where all the fees are stored. The owner can set a new treasury address.">
Treasury Contract
</InfoTooltip>
}
value={<BlockchainAddress address={props.treasury} />}
/>
<Row
label={
<InfoTooltip text="Indicates for which direction library is used. Can be send, receive or both">
<InfoTooltip text="Indicates for which direction library is used. Can be send, receive or both.">
Message lib type
</InfoTooltip>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,23 @@ export function DefaultExecutorConfig({ config }: Props) {
return (
<Block title="Default executor configuration">
<Row
dense
className="!p-0 md:!pl-7 md:!pr-4"
label={
<InfoTooltip text="Maximum size of message that can be passed.">
<InfoTooltip text="Maximum message size in bytes one can send.">
Max message size
</InfoTooltip>
}
value={<Code>{config.maxMessageSize}</Code>}
/>
<Row
dense
className="!p-0 md:!pl-7 md:!pr-4"
label={
<InfoTooltip text="Party responsible for dispatching the message to the target chain after it has been signed-off by the security stack.">
Executor
</InfoTooltip>
}
className="!p-0 md:!pl-7 md:!pr-4"
value={<BlockchainAddress address={EthereumAddress(config.executor)} />}
/>
</Block>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export function DefaultUln({ config }: Props) {
return (
<Block title="Default Security Stack configuration">
<Row
dense
label={
<InfoTooltip text="Amount of confirmations required before dispatching a message.">
Required confirmations
Expand All @@ -23,6 +24,7 @@ export function DefaultUln({ config }: Props) {
/>

<Row
dense
label={
<InfoTooltip text="List of DVN addresses required to sign-off before dispatching a message.">
Required DVNs
Expand All @@ -42,6 +44,7 @@ export function DefaultUln({ config }: Props) {
}
/>
<Row
dense
label={
<InfoTooltip text="Amount of optional DVN confirmations required before dispatching a message.">
Optional DVNs threshold
Expand All @@ -51,6 +54,7 @@ export function DefaultUln({ config }: Props) {
value={config.optionalDVNThreshold}
/>
<Row
dense
label={
<InfoTooltip text="List of DVN addresses that can sign-off before dispatching a message.">
Optional DVNs
Expand Down
Loading