You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add default accounts with balance into chain spec for testing (used to deploy uniswap contract, erc20 token contract ...etc)
Modify frontier/template/node/src/chain_spec.rs
fn testnet_genesis((...)// Alice
vm_genesis.insert(H160::from_str(&"0x1BbE5edc5Caabf4517e40b766D64c3DEd86822Df").unwrap(),ETHAccount{nonce:U256::zero(),balance:"0x115eec47f6cf7e35000000".into(),// 21M Etherstorage:BTreeMap::new(),code:[].into(),});// Bob
vm_genesis.insert(H160::from_str(&"0x987652e1C2B3B953354A43171063499DCE16dC8f").unwrap(),ETHAccount{nonce:U256::zero(),balance:"0x115eec47f6cf7e35000000".into(),// 21M Etherstorage:BTreeMap::new(),code:[].into(),});// Charlie
vm_genesis.insert(H160::from_str(&"0x9f0764D2027c25aC68F341CA568BC3D51aab57A6").unwrap(),ETHAccount{nonce:U256::zero(),balance:"0x115eec47f6cf7e35000000".into(),// 21M Etherstorage:BTreeMap::new(),code:[].into(),});(...)}
Reproduce issue in local node
Prepare local chain: https://github.com/ParaState/frontier/
Test steps
Deploy ERC20 token: https://github.com/second-state/how_to_deploy_uniswap
因為完整 script 我實際測試在 link token 跟 factory 的時候會有問題, 所以這邊只會用到 deploy erc20 token 的部分
Follow README.md in how_to_deploy_uniswap
https://github.com/second-state/how_to_deploy_uniswap/blob/master/installation_data.json#L2-L11
https://github.com/second-state/how_to_deploy_uniswap/blob/master/uniswap_v1/deploy_uniswap_v1.js#L31-L92
將這之後關於 uniswap 的部分註解掉, 只做到 deploy Alice and Bob 這兩種 ERC20 token
cd how_to_deploy_uniswap/uniswap_v1 node deploy_uniswap_v1.js
Deploy uniswap v1: https://github.com/second-state/parastate-setup
透過 Browser 點開 parastate-setup/html/index.html, 直接在 UI 上操作 deploy uniswap, 到 Instantiate ERC20 Token 即可
Test addLiquidity by script: https://github.com/second-state/parastate-setup/blob/main/js/diagnose_invalid_jump_error.js#L3-L22
將以上測試 code 貼到 browser 開發人員工具中的 console (記得替換 uniswap_exchange_address 成透過 UI 操作過程中得到的), Enter 送出即可確認到錯誤訊息
使用 official frontier: https://github.com/paritytech/frontier
123
pallet_evm::GenesisAccount
而非我們 rename 的ETHAccount
The text was updated successfully, but these errors were encountered: