Skip to content
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: 0 additions & 2 deletions scripts/src/commands/sol/base-relayer/initialize.handler.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { z } from "zod";
import {
getProgramDerivedAddress,
devnet,
type Address as SolanaAddress,
type KeyPairSigner,
createSolanaRpc,
address as solanaAddress,
} from "@solana/kit";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
getProgramDerivedAddress,
getU64Encoder,
createSolanaRpc,
devnet,
} from "@solana/kit";
import { SYSTEM_PROGRAM_ADDRESS } from "@solana-program/system";
import {
Expand All @@ -17,10 +16,7 @@ import {
import { baseSepolia } from "viem/chains";
import { decodeEventLog } from "viem/utils";

import {
fetchBridge,
getProveMessageInstruction,
} from "@base/bridge/bridge";
import { fetchBridge, getProveMessageInstruction } from "@base/bridge/bridge";

import { logger } from "@internal/logger";
import {
Expand Down Expand Up @@ -171,7 +167,7 @@ async function generateProof(
topics: log.topics,
});

return decodedLog.eventName === "MessageRegistered"
return decodedLog.eventName === "MessageInitiated"
? {
messageHash: decodedLog.args.messageHash,
mmrRoot: decodedLog.args.mmrRoot,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { z } from "zod";
import {
createSolanaRpc,
devnet,
getProgramDerivedAddress,
type AccountMeta,
type Address as SolanaAddress,
Expand All @@ -14,7 +13,6 @@ import { TOKEN_2022_PROGRAM_ADDRESS } from "@solana-program/token-2022";
import { toBytes, toHex } from "viem";

import {
fetchBridge,
fetchIncomingMessage,
getRelayMessageInstruction,
type BridgeBaseToSolanaStateIncomingMessageMessage,
Expand Down
1 change: 0 additions & 1 deletion scripts/src/commands/sol/bridge/initialize.handler.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { z } from "zod";
import {
getProgramDerivedAddress,
devnet,
type Address as SolanaAddress,
createSolanaRpc,
address as solanaAddress,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
createSolanaRpc,
} from "@solana/kit";
import { SYSTEM_PROGRAM_ADDRESS } from "@solana-program/system";
import { toBytes, isAddress as isEvmAddress, toHex } from "viem";
import { toBytes, isAddress as isEvmAddress } from "viem";

import { fetchBridge, getBridgeSolInstruction } from "@base/bridge/bridge";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
getOrPromptFilePath,
getOrPromptDeployEnv,
validateAndExecute,
getInteractiveSelect,
} from "@internal/utils/cli";
import { argsSchema, handleBridgeSpl } from "./bridge-spl.handler";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { z } from "zod";
import {
getProgramDerivedAddress,
devnet,
address,
createSolanaRpc,
type Account,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
getOrPromptFilePath,
getOrPromptDeployEnv,
validateAndExecute,
getInteractiveSelect,
} from "@internal/utils/cli";
import { argsSchema, handleWrapToken } from "./wrap-token.handler";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
getProgramDerivedAddress,
getU8Codec,
createSolanaRpc,
devnet,
type Instruction,
getU64Encoder,
Endian,
Expand Down
2 changes: 1 addition & 1 deletion scripts/src/commands/sol/spl/create-ata.handler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { z } from "zod";
import { address, createSolanaRpc, devnet } from "@solana/kit";
import { address, createSolanaRpc } from "@solana/kit";
import {
fetchMaybeToken,
getCreateAssociatedTokenIdempotentInstruction,
Expand Down
1 change: 0 additions & 1 deletion scripts/src/commands/sol/spl/create-mint.handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
generateKeyPair,
address,
createSolanaRpc,
devnet,
} from "@solana/kit";
import { getCreateAccountInstruction } from "@solana-program/system";
import {
Expand Down
2 changes: 1 addition & 1 deletion scripts/src/commands/sol/spl/mint.handler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { z } from "zod";
import { address, devnet, createSolanaRpc, type Account } from "@solana/kit";
import { address, createSolanaRpc, type Account } from "@solana/kit";
import {
getMintToInstruction,
fetchMaybeMint,
Expand Down
127 changes: 29 additions & 98 deletions scripts/src/internal/base/abi/bridge-validator.abi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,26 +69,26 @@ export const BRIDGE_VALIDATOR_ABI = [
},
{
type: "function",
name: "addValidator",
inputs: [
name: "getBaseThreshold",
inputs: [],
outputs: [
{
name: "validator",
type: "address",
internalType: "address",
name: "",
type: "uint128",
internalType: "uint128",
},
],
outputs: [],
stateMutability: "nonpayable",
stateMutability: "view",
},
{
type: "function",
name: "getBaseThreshold",
name: "getBaseValidatorCount",
inputs: [],
outputs: [
{
name: "",
type: "uint128",
internalType: "uint128",
type: "uint256",
internalType: "uint256",
},
],
stateMutability: "view",
Expand Down Expand Up @@ -116,6 +116,25 @@ export const BRIDGE_VALIDATOR_ABI = [
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "isBaseValidator",
inputs: [
{
name: "validator",
type: "address",
internalType: "address",
},
],
outputs: [
{
name: "",
type: "bool",
internalType: "bool",
},
],
stateMutability: "view",
},
{
type: "function",
name: "nextNonce",
Expand Down Expand Up @@ -172,45 +191,6 @@ export const BRIDGE_VALIDATOR_ABI = [
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "removeValidator",
inputs: [
{
name: "validator",
type: "address",
internalType: "address",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setPartnerThreshold",
inputs: [
{
name: "newThreshold",
type: "uint256",
internalType: "uint256",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setThreshold",
inputs: [
{
name: "newThreshold",
type: "uint256",
internalType: "uint256",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "validMessages",
Expand Down Expand Up @@ -281,45 +261,6 @@ export const BRIDGE_VALIDATOR_ABI = [
],
anonymous: false,
},
{
type: "event",
name: "ThresholdUpdated",
inputs: [
{
name: "newThreshold",
type: "uint256",
indexed: false,
internalType: "uint256",
},
],
anonymous: false,
},
{
type: "event",
name: "ValidatorAdded",
inputs: [
{
name: "validator",
type: "address",
indexed: false,
internalType: "address",
},
],
anonymous: false,
},
{
type: "event",
name: "ValidatorRemoved",
inputs: [
{
name: "validator",
type: "address",
indexed: false,
internalType: "address",
},
],
anonymous: false,
},
{
type: "error",
name: "BaseSignerCountTooHigh",
Expand Down Expand Up @@ -395,16 +336,6 @@ export const BRIDGE_VALIDATOR_ABI = [
name: "ValidatorAlreadyAdded",
inputs: [],
},
{
type: "error",
name: "ValidatorCountLessThanThreshold",
inputs: [],
},
{
type: "error",
name: "ValidatorNotExisted",
inputs: [],
},
{
type: "error",
name: "ZeroAddress",
Expand Down
7 changes: 6 additions & 1 deletion scripts/src/internal/base/abi/bridge.abi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ export const BRIDGE_ABI = [
},
{
type: "event",
name: "MessageRegistered",
name: "MessageInitiated",
inputs: [
{
name: "messageHash",
Expand Down Expand Up @@ -963,6 +963,11 @@ export const BRIDGE_ABI = [
name: "AlreadyInitialized",
inputs: [],
},
{
type: "error",
name: "CumulativeDepositExceedsU64",
inputs: [],
},
{
type: "error",
name: "EmptyMMR",
Expand Down
1 change: 0 additions & 1 deletion scripts/src/internal/sol/base-relayer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
createSolanaRpc,
devnet,
getProgramDerivedAddress,
type Address,
type KeyPairSigner,
Expand Down
1 change: 0 additions & 1 deletion scripts/src/internal/sol/base.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { sleep } from "bun";
import {
createSolanaRpc,
devnet,
getBase58Codec,
getBase58Encoder,
type Address as SolAddress,
Expand Down
1 change: 0 additions & 1 deletion scripts/src/internal/sol/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
createSolanaRpc,
createSolanaRpcSubscriptions,
createTransactionMessage,
devnet,
getSignatureFromTransaction,
pipe,
sendAndConfirmTransactionFactory,
Expand Down
2 changes: 1 addition & 1 deletion scripts/src/internal/utils/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { isAddress as isEvmAddress, isHash } from "viem";
import { z } from "zod";

import { logger } from "@internal/logger";
import { DEPLOY_ENVS, type DeployEnv } from "@internal/constants";
import { type DeployEnv } from "@internal/constants";

export const bigintSchema = z
.string()
Expand Down
Loading