Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
txwrapper
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
txwrapper
Commits
1d0ade68
Unverified
Commit
1d0ade68
authored
4 years ago
by
emostov
Browse files
Options
Downloads
Patches
Plain Diff
Crowloan.withdraw
parent
26403b7e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/polkadot.ts
+2
-5
2 additions, 5 deletions
examples/polkadot.ts
src/methods/crowdloan/index.ts
+1
-0
1 addition, 0 deletions
src/methods/crowdloan/index.ts
src/methods/crowdloan/withdraw.ts
+30
-0
30 additions, 0 deletions
src/methods/crowdloan/withdraw.ts
with
33 additions
and
5 deletions
examples/polkadot.ts
+
2
−
5
View file @
1d0ade68
...
...
@@ -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
),
...
...
This diff is collapsed.
Click to expand it.
src/methods/crowdloan/index.ts
+
1
−
0
View file @
1d0ade68
export
*
from
'
./contribute
'
;
export
*
from
'
./types
'
;
export
*
from
'
./withdraw
'
;
This diff is collapsed.
Click to expand it.
src/methods/crowdloan/withdraw.ts
0 → 100644
+
30
−
0
View file @
1d0ade68
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
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment