diff --git a/.github/workflows/ci-dev-api.yml b/.github/workflows/ci-dev-api.yml index 70c9decae..02d700b52 100644 --- a/.github/workflows/ci-dev-api.yml +++ b/.github/workflows/ci-dev-api.yml @@ -76,7 +76,7 @@ jobs: run: flyctl deploy ../.. --app credbull-defi-api --env ENVIRONMENT=testnet --local-only -t ${{ secrets.FLY_DEPLOY_TOKEN }} - name: Deploy fly.io credbull-defi-ci app - run: flyctl deploy ../.. --app credbull-defi-api-ci --env ENVIRONMENT=local --local-only -t ${{ secrets.CI_FLY_DEPLOY_TOKEN }} + run: flyctl deploy ../.. --app credbull-defi-api-ci --env ENVIRONMENT=ci --local-only -t ${{ secrets.CI_FLY_DEPLOY_TOKEN }} - name: Create Sentry release uses: getsentry/action-release@v1 diff --git a/.github/workflows/ci-dev-ops.yml b/.github/workflows/ci-dev-ops.yml index f707b5c91..99db26f73 100644 --- a/.github/workflows/ci-dev-ops.yml +++ b/.github/workflows/ci-dev-ops.yml @@ -37,11 +37,6 @@ jobs: node-version: 20 cache: "yarn" - - name: Install foundry-toolchain - uses: foundry-rs/foundry-toolchain@v1.2.0 - with: - version: nightly - - name: Install Project Dependencies run: yarn install @@ -72,10 +67,6 @@ jobs: run: supabase start working-directory: packages/api - - name: Deploy Credbull Contracts - run: yarn deploy - working-directory: packages/contracts - - name: Logs run: docker logs api --tail all diff --git a/packages/ops/resource/ops-ci.toml b/packages/ops/resource/ops-ci.toml index 34d7d9892..6dfd75e95 100644 --- a/packages/ops/resource/ops-ci.toml +++ b/packages/ops/resource/ops-ci.toml @@ -1,7 +1,7 @@ node_env = "development" [api] -url = "https://credbull-defi-api.fly.dev/" +url = "https://credbull-defi-api-ci.fly.dev" [app] url = "http://127.0.0.1:3000" @@ -10,13 +10,17 @@ url = "http://127.0.0.1:3000" url = "https://iucsqvvjujqcncowypnr.supabase.co" [services.ethers] -url = "http://127.0.0.1:8545" +# settings for baseSepolia, see others: https://chainlist.org/ +url = "https://sepolia.base.org" +wss = "https://sepolia.base.org" [evm.address] -# Dev/Anvil Wallet, Account[0] -owner = "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" -# Dev/Anvil Wallet, Account[1] -operator = "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" +# credbull-devops wallets. wallet numbers are 1-based (as opposed to 0-based in anvil) +# devops admin/owner (wallet 1) - public address, okay to share +owner = "0xD79Be36f61fce3B8EF2FBF22b13B2b9a68eE15A2" +# devops operator (wallet 2) - public address, okay to share +operator = "0xaD3C004eE1f942BFDA2DA0D2DAaC94d6aC012F75" + # Dev/Anvil Wallet, Account[2] custodian = "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC" # Dev/Anvil Wallet, Account[3] diff --git a/packages/ops/src/create-user.ts b/packages/ops/src/create-user.ts index 2eab5443c..cbab66c86 100644 --- a/packages/ops/src/create-user.ts +++ b/packages/ops/src/create-user.ts @@ -44,7 +44,15 @@ export const createUser = async ( password: password, options: { emailRedirectTo: `${config.app.url}/forgot-password` }, }); - if (error) throw error; + + if (error) { + if (error.message === 'User already registered') { + console.log('User already registered. Proceeding without error.'); + } else { + // Throw other errors + throw error; + } + } console.log('='.repeat(80)); console.log(' Corporate Account created: '); diff --git a/packages/ops/src/utils/config.ts b/packages/ops/src/utils/config.ts index f3d099afc..5a58e712a 100644 --- a/packages/ops/src/utils/config.ts +++ b/packages/ops/src/utils/config.ts @@ -42,7 +42,7 @@ export const loadConfiguration = (): Config => { const toml = fs.readFileSync(configFile, 'utf8'); const config: Config = load(toml); - console.log(`Successfully loaded configuration from: '${configFile}'`); + console.log('Successfully loaded configuration:', JSON.stringify(config, null, 2)); // include Environment into config // NB - call this after the log statement to avoid logging keys!