简体   繁体   中英

Possible to deploy contract to polygon with Ledger?

I'm trying to deploy a contract to Polygon using a Ledger device thru Truffle. However, the signature returned is invalid because it appears ledger wraps the chainID at 127.

https://github.com/LedgerHQ/ledgerjs-legacy/blob/6d655aa89b748e50ae15c0cfb30c08f2215f6d84/packages/web3-subprovider/src/index.js#L143

I've mostly duplicated this sample. I get the signature correctly, but then truffle (correctly) points out that the signature is no good because of the bad v parameter.

Has anyone successfully deployed a contract on Polygon using Ledger?

Figured it out - the problem was I was trying to use ethers.js LedgerSigner , which uses out-of-date versions of the ledger libraries.

Removing that library, wrote my own LedgerSigner with latest ledger libraries fixed that issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM