Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregor Gololicic committed Dec 12, 2023
1 parent e8196d8 commit 821477a
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 19 deletions.
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,46 @@ The Flow CLI includes several commands to interact with Flow networks, such as q
## Contributing

Read [contributing](./CONTRIBUTING.md) document.


## Running Flow EVM

⚠️ **This feature is experimental in nature, and its stability cannot be guaranteed. It does not reflect the intended direction for utilizing the EVM in a production environment.** ⚠️

In order to run Flow EVM you have to start the emulator with the evm flag enabled:
```
flow emulator --evm-enabled
```

You can then proceed by creating an account using the:

```
flow evm create-account {funding-amount}
```

This will create an account inside the EVM, fund it with the funding amount provided and create a bridged
account resource which will be saved inside the Flow account that was used as a signer in the above command
(default signer is emulator account if not provided with `--signer` flag). Please be aware you can't create
multiple accounts on a single Flow account right now as the bridged account resource is always stored
in same place and can't be overwritten.

After creating an account you can deploy a contract to the EVM by running:

```
flow evm deploy {compiled binary}
```

You need to provide location of the file that contains the compiled EVM binary. The response will include the
EVM address of the contract that you will later need to interact with it.

You can interact with deploy contract by calling functions using:

```
flow evm run {Flow caller address} {EVM contract address} {contract function name} --ABI {abi location}
```

The Flow caller address is the account that contains EVM bridged account resource, that will be used to
execute the call inside the EVM. So you must first create such a resource by using the `create-account` command.
The EVM contract address will be provided to you when `deploy` command is executed. You also need to specify the
name of the contract function you want to call and the file containing ABI specification, which is normally produced
in the compile process.
38 changes: 19 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ require (
github.com/go-git/go-git/v5 v5.10.0
github.com/gosuri/uilive v0.0.4
github.com/manifoldco/promptui v0.9.0
github.com/onflow/cadence v0.42.5
github.com/onflow/cadence v0.42.6
github.com/onflow/cadence-tools/languageserver v0.33.3
github.com/onflow/cadence-tools/test v0.14.3
github.com/onflow/fcl-dev-wallet v0.7.4
github.com/onflow/flixkit-go v0.3.1
github.com/onflow/flow-cli/flowkit v1.6.1-0.20231110211255-b41f57a8b8c7
github.com/onflow/flow-core-contracts/lib/go/templates v1.2.4-0.20231016154253-a00dbf7c061f
github.com/onflow/flow-emulator v0.58.0
github.com/onflow/flow-go-sdk v0.41.16
github.com/onflow/flow-emulator v0.59.1-0.20231212135229-f6a1475e6308
github.com/onflow/flow-go-sdk v0.41.17
github.com/onflowser/flowser/v3 v3.1.3
github.com/pkg/errors v0.9.1
github.com/psiemens/sconfig v0.1.0
Expand All @@ -41,8 +41,8 @@ require (
github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
github.com/VictoriaMetrics/fastcache v1.6.0 // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/acomagu/bufpipe v1.0.4 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect
Expand Down Expand Up @@ -114,7 +114,7 @@ require (
github.com/hashicorp/golang-lru/v2 v2.0.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c // indirect
github.com/holiman/uint256 v1.2.3 // indirect
github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 // indirect
github.com/improbable-eng/grpc-web v0.15.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
Expand Down Expand Up @@ -172,10 +172,10 @@ require (
github.com/onflow/flow-archive v1.3.4-0.20230503192214-9e81e82d4dcc // indirect
github.com/onflow/flow-core-contracts/lib/go/contracts v1.2.4-0.20231016154253-a00dbf7c061f // indirect
github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20230711213910-baad011d2b13 // indirect
github.com/onflow/flow-go v0.32.4-0.20231115172515-c1ec969fd6f2 // indirect
github.com/onflow/flow-go/crypto v0.24.10 // indirect
github.com/onflow/flow-go v0.32.4-0.20231211231711-1aba0828ca33 // indirect
github.com/onflow/flow-go/crypto v0.25.0 // indirect
github.com/onflow/flow-nft/lib/go/contracts v1.1.0 // indirect
github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231018182244-e72527c55c63 // indirect
github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231124194313-106cc495def6 // indirect
github.com/onflow/nft-storefront/lib/go/contracts v0.0.0-20221222181731-14b90207cead // indirect
github.com/onflow/sdks v0.5.0 // indirect
github.com/onflow/wal v0.0.0-20230529184820-bc9f8244608d // indirect
Expand Down Expand Up @@ -212,8 +212,8 @@ require (
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/texttheater/golang-levenshtein/levenshtein v0.0.0-20200805054039-cae8b0eaed6c // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tklauser/go-sysconf v0.3.9 // indirect
github.com/tklauser/numcpus v0.3.0 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/turbolent/prettier v0.0.0-20220320183459-661cc755135d // indirect
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
Expand All @@ -234,16 +234,16 @@ require (
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/crypto v0.16.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/oauth2 v0.11.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.14.0 // indirect
golang.org/x/tools v0.16.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
gonum.org/v1/gonum v0.13.0 // indirect
google.golang.org/api v0.126.0 // indirect
Expand Down
Loading

0 comments on commit 821477a

Please sign in to comment.