Created
October 10, 2018 08:42
-
-
Save iamjaspreetsingh/4510686dc94cee5facfbbdad80a163ed to your computer and use it in GitHub Desktop.
Type error in the binding to into `msg`: [:0:0]: Couldn't resolve the identifier "noauth".
This file contains 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
contract ERC777Token | |
(name:String , | |
symbol: String, | |
totalSupply:Uint128, | |
owner : ByStr20, | |
granularity: Uint128) | |
(* Initial balance is not stated explicitly: it's initialized when creating the contract. *) | |
field balances : Map ByStr20 Uint128 = | |
let m = Emp ByStr20 Uint128 in | |
builtin put m owner totalSupply | |
field allowed : Map ByStr20 (Map ByStr20 Uint128) = Emp ByStr20 (Map ByStr20 Uint128) | |
field _totalSupply: Uint128 = totalSupply | |
transition revokeOperator (operator : ByStr20) | |
auth="revoked"; | |
noauth="revoke failed"; | |
al <- allowed; | |
is_operator=builtin eq operator _sender; | |
match is_operator with | |
| True=> | |
msg = { _tag : "Main"; _recipient : _sender; _amount : Uint128 0; authorized : noauth}; | |
msgs = one_msg msg; | |
send msgs | |
| False=> | |
allowed_operators = let m = Emp ByStr20 Uint128 in builtin put m operator totalSupply ; | |
allowed_new = builtin remove al operator ; | |
allowed := allowed_new; | |
msg = { _tag : "Main"; _recipient : _sender; _amount : Uint128 0; authorized : auth}; | |
msgs = one_msg msg; | |
send msgs | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It was working for me in old ide https://ide.zilliqa.com.