Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@catalist-nestjs/contracts
Advanced tools
NestJS Contracts Module for Catalist Finance projects. Part of [Catalist NestJS Modules](https://github.com/blockarchivelabs/catalist-nestjs-modules/#readme)
NestJS Contracts Module for Catalist Finance projects. Part of Catalist NestJS Modules
yarn add @catalist-nestjs/contracts
// Import
import { Module } from '@nestjs/common';
import { CatalistContractModule } from '@catalist-nestjs/contracts';
import { getDefaultProvider } from '@ethersproject/providers';
import { MyService } from './my.service';
@Module({
imports: [
CatalistContractModule.forFeature({
provider: getDefaultProvider('mainnet'),
}),
],
providers: [MyService],
exports: [MyService],
})
export class MyModule {}
// Usage
import { CATALIST_CONTRACT_TOKEN, Catalist } from '@catalist-nestjs/contracts';
import { Inject } from '@nestjs/common';
export class MyService {
constructor(@Inject(CATALIST_CONTRACT_TOKEN) private contract: Catalist) {}
async myMethod() {
return await this.contract.decimals();
}
}
Specify a different address:
CatalistContractModule.forFeature({
address: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84',
});
import { Module } from '@nestjs/common';
import { CatalistContractModule } from '@catalist-nestjs/contracts';
@Module({
imports: [CatalistContractModule.forRoot()],
})
export class MyModule {}
import { Module } from '@nestjs/common';
import { CatalistContractModule } from '@catalist-nestjs/contracts';
import { ConfigModule, ConfigService } from './config.service';
@Module({
imports: [
CatalistContractModule.forRootAsync({
async useFactory(testService: TestService) {
return { address: testService.address };
},
inject: [TestService],
}),
],
})
export class MyModule {}
import { Module } from '@nestjs/common';
import { CatalistContractModule } from '@catalist-nestjs/contracts';
import { ProviderModule } from './provider.service';
@Module({
imports: [ProviderModule.forRoot(), CatalistContractModule.forRoot()],
})
export class MyModule {}
packages/contracts/abi
folderpackages/contracts/<your name of abi>
: module, contractspackages/contracts/test/contracts.spec.ts
FAQs
NestJS Contracts Module for Catalist Finance projects. Part of [Catalist NestJS Modules](https://github.com/blockarchivelabs/catalist-nestjs-modules/#readme)
We found that @catalist-nestjs/contracts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.