修改批量mint数量, 修改arb one rpc地址, 邮件改为可发送多人
This commit is contained in:
parent
61798a5bb7
commit
4f3dfeb43d
@ -42,9 +42,11 @@ export class WalletReactor {
|
||||
let gas = await this.contract.methods
|
||||
.schedule(operation.targets, operation.values, operation.datas, operation.predecessor, operation.salt, seconds)
|
||||
.estimateGas({ from: this.account.address })
|
||||
// let nonce = await this.web3.eth.getTransactionCount(this.account.address)
|
||||
let gasPrice = await this.web3.eth.getGasPrice()
|
||||
let res = await this.contract.methods
|
||||
.schedule(operation.targets, operation.values, operation.datas, operation.predecessor, operation.salt, seconds)
|
||||
.send({ gas: (gas * 1.5) | 0 })
|
||||
.send({ gas: (gas * 1.51) | 0, gasPrice })
|
||||
operation.transactionHash = res.transactionHash
|
||||
return operation
|
||||
}
|
||||
@ -89,9 +91,10 @@ export class WalletReactor {
|
||||
let gas = await this.contract.methods
|
||||
.execute(operation.targets, operation.values, operation.datas, operation.predecessor, operation.salt)
|
||||
.estimateGas({ from: this.account.address })
|
||||
let gasPrice = await this.web3.eth.getGasPrice()
|
||||
let res = await this.contract.methods
|
||||
.execute(operation.targets, operation.values, operation.datas, operation.predecessor, operation.salt)
|
||||
.send({ gas: (gas * 1.5) | 0 })
|
||||
.send({ gas: (gas * 1.5) | 0, gasPrice })
|
||||
return res
|
||||
}
|
||||
|
||||
|
@ -210,7 +210,7 @@ export const AllChains = [
|
||||
{
|
||||
name: 'Arbitrum One',
|
||||
type: 'Mainnet',
|
||||
rpc: 'https://endpoints.omniatech.io/v1/arbitrum/one/public|https://rpc.ankr.com/arbitrum',
|
||||
rpc: 'https://arb-mainnet.g.alchemy.com/v2/tFPlLg-MT8uGkM5wKHyoBqEHWJJ0o3Nt',
|
||||
id: 42161,
|
||||
network: 'ARBITRUM',
|
||||
symbol: 'ETH',
|
||||
|
@ -3,11 +3,11 @@ export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'
|
||||
export const ZERO_BYTES32 = '0x0000000000000000000000000000000000000000000000000000000000000000'
|
||||
|
||||
// 多签钱包单次最大请求数量
|
||||
export const MAX_BATCH_REQ_COUNT = 500
|
||||
export const MAX_BATCH_REQ_COUNT = 200
|
||||
// 空投单次最大请求数量
|
||||
export const MAX_AIRDROP_COUNT = 500
|
||||
export const MAX_AIRDROP_COUNT = 200
|
||||
|
||||
export const GAS_BOOST = 1.2
|
||||
export const GAS_BOOST = 1.21
|
||||
|
||||
export const CONFIRM_MAIL_HTML = `
|
||||
<p>{{title}}</p>
|
||||
|
@ -88,8 +88,8 @@ class WorkFlowController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
@role(ROLE_ANON)
|
||||
@router('get /workflow/update_required')
|
||||
// @role(ROLE_ANON)
|
||||
// @router('get /workflow/update_required')
|
||||
async updateRequired(req, res) {
|
||||
let { chain } = req.params
|
||||
chain = parseInt(chain)
|
||||
@ -97,8 +97,8 @@ class WorkFlowController extends BaseController {
|
||||
return result
|
||||
}
|
||||
|
||||
@role(ROLE_ANON)
|
||||
@router('post /workflow/update_required')
|
||||
// @role(ROLE_ANON)
|
||||
// @router('post /workflow/update_required')
|
||||
async execUpdateRequired(req, res) {
|
||||
let { chain } = req.params
|
||||
let data = {
|
||||
@ -120,7 +120,7 @@ class WorkFlowController extends BaseController {
|
||||
// let fileId = 'WWME_g-oYEAAACj738mha3is3XxxDavhb5w'
|
||||
// await new WechatWorkService().fetchFile(fileId, true)
|
||||
// console.log('11')
|
||||
let spNo = '202307120001'
|
||||
let spNo = '202307120024'
|
||||
new TaskQueue().addTaskToQueue(spNo)
|
||||
// let task = await ChainTask.findById('642fe42611845ce0e1def316')
|
||||
// for (let tid of task.tasks) {
|
||||
|
@ -42,16 +42,22 @@ export class MailQueue {
|
||||
let subject = `${task.starterName} 申请 ${task.name}`
|
||||
let cfg = new ChainCache().chainArray.find(c => c.id === this.chain)
|
||||
assert(cfg, `chain ${this.chain} not found`)
|
||||
let data: any = { html, subject, to: cfg.mail }
|
||||
let data: any = { html, subject }
|
||||
Object(DEFAULT_MSG_DATA).zssign(data)
|
||||
let deferred = new Deferred()
|
||||
this.queue.push(async () => {
|
||||
try {
|
||||
let info = await new MailService().send(data)
|
||||
logger.info(
|
||||
`send mail success:: from: ${data.from}, to: ${data.to}, subject: ${data.subject}, messageId: ${info.messageId}`,
|
||||
)
|
||||
deferred.resolve(info)
|
||||
let mails = cfg.mail.split(',')
|
||||
let infos: any[] = []
|
||||
for (let mail of mails) {
|
||||
data.to = mail
|
||||
let info = await new MailService().send(data)
|
||||
infos.push(info)
|
||||
logger.info(
|
||||
`send mail success:: from: ${data.from}, to: ${data.to}, subject: ${data.subject}, messageId: ${info.messageId}`,
|
||||
)
|
||||
}
|
||||
deferred.resolve(infos)
|
||||
} catch (err) {
|
||||
logger.info(`send mail error:: from: ${data.from}, to: ${data.to}, subject: ${data.subject}`)
|
||||
logger.error(err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user