Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Duniter v2S
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
nodes
rust
Duniter v2S
Merge requests
!9
upgrade substrate to monthly-2022-01
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
upgrade substrate to monthly-2022-01
elois-upgrade-substrate
into
master
Overview
0
Commits
13
Pipelines
0
Changes
58
Merged
Éloïs
requested to merge
elois-upgrade-substrate
into
master
3 years ago
Overview
0
Commits
13
Pipelines
0
Changes
4
Expand
0
0
Merge request reports
Compare
version 6
version 6
8338bf50
3 years ago
version 5
544950cc
3 years ago
version 4
bc9f1b6a
3 years ago
version 3
0f62fd71
3 years ago
version 2
969d392d
3 years ago
version 1
02a61007
3 years ago
master (base)
and
latest version
latest version
017dbc18
13 commits,
3 years ago
version 6
8338bf50
12 commits,
3 years ago
version 5
544950cc
11 commits,
3 years ago
version 4
bc9f1b6a
10 commits,
3 years ago
version 3
0f62fd71
9 commits,
3 years ago
version 2
969d392d
8 commits,
3 years ago
version 1
02a61007
7 commits,
3 years ago
Show latest version
4 files
+
7
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
integration-tests/src/balance_transfer.rs
0 → 100644
+
52
−
0
Options
// Copyright 2021 Axiom-Team
//
// This file is part of Substrate-Libre-Currency.
//
// Substrate-Libre-Currency is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, version 3 of the License.
//
// Substrate-Libre-Currency is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>.
use
crate
::
common
::
*
;
use
sp_keyring
::
AccountKeyring
;
use
subxt
::
PairSigner
;
#[tokio::test]
async
fn
test_balance_transfer
()
->
Result
<
(),
Box
<
dyn
std
::
error
::
Error
>>
{
env_logger
::
init
();
// Spawn a node
let
(
api
,
client
,
_process
)
=
spawn_node
()
.await
;
let
alice
=
PairSigner
::
new
(
AccountKeyring
::
Alice
.pair
());
let
dave
=
AccountKeyring
::
Dave
.to_account_id
();
let
events
=
create_block_with_extrinsic
(
&
client
,
api
.tx
()
.balances
()
.transfer
(
dave
.clone
()
.into
(),
512
)
.create_signed
(
&
alice
,
())
.await
?
,
)
.await
?
;
println!
(
"Balance transfer extrinsic written in blockchain, events: {:?}"
,
events
);
// verify that Bob's free Balance increased
let
dave_post
=
api
.storage
()
.system
()
.account
(
dave
,
None
)
.await
?
;
println!
(
"Bob's Free Balance is now {}
\n
"
,
dave_post
.data.free
);
assert_eq!
(
dave_post
.data.free
,
512
);
Ok
(())
}
Loading