Skip to content

Commit

Permalink
refactor: simplified GA integration test contract
Browse files Browse the repository at this point in the history
  • Loading branch information
randomshinichi committed Aug 13, 2019
1 parent 823f14b commit f976269
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions integration_test/authorize.aes
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ contract BlindAuth =

entrypoint init(owner' : address) = { nonce = 1, owner = owner' }

stateful entrypoint authorize(s : signature) : bool =
switch(Auth.tx_hash)
None => abort("Not in Auth context")
Some(tx_hash) =>
put(state{ nonce = state.nonce + 1 })
true
stateful entrypoint authorize() : bool =
put(state{nonce = state.nonce + 1})
true

entrypoint to_sign(h : hash, n : int) : hash =
Crypto.blake2b((h, n))

0 comments on commit f976269

Please sign in to comment.