Deployment Failed :invalid sender.
mo-xiaoxi opened this issue · 4 comments
Hello, thanks for sharing your tools. I followed your setup steps to configure, but found a deployment error. Can I make any changes to complete the deployment.
Run on MacOS.
# moxiaoxi @ 192 in ~/Desktop/pancake-bakery-arbitrage-main [12:12:52]
$ node -v
v14.17.0
# moxiaoxi @ 192 in ~/Desktop/pancake-bakery-arbitrage-main [12:13:48]
$ truffle version
Truffle v5.3.7 (core: 5.3.7)
Solidity - >=0.6.6 <0.8.0 (solc-js)
Node v14.17.0
Web3.js v1.3.6
$ truffle migrate --network mainnet
Compiling your contracts...
===========================
✔ Fetching solc version list from solc-bin. Attempt #1
> Everything is up to date, there is nothing to compile.
Starting migrations...
======================
> Network name: 'mainnet'
> Network id: 56
> Block gas limit: 60000000 (0x3938700)
1_initial_migration.js
======================
Deploying 'Migrations'
----------------------
Error: *** Deployment Failed ***
"Migrations" -- invalid sender.
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/deployer/src/deployment.js:365:1
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at Migration._deploy (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:74:1)
at Migration._load (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:61:1)
at Migration.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:212:1)
at Object.runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:150:1)
at Object.runFrom (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:110:1)
at Object.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:87:1)
at runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:258:1)
at Object.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:223:1)
at Command.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/command.js:147:1)
Truffle v5.3.7 (core: 5.3.7)
Node v14.17.0
@mo-xiaoxi Thanks for raising this. Could you make sure that your private key is set in .env file and that private key is the existing private key of your BSC account?? Even if those are correct but migration doesn't work, you may need to use remix instead of Truffle for deployment because https://bsc-dataseed.binance.org/ endpoint might not be working for deployment. Please try and let me know how it goes. Thanks!!
Okay, I will try to use remix instead of Truffle. Have you deployed this environment with Truffle?
@mo-xiaoxi sorry I don't remember I have deployed this exact code with Truffle or not, but at least deploying with Remix must work for BSC. Or you would try another https endpoint to deploy a code for BSC. Either way can work. Thanks.
@mo-xiaoxi I published the updated article. If you upgrade truffle/hdwallet-provider above 2.x.x that issue must be gone.
https://yuyasugano.medium.com/arbitrage-party-between-pancakeswap-and-bakeryswap-apeswap-b055af13e4fc