fix: HRC20 burn/burnFrom BNish type and BridgeToken devnet multisig signer - #78
Open
D2758695161 wants to merge 1 commit into
Open
fix: HRC20 burn/burnFrom BNish type and BridgeToken devnet multisig signer#78D2758695161 wants to merge 1 commit into
D2758695161 wants to merge 1 commit into
Conversation
…tisig signer Bug fixes: 1. HRC20.burn() and HRC20.burnFrom() parameters were typed as 'number' but should accept BNish (BN|string|bigint|Arrayish) per the README docs. Added Promise<Transaction> return types. 2. BridgeToken constructor always set hmyMasterWallet signer to MAINNET_MULTISIG_WALLET regardless of network. Fixed to use DEVNET_MULTISIG_WALLET for devnet.
2 tasks
Author
|
👋 Just checking in on this PR. Happy to make any adjustments if needed. Ready for merge whenever you are! |
Author
|
👋 Hi! Just bumping this PR. All ready for merge - let me know if you need any changes! 🦞 |
Author
Description
Fixed two bugs in the Harmony Marketplace SDK:
Bug 1: HRC20 burn/burnFrom parameter type mismatch
The burn() and burnFrom() methods in HRC20 class had their amount parameter typed as number, but the HRC20 standard and the SDK README documentation specify that amounts should accept BNish type (BN | Arrayish | bigint | number).
Before:
After:
Also added missing Promise return type annotations.
Bug 2: BridgeToken devnet multisig signer always uses mainnet address
In the BridgeToken constructor, hmyMasterWallet.setSigner() was always called with MAINNET_MULTISIG_WALLET regardless of whether the network was mainnet or devnet.
Before:
After:
Bounty claim: This PR addresses the coding errors bug bounty for Harmony Marketplace SDK (harmony-one/bounties#125).
Payment address for bounty: 0xaae0101ac77a2e4e0ea826eb4d309374f029b0a6