Create ProposalSalt event for TimelockController (#4001)

Co-authored-by: Francisco <frangio.1@gmail.com>
This commit is contained in:
JulissaDantes
2023-01-27 13:47:43 -05:00
committed by GitHub
parent 5e28952cbd
commit bc6de21fe2
4 changed files with 44 additions and 2 deletions

View File

@ -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);