Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ func (d *DebugAPI) TraceCall(
from,
to,
tx.Data(),
tx.SetCodeAuthorizations(),
tx.Value(),
tx.Gas(),
opts...,
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/holiman/uint256 v1.3.2
github.com/onflow/atree v0.11.0
github.com/onflow/cadence v1.8.3
github.com/onflow/flow-go v0.44.0-experimental-cadence-v1.8.3.0.20251111112227-097f521427a5
github.com/onflow/flow-go v0.44.0
github.com/onflow/flow-go-sdk v1.9.2
github.com/prometheus/client_golang v1.20.5
github.com/rs/cors v1.8.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,8 @@ github.com/onflow/flow-ft/lib/go/contracts v1.0.1 h1:Ts5ob+CoCY2EjEd0W6vdLJ7hLL3
github.com/onflow/flow-ft/lib/go/contracts v1.0.1/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A=
github.com/onflow/flow-ft/lib/go/templates v1.0.1 h1:FDYKAiGowABtoMNusLuRCILIZDtVqJ/5tYI4VkF5zfM=
github.com/onflow/flow-ft/lib/go/templates v1.0.1/go.mod h1:uQ8XFqmMK2jxyBSVrmyuwdWjTEb+6zGjRYotfDJ5pAE=
github.com/onflow/flow-go v0.44.0-experimental-cadence-v1.8.3.0.20251111112227-097f521427a5 h1:L09sNOfqIHAWD90psYCl6+sJYdx9RFDCt5IlYmgrSSY=
github.com/onflow/flow-go v0.44.0-experimental-cadence-v1.8.3.0.20251111112227-097f521427a5/go.mod h1:4A34mlMMd7usjw7e0r4VrltFpZRjhYkV+T+iecTbzO0=
github.com/onflow/flow-go v0.44.0 h1:I1P0t0+wUokyB4RHRLMGWy9QMf4jWg6EFcttKNtU0Rw=
github.com/onflow/flow-go v0.44.0/go.mod h1:4A34mlMMd7usjw7e0r4VrltFpZRjhYkV+T+iecTbzO0=
github.com/onflow/flow-go-sdk v1.9.2 h1:kMw3qShgLNIASHGMgoY+faTBQ+1MnzsNLAH+oxy9eiY=
github.com/onflow/flow-go-sdk v1.9.2/go.mod h1:qVuzMGXNJBMktKnIDKLjV0/k21P2XD39dOfMW+X5Bsc=
github.com/onflow/flow-nft/lib/go/contracts v1.3.0 h1:DmNop+O0EMyicZvhgdWboFG57xz5t9Qp81FKlfKyqJc=
Expand Down
1 change: 1 addition & 0 deletions services/requester/requester.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ func (e *EVM) dryRunTx(
from,
to,
tx.Data(),
tx.SetCodeAuthorizations(),
tx.Value(),
tx.Gas(),
opts...,
Expand Down
4 changes: 2 additions & 2 deletions tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ require (
github.com/goccy/go-json v0.10.4
github.com/onflow/cadence v1.8.3
github.com/onflow/crypto v0.25.3
github.com/onflow/flow-emulator v1.12.1-0.20251112150210-ab3ddcde0cdc
github.com/onflow/flow-emulator v1.13.1-0.20251120165439-67cc8cd69668
github.com/onflow/flow-evm-gateway v0.0.0-20240201154855-4d4d3d3f19c7
github.com/onflow/flow-go v0.44.0-experimental-cadence-v1.8.3.0.20251111112227-097f521427a5
github.com/onflow/flow-go v0.44.0
github.com/onflow/flow-go-sdk v1.9.2
github.com/rs/zerolog v1.34.0
github.com/stretchr/testify v1.11.1
Expand Down
8 changes: 4 additions & 4 deletions tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -812,16 +812,16 @@ github.com/onflow/flow-core-contracts/lib/go/contracts v1.9.2 h1:mkd1NSv74+OnCHw
github.com/onflow/flow-core-contracts/lib/go/contracts v1.9.2/go.mod h1:jBDqVep0ICzhXky56YlyO4aiV2Jl/5r7wnqUPpvi7zE=
github.com/onflow/flow-core-contracts/lib/go/templates v1.9.2 h1:semxeVLwC6xFG1G/7egUmaf7F1C8eBnc7NxNTVfBHTs=
github.com/onflow/flow-core-contracts/lib/go/templates v1.9.2/go.mod h1:twSVyUt3rNrgzAmxtBX+1Gw64QlPemy17cyvnXYy1Ug=
github.com/onflow/flow-emulator v1.12.1-0.20251112150210-ab3ddcde0cdc h1:nNjfjEurFv00RqTanfjpGGCZdPkHyrLzH8UunLwUkbI=
github.com/onflow/flow-emulator v1.12.1-0.20251112150210-ab3ddcde0cdc/go.mod h1:clmz8n+gWjzcZwNBpElNY/W/SG7U628WGo6/x/9BhvI=
github.com/onflow/flow-emulator v1.13.1-0.20251120165439-67cc8cd69668 h1:040Xf/99mXVDfsuPxIoaiMTFlxW7fkMJ0gq3y8Hktlk=
github.com/onflow/flow-emulator v1.13.1-0.20251120165439-67cc8cd69668/go.mod h1:+MBvYoRM65uyW1+qLA324l4SB6FD3UTfFU/9caBm3W0=
github.com/onflow/flow-evm-bridge v0.1.0 h1:7X2osvo4NnQgHj8aERUmbYtv9FateX8liotoLnPL9nM=
github.com/onflow/flow-evm-bridge v0.1.0/go.mod h1:5UYwsnu6WcBNrwitGFxphCl5yq7fbWYGYuiCSTVF6pk=
github.com/onflow/flow-ft/lib/go/contracts v1.0.1 h1:Ts5ob+CoCY2EjEd0W6vdLJ7hLL3SsEftzXG2JlmSe24=
github.com/onflow/flow-ft/lib/go/contracts v1.0.1/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A=
github.com/onflow/flow-ft/lib/go/templates v1.0.1 h1:FDYKAiGowABtoMNusLuRCILIZDtVqJ/5tYI4VkF5zfM=
github.com/onflow/flow-ft/lib/go/templates v1.0.1/go.mod h1:uQ8XFqmMK2jxyBSVrmyuwdWjTEb+6zGjRYotfDJ5pAE=
github.com/onflow/flow-go v0.44.0-experimental-cadence-v1.8.3.0.20251111112227-097f521427a5 h1:L09sNOfqIHAWD90psYCl6+sJYdx9RFDCt5IlYmgrSSY=
github.com/onflow/flow-go v0.44.0-experimental-cadence-v1.8.3.0.20251111112227-097f521427a5/go.mod h1:4A34mlMMd7usjw7e0r4VrltFpZRjhYkV+T+iecTbzO0=
github.com/onflow/flow-go v0.44.0 h1:I1P0t0+wUokyB4RHRLMGWy9QMf4jWg6EFcttKNtU0Rw=
github.com/onflow/flow-go v0.44.0/go.mod h1:4A34mlMMd7usjw7e0r4VrltFpZRjhYkV+T+iecTbzO0=
github.com/onflow/flow-go-sdk v1.9.2 h1:kMw3qShgLNIASHGMgoY+faTBQ+1MnzsNLAH+oxy9eiY=
github.com/onflow/flow-go-sdk v1.9.2/go.mod h1:qVuzMGXNJBMktKnIDKLjV0/k21P2XD39dOfMW+X5Bsc=
github.com/onflow/flow-nft/lib/go/contracts v1.3.0 h1:DmNop+O0EMyicZvhgdWboFG57xz5t9Qp81FKlfKyqJc=
Expand Down
63 changes: 61 additions & 2 deletions tests/web3js/eth_eip_7702_sending_transactions_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ const { encodeFunctionData } = require('viem')
const { privateKeyToAccount } = require('viem/accounts')
const { relay, walletClient, publicClient } = require('./viem/config')
const { abi, bytecode } = require('./viem/contract')
const conf = require('./config')
const helpers = require('./helpers')
const web3 = conf.web3

// eoa is 0xfe847d8bebe46799FCE83eB52f38Ef4b907996A6
const eoa = privateKeyToAccount('0x3a0901a19a40f2041727fe1a973137ad917fc925ce716983e1376e927658b12e')
Expand Down Expand Up @@ -46,6 +49,33 @@ it('should send transactions with relay account', async () => {
contractAddress,
})

let txArgs = {
from: relay.address,
to: eoa.address,
data: encodeFunctionData({
abi,
functionName: 'initialize',
}),
authorizationList: [
{
address: authorization.address,
chainId: web3.utils.numberToHex(authorization.chainId),
nonce: web3.utils.numberToHex(authorization.nonce),
r: authorization.r,
s: authorization.s,
yParity: web3.utils.numberToHex(authorization.yParity)
}
]
}

let response = await helpers.callRPCMethod(
'eth_estimateGas',
[txArgs, 'latest']
)
assert.equal(response.status, 200)
assert.isDefined(response.body)
assert.equal(web3.utils.hexToNumber(response.body.result), 63779n)

// 2. Designate the Contract on the EOA, and invoke the `initialize` function.
let hash = await walletClient.sendTransaction({
authorizationList: [authorization], // 3. Pass the Authorization as a parameter.
Expand All @@ -54,6 +84,7 @@ it('should send transactions with relay account', async () => {
functionName: 'initialize',
}),
to: eoa.address,
gas: web3.utils.hexToNumber(response.body.result)
})

await new Promise((res) => setTimeout(() => res(), 1500))
Expand Down Expand Up @@ -108,14 +139,42 @@ it('should send self-executing transactions', async () => {
executor: 'self',
})

let txArgs = {
from: relay.address,
to: relay.address,
data: encodeFunctionData({
abi,
functionName: 'initialize',
}),
authorizationList: [
{
address: authorization.address,
chainId: web3.utils.numberToHex(authorization.chainId),
nonce: web3.utils.numberToHex(authorization.nonce),
r: authorization.r,
s: authorization.s,
yParity: web3.utils.numberToHex(authorization.yParity)
}
]
}

let response = await helpers.callRPCMethod(
'eth_estimateGas',
[txArgs, 'latest']
)
assert.equal(response.status, 200)
assert.isDefined(response.body)
assert.equal(web3.utils.hexToNumber(response.body.result), 63779n)

// 2. Designate the Contract on the EOA, and invoke the `initialize` function.
let hash = await walletClient.sendTransaction({
authorizationList: [authorization], // 3. Pass the Authorization as a parameter.
data: encodeFunctionData({
abi,
functionName: 'initialize',
}),
to: walletClient.account.address,
to: relay.address,
gas: web3.utils.hexToNumber(response.body.result),
})

await new Promise((res) => setTimeout(() => res(), 1500))
Expand Down Expand Up @@ -150,7 +209,7 @@ it('should send self-executing transactions', async () => {
abi,
functionName: 'ping',
}),
to: walletClient.account.address,
to: relay.address,
})

await new Promise((res) => setTimeout(() => res(), 1500))
Expand Down
1 change: 1 addition & 0 deletions tests/web3js/eth_pectra_upgrade_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ it('should not perform contract writes with relay account before Pectra', async
address: eoa.address,
authorizationList: [authorization], // 3. Pass the Authorization as a parameter.
functionName: 'initialize',
gas: 63779n
})
} catch (e) {
errMsg = e.details
Expand Down