Skip to content

Commit

Permalink
Change CI environment to use baseSepolia as chain
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasia committed Jun 16, 2024
1 parent a8a93c5 commit 7ce1799
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-dev-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/ci-dev-ops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ jobs:
node-version: 20
cache: "yarn"

- name: Install foundry-toolchain
uses: foundry-rs/[email protected]
with:
version: nightly

- name: Install Project Dependencies
run: yarn install

Expand Down Expand Up @@ -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

Expand Down
16 changes: 10 additions & 6 deletions packages/ops/resource/ops-ci.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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]
Expand Down
10 changes: 9 additions & 1 deletion packages/ops/src/create-user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: ');
Expand Down
2 changes: 1 addition & 1 deletion packages/ops/src/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down

0 comments on commit 7ce1799

Please sign in to comment.