diff --git a/scripts/hotWalletCli/MultiSig.md b/cli/MultiSig.md similarity index 100% rename from scripts/hotWalletCli/MultiSig.md rename to cli/MultiSig.md diff --git a/scripts/hotWalletCli/README.md b/cli/README.md similarity index 100% rename from scripts/hotWalletCli/README.md rename to cli/README.md diff --git a/scripts/hotWalletCli/generated/abi.ts b/cli/generated/abi.ts similarity index 100% rename from scripts/hotWalletCli/generated/abi.ts rename to cli/generated/abi.ts diff --git a/scripts/hotWalletCli/package.json b/cli/package.json similarity index 90% rename from scripts/hotWalletCli/package.json rename to cli/package.json index 3bd0247..033c2f7 100644 --- a/scripts/hotWalletCli/package.json +++ b/cli/package.json @@ -1,8 +1,8 @@ { - "name": "hot-wallet-cli", + "name": "rfox-cli", "version": "1.0.0", "type": "module", - "exports": "./index.js", + "exports": "./src/index.js", "engines": { "node": ">=18" }, @@ -10,7 +10,7 @@ "scripts": { "clean": "rm -rf node_modules", "generate": "yarn wagmi generate", - "start": "tsx index.ts" + "start": "tsx src/index.ts" }, "dependencies": { "@inquirer/core": "^8.2.2", diff --git a/scripts/hotWalletCli/sample.env b/cli/sample.env similarity index 100% rename from scripts/hotWalletCli/sample.env rename to cli/sample.env diff --git a/scripts/hotWalletCli/client.ts b/cli/src/client.ts similarity index 99% rename from scripts/hotWalletCli/client.ts rename to cli/src/client.ts index e92836d..523f7a5 100644 --- a/scripts/hotWalletCli/client.ts +++ b/cli/src/client.ts @@ -4,8 +4,8 @@ import BigNumber from 'bignumber.js' import ora, { Ora } from 'ora' import { Address, PublicClient, createPublicClient, getAddress, getContract, http } from 'viem' import { arbitrum } from 'viem/chains' +import { stakingV1Abi } from '../generated/abi' import { RFOX_REWARD_RATE } from './constants' -import { stakingV1Abi } from './generated/abi' import { error, info, warn } from './logging' import { RewardDistribution } from './types' diff --git a/scripts/hotWalletCli/constants.ts b/cli/src/constants.ts similarity index 100% rename from scripts/hotWalletCli/constants.ts rename to cli/src/constants.ts diff --git a/scripts/hotWalletCli/file.ts b/cli/src/file.ts similarity index 100% rename from scripts/hotWalletCli/file.ts rename to cli/src/file.ts diff --git a/scripts/hotWalletCli/index.ts b/cli/src/index.ts similarity index 100% rename from scripts/hotWalletCli/index.ts rename to cli/src/index.ts index 86e2c63..dc28d7d 100644 --- a/scripts/hotWalletCli/index.ts +++ b/cli/src/index.ts @@ -4,13 +4,13 @@ import BigNumber from 'bignumber.js' import fs from 'node:fs' import path from 'node:path' import ora from 'ora' -import { Epoch } from './types' import { Client } from './client' import { MONTHS, RFOX_DIR } from './constants' import { isEpochDistributionStarted } from './file' import { IPFS } from './ipfs' import { error, info, success, warn } from './logging' import { create, recoverKeystore } from './mnemonic' +import { Epoch } from './types' import { Wallet } from './wallet' const processEpoch = async () => { diff --git a/scripts/hotWalletCli/ipfs.ts b/cli/src/ipfs.ts similarity index 100% rename from scripts/hotWalletCli/ipfs.ts rename to cli/src/ipfs.ts diff --git a/scripts/hotWalletCli/logging.ts b/cli/src/logging.ts similarity index 100% rename from scripts/hotWalletCli/logging.ts rename to cli/src/logging.ts diff --git a/scripts/hotWalletCli/mnemonic.ts b/cli/src/mnemonic.ts similarity index 100% rename from scripts/hotWalletCli/mnemonic.ts rename to cli/src/mnemonic.ts diff --git a/scripts/hotWalletCli/types.ts b/cli/src/types.ts similarity index 100% rename from scripts/hotWalletCli/types.ts rename to cli/src/types.ts diff --git a/scripts/hotWalletCli/wallet.ts b/cli/src/wallet.ts similarity index 98% rename from scripts/hotWalletCli/wallet.ts rename to cli/src/wallet.ts index af5091e..6f1f4d8 100644 --- a/scripts/hotWalletCli/wallet.ts +++ b/cli/src/wallet.ts @@ -159,7 +159,7 @@ export class Wallet { success(`Unsigned funding transaction created (${unsignedTxFile})`) info( - `Follow the steps for signing and broadcasting the funding transaction as detailed here: https://github.com/shapeshift/rFOX/blob/main/scripts/hotWalletCli/MultiSig.md`, + 'Follow the steps for signing and broadcasting the funding transaction as detailed here: https://github.com/shapeshift/rFOX/blob/main/cli/MultiSig.md', ) const spinner = ora('Waiting for hot wallet to be funded...').start() diff --git a/scripts/hotWalletCli/tsconfig.json b/cli/tsconfig.json similarity index 100% rename from scripts/hotWalletCli/tsconfig.json rename to cli/tsconfig.json diff --git a/scripts/hotWalletCli/wagmi.config.ts b/cli/wagmi.config.ts similarity index 91% rename from scripts/hotWalletCli/wagmi.config.ts rename to cli/wagmi.config.ts index 7ace58e..3582cde 100644 --- a/scripts/hotWalletCli/wagmi.config.ts +++ b/cli/wagmi.config.ts @@ -2,7 +2,7 @@ import { defineConfig } from '@wagmi/cli' import { foundry, FoundryConfig } from '@wagmi/cli/plugins' const foundryConfig: FoundryConfig = { - project: '../../foundry', + project: '../foundry', artifacts: 'out', include: ['StakingV1.json'], } diff --git a/scripts/hotWalletCli/yarn.lock b/cli/yarn.lock similarity index 100% rename from scripts/hotWalletCli/yarn.lock rename to cli/yarn.lock diff --git a/package.json b/package.json index 166d5a8..d5555ef 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "typescript": "^5.4.5" }, "scripts": { - "build": "forge build --root foundry && cd scripts/hotWalletCli && yarn && yarn generate", + "build": "forge build --root foundry && cd cli && yarn && yarn generate", "lint:sol": "npx prettier --write --plugin=prettier-plugin-solidity foundry/src/**/*.sol foundry/test/**/*.t.sol" }, "simple-git-hooks": {