We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8507ccd commit c77c041Copy full SHA for c77c041
templates/hyperweb/src/bank/index.ts
@@ -0,0 +1,20 @@
1
+// @ts-ignore
2
+import { getBalance, sendCoins } from "@hyperweb/bank";
3
+
4
+export default class Contract {
5
+ constructor() { }
6
7
+ balance({ address, denom }: { address: string; denom: string }): string {
8
+ return getBalance(address, denom).amount.toString();
9
+ }
10
11
+ transfer({ from, to, amount, denom }: {
12
+ from: string;
13
+ to: string;
14
+ amount: number;
15
+ denom: string
16
+ }): string {
17
+ sendCoins(from, to, { [denom]: amount });
18
+ return "Transfer successful";
19
20
+}
0 commit comments