2022-06-28 05:59:06 +03:00
|
|
|
/*
|
|
|
|
namespace: Compile
|
|
|
|
expectation: Pass
|
|
|
|
*/
|
|
|
|
|
|
|
|
record Token {
|
|
|
|
// The token owner.
|
|
|
|
owner: address,
|
|
|
|
// The Aleo balance (in gates).
|
2022-07-08 02:15:11 +03:00
|
|
|
gates: u64,
|
2022-06-28 05:59:06 +03:00
|
|
|
// The token amount.
|
|
|
|
amount: u64,
|
|
|
|
}
|
|
|
|
|
|
|
|
function mint(r0: address, r1: u64) -> Token {
|
|
|
|
return Token {
|
|
|
|
owner: r0,
|
2022-07-08 02:15:11 +03:00
|
|
|
gates: 0u64,
|
2022-06-28 05:59:06 +03:00
|
|
|
amount: r1,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
function main(x: address) -> u64 {
|
|
|
|
const c: u64 = 1u64;
|
2022-07-29 02:40:48 +03:00
|
|
|
let t: Token = Token { owner: x, gates: 0u64, amount: c};
|
2022-06-28 05:59:06 +03:00
|
|
|
|
2022-07-08 02:15:11 +03:00
|
|
|
return t.gates;
|
2022-06-28 05:59:06 +03:00
|
|
|
}
|