Skip to content

Commit

Permalink
fix(synthesizer): example env and finalize for new path
Browse files Browse the repository at this point in the history
SonYoungsung committed Jan 23, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 674fca8 commit 1d3b3d6
Showing 173 changed files with 26,494 additions and 995 deletions.
32 changes: 32 additions & 0 deletions packages/frontend/synthesizer/examples/browser.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!doctype html>
<html>

<head>
<title>EthereumJS Browser Examples</title>
<script src="./runCode.ts" type="module"></script>
</head>

<body style="padding:50px; font-family: Arial, Helvetica, sans-serif;">
<h1>EVM | @ethereumjs/evm</h1>
Basic usage of this library in the browser (using <a href="https://github.com/vitejs/vite" target="_blank">Vite</a>)

<h3>Run the Example</h3>
<ol>
<li>Go to the library root directory (packages/[LIBRARY_NAME]/)</li>
<li>Build "dist" folder with: npm run build</li>
<li>Start Vite development server with: npx vite</li>
<li>Open the example URL in the browser (http://localhost:5173/examples/browser.html)</li>
<li>Open the development console (e.g. Chrome Developer Tools)</li>
<li>See example results and play with the code</li>
</ol>

<h3>Interactive CLI</h3>
<ol>
<li>Open the "Sources" or "Debugger" tab in the browser development console</li>
<li>Eventually reload the page, set a breakpoint within the referenced TypeScript .ts file</li>
<li>Now you can use the debugger and play with and change the imported EthereumJS code</li>
</ol>

</body>

</html>
Original file line number Diff line number Diff line change
@@ -6,8 +6,8 @@
import { Account, Address, hexToBytes } from "@ethereumjs/util/index.js"
import { keccak256 } from 'ethereum-cryptography/keccak'

import { createEVM } from '../../../src/constructors.js'
import { finalize } from '../../../src/tokamak/core/finalize.js'
import { createEVM } from '../../src/constructors.js'
import { finalize } from '../../src/tokamak/core/finalize.js'

// ERC20 contract bytecode
const contractCode = hexToBytes(
Binary file added packages/frontend/synthesizer/libs.zip
Binary file not shown.
4 changes: 4 additions & 0 deletions packages/frontend/synthesizer/libs/mpt/.c8rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../../config/.c8rc.json",
"include": ["src/**/*.ts"]
}
14 changes: 14 additions & 0 deletions packages/frontend/synthesizer/libs/mpt/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
extends: '../../config/eslint.cjs',
parserOptions: {
project: ['./tsconfig.lint.json'],
},
overrides: [
{
files: ['benchmarks/*.ts', 'examples/**/*'],
rules: {
'no-console': 'off',
},
},
],
}
2 changes: 2 additions & 0 deletions packages/frontend/synthesizer/libs/mpt/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
benchmarks/*.js
MY_TRIE_DB_LOCATION
3 changes: 3 additions & 0 deletions packages/frontend/synthesizer/libs/mpt/.gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "test/jsonTests"]
path = test/jsonTests
url = https://github.com/ethereum/tests
2 changes: 2 additions & 0 deletions packages/frontend/synthesizer/libs/mpt/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test/
src/
6 changes: 6 additions & 0 deletions packages/frontend/synthesizer/libs/mpt/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
.vscode
dist
.nyc_output
*.json
docs
721 changes: 721 additions & 0 deletions packages/frontend/synthesizer/libs/mpt/CHANGELOG.md

Large diffs are not rendered by default.

Loading

0 comments on commit 1d3b3d6

Please sign in to comment.