Skip to content

Commit

Permalink
fix ethers6
Browse files Browse the repository at this point in the history
  • Loading branch information
yann300 committed Sep 13, 2024
1 parent c7f6932 commit e97d280
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 5 additions & 0 deletions libs/remix-simulator/src/methods/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export class Web3Accounts {

methods (): Record<string, unknown> {
return {
eth_requestAccounts: this.eth_requestAccounts.bind(this),
eth_accounts: this.eth_accounts.bind(this),
eth_getBalance: this.eth_getBalance.bind(this),
eth_sign: this.eth_sign.bind(this),
Expand All @@ -85,6 +86,10 @@ export class Web3Accounts {
}
}

eth_requestAccounts (_payload, cb) {
return cb(null, Object.keys(this.accounts))
}

eth_accounts (_payload, cb) {
return cb(null, Object.keys(this.accounts))
}
Expand Down
10 changes: 4 additions & 6 deletions libs/remix-simulator/src/methods/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ export class Transactions {

const txBlock = this.vmContext.blockByTxHash[receipt.transactionHash]
const tx = this.vmContext.txByHash[receipt.transactionHash]

// TODO: params to add later
const r: Record<string, unknown> = {
blockHash: bytesToHex(txBlock.hash()),
Expand All @@ -322,11 +321,10 @@ export class Transactions {
input: receipt.input,
nonce: bigIntToHex(tx.nonce),
transactionIndex: this.TX_INDEX,
value: bigIntToHex(tx.value)
// "value":"0xf3dbb76162000" // 4290000000000000
// "v": "0x25", // 37
// "r": "0x1b5e176d927f8e9ab405058b2d2457392da3e20f328b16ddabcebc33eaac5fea",
// "s": "0x4ba69724e8f69de52f0125ad8b3c5c2cef33019bac3249e2c0a2192766d1721c"
value: bigIntToHex(tx.value),
v: bigIntToHex(tx.v),
r: bigIntToHex(tx.r),
s: bigIntToHex(tx.s)
}

if (receipt.to) {
Expand Down

0 comments on commit e97d280

Please sign in to comment.