Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tasinco/avalanche-test-tool

Ethereum testing tool.
https://github.com/tasinco/avalanche-test-tool

avalanche ethereum ethereum-contract evm go golang solidity web3

Last synced: 10 days ago
JSON representation

Ethereum testing tool.

Awesome Lists containing this project

README

        

# ava-test-tool

Start a local net 5 node Avalanche testing environment.

Deploy and test solidity contracts on a live local EVM.

## Howto run

```shell
go run ./cmd/app/
```

## Howto connect

You can interact with the C chain at http://localhost:9650

```go
package main

import (
"context"
"github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/rpc"
"log"
)

func main() {
ctx := context.Background()

rpcClnt, err := rpc.Dial("http://localhost:9650/ext/bc/C/rpc")
if err != nil {
log.Fatal(err)
}
ethClnt := ethclient.NewClient(rpcClnt)

chainID, err := ethClnt.ChainID(ctx)
if err != nil {
log.Fatal(err)
}

log.Println(chainID)
}
```

## Test deploy

[revertdeploy](reverterdeploy) deploys the reverted contract and test some calls.