Skip to content

Commit

Permalink
Fix fund-accounts service (#87)
Browse files Browse the repository at this point in the history
* Update fund-accounts env variables to admin

* Add admin to funded accounts

* Add gas limit to cast command
  • Loading branch information
ryangoree authored Oct 17, 2023
1 parent 547ee2f commit 6e5842c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions accounts/balances.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"0x6043bF4ec8834F918242BaCA0F1F3805F2a2988D": {
"eth": 500,
"tokens": 500
},
"0x004dfC2dBA6573fa4dFb1E86e3723e1070C0CfdE": {
"eth": 500,
"tokens": 500
Expand Down
4 changes: 2 additions & 2 deletions images/fund-accounts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ WORKDIR /src

COPY ./fund_accounts.sh ./fund_accounts.sh

ENV ETH_FROM=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
ENV PRIVATE_KEY=ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
ENV ETH_FROM=0x6043bF4ec8834F918242BaCA0F1F3805F2a2988D
ENV PRIVATE_KEY=0f1616bb59774b929ba5256c2204123d9dedc4c142d013179b90f929997d119b
ENV RPC_URL=http://ethereum:8545

RUN apk add --no-cache jq curl
Expand Down
2 changes: 1 addition & 1 deletion images/fund-accounts/fund_accounts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ echo "$accounts_and_balances" | while read account eth_balance token_balance; do
curl -X POST --header "Content-Type: application/json" --data "$data" ${RPC_URL}

# Mint base tokens
cast send "$base_token" "mint(address,uint256)" "$account" "$token_balance_hex" --rpc-url ${RPC_URL} --private-key ${PRIVATE_KEY}
cast send "$base_token" "mint(address,uint256)" "$account" "$token_balance_hex" --rpc-url ${RPC_URL} --private-key ${PRIVATE_KEY} --gas-limit 500000
done

echo "--------------------------------"
Expand Down

0 comments on commit 6e5842c

Please sign in to comment.