Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
Mirrored projects
polkadot-sdk
Commits
eae9d946
Unverified
Commit
eae9d946
authored
3 months ago
by
Muharem Ismailov
Browse files
Options
Downloads
Patches
Plain Diff
fix
parent
85c15129
No related merge requests found
Pipeline
#510220
waiting for manual action with stages
in 14 minutes and 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
substrate/frame/meta-tx/src/tests.rs
+11
-11
11 additions, 11 deletions
substrate/frame/meta-tx/src/tests.rs
with
11 additions
and
11 deletions
substrate/frame/meta-tx/src/tests.rs
+
11
−
11
View file @
eae9d946
...
...
@@ -19,7 +19,7 @@ use crate::*;
use
frame_support
::
traits
::
tokens
::
fungible
::
Inspect
;
use
mock
::
*
;
use
sp_io
::
hashing
::
blake2_256
;
use
sp_keyring
::
Account
Keyring
;
use
sp_keyring
::
Sr25519
Keyring
;
use
sp_runtime
::{
generic
::
Era
,
traits
::{
Applyable
,
Checkable
,
Hash
,
IdentityLookup
},
...
...
@@ -59,7 +59,7 @@ pub fn create_meta_tx_bare_ext(account: AccountId) -> MetaTxBareExtension {
fn
create_signature
<
Call
:
Encode
,
Ext
:
Encode
+
TransactionExtension
<
RuntimeCall
>>
(
call
:
Call
,
ext
:
Ext
,
signer
:
Account
Keyring
,
signer
:
Sr25519
Keyring
,
)
->
MultiSignature
{
MultiSignature
::
Sr25519
(
(
META_EXTENSION_VERSION
,
call
,
ext
.clone
(),
ext
.implicit
()
.unwrap
())
...
...
@@ -89,9 +89,9 @@ fn apply_extrinsic(uxt: UncheckedExtrinsic) -> DispatchResultWithPostInfo {
fn
sign_and_execute_meta_tx
()
{
new_test_ext
()
.execute_with
(||
{
// meta tx signer
let
alice_keyring
=
Account
Keyring
::
Alice
;
let
alice_keyring
=
Sr25519
Keyring
::
Alice
;
// meta tx relayer
let
bob_keyring
=
Account
Keyring
::
Bob
;
let
bob_keyring
=
Sr25519
Keyring
::
Bob
;
let
alice_account
:
AccountId
=
alice_keyring
.public
()
.into
();
let
bob_account
:
AccountId
=
bob_keyring
.public
()
.into
();
...
...
@@ -177,9 +177,9 @@ fn sign_and_execute_meta_tx() {
fn
invalid_signature
()
{
new_test_ext
()
.execute_with
(||
{
// meta tx signer
let
alice_keyring
=
Account
Keyring
::
Alice
;
let
alice_keyring
=
Sr25519
Keyring
::
Alice
;
// meta tx relayer
let
bob_keyring
=
Account
Keyring
::
Bob
;
let
bob_keyring
=
Sr25519
Keyring
::
Bob
;
let
alice_account
:
AccountId
=
alice_keyring
.public
()
.into
();
let
bob_account
:
AccountId
=
bob_keyring
.public
()
.into
();
...
...
@@ -197,7 +197,7 @@ fn invalid_signature() {
let
invalid_meta_tx_sig
=
create_signature
(
remark_call
.clone
(),
meta_tx_bare_ext
.clone
(),
Account
Keyring
::
Charlie
,
Sr25519
Keyring
::
Charlie
,
);
let
meta_tx_ext
=
(
VerifySignatureExt
::
new_with_signature
(
invalid_meta_tx_sig
,
alice_account
.clone
()),
...
...
@@ -246,9 +246,9 @@ fn invalid_signature() {
fn
meta_tx_extension_work
()
{
new_test_ext
()
.execute_with
(||
{
// meta tx signer
let
alice_keyring
=
Account
Keyring
::
Alice
;
let
alice_keyring
=
Sr25519
Keyring
::
Alice
;
// meta tx relayer
let
bob_keyring
=
Account
Keyring
::
Bob
;
let
bob_keyring
=
Sr25519
Keyring
::
Bob
;
let
alice_account
:
AccountId
=
alice_keyring
.public
()
.into
();
let
bob_account
:
AccountId
=
bob_keyring
.public
()
.into
();
...
...
@@ -310,9 +310,9 @@ fn meta_tx_extension_work() {
fn
meta_tx_call_fails
()
{
new_test_ext
()
.execute_with
(||
{
// meta tx signer
let
alice_keyring
=
Account
Keyring
::
Alice
;
let
alice_keyring
=
Sr25519
Keyring
::
Alice
;
// meta tx relayer
let
bob_keyring
=
Account
Keyring
::
Bob
;
let
bob_keyring
=
Sr25519
Keyring
::
Bob
;
let
alice_account
:
AccountId
=
alice_keyring
.public
()
.into
();
let
bob_account
:
AccountId
=
bob_keyring
.public
()
.into
();
...
...
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