Skip to content

Commit 5a44407

Browse files
committed
fix issues with eip 7702 impl
1 parent 0ef15ea commit 5a44407

File tree

21 files changed

+237
-207
lines changed

21 files changed

+237
-207
lines changed

apps/remix-ide-e2e/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"npm": "^6.14.15"
77
},
88
"dependencies": {
9-
"ethers": "^6.13.7",
9+
"ethers": "beta-eip-7702",
1010
"@openzeppelin/contracts": "^5.0.2",
1111
"@openzeppelin/contracts-upgradeable": "^5.0.2",
1212
"@openzeppelin/upgrades-core": "^1.30.0",
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
'use strict'
2+
3+
import { NightwatchBrowser } from 'nightwatch'
4+
import init from '../helpers/init'
5+
6+
module.exports = {
7+
'@disabled': true,
8+
before: function (browser: NightwatchBrowser, done: VoidFunction) {
9+
init(browser, done)
10+
},
11+
'Should activate delegation and make a transaction to the authority address #group1': function (browser: NightwatchBrowser) {
12+
let addressDelegate
13+
browser
14+
.clickLaunchIcon('udapp')
15+
.switchEnvironment('vm-pectra')
16+
.addFile('delegate.sol', { content: delegate })
17+
.clickLaunchIcon('solidity')
18+
.setSolidityCompilerVersion('soljson-v0.8.24+commit.e11b9ed9.js')
19+
.clickLaunchIcon('solidity')
20+
.verifyContracts(['TestDelegate'])
21+
.clickLaunchIcon('udapp')
22+
.selectContract('Simple7702Account')
23+
.createContract('')
24+
.perform((done) => {
25+
browser.getAddressAtPosition(0, (address) => {
26+
addressDelegate = delegate
27+
})
28+
})
29+
.click('*[data-id="create-delegation-authorization"]')
30+
.setValue('*[data-id="create-delegation-authorization-input"]', addressDelegate)
31+
.modalFooterOKClick('udapp')
32+
.waitForElementContainsText('*[data-id="terminalJournal"]', 'This account will be running the code located at')
33+
.clickInstance(1)
34+
.clickFunction('entryPoint - call (not payable)')
35+
.verifyCallReturnValue('0x5B38Da6a701c568545dCfcB03FcB875f56beddC4', ['0:address: 0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108'])
36+
}
37+
}
38+
39+
const delegate = `import "https://github.com/eth-infinitism/account-abstraction/blob/v0.8.0/contracts/accounts/Simple7702Account.sol";`

libs/ghaction-helper/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"@ethereum-waffle/chai": "^3.4.4",
2828
"@remix-project/remix-simulator": "^0.2.68",
2929
"chai": "^4.3.7",
30-
"ethers": "^6.13.7",
30+
"ethers": "beta-eip-7702",
3131
"web3": "^4.1.1"
3232
},
3333
"types": "./src/index.d.ts",

libs/remix-analyzer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"@remix-project/remix-astwalker": "^0.0.98",
2929
"@remix-project/remix-lib": "^0.5.75",
3030
"async": "^2.6.2",
31-
"ethers": "^6.13.7",
31+
"ethers": "beta-eip-7702",
3232
"ethjs-util": "^0.1.6",
3333
"string-similarity": "^4.0.4",
3434
"web3": "^4.1.1"

libs/remix-astwalker/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"@remix-project/remix-lib": "^0.5.75",
4141
"@types/tape": "^4.2.33",
4242
"async": "^2.6.2",
43-
"ethers": "^6.13.7",
43+
"ethers": "beta-eip-7702",
4444
"ethjs-util": "^0.1.6",
4545
"nyc": "^13.3.0",
4646
"string-similarity": "^4.0.4",

libs/remix-debug/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"color-support": "^1.1.3",
3636
"commander": "^9.4.1",
3737
"deep-equal": "^1.0.1",
38-
"ethers": "^6.13.7",
38+
"ethers": "beta-eip-7702",
3939
"ethjs-util": "^0.1.6",
4040
"express-ws": "^4.0.0",
4141
"merge": "^2.1.1",

libs/remix-lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@ethereumjs/util": "^10.0.0-rc.1",
2121
"async": "^2.1.2",
2222
"create-hash": "^1.2.0",
23-
"ethers": "^6.13.7",
23+
"ethers": "beta-eip-7702",
2424
"ethjs-util": "^0.1.6",
2525
"events": "^3.0.0",
2626
"from-exponential": "1.1.1",

libs/remix-lib/src/execution/txRunner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22
import { EventManager } from '../eventManager'
3-
import { AuthorizationList } from '@ethereumjs/common'
3+
import { EOACode7702AuthorizationList } from '@ethereumjs/util'
44
/*
55
* A type that represents a `0x`-prefixed hex string.
66
*/
@@ -17,7 +17,7 @@ export type Transaction = {
1717
useCall?: boolean,
1818
timestamp?: number,
1919
signed?: boolean,
20-
authorizationList?: AuthorizationList
20+
authorizationList?: EOACode7702AuthorizationList
2121
type?: '0x1' | '0x2' | '0x4'
2222
}
2323

libs/remix-lib/src/execution/txRunnerVM.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export class TxRunnerVM {
136136
data: hexToBytes(data as PrefixedHexString),
137137
authorizationList: authorizationList
138138
}, { common: this.commonContext }).sign(account.privateKey)
139-
} if (!EIP1559) {
139+
} else if (!EIP1559) {
140140
tx = createLegacyTx({
141141
nonce: useCall ? this.nextNonceForCall : res.nonce,
142142
gasPrice: '0x1',

libs/remix-lib/src/helpers/eip-7702.ts

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)