mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-25 03:04:13 +03:00
30 lines
498 B
Plaintext
30 lines
498 B
Plaintext
/*
|
|
namespace: Compile
|
|
expectation: Pass
|
|
*/
|
|
|
|
record Token {
|
|
// The token owner.
|
|
owner: address,
|
|
// The Aleo balance (in gates).
|
|
gates: u64,
|
|
// The token amount.
|
|
amount: u64,
|
|
}
|
|
|
|
@program
|
|
function mint(r0: address, r1: u64) -> Token {
|
|
return Token {
|
|
owner: r0,
|
|
gates: 0u64,
|
|
amount: r1,
|
|
};
|
|
}
|
|
|
|
@program
|
|
function main(x: address) -> u64 {
|
|
const c: u64 = 1u64;
|
|
let t: Token = Token { owner: x, gates: 0u64, amount: c};
|
|
|
|
return t.gates;
|
|
} |