docs2 icon indicating copy to clipboard operation
docs2 copied to clipboard

Change server-side tutorial to use `faucet`

Open mitschabaude opened this issue 2 years ago • 1 comments

  • there is now an interact.ts script in the zk project template, which covers a subset of the tutorial (interacting with a deployed contract from the command line), in a cleaner and more robust way. the tutorial could start from this script and adapt it to add a custom deploy method.
  • tx.wait() can replace the hacky loopUntilAccountExists()
  • zkAppNeedsInitialization() can be left out, because this is handled automatically in SmartContract.deploy() now

EDIT: much of this is done with https://github.com/o1-labs/docs2/pull/234. The only "hack" that remains is loopUntilAccountExists(), our current API can't replace it as it is used in that example

mitschabaude avatar Jan 12 '23 13:01 mitschabaude

When the faucet function makes it into snarkyjs or the CLI, would be good to add that as well

mitschabaude avatar Jan 12 '23 13:01 mitschabaude