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

Rename relayer to solver #857

Merged
merged 3 commits into from
Nov 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Helixbox Interfaces

❤️ Secure, fast, and low-cost cross-chain crypto transfers.
❤️ Helixbox is focusing on becoming an efficient multi-chain liquidity provider, offering users a superior experience in multi-chain asset transfer and exchange.

## App Interface

Expand Down
2 changes: 1 addition & 1 deletion apps/helixbox-app/src/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface NavigationConfig {

const navigationsConfig: NavigationConfig[] = [
{ href: "/", label: "Bridge" },
{ href: "/relayer", label: "Relayer" },
{ href: "/solver", label: "Solver" },
];

export default function Header() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export default function RelayerManageV3Modal({ relayerInfo, isOpen, onClose, onS

return (
<Modal
title="Manage Relayer"
title="Manage Solver"
className="w-full lg:w-[32rem]"
okText={okText}
isOpen={isOpen}
Expand Down Expand Up @@ -290,7 +290,7 @@ export default function RelayerManageV3Modal({ relayerInfo, isOpen, onClose, onS
onChange={setFeeRateInput}
/>
</Label>
<Label text="Trasfer Limit">
<Label text="Transfer Limit">
<BalanceInput token={sourceToken} value={transferLimitInput} onChange={setTransferLimitInput} />
</Label>
</div>
Expand Down
10 changes: 5 additions & 5 deletions apps/helixbox-app/src/components/relayer-register-v3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,12 @@ export default function RelayerRegisterV3({ onManage = () => undefined }: { onMa
{Step.TWO === currentStep && (
<>
<Divider />
<Label text="Base Fee" tips="The fixed fee set by the relayer and charged in a transaction">
<Label text="Base Fee" tips="The fixed fee set by the solver and charged in a transaction">
<BalanceInput token={sourceToken} value={baseFeeInput} onChange={setBaseFeeInput} />
</Label>
<Label
text="Liquidity Fee Rate"
tips="The percentage deducted by the relayer from the transfer amount in a transaction"
tips="The percentage deducted by the solver from the transfer amount in a transaction"
>
<FeeRateInput
isV3
Expand Down Expand Up @@ -338,10 +338,10 @@ export default function RelayerRegisterV3({ onManage = () => undefined }: { onMa
{/* Step 3 */}
{targetToken?.type && targetToken.type !== "native" ? (
<div className="flex flex-col gap-5 rounded-3xl bg-[#1F282C] p-5 lg:p-8">
<StepTitle step={3} title="Authorize Token on Target Chain and Run Relayer" />
<StepTitle step={3} title="Authorize Token on Target Chain and Run Solver" />
{Step.THREE === currentStep && (
<>
<Description content="Authorize token on target chain and run relayer to start relaying messages and earn rewards. Please note this step authorizes tokens for the relayer to send to users' target chain address based on transactions. Ensure you authorize enough tokens for multiple transactions as needed." />
<Description content="Authorize token on target chain and run solver to start relaying messages and earn rewards. Please note this step authorizes tokens for the solver to send to users' target chain address based on transactions. Ensure you authorize enough tokens for multiple transactions as needed." />
<Divider />
<Label text="Current Allowance">
<BalanceInput
Expand Down Expand Up @@ -453,7 +453,7 @@ function RunRelayer({ style, onClick = () => undefined }: { style: "button" | "l
target="_blank"
onClick={onClick}
>
{style === "button" ? "Run relayer" : "run a relayer"}
{style === "button" ? "Run solver" : "run a solver"}
</a>
);
}
Expand Down
16 changes: 8 additions & 8 deletions apps/helixbox-app/src/components/relayer-register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export default function RelayerRegister({ onManage = () => undefined }: { onMana
) {
notification.warn({
title: "Transaction failed",
description: `You have registered a relayer that supports this cross-chain.`,
description: `You have registered a solver that supports this cross-chain.`,
});
return true;
} else {
Expand All @@ -154,7 +154,7 @@ export default function RelayerRegister({ onManage = () => undefined }: { onMana

{Step.ONE === currentStep && (
<>
<Description content="Different source chains and target chains correspond to different bridge types. In different bridge types, the relayer is required to set margin on different chains. When the bridge type is 'default', the relayer needs to set margin on the target chain. If the bridge type is 'opposite', the relayer must set margin on the source chain." />
<Description content="Different source chains and target chains correspond to different bridge types. In different bridge types, the solver is required to set margin on different chains. When the bridge type is 'default', the solver needs to set margin on the target chain. If the bridge type is 'opposite', the solver must set margin on the source chain." />

<Divider />

Expand Down Expand Up @@ -254,7 +254,7 @@ export default function RelayerRegister({ onManage = () => undefined }: { onMana

{Step.TWO === currentStep && (
<>
<Description content="When a relayer engages in misconduct, their margin will be used for compensation. The fee charged by the relayer in the source chain from user transactions is baseFee + transferAmount * liquidityFeeRate." />
<Description content="When a solver engages in misconduct, their margin will be used for compensation. The fee charged by the solver in the source chain from user transactions is baseFee + transferAmount * liquidityFeeRate." />

<Divider />

Expand Down Expand Up @@ -329,12 +329,12 @@ export default function RelayerRegister({ onManage = () => undefined }: { onMana
</>
) : null}

<LabelItem label="Base Fee" tips="The fixed fee set by the relayer and charged in a transaction">
<LabelItem label="Base Fee" tips="The fixed fee set by the solver and charged in a transaction">
<BalanceInput token={sourceToken} value={baseFeeInput} onChange={setBaseFeeInput} />
</LabelItem>
<LabelItem
label="Liquidity Fee Rate"
tips="The percentage deducted by the relayer from the transfer amount in a transaction"
tips="The percentage deducted by the solver from the transfer amount in a transaction"
>
<FeeRateInput
placeholder="Enter 0 ~ 0.25"
Expand Down Expand Up @@ -445,11 +445,11 @@ export default function RelayerRegister({ onManage = () => undefined }: { onMana
{/* Step 3 */}
{targetToken?.type && targetToken.type !== "native" ? (
<div className="flex flex-col gap-5 rounded-3xl bg-[#1F282C] p-5 lg:p-8">
<StepTitle step={3} title="Authorize Token on Target Chain and Run Relayer" />
<StepTitle step={3} title="Authorize Token on Target Chain and Run Solver" />

{Step.THREE === currentStep && (
<>
<Description content="Authorize token on target chain and run relayer to start relaying messages and earn rewards. Please note this step authorizes tokens for the relayer to send to users' target chain address based on transactions. Ensure you authorize enough tokens for multiple transactions as needed." />
<Description content="Authorize token on target chain and run solver to start relaying messages and earn rewards. Please note this step authorizes tokens for the solver to send to users' target chain address based on transactions. Ensure you authorize enough tokens for multiple transactions as needed." />

<Divider />

Expand Down Expand Up @@ -581,7 +581,7 @@ function RunRelayer({ style, onClick = () => undefined }: { style: "button" | "l
target="_blank"
onClick={onClick}
>
{style === "button" ? "Run relayer" : "run a relayer"}
{style === "button" ? "Run solver" : "run a Solver"}
</a>
);
}
Expand Down
2 changes: 1 addition & 1 deletion apps/helixbox-app/src/components/relayer/manage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function Manage({ version }: { version: BridgeVersion }) {
return (
<div className="space-y-medium">
<div className="flex items-center justify-between">
<span className="text-base font-semibold text-white">Relayers</span>
<span className="text-base font-semibold text-white">Solvers</span>
<CountdownRefresh onClick={refetch} />
</div>
<RelayersTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const getColumnToken = ({ isDashboard }: Args): ColumnType<DataSource> =>
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const getColumnBaseFee = (_: Args): ColumnType<DataSource> => ({
key: "base fee",
title: <Title title="Base Fee" tips="The fixed fee set by the relayer and charged in a transaction" />,
title: <Title title="Base Fee" tips="The fixed fee set by the solver and charged in a transaction" />,
render: ({ fromChain, sendToken, baseFee }) => {
const token = getChainConfig(fromChain)?.tokens.find((t) => t.address.toLowerCase() === sendToken?.toLowerCase());
return token && baseFee ? (
Expand All @@ -72,7 +72,7 @@ export const getColumnFeeRate = (_: Args): ColumnType<DataSource> => ({
title: (
<Title
title="Liquidity Fee Rate"
tips="Liquidity Fee Rate: the percentage deducted by the relayer from the transfer amount in a transaction"
tips="Liquidity Fee Rate: the percentage deducted by the solver from the transfer amount in a transaction"
/>
),
render: ({ liquidityFeeRate }) =>
Expand Down Expand Up @@ -168,8 +168,8 @@ export const getColumnAction = ({ onClick = () => undefined }: Args): ColumnType

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const getColumnRelayer = (_: Args): ColumnType<DataSource> => ({
key: "relayer",
title: <Title title="Relayer" />,
key: "solver",
title: <Title title="Solver" />,
render: ({ relayer }) => (
<div className="truncate">
<PrettyAddress address={relayer} forceShort copyable />
Expand Down
8 changes: 4 additions & 4 deletions apps/helixbox-app/src/components/relayers-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function getColumns(bridgeVersion: BridgeVersion, isDashboard?: boolean) {
},
{
key: "base fee",
title: <Title title="Base Fee" tips="The fixed fee set by the relayer and charged in a transaction" />,
title: <Title title="Base Fee" tips="The fixed fee set by the solver and charged in a transaction" />,
render: ({ fromChain, sendToken, baseFee }) => {
const token = getChainConfig(fromChain)?.tokens.find(
(t) => t.address.toLowerCase() === sendToken?.toLowerCase(),
Expand All @@ -91,7 +91,7 @@ function getColumns(bridgeVersion: BridgeVersion, isDashboard?: boolean) {
title: (
<Title
title="Liquidity Fee Rate"
tips="Liquidity Fee Rate: The percentage deducted by the relayer from the transfer amount in a transaction"
tips="Liquidity Fee Rate: The percentage deducted by the solver from the transfer amount in a transaction"
/>
),
render: ({ liquidityFeeRate }) =>
Expand Down Expand Up @@ -254,8 +254,8 @@ export default function RelayersTable({
]
: [
{
key: "relayer",
title: <Title title="Relayer" />,
key: "solver",
title: <Title title="Solver" />,
render: ({ relayer }) => (
<div className="truncate">
<PrettyAddress address={relayer} forceShort copyable />
Expand Down
2 changes: 1 addition & 1 deletion apps/helixbox-app/src/providers/walletconnect-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const projectId = import.meta.env.VITE_WALLET_CONNECT_PROJECT_ID || "";

// 2. Create a metadata object - optional
const metadata = {
name: "Helix Bridge",
name: "Helixbox",
description: "Secure, fast, and low-cost cross-chain crypto transfers",
url: "https://app.helix.box", // origin must match your domain & subdomain
icons: ["https://app.helix.box/pwa-512x512.png"],
Expand Down
1 change: 1 addition & 0 deletions apps/helixbox-app/src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const router = createHashRouter([
children: [
{ index: true, element: <Transfer /> },
{ path: "relayer", element: <Relayer /> },
{ path: "solver", element: <Relayer /> },
{ path: "explorer", element: <Explorer /> },
{ path: "tx/:id", element: <TxDetails /> },
],
Expand Down
4 changes: 2 additions & 2 deletions apps/helixbox-app/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export default defineConfig({
config: true,
},
manifest: {
name: "Helix Bridge",
short_name: "HelixBridge",
name: "Helixbox",
short_name: "Helixbox",
description: "Secure, fast, and low-cost cross-chain crypto transfers",
theme_color: "#00141D",
background_color: "#00141D",
Expand Down
7 changes: 4 additions & 3 deletions apps/helixbox-home/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ export default defineConfig({
config: true,
},
manifest: {
name: "Helix Bridge",
short_name: "HelixBridge",
description: "Secure, fast, and low-cost cross-chain crypto transfers",
name: "Helixbox",
short_name: "Helixbox",
description:
"Helixbox is focusing on becoming an efficient multi-chain liquidity provider, offering users a superior experience in multi-chain asset transfer and exchange",
theme_color: "#00141D",
background_color: "#00141D",
},
Expand Down
Loading