mirror of
https://github.com/pezkuwichain/pezkuwi-sdk-ui.git
synced 2026-06-24 20:41:11 +00:00
d949863789
Comprehensive web interface for interacting with Pezkuwi blockchain. Features: - Blockchain explorer - Wallet management - Staking interface - Governance participation - Developer tools Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
28 lines
883 B
TypeScript
28 lines
883 B
TypeScript
// Copyright 2017-2026 @pezkuwi/app-js authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
export default `// transfer
|
|
const sender = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
|
|
const recipient = '5F2PCyGDWGDJyLRV15NrBsEa9Y61BS1dfAwzbfk7yR6DBm7P';
|
|
|
|
const nonce = await api.query.system.accountNonce(ALICE),
|
|
|
|
console.log('Current nonce', nonce);
|
|
|
|
const unsub = await api.tx.balances
|
|
.transferAllowDeath(recipient,12345)
|
|
.signAndSend(sender, ({ events = [], status }) => {
|
|
console.log('Transaction status:', status.type);
|
|
|
|
if (status.isInBlock) {
|
|
console.log('Completed at block hash', status.asInBlock.toHex());
|
|
console.log('Events:');
|
|
|
|
events.forEach(({ phase, event: { data, method, section } }) => {
|
|
console.log('\t', phase.toString(), \`: \${section}.\${method}\`, data.toString());
|
|
});
|
|
|
|
unsub();
|
|
}
|
|
});`;
|