Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added VRF to the generate_keypair function in BIP340.cairo #441

156 changes: 0 additions & 156 deletions apps/data-backend/src/routes/indexer/tip.ts

This file was deleted.

3 changes: 1 addition & 2 deletions apps/data-backend/src/utils/starknet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
* @param address - The string to be tested against the StarkNet address format.
* @returns `true` if the string is a valid StarkNet address, otherwise `false`.
*/
export function isValidStarknetAddress(address: string | undefined): boolean {
if (!address) return false;
export function isValidStarknetAddress(address: string): boolean {
const regex = /^0x[0-9a-fA-F]{50,64}$/;
return regex.test(address);
}
5 changes: 1 addition & 4 deletions apps/nestjs-indexer/src/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@ export default {

// LAUNCHPAD_ADDRESS:"0x6fbcf2a0df5716d83d9653985f9c9bde6fb73130f0804e18bb18ef6f6ae7ad2",
// LAUNCHPAD_ADDRESS:"0x6579503122e7564117f2192d6a66ec81b51dfd551b39a4fa26046044cd39a35",
LAUNCHPAD_ADDRESS:
'0x4cefb7ab4c3fda72df52f288e141ff1dc6956a497949bf7b0031f012f3d3afc',
LAUNCHPAD_ADDRESS:"0x4cefb7ab4c3fda72df52f288e141ff1dc6956a497949bf7b0031f012f3d3afc",
NAMESERVICE_ADDRESS:
'0x15dcd3c28c07846fa98d3a40d29446de21b5e6cd8d49a43773da0f237d5ea7f',
ESCROW_DEPOSIT_ADDRESS:
'0x7323351c9e497ef4cc59cfdacdc8ba7b07c6b4aaeb07e78dfda0988f6e8e3ee',
},
},
apibara: {
Expand Down
7 changes: 1 addition & 6 deletions apps/nestjs-indexer/src/indexer/indexer.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import { SellTokenModule } from 'src/services/sell-token/sell-token.module';
import { NameServiceModule } from 'src/services/name-service/name-service.module';
import { LiquidityAddedModule } from 'src/services/liquidity-added/liquidity-added.module';
import { LiquidityAddedIndexer } from './liquidity-added.indexer';
import { TipServiceModule } from '../services/tip-service/tipServiceModule';
import { TipServiceIndexer } from './tip-service.indexer';

@Module({
imports: [
Expand All @@ -23,7 +21,6 @@ import { TipServiceIndexer } from './tip-service.indexer';
SellTokenModule,
NameServiceModule,
LiquidityAddedModule,
TipServiceModule,
],
providers: [
TokenLaunchIndexer,
Expand All @@ -33,16 +30,14 @@ import { TipServiceIndexer } from './tip-service.indexer';
NameServiceIndexer,
IndexerService,
LiquidityAddedIndexer,
TipServiceIndexer,
],
exports: [
TokenLaunchIndexer,
DeployTokenIndexer,
BuyTokenIndexer,
SellTokenIndexer,
NameServiceIndexer,
LiquidityAddedIndexer,
TipServiceIndexer,
LiquidityAddedIndexer
],
})
export class IndexerModule {}
5 changes: 1 addition & 4 deletions apps/nestjs-indexer/src/indexer/indexer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { StreamClient, v1alpha2 } from '@apibara/protocol';
import {
FieldElement,
Filter,
StarkNetCursor,
v1alpha2 as starknet,
StarkNetCursor,
} from '@apibara/starknet';
import { validateAndParseAddress } from 'starknet';
import constants from 'src/common/constants';
Expand Down Expand Up @@ -67,9 +67,6 @@ export class IndexerService {
const contractAddressFieldElements = [
validateAndParseAddress(constants.contracts.sepolia.LAUNCHPAD_ADDRESS),
validateAndParseAddress(constants.contracts.sepolia.NAMESERVICE_ADDRESS),
validateAndParseAddress(
constants.contracts.sepolia.ESCROW_DEPOSIT_ADDRESS,
),
].map((address) => FieldElement.fromBigInt(BigInt(address)));

contractAddressFieldElements.forEach((contractAddressFieldElement) => {
Expand Down
Loading
Loading