Skip to content

Commit

Permalink
Merge pull request #8 from MoonSHRD/address_update
Browse files Browse the repository at this point in the history
addresses are now fetched from .env
  • Loading branch information
JackBekket authored Oct 11, 2022
2 parents 2f4431b + ff1783d commit 8f10681
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .envExample
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
PK=yourprivatekey
GATEWAY_GOERLI_WS=wss://goerli.infura.io/
ACCOUNT_ADDRESS=0xc905803BbC804fECDc36850281fEd6520A346AC5
PASSPORT_ADDRESS=0x155C672bFdD482F2D67a7cd30e3acDc3e59D5092
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ func main() {
}

// Creating an auth transactor
auth, _ := bind.NewKeyedTransactorWithChainID(privateKey, big.NewInt(4))
auth, _ := bind.NewKeyedTransactorWithChainID(privateKey, big.NewInt(5))

// check calls
// check balance
accountAddress := common.HexToAddress("0xc905803BbC804fECDc36850281fEd6520A346AC5")
accountAddress := common.HexToAddress(myenv["ACCOUNT_ADDRESS"])
balance, _ := client.BalanceAt(ctx, accountAddress, nil) //our balance
fmt.Printf("Balance of the validator bot: %d\n", balance)

// Setting up Passport Contract
passportCenter, err := passport.NewPassport(common.HexToAddress("0x155C672bFdD482F2D67a7cd30e3acDc3e59D5092"), client)
passportCenter, err := passport.NewPassport(common.HexToAddress(myenv["PASSPORT_ADDRESS"]), client)
if err != nil {
log.Fatalf("Failed to instantiate a TGPassport contract: %v", err)
}
Expand Down

0 comments on commit 8f10681

Please sign in to comment.