Skip to content

Commit

Permalink
print
Browse files Browse the repository at this point in the history
  • Loading branch information
rianhughes committed Oct 9, 2023
1 parent b685955 commit 9419182
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_account.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: cd account && go test -timeout 600s -v -env devnet .
env:
TESTNET_ACCOUNT_PRIVATE_KEY: ${{ secrets.TESTNET_ACCOUNT_PRIVATE_KEY }}
INTEGRATION_BASE: "http://localhost:5050"
INTEGRATION_BASE: "http://0.0.0.0:5050"

# Test Account on mock
- name: Test Account with mocks
Expand Down
10 changes: 7 additions & 3 deletions account/account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,12 +416,16 @@ func TestAddDeployAccountDevnet(t *testing.T) {
require.NoError(t, err, "Error in rpc.NewClient")
provider := rpc.NewProvider(client)

acnts, err := newDevnet(t, base)
devnet, acnts, err := newDevnet(t, base)
require.NoError(t, err, "Error setting up Devnet")
fakeUser := acnts[0]
fakeUserAddr := utils.TestHexToFelt(t, fakeUser.Address)
fakeUserPub := utils.TestHexToFelt(t, fakeUser.PublicKey)

resp2, err := devnet.Mint(fakeUserAddr, new(big.Int).SetInt64(1000000000000000))
fmt.Println(resp2)
require.NoError(t, err, "Error Mint")

// Set up ks
ks := account.NewMemKeystore()
fakePrivKeyBI, ok := new(big.Int).SetString(fakeUser.PrivateKey, 0)
Expand Down Expand Up @@ -707,8 +711,8 @@ func TestAddDeclareTxn(t *testing.T) {
}
}

func newDevnet(t *testing.T, url string) ([]devnet.TestAccount, error) {
func newDevnet(t *testing.T, url string) (*devnet.DevNet, []devnet.TestAccount, error) {
devnet := devnet.NewDevNet(url)
acnts, err := devnet.Accounts()
return acnts, err
return devnet, acnts, err
}
1 change: 1 addition & 0 deletions devnet/devnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ func (devnet *DevNet) Mint(address *felt.Felt, amount *big.Int) (*MintResponse,
}
req.Header.Add("Content-Type", "application/json")
client := &http.Client{}
fmt.Println("req", req)
resp, err := client.Do(req)
if err != nil {
return nil, err
Expand Down

0 comments on commit 9419182

Please sign in to comment.