Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
shunkakinoki committed Mar 3, 2025
1 parent a6674c1 commit 67ba149
Showing 1 changed file with 0 additions and 64 deletions.
64 changes: 0 additions & 64 deletions estimator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,70 +381,6 @@ func TestEstimateSimpleSequenceTransactionNonDeployedWallet(t *testing.T) {
assert.LessOrEqual(t, receipt.GasUsed, estimated)
assert.Less(t, estimated-receipt.GasUsed, uint64(25000))
})

// t.Run("v3", func(t *testing.T) {
// rand.Seed(time.Now().UnixNano())

// wallet, err := testChain.V3DummySequenceWallet(rand.Uint64(), true)
// assert.NoError(t, err)

// isDeployed, err := wallet.IsDeployed()
// assert.NoError(t, err)
// assert.False(t, isDeployed)

// callmockContract := testChain.UniDeploy(t, "WALLET_CALL_RECV_MOCK", 0)

// wallet2, err := testChain.V3DummySequenceWallet(1)
// assert.NoError(t, err)

// clearData, err := callmockContract.Encode("testCall", big.NewInt(0), ethcoder.MustHexDecode("0x"))
// assert.NoError(t, err)
// testutil.SignAndSend(t, wallet2, callmockContract.Address, clearData)

// data := make([]byte, 32)
// rand.Read(data)

// calldata, err := callmockContract.Encode("testCall", big.NewInt(771), data)
// assert.NoError(t, err)

// txs := sequence.Transactions{
// &sequence.Transaction{
// To: callmockContract.Address,
// Data: calldata,
// },
// }

// estimator := sequence.NewEstimator()
// estimated, err := estimator.Estimate(context.Background(), testChain.Provider, wallet.Address(), wallet.GetWalletConfig(), wallet.GetWalletContext(), txs)
// assert.NoError(t, err)

// err = testChain.DeploySequenceWallet(wallet)
// assert.NoError(t, err)
// isDeployed, err = wallet.IsDeployed()
// assert.NoError(t, err)
// assert.True(t, isDeployed)

// assert.NoError(t, err)
// assert.NotZero(t, estimated)
// assert.Equal(t, 1, txs[0].GasLimit.Cmp(big.NewInt(0)))

// signed, err := wallet.SignTransactions(context.Background(), txs)
// assert.NoError(t, err)

// _, _, wait, err := wallet.SendTransactions(context.Background(), signed)
// assert.NoError(t, err)

// receipt, err := wait(context.Background())
// assert.NoError(t, err)

// ret, err := testutil.ContractQuery(testChain.Provider, callmockContract.Address, "lastValA()", "uint256", nil)
// assert.NoError(t, err)
// assert.Len(t, ret, 1)
// assert.Equal(t, "771", ret[0])

// assert.LessOrEqual(t, receipt.GasUsed, estimated)
// assert.Less(t, estimated-receipt.GasUsed, uint64(25000))
// })
}

func TestEstimateSimpleSequenceTransactionWithStubConfig(t *testing.T) {
Expand Down

0 comments on commit 67ba149

Please sign in to comment.