Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add eth shanghai test #44

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion network/config/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"BLOCKLIST": 0,
"ETH_IST": 0,
"VIP214": 0,
"FINALITY": 0
"FINALITY": 0,
"ETH_SH": 0
},
"accounts": [
{
Expand Down
51 changes: 51 additions & 0 deletions test/evm/compatability.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { ThorWallet } from '../../src/wallet'
import {
SimpleCounterParis__factory as ParisCounter,
SimpleCounterShanghai__factory as ShanghaiCounter,
} from '../../typechain-types'
import { pollReceipt } from '../../src/transactions'

/**
* @group opcodes
* @group evm
*/
describe('fork contract tests', () => {
const wallet: ThorWallet = ThorWallet.withFunds()

const counters = [
{
countrct: ParisCounter,
name: 'Paris',
},
{
countrct: ShanghaiCounter,
name: 'Shanghai',
},
]

counters.forEach((counter) => {
it.e2eTest(
`should be able to deploy a ${counter.name} contract`,
'all',
async () => {
const contract = await wallet.deployContract(
counter.countrct.bytecode,
counter.countrct.abi,
)

const startValue = await contract.read
.getCounter()
.then((r) => r[0])

expect(startValue).toBe(0n)
const increment = await contract.transact.incrementCounter()
await pollReceipt(increment.id)

const endValue = await contract.read
.getCounter()
.then((r) => r[0])
expect(endValue).toBe(1n)
},
)
})
})
28 changes: 0 additions & 28 deletions test/evm/paris/simple-paris.test.ts

This file was deleted.

Loading