Created
July 7, 2020 12:41
-
-
Save dakk/94c0a0a74523c363df8158a621f9c5b3 to your computer and use it in GitHub Desktop.
yallo_medium_1_using.yallo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "IToken.yallo"; | |
const tokenContractAddress: address = @KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq; | |
contract usingAToken { | |
field bal: nat; | |
entry checkBalance(a: address) { | |
[IToken.of(tokenContractAddress).getBalance(a, this.checkBalanceCallback)] | |
} | |
entry checkBalanceCallback(b: nat) { | |
this.bal = b; | |
[] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment