add bid claim weth 2 eth support

This commit is contained in:
牛涛涛
2021-01-08 17:41:36 +08:00
parent 01b73b5ca9
commit 051dc73eb3
7 changed files with 76 additions and 16 deletions

View File

@@ -13,6 +13,7 @@ export const numberWithCommas = x => x.toString().replace(/\B(?=(\d{3})+(?!\d))/
export async function logGas(funcCall: any, params: any, desc: string) {
const estimatedGas = await funcCall.estimateGas(params)
const receipt = await funcCall.send(params)
const gasUsed = receipt.gasUsed;
let colorFn;
@@ -27,4 +28,4 @@ export async function logGas(funcCall: any, params: any, desc: string) {
console.log(("Gas estimated:" + numberWithCommas(estimatedGas)).padEnd(60, '.'), blueText(desc) + " ", colorFn(numberWithCommas(gasUsed).padStart(5)));
return receipt
}
}