Skip to content

Commit 966c2ca

Browse files
committed
Added test for setting sequencer
1 parent c47f4cc commit 966c2ca

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

test/contract/arbRollup.spec.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,33 @@ describe('ArbRollup', () => {
11931193
)
11941194
})
11951195

1196+
it('can set is sequencer', async function () {
1197+
const testAddress = await accounts[9].getAddress()
1198+
expect(await sequencerInbox.isSequencer(testAddress)).to.be.false
1199+
await expect(
1200+
sequencerInbox.setIsSequencer(testAddress, true)
1201+
).to.revertedWith(
1202+
`NotBatchPosterManager("${await sequencerInbox.signer.getAddress()}")`
1203+
)
1204+
expect(await sequencerInbox.isSequencer(testAddress)).to.be.false
1205+
1206+
await (
1207+
await sequencerInbox
1208+
.connect(batchPosterManager)
1209+
.setIsSequencer(testAddress, true)
1210+
).wait()
1211+
1212+
expect(await sequencerInbox.isSequencer(testAddress)).to.be.true
1213+
1214+
await (
1215+
await sequencerInbox
1216+
.connect(batchPosterManager)
1217+
.setIsSequencer(testAddress, false)
1218+
).wait()
1219+
1220+
expect(await sequencerInbox.isSequencer(testAddress)).to.be.false
1221+
})
1222+
11961223
it('can set a batch poster', async function () {
11971224
const testAddress = await accounts[9].getAddress()
11981225
expect(await sequencerInbox.isBatchPoster(testAddress)).to.be.false

0 commit comments

Comments
 (0)