Last active
October 7, 2023 13:51
-
-
Save dcb9/ec6cd7f58a8af2941955114971ac0f23 to your computer and use it in GitHub Desktop.
Revisions
-
Du, Chengbin revised this gist
Oct 7, 2023 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,10 @@ const txHash = '0x...'; const contract = await hre.ethers.getContractAt(FIXME); const tx = await hre.ethers.provider.getTransaction(txHash) try { let code = await hre.ethers.provider.call(tx, tx.blockNumber) } catch (err) { const code = err.data.replace('Reverted ',''); console.log(code); console.log(contract.interface.parseError(code)); } -
Du, Chengbin created this gist
Oct 7, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ const txHash = '0x...'; const tx = await hre.ethers.provider.getTransaction(txHash) try { let code = await hre.ethers.provider.call(tx, tx.blockNumber) } catch (err) { const code = err.data.replace('Reverted ',''); console.log(code); console.log(manager.interface.parseError(code)); }