# 切换不同Chain步骤 来自scroll test net部署后小结 Deploy SoulWallet to a new chain: For internal enineering document. 1.Set the destination chain network and add TestETH/USDT token contract to you MetaMask(deploy tool). 准备:获取要迁移的目标链的测试ETH和USDT到测试用钱包(一般都会部署这两个token合约)。 2.Clone the main branch of SoulWallet contract, add new network to hardhat config. 获取SoulWallet合约的最新稳定发布版分支代码,本地hardhat增加一项网络配置(endpoint,scan url等)。 3.Deploy tool contract and get the onchain address: WETH contract or other ERC20 contract. 部署必要的工具合约,例如WETH的铸造合约或者其他。 entrypoint部署,依赖工厂合约(create2),需要不同链的支持 4.Adjust the wallet contract gas limitation and other dependence param, local test 插件端调整gas计算方式和其他依赖,本地测试(@robbie补)优先级和max设置为一致,看链对1559支持情况? 待优化(更节省gas),codefi接口获取最新gas bundler需要新链支持的协议,做配置修改,测试(@cejay补) 当下模式(会升级),需要web3.js的自定义函数,chainId更新,gasfee 参数调整为1 5.Deploy the wallet contract to TestNet with hardhat 部署钱包合约到新链(需要EVM兼容) 6.Set the contract address on new chain to a new bundler server named new-chain-name-bunlder and start service. 设置新钱包合约地址到bundler的相关配置,需要bunlder也配置化?(@cejay补吧。。哈哈) 地址切换写死,后面不同链,不同bunlder(需要思考bundler方案) 7.Install new Chrome plugin of SoulWallet, select new chain(to be dev) and create a new contract wallet. 获取最新稳定版SoulWallet Plugin代码,build and install 8.Try to activate and set guardians to recovery your contract wallet on new chain. 测试创建、激活和恢复场景