Add stake management function to ERC4337Utils (#5471)
This commit is contained in:
@ -7,8 +7,11 @@ const clock = {
|
||||
timestamp: () => time.latest().then(ethers.toBigInt),
|
||||
};
|
||||
const clockFromReceipt = {
|
||||
blocknumber: receipt => Promise.resolve(ethers.toBigInt(receipt.blockNumber)),
|
||||
timestamp: receipt => ethers.provider.getBlock(receipt.blockNumber).then(block => ethers.toBigInt(block.timestamp)),
|
||||
blocknumber: receipt => Promise.resolve(receipt).then(({ blockNumber }) => ethers.toBigInt(blockNumber)),
|
||||
timestamp: receipt =>
|
||||
Promise.resolve(receipt)
|
||||
.then(({ blockNumber }) => ethers.provider.getBlock(blockNumber))
|
||||
.then(({ timestamp }) => ethers.toBigInt(timestamp)),
|
||||
};
|
||||
const increaseBy = {
|
||||
blockNumber: mine,
|
||||
|
||||
Reference in New Issue
Block a user