Skip to content

Commit

Permalink
test(taiko-client): use env names which defined in flag configs (#17921)
Browse files Browse the repository at this point in the history
  • Loading branch information
mask-pp authored Aug 15, 2024
1 parent 46a3e00 commit 196b74e
Show file tree
Hide file tree
Showing 25 changed files with 118 additions and 121 deletions.
4 changes: 2 additions & 2 deletions packages/guardian-prover-health-check/.default.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DATABASE_HOST=localhost:3306
DATABASE_MAX_IDLE_CONNS=50
DATABASE_MAX_OPEN_CONNS=3000
DATABASE_CONN_MAX_LIFETIME_IN_MS=100000
GUARDIAN_PROVER_CONTRACT_ADDRESS=0xDf8038e9f4535040D7421A89ead398b3A38366EC
GUARDIAN_PROVER_CONTRACT=0xDf8038e9f4535040D7421A89ead398b3A38366EC
L1_RPC_URL=wss://l1ws.internal.taiko.xyz
L2_RPC_URL=wss://ws.internal.taiko.xyz
INTERVAL=12s
INTERVAL=12s
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var (
Name: "guardianProverContractAddress",
Usage: "Address of the GuardianProver contract",
Category: healthCheckCategory,
EnvVars: []string{"GUARDIAN_PROVER_CONTRACT_ADDRESS"},
EnvVars: []string{"GUARDIAN_PROVER_CONTRACT"},
Required: true,
}
L1RPCUrl = &cli.StringFlag{
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/script/DeployOnL1.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ contract DeployOnL1 is DeployCapability {
});
}

address taikoToken = vm.envAddress("TAIKO_TOKEN");
address taikoToken = vm.envAddress("TAIKO_TOKEN_ADDRESS");
if (taikoToken == address(0)) {
taikoToken = deployProxy({
name: "taiko_token",
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/script/test_deploy_on_l1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e

export PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
PROPOSER=0x0000000000000000000000000000000000000000 \
TAIKO_TOKEN=0x0000000000000000000000000000000000000000 \
TAIKO_TOKEN_ADDRESS=0x0000000000000000000000000000000000000000 \
PROPOSER_ONE=0x0000000000000000000000000000000000000000 \
GUARDIAN_PROVERS="0x1000777700000000000000000000000000000001,0x1000777700000000000000000000000000000002,0x1000777700000000000000000000000000000003,0x1000777700000000000000000000000000000004,0x1000777700000000000000000000000000000005,0x1000777700000000000000000000000000000006,0x1000777700000000000000000000000000000007" \
TAIKO_L2_ADDRESS=0x1000777700000000000000000000000000000001 \
Expand Down
2 changes: 1 addition & 1 deletion packages/taiko-client/bindings/encoding/input_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestUnpackTxListBytes(t *testing.T) {
)
require.ErrorContains(t, err, "no method with id")

cli, err := ethclient.Dial(os.Getenv("L1_NODE_WS_ENDPOINT"))
cli, err := ethclient.Dial(os.Getenv("L1_WS"))
require.Nil(t, err)

chainID, err := cli.ChainID(context.Background())
Expand Down
6 changes: 3 additions & 3 deletions packages/taiko-client/cmd/flags/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,21 @@ var (
Usage: "TaikoL1 contract `address`",
Required: true,
Category: commonCategory,
EnvVars: []string{"TAIKO_L1"},
EnvVars: []string{"TAIKO_L1_ADDRESS"},
}
TaikoL2Address = &cli.StringFlag{
Name: "taikoL2",
Usage: "TaikoL2 contract `address`",
Required: true,
Category: commonCategory,
EnvVars: []string{"TAIKO_L2"},
EnvVars: []string{"TAIKO_L2_ADDRESS"},
}
TaikoTokenAddress = &cli.StringFlag{
Name: "taikoToken",
Usage: "TaikoToken contract `address`",
Required: true,
Category: commonCategory,
EnvVars: []string{"TAIKO_TOKEN"},
EnvVars: []string{"TAIKO_TOKEN_ADDRESS"},
}

// Optional flags used by all client software.
Expand Down
8 changes: 4 additions & 4 deletions packages/taiko-client/driver/chain_syncer/blob/syncer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ func (s *BlobSyncerTestSuite) initProposer() {

s.Nil(prop.InitFromConfig(context.Background(), &proposer.Config{
ClientConfig: &rpc.ClientConfig{
L1Endpoint: os.Getenv("L1_NODE_WS_ENDPOINT"),
L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"),
L2EngineEndpoint: os.Getenv("L2_EXECUTION_ENGINE_AUTH_ENDPOINT"),
L1Endpoint: os.Getenv("L1_WS"),
L2Endpoint: os.Getenv("L2_WS"),
L2EngineEndpoint: os.Getenv("L2_AUTH"),
JwtSecret: string(jwtSecret),
TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")),
TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")),
Expand All @@ -202,7 +202,7 @@ func (s *BlobSyncerTestSuite) initProposer() {
ProposeInterval: 1024 * time.Hour,
MaxProposedTxListsPerEpoch: 1,
TxmgrConfigs: &txmgr.CLIConfig{
L1RPCURL: os.Getenv("L1_NODE_WS_ENDPOINT"),
L1RPCURL: os.Getenv("L1_WS"),
NumConfirmations: 0,
SafeAbortNonceTooLowCount: txmgr.DefaultBatcherFlagValues.SafeAbortNonceTooLowCount,
PrivateKey: common.Bytes2Hex(crypto.FromECDSA(l1ProposerPrivKey)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ func (s *ChainSyncerTestSuite) SetupTest() {

s.Nil(prop.InitFromConfig(context.Background(), &proposer.Config{
ClientConfig: &rpc.ClientConfig{
L1Endpoint: os.Getenv("L1_NODE_WS_ENDPOINT"),
L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"),
L1Endpoint: os.Getenv("L1_WS"),
L2Endpoint: os.Getenv("L2_WS"),
TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")),
TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")),
TaikoTokenAddress: common.HexToAddress(os.Getenv("TAIKO_TOKEN_ADDRESS")),
Expand All @@ -65,7 +65,7 @@ func (s *ChainSyncerTestSuite) SetupTest() {
MaxProposedTxListsPerEpoch: 1,
ExtraData: "test",
TxmgrConfigs: &txmgr.CLIConfig{
L1RPCURL: os.Getenv("L1_NODE_WS_ENDPOINT"),
L1RPCURL: os.Getenv("L1_WS"),
NumConfirmations: 0,
SafeAbortNonceTooLowCount: txmgr.DefaultBatcherFlagValues.SafeAbortNonceTooLowCount,
PrivateKey: common.Bytes2Hex(crypto.FromECDSA(l1ProposerPrivKey)),
Expand Down
10 changes: 5 additions & 5 deletions packages/taiko-client/driver/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
)

var (
l1Endpoint = os.Getenv("L1_NODE_WS_ENDPOINT")
l1BeaconEndpoint = os.Getenv("L1_NODE_HTTP_ENDPOINT")
l2Endpoint = os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT")
l2CheckPoint = os.Getenv("L2_EXECUTION_ENGINE_HTTP_ENDPOINT")
l2EngineEndpoint = os.Getenv("L2_EXECUTION_ENGINE_AUTH_ENDPOINT")
l1Endpoint = os.Getenv("L1_WS")
l1BeaconEndpoint = os.Getenv("L1_HTTP")
l2Endpoint = os.Getenv("L2_WS")
l2CheckPoint = os.Getenv("L2_HTTP")
l2EngineEndpoint = os.Getenv("L2_AUTH")
taikoL1 = os.Getenv("TAIKO_L1_ADDRESS")
taikoL2 = os.Getenv("TAIKO_L2_ADDRESS")
)
Expand Down
14 changes: 7 additions & 7 deletions packages/taiko-client/driver/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ func (s *DriverTestSuite) SetupTest() {
ctx, cancel := context.WithCancel(context.Background())
s.Nil(d.InitFromConfig(ctx, &Config{
ClientConfig: &rpc.ClientConfig{
L1Endpoint: os.Getenv("L1_NODE_WS_ENDPOINT"),
L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"),
L2EngineEndpoint: os.Getenv("L2_EXECUTION_ENGINE_AUTH_ENDPOINT"),
L1Endpoint: os.Getenv("L1_WS"),
L2Endpoint: os.Getenv("L2_WS"),
L2EngineEndpoint: os.Getenv("L2_AUTH"),
TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")),
TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")),
JwtSecret: string(jwtSecret),
Expand Down Expand Up @@ -296,9 +296,9 @@ func (s *DriverTestSuite) InitProposer() {

s.Nil(p.InitFromConfig(context.Background(), &proposer.Config{
ClientConfig: &rpc.ClientConfig{
L1Endpoint: os.Getenv("L1_NODE_WS_ENDPOINT"),
L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"),
L2EngineEndpoint: os.Getenv("L2_EXECUTION_ENGINE_AUTH_ENDPOINT"),
L1Endpoint: os.Getenv("L1_WS"),
L2Endpoint: os.Getenv("L2_WS"),
L2EngineEndpoint: os.Getenv("L2_AUTH"),
JwtSecret: string(jwtSecret),
TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")),
TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")),
Expand All @@ -309,7 +309,7 @@ func (s *DriverTestSuite) InitProposer() {
ProposeInterval: 1024 * time.Hour,
MaxProposedTxListsPerEpoch: 1,
TxmgrConfigs: &txmgr.CLIConfig{
L1RPCURL: os.Getenv("L1_NODE_WS_ENDPOINT"),
L1RPCURL: os.Getenv("L1_WS"),
NumConfirmations: 0,
SafeAbortNonceTooLowCount: txmgr.DefaultBatcherFlagValues.SafeAbortNonceTooLowCount,
PrivateKey: common.Bytes2Hex(crypto.FromECDSA(l1ProposerPrivKey)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source integration_test/l1_env.sh

cd ../protocol &&
forge script script/DeployOnL1.s.sol:DeployOnL1 \
--fork-url "$L1_NODE_HTTP_ENDPOINT" \
--fork-url "$L1_HTTP" \
--broadcast \
--ffi \
-vvvvv \
Expand Down
15 changes: 7 additions & 8 deletions packages/taiko-client/integration_test/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,17 @@ integration_test/deploy_l1_contract.sh
source integration_test/test_env.sh

# make sure environment variables are set
check_env "L1_NODE_HTTP_ENDPOINT"
check_env "L1_NODE_WS_ENDPOINT"
check_env "L2_EXECUTION_ENGINE_HTTP_ENDPOINT"
check_env "L2_EXECUTION_ENGINE_WS_ENDPOINT"
check_env "L2_EXECUTION_ENGINE_AUTH_ENDPOINT"
check_env "L1_HTTP"
check_env "L1_WS"
check_env "L2_HTTP"
check_env "L2_WS"
check_env "L2_AUTH"
check_env "TAIKO_L1_ADDRESS"
check_env "TAIKO_L2_ADDRESS"
check_env "TAIKO_TOKEN_ADDRESS"
check_env "TIMELOCK_CONTROLLER"
check_env "ROLLUP_ADDRESS_MANAGER_CONTRACT_ADDRESS"
check_env "GUARDIAN_PROVER_CONTRACT_ADDRESS"
check_env "GUARDIAN_PROVER_MINORITY_ADDRESS"
check_env "GUARDIAN_PROVER_CONTRACT"
check_env "GUARDIAN_PROVER_MINORITY"
check_env "L1_CONTRACT_OWNER_PRIVATE_KEY"
check_env "L1_SECURITY_COUNCIL_PRIVATE_KEY"
check_env "L1_PROPOSER_PRIVATE_KEY"
Expand Down
4 changes: 2 additions & 2 deletions packages/taiko-client/integration_test/l1_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export TAIKO_TOKEN_SYMBOL="TTKOt"
export TIER_PROVIDER="devnet"
export PAUSE_TAIKO_L1="false"
export PAUSE_BRIDGE="false"
export TAIKO_TOKEN=0x0000000000000000000000000000000000000000
export TAIKO_TOKEN_ADDRESS=0x0000000000000000000000000000000000000000
export SHARED_ADDRESS_MANAGER=0x0000000000000000000000000000000000000000
export PROPOSER=0x0000000000000000000000000000000000000000
export PROPOSER_ONE=0x0000000000000000000000000000000000000000
Expand All @@ -40,6 +40,6 @@ export L2_GENESIS_HASH=$(
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":0,"method":"eth_getBlockByNumber","params":["0x0", false]}' \
$L2_EXECUTION_ENGINE_HTTP_ENDPOINT | jq .result.hash | sed 's/\"//g'
$L2_HTTP | jq .result.hash | sed 's/\"//g'
)
echo "L2_GENESIS_HASH: $L2_GENESIS_HASH"
22 changes: 10 additions & 12 deletions packages/taiko-client/integration_test/test_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ export TAIKO_L1_ADDRESS=$(echo "$DEPLOYMENT_JSON" | jq '.taiko' | sed 's/\"//g')
export TAIKO_L2_ADDRESS=0x1670010000000000000000000000000000010001
export TAIKO_TOKEN_ADDRESS=$(echo "$DEPLOYMENT_JSON" | jq '.taiko_token' | sed 's/\"//g')
export TIMELOCK_CONTROLLER=$(echo "$DEPLOYMENT_JSON" | jq '.timelock_controller' | sed 's/\"//g')
export ROLLUP_ADDRESS_MANAGER_CONTRACT_ADDRESS=$(echo "$DEPLOYMENT_JSON" | jq '.rollup_address_manager' | sed 's/\"//g')
export GUARDIAN_PROVER_CONTRACT_ADDRESS=$(echo "$DEPLOYMENT_JSON" | jq '.guardian_prover' | sed 's/\"//g')
export GUARDIAN_PROVER_MINORITY_ADDRESS=$(echo "$DEPLOYMENT_JSON" | jq '.guardian_prover_minority' | sed 's/\"//g')
export GUARDIAN_PROVER_CONTRACT=$(echo "$DEPLOYMENT_JSON" | jq '.guardian_prover' | sed 's/\"//g')
export GUARDIAN_PROVER_MINORITY=$(echo "$DEPLOYMENT_JSON" | jq '.guardian_prover_minority' | sed 's/\"//g')
export L1_CONTRACT_OWNER_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
export L1_SECURITY_COUNCIL_PRIVATE_KEY=0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97
export L1_PROPOSER_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
Expand All @@ -21,21 +20,20 @@ export TREASURY=0x1670010000000000000000000000000000010001
export VERBOSITY=3

# show the integration test environment variables.
# L1_BEACON_HTTP_ENDPOINT=$L1_BEACON_HTTP_ENDPOINT
# L1_BEACON=$L1_BEACON
echo "RUN_TESTS=true
L1_NODE_HTTP_ENDPOINT=$L1_NODE_HTTP_ENDPOINT
L1_NODE_WS_ENDPOINT=$L1_NODE_WS_ENDPOINT
L1_HTTP=$L1_HTTP
L1_WS=$L1_WS
L2_SUGGESTED_FEE_RECIPIENT=$L2_SUGGESTED_FEE_RECIPIENT
L2_EXECUTION_ENGINE_HTTP_ENDPOINT=$L2_EXECUTION_ENGINE_HTTP_ENDPOINT
L2_EXECUTION_ENGINE_WS_ENDPOINT=$L2_EXECUTION_ENGINE_WS_ENDPOINT
L2_EXECUTION_ENGINE_AUTH_ENDPOINT=$L2_EXECUTION_ENGINE_AUTH_ENDPOINT
L2_HTTP=$L2_HTTP
L2_WS=$L2_WS
L2_AUTH=$L2_AUTH
TAIKO_L1_ADDRESS=$TAIKO_L1_ADDRESS
TAIKO_L2_ADDRESS=$TAIKO_L2_ADDRESS
TAIKO_TOKEN_ADDRESS=$TAIKO_TOKEN_ADDRESS
TIMELOCK_CONTROLLER=$TIMELOCK_CONTROLLER
ROLLUP_ADDRESS_MANAGER_CONTRACT_ADDRESS=$ROLLUP_ADDRESS_MANAGER_CONTRACT_ADDRESS
GUARDIAN_PROVER_CONTRACT_ADDRESS=$GUARDIAN_PROVER_CONTRACT_ADDRESS
GUARDIAN_PROVER_MINORITY_ADDRESS=$GUARDIAN_PROVER_MINORITY_ADDRESS
GUARDIAN_PROVER_CONTRACT=$GUARDIAN_PROVER_CONTRACT
GUARDIAN_PROVER_MINORITY=$GUARDIAN_PROVER_MINORITY
L1_CONTRACT_OWNER_PRIVATE_KEY=$L1_CONTRACT_OWNER_PRIVATE_KEY
L1_SECURITY_COUNCIL_PRIVATE_KEY=$L1_SECURITY_COUNCIL_PRIVATE_KEY
L1_PROPOSER_PRIVATE_KEY=$L1_PROPOSER_PRIVATE_KEY
Expand Down
20 changes: 10 additions & 10 deletions packages/taiko-client/internal/docker/docker_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ until cast chain-id --rpc-url "$L2_PROBE_URL" 2> /dev/null; do
done

L1_NODE_PORT=$(docker port l1_node | grep '0.0.0.0' | awk -F ':' '{print $2}')
export L1_NODE_HTTP_ENDPOINT=http://localhost:$L1_NODE_PORT
export L1_NODE_WS_ENDPOINT=ws://localhost:$L1_NODE_PORT
export L1_HTTP=http://localhost:$L1_NODE_PORT
export L1_WS=ws://localhost:$L1_NODE_PORT

export L2_EXECUTION_ENGINE_HTTP_ENDPOINT=http://localhost:$(docker port l2_node | grep "0.0.0.0" | awk -F ':' 'NR==1 {print $2}')
export L2_EXECUTION_ENGINE_WS_ENDPOINT=ws://localhost:$(docker port l2_node | grep "0.0.0.0" | awk -F ':' 'NR==2 {print $2}')
export L2_EXECUTION_ENGINE_AUTH_ENDPOINT=http://localhost:$(docker port l2_node | grep "0.0.0.0" | awk -F ':' 'NR==3 {print $2}')
export L2_HTTP=http://localhost:$(docker port l2_node | grep "0.0.0.0" | awk -F ':' 'NR==1 {print $2}')
export L2_WS=ws://localhost:$(docker port l2_node | grep "0.0.0.0" | awk -F ':' 'NR==2 {print $2}')
export L2_AUTH=http://localhost:$(docker port l2_node | grep "0.0.0.0" | awk -F ':' 'NR==3 {print $2}')
export JWT_SECRET=$DIR/nodes/jwt.hex

echo -e "L1_NODE PORTS: \n$(docker port l1_node)"
echo -e "L2_NODE PORTS: \n$(docker port l2_node)"

echo "L1_NODE_HTTP_ENDPOINT: $L1_NODE_HTTP_ENDPOINT"
echo "L1_NODE_WS_ENDPOINT: $L1_NODE_WS_ENDPOINT"
echo "L2_EXECUTION_ENGINE_HTTP_ENDPOINT: $L2_EXECUTION_ENGINE_HTTP_ENDPOINT"
echo "L2_EXECUTION_ENGINE_WS_ENDPOINT: $L2_EXECUTION_ENGINE_WS_ENDPOINT"
echo "L2_EXECUTION_ENGINE_AUTH_ENDPOINT: $L2_EXECUTION_ENGINE_AUTH_ENDPOINT"
echo "L1_HTTP: $L1_HTTP"
echo "L1_WS: $L1_WS"
echo "L2_HTTP: $L2_HTTP"
echo "L2_WS: $L2_WS"
echo "L2_AUTH: $L2_AUTH"
16 changes: 8 additions & 8 deletions packages/taiko-client/internal/testutils/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ func (s *ClientTestSuite) SetupTest() {
s.NotEmpty(jwtSecret)

rpcCli, err := rpc.NewClient(context.Background(), &rpc.ClientConfig{
L1Endpoint: os.Getenv("L1_NODE_WS_ENDPOINT"),
L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"),
L1Endpoint: os.Getenv("L1_WS"),
L2Endpoint: os.Getenv("L2_WS"),
TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")),
TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")),
TaikoTokenAddress: common.HexToAddress(os.Getenv("TAIKO_TOKEN_ADDRESS")),
GuardianProverMajorityAddress: common.HexToAddress(os.Getenv("GUARDIAN_PROVER_CONTRACT_ADDRESS")),
GuardianProverMinorityAddress: common.HexToAddress(os.Getenv("GUARDIAN_PROVER_MINORITY_ADDRESS")),
L2EngineEndpoint: os.Getenv("L2_EXECUTION_ENGINE_AUTH_ENDPOINT"),
GuardianProverMajorityAddress: common.HexToAddress(os.Getenv("GUARDIAN_PROVER_CONTRACT")),
GuardianProverMinorityAddress: common.HexToAddress(os.Getenv("GUARDIAN_PROVER_MINORITY")),
L2EngineEndpoint: os.Getenv("L2_AUTH"),
JwtSecret: string(jwtSecret),
})
s.Nil(err)
Expand Down Expand Up @@ -96,14 +96,14 @@ func (s *ClientTestSuite) SetupTest() {

_, err = rpcCli.TaikoToken.Transfer(
opts,
common.HexToAddress(os.Getenv("GUARDIAN_PROVER_MINORITY_ADDRESS")),
common.HexToAddress(os.Getenv("GUARDIAN_PROVER_MINORITY")),
new(big.Int).Div(proverBalance, common.Big2),
)
s.Nil(err)

_, err = rpcCli.TaikoToken.Transfer(
opts,
common.HexToAddress(os.Getenv("GUARDIAN_PROVER_CONTRACT_ADDRESS")),
common.HexToAddress(os.Getenv("GUARDIAN_PROVER_CONTRACT")),
new(big.Int).Div(proverBalance, common.Big2),
)
s.Nil(err)
Expand All @@ -122,7 +122,7 @@ func (s *ClientTestSuite) setAllowance(key *ecdsa.PrivateKey) {
log.Root(),
new(metrics.NoopTxMetrics),
txmgr.CLIConfig{
L1RPCURL: os.Getenv("L1_NODE_WS_ENDPOINT"),
L1RPCURL: os.Getenv("L1_WS"),
NumConfirmations: 0,
SafeAbortNonceTooLowCount: txmgr.DefaultBatcherFlagValues.SafeAbortNonceTooLowCount,
PrivateKey: common.Bytes2Hex(crypto.FromECDSA(key)),
Expand Down
12 changes: 6 additions & 6 deletions packages/taiko-client/pkg/rpc/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import (

func newTestClient(t *testing.T) *Client {
client, err := NewClient(context.Background(), &ClientConfig{
L1Endpoint: os.Getenv("L1_NODE_WS_ENDPOINT"),
L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"),
L1Endpoint: os.Getenv("L1_WS"),
L2Endpoint: os.Getenv("L2_WS"),
TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")),
TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")),
TaikoTokenAddress: common.HexToAddress(os.Getenv("TAIKO_TOKEN_ADDRESS")),
L2EngineEndpoint: os.Getenv("L2_EXECUTION_ENGINE_AUTH_ENDPOINT"),
L2EngineEndpoint: os.Getenv("L2_AUTH"),
JwtSecret: os.Getenv("JWT_SECRET"),
})

Expand All @@ -29,12 +29,12 @@ func newTestClient(t *testing.T) *Client {

func newTestClientWithTimeout(t *testing.T) *Client {
client, err := NewClient(context.Background(), &ClientConfig{
L1Endpoint: os.Getenv("L1_NODE_WS_ENDPOINT"),
L2Endpoint: os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"),
L1Endpoint: os.Getenv("L1_WS"),
L2Endpoint: os.Getenv("L2_WS"),
TaikoL1Address: common.HexToAddress(os.Getenv("TAIKO_L1_ADDRESS")),
TaikoL2Address: common.HexToAddress(os.Getenv("TAIKO_L2_ADDRESS")),
TaikoTokenAddress: common.HexToAddress(os.Getenv("TAIKO_TOKEN_ADDRESS")),
L2EngineEndpoint: os.Getenv("L2_EXECUTION_ENGINE_AUTH_ENDPOINT"),
L2EngineEndpoint: os.Getenv("L2_AUTH"),
JwtSecret: os.Getenv("JWT_SECRET"),
Timeout: 5 * time.Second,
})
Expand Down
4 changes: 2 additions & 2 deletions packages/taiko-client/pkg/rpc/dial_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestDialEngineClientWithBackoff(t *testing.T) {

client, err := DialEngineClientWithBackoff(
context.Background(),
os.Getenv("L2_EXECUTION_ENGINE_AUTH_ENDPOINT"),
os.Getenv("L2_AUTH"),
string(jwtSecret),
12*time.Second,
10,
Expand All @@ -38,7 +38,7 @@ func TestDialEngineClientWithBackoff(t *testing.T) {
func TestDialClientWithBackoff(t *testing.T) {
client, err := DialClientWithBackoff(
context.Background(),
os.Getenv("L2_EXECUTION_ENGINE_WS_ENDPOINT"),
os.Getenv("L2_WS"),
12*time.Second,
10,
)
Expand Down
4 changes: 2 additions & 2 deletions packages/taiko-client/proposer/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
)

var (
l1Endpoint = os.Getenv("L1_NODE_WS_ENDPOINT")
l2Endpoint = os.Getenv("L2_EXECUTION_ENGINE_HTTP_ENDPOINT")
l1Endpoint = os.Getenv("L1_WS")
l2Endpoint = os.Getenv("L2_HTTP")
taikoL1 = os.Getenv("TAIKO_L1_ADDRESS")
taikoL2 = os.Getenv("TAIKO_L2_ADDRESS")
taikoToken = os.Getenv("TAIKO_TOKEN_ADDRESS")
Expand Down
Loading

0 comments on commit 196b74e

Please sign in to comment.