//# publish module 0x1.Token { struct T has key { b: bool } public new(): Self.T { label b0: return T{ b: true }; } public has(addr: address): bool { let yes: bool; label b0: yes = exists(move(addr)); return move(yes); } public publish(account: &signer, t: Self.T) { label b0: move_to(move(account), move(t)); return; } } //# run --signers 0x1 import 0x1.signer; import 0x1.Token; main(account: signer) { let z: Token.T; let sender: address; let exists1: bool; let addr1: address; let exists2: bool; label b0: z = Token.new(); Token.publish(&account, move(z)); sender = signer.address_of(&account); exists1 = Token.has(copy(sender)); assert(copy(exists1), 42); addr1 = 0x0111111111111111111111110; exists2 = Token.has(copy(addr1)); assert(!copy(exists2), 42); return; }