diff --git a/.changeset/early-ants-yell.md b/.changeset/early-ants-yell.md new file mode 100644 index 00000000..85b6b00d --- /dev/null +++ b/.changeset/early-ants-yell.md @@ -0,0 +1,5 @@ +--- +"@cartesi/cli": major +--- + +remove command `send dapp-address` diff --git a/apps/cli/src/baseCommand.ts b/apps/cli/src/baseCommand.ts index b01c4457..dc0f243f 100644 --- a/apps/cli/src/baseCommand.ts +++ b/apps/cli/src/baseCommand.ts @@ -6,9 +6,8 @@ import path from "path"; import { Address, Hash, getAddress, isHash } from "viem"; import { - authorityHistoryPairFactoryAddress, - cartesiDAppFactoryAddress, - dAppAddressRelayAddress, + applicationFactoryAddress, + authorityFactoryAddress, erc1155BatchPortalAddress, erc1155SinglePortalAddress, erc20PortalAddress, @@ -80,10 +79,9 @@ export abstract class BaseCommand extends Command { // build rollups contracts address book const contracts: AddressBook = { - AuthorityHistoryPairFactory: authorityHistoryPairFactoryAddress, - CartesiDApp: applicationAddress, - CartesiDAppFactory: cartesiDAppFactoryAddress, - DAppAddressRelay: dAppAddressRelayAddress, + Application: applicationAddress, + ApplicationFactory: applicationFactoryAddress, + AuthorityFactory: authorityFactoryAddress, EntryPointV06: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789", EntryPointV07: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", ERC1155BatchPortal: erc1155BatchPortalAddress, diff --git a/apps/cli/src/commands/send/dapp-address.ts b/apps/cli/src/commands/send/dapp-address.ts deleted file mode 100644 index 3ee3074c..00000000 --- a/apps/cli/src/commands/send/dapp-address.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Address, PublicClient, WalletClient } from "viem"; - -import { - dAppAddressRelayAbi, - dAppAddressRelayAddress, -} from "../../contracts.js"; -import { SendBaseCommand } from "./index.js"; - -export default class SendAddress extends SendBaseCommand { - static summary = "Send DApp address input to the application."; - - static description = - "Sends an input to the application with its own address."; - - static examples = ["<%= config.bin %> <%= command.id %>"]; - - public async send( - publicClient: PublicClient, - walletClient: WalletClient, - ): Promise
{ - // get dapp address from local node, or ask - const address = await super.getApplicationAddress(); - - const { request } = await publicClient.simulateContract({ - address: dAppAddressRelayAddress, - abi: dAppAddressRelayAbi, - functionName: "relayDAppAddress", - args: [address], - account: walletClient.account, - }); - - return walletClient.writeContract(request); - } -}