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
4 changes: 2 additions & 2 deletions packages/cli/src/commands/claim.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Command } from "commander";
import { type Address, erc20Abi, formatUnits, isAddress } from "viem";
import { MCV2_BOND_ADDRESS, mcv2BondAbi } from "../sdk/index.js";
import { mcv2BondAbi } from "../sdk/index.js";
import { buildClient } from "../sdk.js";

export function registerClaim(program: Command): void {
Expand All @@ -20,7 +20,7 @@ export function registerClaim(program: Command): void {
// Fetch bond data (creator = beneficiary, reserve token for display)
console.log("Checking royalties...");
const bond = await client.publicClient.readContract({
address: MCV2_BOND_ADDRESS,
address: client.mcv2Bond,
abi: mcv2BondAbi,
functionName: "tokenBond",
args: [tokenAddress],
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/commands/status.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Command } from "commander";
import { createClient } from "@supabase/supabase-js";
import { type Address, erc20Abi, formatUnits } from "viem";
import { MCV2_BOND_ADDRESS, mcv2BondAbi, STORY_FACTORY_ADDRESS } from "../sdk/index.js";
import { mcv2BondAbi } from "../sdk/index.js";
import { buildClient } from "../sdk.js";
import { loadConfig } from "../config.js";

Expand Down Expand Up @@ -45,7 +45,7 @@ export function registerStatus(program: Command): void {
.from("storylines")
.select("plot_count, last_plot_time, has_deadline, sunset, writer_type, block_timestamp")
.eq("storyline_id", Number(storylineId))
.eq("contract_address", STORY_FACTORY_ADDRESS.toLowerCase())
.eq("contract_address", client.storyFactory.toLowerCase())
.single();
dbRow = data;
}
Expand All @@ -59,7 +59,7 @@ export function registerStatus(program: Command): void {
let bondReserveToken: Address | null = null;
try {
const bond = await client.publicClient.readContract({
address: MCV2_BOND_ADDRESS,
address: client.mcv2Bond,
abi: mcv2BondAbi,
functionName: "tokenBond",
args: [info.tokenAddress],
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/sdk/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ export class PlotLink {
readonly walletClient: WalletClient;
readonly address: Address;

private readonly storyFactory: Address;
private readonly mcv2Bond: Address;
readonly storyFactory: Address;
readonly mcv2Bond: Address;
private readonly erc8004Registry: Address;
private readonly filebase: FilebaseConfig | undefined;
private readonly chain: Chain;
Expand Down
Loading