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

Upgrade Deps #23

Merged
merged 2 commits into from
Jan 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
"lint": "tsc --noEmit && eslint . --ext ts"
},
"dependencies": {
"@polkadot/api": "6.7.2",
"@polkadot/util-crypto": "7.8.2",
"@substrate/txwrapper-polkadot": "1.2.20",
"@polkadot/api": "7.3.1",
"@polkadot/util-crypto": "8.3.1",
"@substrate/txwrapper-polkadot": "1.4.0",
"axios": "^0.24.0",
"node-fetch": "^3.1.0",
"ts-node": "^10.4.0",
"typescript": "^4.4.4"
"typescript": "^4.5.4"
},
"devDependencies": {
"readline": "^1.3.0"
},
"resolutions": {
"@polkadot/api": "6.7.2"
"@polkadot/api": "7.3.1"
}
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function main(): Promise<void> {
if (method == 'transfer'){
const inputs: TransferInputs = {
recipientAddress: { id: transaction.args.recipientAddress.id },
transferValue: transaction.args.value,
transferValue: transaction.args.transferValue,
...baseInputs
}
await doBalancesTransfer(inputs);
Expand Down
6 changes: 3 additions & 3 deletions src/util/construction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { TypeRegistry } from '@polkadot/types';
import { construct, getRegistry } from '@substrate/txwrapper-polkadot';
import { getChainData, getSenderData, submitTransaction } from './nodeInteraction'
import { AddressData, ChainData, TxConstruction } from './types'
import { AddressData, ChainData, Metadata, TxConstruction } from './types'
import { promptUser } from './signing';

/* Types */
Expand All @@ -15,15 +15,15 @@ interface BaseTxInfo {
blockNumber: number;
eraPeriod: number;
genesisHash: string;
metadataRpc: string;
metadataRpc: Metadata;
nonce: number;
specVersion: number;
transactionVersion: number;
tip: number;
}

interface OptionsWithMeta {
metadataRpc: string;
metadataRpc: Metadata;
registry: TypeRegistry;
}

Expand Down
4 changes: 2 additions & 2 deletions src/util/nodeInteraction.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AddressData, ChainData, ChainName, SpecName } from './types'
import { AddressData, ChainData, ChainName, Metadata, SpecName } from './types'
import axios from 'axios';

/* Types */
Expand All @@ -16,7 +16,7 @@ interface ArtifactsResponse {
specName: SpecName;
specVersion: string;
txVersion: string;
metadata: string;
metadata: Metadata;
}

// Response from `/balance` endpoint on sidecar.
Expand Down
5 changes: 3 additions & 2 deletions src/util/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { TypeRegistry } from '@polkadot/types';
export type ChainName = 'Polkadot' | 'Polkadot CC1' | 'Kusama' | 'Westend';
export type SpecName = 'polkadot' | 'kusama' | 'westend';
export type Curve = 'sr25519' | 'ed25519' | 'ecdsa';
export type Metadata = `0x$string` | `0x${string}`;

// Information about the chain that we need to construct a transaction.
export interface ChainData {
Expand All @@ -14,7 +15,7 @@ export interface ChainData {
specName: SpecName;
specVersion: number;
transactionVersion: number;
metadataRpc: string;
metadataRpc: Metadata;
}

// Information about the sender's address.
Expand All @@ -29,7 +30,7 @@ export interface AddressData {
export interface TxConstruction {
unsigned: UnsignedTransaction;
registry: TypeRegistry;
metadata: string;
metadata: Metadata;
}

// The type registry is somewhat mysterious to me. We just need this a lot.
Expand Down
Loading