This package contains code samples that interact with the Flow Emulator.
The emulator is bundled with the Flow CLI, a command-line interface for working with Flow.
Follow these steps to install the Flow CLI.
Start the emulator by running the following command in this directory:
flow emulator start -v
# The -v flag enables verbose log output, which is useful for testing
In separate process, run any of the example programs below. Watch the emulator logs to see transaction output.
# Create a new account
GO111MODULE=on go run ./create_account/main.go
# Add a key to an existing account
GO111MODULE=on go run ./add_account_key/main.go
# Deploy a contract
GO111MODULE=on go run ./deploy_contract/main.go
# Query events
GO111MODULE=on go run ./query_events/main.go