重构:重构钱包反应器以改善计划执行。
- 在 `WalletReactor.ts` 中的 `executeSchedule` 方法中添加 gas 估算。 - 更新 `beginSchedule` 方法以包括返回语句。 - 删除 `genOperation` 方法中未使用的参数。
This commit is contained in:
parent
adb4e00b40
commit
26ea64b9f6
@ -80,6 +80,10 @@ export class WalletReactor {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
async executeSchedule(operation: IOperationData) {
|
async executeSchedule(operation: IOperationData) {
|
||||||
|
let gas = await this.contract.methods
|
||||||
|
.executeBatch(operation.targets, operation.values, operation.datas, operation.predecessor, operation.salt)
|
||||||
|
.estimateGas({ from: this.account.address })
|
||||||
|
console.log(gas)
|
||||||
let res = await this.contract.methods
|
let res = await this.contract.methods
|
||||||
.executeBatch(operation.targets, operation.values, operation.datas, operation.predecessor, operation.salt)
|
.executeBatch(operation.targets, operation.values, operation.datas, operation.predecessor, operation.salt)
|
||||||
.send({ gas: 1000000 })
|
.send({ gas: 1000000 })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user