Create ProposalSalt event for TimelockController (#4001)
Co-authored-by: Francisco <frangio.1@gmail.com>
This commit is contained in:
@ -158,6 +158,11 @@ contract('TimelockController', function (accounts) {
|
||||
delay: MINDELAY,
|
||||
});
|
||||
|
||||
expectEvent(receipt, 'CallSalt', {
|
||||
id: this.operation.id,
|
||||
salt: this.operation.salt,
|
||||
});
|
||||
|
||||
const block = await web3.eth.getBlock(receipt.receipt.blockHash);
|
||||
|
||||
expect(await this.mock.getTimestamp(this.operation.id)).to.be.bignumber.equal(
|
||||
@ -219,6 +224,19 @@ contract('TimelockController', function (accounts) {
|
||||
'TimelockController: insufficient delay',
|
||||
);
|
||||
});
|
||||
|
||||
it('schedule operation with salt zero', async function () {
|
||||
const { receipt } = await this.mock.schedule(
|
||||
this.operation.target,
|
||||
this.operation.value,
|
||||
this.operation.data,
|
||||
this.operation.predecessor,
|
||||
ZERO_BYTES32,
|
||||
MINDELAY,
|
||||
{ from: proposer },
|
||||
);
|
||||
expectEvent.notEmitted(receipt, 'CallSalt');
|
||||
});
|
||||
});
|
||||
|
||||
describe('execute', function () {
|
||||
@ -364,6 +382,11 @@ contract('TimelockController', function (accounts) {
|
||||
predecessor: this.operation.predecessor,
|
||||
delay: MINDELAY,
|
||||
});
|
||||
|
||||
expectEvent(receipt, 'CallSalt', {
|
||||
id: this.operation.id,
|
||||
salt: this.operation.salt,
|
||||
});
|
||||
}
|
||||
|
||||
const block = await web3.eth.getBlock(receipt.receipt.blockHash);
|
||||
|
||||
Reference in New Issue
Block a user