Unverified Commit 1d0ade68 authored by emostov's avatar emostov
Browse files

Crowloan.withdraw

parent 26403b7e
......@@ -53,13 +53,10 @@ async function main(): Promise<void> {
// Now we can create our `balances.transfer` unsigned tx. The following
// function takes the above data as arguments, so can be performed offline
// if desired.
const unsigned = methods.crowdloan.contribute(
const unsigned = methods.balances.transfer(
{
value: '90071992547409910',
index: 12,
signature: {
Sr25519: '0xFFFFFFFFFFFFFFFF',
},
dest: '14E5nqKAp3oAJcmzgZhUD2RcptBeUBScxKHgJKU4HPNcKVf3', // Bob
},
{
address: deriveAddress(alice.publicKey, POLKADOT_SS58_FORMAT),
......
export * from './contribute';
export * from './types';
export * from './withdraw';
import {
Args,
BaseTxInfo,
createMethod,
OptionsWithMeta,
UnsignedTransaction,
} from '../../util';
export interface CroadloanWithdrawArgs extends Args {
who: string;
index: number | string;
}
export function withdraw(
args: CroadloanWithdrawArgs,
info: BaseTxInfo,
options: OptionsWithMeta
): UnsignedTransaction {
return createMethod(
{
method: {
args,
name: 'withdraw',
pallet: 'crowdloan',
},
...info,
},
options
);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment