-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added netcurve api * Revemod private key of random wallet * Removed wallet address * Update package version * Change pipeline image * Updated netcurve apichanges implementation --------- Co-authored-by: vnovacev <[email protected]>
- Loading branch information
1 parent
53c49eb
commit 960085c
Showing
13 changed files
with
140 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { Wallet } from 'ethers'; | ||
import { EnvNames, NetworkNames, Sdk } from '../../src'; | ||
import { logger } from './common'; | ||
|
||
async function main(): Promise<void> { | ||
const wallet = Wallet.createRandom(); | ||
|
||
logger.log('sender wallet', wallet.address); | ||
|
||
const sdk = new Sdk(wallet, { | ||
projectKey: 'testProject', | ||
projectMetadata: 'test', | ||
env: EnvNames.LocalNets, | ||
networkName: NetworkNames.LocalA, | ||
}); | ||
|
||
const { state } = sdk; | ||
|
||
logger.log('key account', state.account); | ||
|
||
logger.log( | ||
'contract account', | ||
await sdk.computeContractAccount({ | ||
sync: false, | ||
}), | ||
); | ||
|
||
await sdk.syncAccount(); | ||
|
||
logger.log('synced contract account', state.account); | ||
logger.log('synced contract account member', state.accountMember); | ||
|
||
logger.log( | ||
'get market details of token', | ||
await sdk.getAccount24HourNetCurve({ | ||
chainIds: [1], // Linked chain ids (optional) | ||
account: '', | ||
}), | ||
); | ||
} | ||
|
||
main() | ||
.catch(logger.error) | ||
.finally(() => process.exit()); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export class NetCurveBalance { | ||
timestamp: number; | ||
|
||
usdValue: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Type } from 'class-transformer'; | ||
import { NetCurveBalance } from './net-curve-balance'; | ||
|
||
export class NetCurveBalances { | ||
@Type(() => NetCurveBalance) | ||
items: NetCurveBalance[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { IsOptional } from 'class-validator'; | ||
import { IsAddress } from './validators'; | ||
|
||
export class GetAccount24HourNetCurveDto { | ||
@IsOptional() | ||
@IsAddress() | ||
account?: string = null; | ||
|
||
@IsOptional() | ||
chainIds?: number[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters