Create account
Before you continue with the rest of our tutorials, you should create a Diem account to be compatible with the Diem ecosystem.
In this example we will create a VASP (Virtual Asset Service Provider) account which is a certified or registered account in the system that is permissioned to hold balances and fire events:
1
script {
2
use 0x1::DiemAccount;
3
use 0x1::PONT::PONT;
4
5
fun create_account(tc_account: signer, account: address) {
6
DiemAccount::create_parent_vasp_account<PONT>(
7
&tc_account, // Treasury signature.
8
account, // Address of account.
9
x"", // Auth key, ignore for now.
10
x"626f62", // Account name, hex (Bob for example)
11
true // Support all currencies
12
);
13
}
14
}
Copied!
Compile the provided script:
1
dove tx 'create_account(tr, <address>)
Copied!
Replace <address> with your account and execute the transaction using the Polkadot JS UI or CLI.
✈️ See our instruction how to send transaction (execute/publish) using UI or CLI.
Last modified 1mo ago
Copy link