Skip to content

Commit

Permalink
Merge branch 'main' of github.com:QuantWealth/qw-monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
thelazyindian committed Jun 8, 2024
2 parents 6c16071 + 69f3e06 commit f926264
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
4 changes: 3 additions & 1 deletion packages/agents/nova/src/common/constants/address.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export const USDC_SEPOLIA = '0x94a9D9AC8a22534E3FaCa9F4e7F2E2cf85d5E4C8';
export const USDC_SEPOLIA = '0x83A9aE82b26249EC6e01498F5aDf0Ec20fF3Da9C';

export const USDT_SEPOLIA = '0x521C5901A1bbF805AE05aad11e93561e76dD7269';
19 changes: 11 additions & 8 deletions packages/agents/nova/src/core/resources/user/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {
} from '@nestjs/common';
import { IUser, UserModel } from '@qw/orderbook-db';
import {
USDT_SEPOLIA,
mint,
createGelatoRelayPack,
createSCW,
createTransactions,
Expand All @@ -17,8 +19,9 @@ import {
initSCW,
normalizeMetaTransaction,
relayTransaction,
signSafeTransaction
signSafeTransaction,
} from '@qw/utils';
import {JsonRpcProvider, parseUnits} from 'ethers';
import { ConfigService } from 'src/config/config.service';
import { NovaConfig } from 'src/config/schema';
import { UserBalanceQueryDto } from './dto/user-balance-query.dto';
Expand Down Expand Up @@ -111,15 +114,15 @@ export class UserService {
});
console.log('safeAddress:', safeAddress);
// Create a mint transaction for the user's SCW
// const mintTx = mint({
// contractAddress: USDC_SEPOLIA,
// provider: new ethers.JsonRpcProvider(rpcUrl),
// amount: ethers.parseUnits('500', 18), // Mint 500 tokens
// recipientAddress: safeAddress,
// });
const mintTx = mint({
contractAddress: USDT_SEPOLIA,
provider: new JsonRpcProvider(rpcUrl),
amount: parseUnits('500', 18), // Mint 500 tokens
recipientAddress: safeAddress,
});

// Prepare the array of transactions
const transactionsArr = [deploymentTransaction];
const transactionsArr = [deploymentTransaction, mintTx];

// Normalize transactions to MetaTransactionData format
const metaTransactionsArr = transactionsArr.map((tx) =>
Expand Down

0 comments on commit f926264

Please sign in to comment.