Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 20 additions & 24 deletions contracts/v1_5/FiredrillEntrypoint.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ contract FiredrillEntrypoint is Ownable2Step, HasStatus, ITypeAndVersion {
// deactivation will be reflected in rdd-monster and alerts will stop triggering
bool private s_active;

uint64 private s_init_send;
uint64 private s_init_commit;
uint64 private s_init_bless;
uint64 private s_init_exec;
uint64 private s_send_last;

constructor(uint64 chainSelector) Ownable(msg.sender) {
i_chainSelector = chainSelector;
Expand All @@ -36,10 +33,6 @@ contract FiredrillEntrypoint is Ownable2Step, HasStatus, ITypeAndVersion {
i_compound = new FiredrillCompound(this);
i_receiver = new FiredrillRevertMessageReceiver(this);
s_active = true;
s_init_send = 1;
s_init_commit = 1;
s_init_bless = 1;
s_init_exec = 1;
}

function deactivate() public onlyOwner {
Expand All @@ -54,30 +47,33 @@ contract FiredrillEntrypoint is Ownable2Step, HasStatus, ITypeAndVersion {
i_offRamp.emitConfigSet(); // register OffRamp
}

function drill_PendingCommit_PendingQueue_TxSpike(uint8 n) public onlyOwner {
for (uint64 i = 0; i < n; i++) {
i_onRamp.emitCCIPSendRequested(msg.sender, s_init_send + i);
function drill_PendingCommit_PendingQueue_TxSpike(uint8 from, uint8 to) public onlyOwner {
require(from <= to, "nothing to send");
require(from > s_send_last, "message already sent");
for (uint64 i = from; i <= to; i++) {
i_onRamp.emitCCIPSendRequested(msg.sender, i);
}
s_init_send += n;
s_send_last = to;
}

function drill_PendingBless() public onlyOwner {
require(s_init_commit < s_init_send, "nothing to commit");
i_offRamp.emitReportAccepted(s_init_commit, s_init_send);
s_init_commit = s_init_send;
function drill_PendingBless(uint8 from, uint8 to) public onlyOwner {
require(from <= to, "nothing to send");
require(to <= s_send_last, "not yet sent");
i_offRamp.emitReportAccepted(from, to);
}

function drill_PendingExecution() public onlyOwner {
require(s_init_bless < s_init_commit, "nothing to bless");
i_compound.emitTagRootBlessed(s_init_bless, s_init_commit);
s_init_bless = s_init_commit;
function drill_PendingExecution(uint8 from, uint8 to) public onlyOwner {
require(from <= to, "nothing to send");
require(to <= s_send_last, "not yet sent");
i_compound.emitTagRootBlessed(from, to);
}

function drill_InvalidMessageState(uint8 n) public onlyOwner {
for (uint64 i = 0; i < n; i++) {
i_offRamp.emitExecutionStateChanged(msg.sender, s_init_exec + i);
function drill_InvalidMessageState(uint8 from, uint8 to) public onlyOwner {
require(from <= to, "nothing to send");
require(to <= s_send_last, "not yet sent");
for (uint64 i = from; i <= to; i++) {
i_offRamp.emitExecutionStateChanged(msg.sender, i);
}
s_init_exec += n;
}

function drill_PriceRegistries() public onlyOwner {
Expand Down
25 changes: 11 additions & 14 deletions contracts/v1_6/FiredrillEntrypoint.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ contract FiredrillEntrypoint is Ownable2Step, HasStatus, ITypeAndVersion {
// deactivation will be reflected in rdd-monster and alerts will stop triggering
bool private s_active;

uint64 private s_init_send;
uint64 private s_init_commit;
uint64 private s_init_exec;
uint64 private s_send_last;

constructor(uint64 chainSelector) Ownable(msg.sender) {
i_chainSelector = chainSelector;
Expand All @@ -35,9 +33,6 @@ contract FiredrillEntrypoint is Ownable2Step, HasStatus, ITypeAndVersion {
i_compound = new FiredrillCompound(this);
i_receiver = new FiredrillRevertMessageReceiver(this);
s_active = true;
s_init_send = 1;
s_init_commit = 1;
s_init_exec = 1;
}

function deactivate() public onlyOwner {
Expand All @@ -52,17 +47,19 @@ contract FiredrillEntrypoint is Ownable2Step, HasStatus, ITypeAndVersion {
i_offRamp.emitSourceChainConfigSet(); // register OffRamp
}

function drill_PendingCommit_PendingQueue_TxSpike(uint8 n) public onlyOwner {
for (uint64 i = 0; i < n; i++) {
i_onRamp.emitCCIPMessageSent(msg.sender, s_init_send + i);
function drill_PendingCommit_PendingQueue_TxSpike(uint8 from, uint8 to) public onlyOwner {
require(from <= to, "nothing to send");
require(from > s_send_last, "message already sent");
for (uint64 i = from; i <= to; i++) {
i_onRamp.emitCCIPMessageSent(msg.sender, i);
}
s_init_send += n;
s_send_last = to;
}

function drill_PendingExecution() public onlyOwner {
require(s_init_commit < s_init_send, "nothing to commit");
i_offRamp.emitCommitReportAccepted(s_init_commit, s_init_send);
s_init_commit = s_init_send;
function drill_PendingExecution(uint8 from, uint8 to) public onlyOwner {
require(from <= to, "nothing to send");
require(to <= s_send_last, "not yet sent");
i_offRamp.emitCommitReportAccepted(from, to);
}

function drill_PriceRegistries() public onlyOwner {
Expand Down
40 changes: 36 additions & 4 deletions generated/v1_5/abi/FiredrillEntrypoint.abi
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@
"name": "drill_InvalidMessageState",
"inputs": [
{
"name": "n",
"name": "from",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "to",
"type": "uint8",
"internalType": "uint8"
}
Expand All @@ -66,7 +71,18 @@
{
"type": "function",
"name": "drill_PendingBless",
"inputs": [],
"inputs": [
{
"name": "from",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "to",
"type": "uint8",
"internalType": "uint8"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
Expand All @@ -75,7 +91,12 @@
"name": "drill_PendingCommit_PendingQueue_TxSpike",
"inputs": [
{
"name": "n",
"name": "from",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "to",
"type": "uint8",
"internalType": "uint8"
}
Expand All @@ -86,7 +107,18 @@
{
"type": "function",
"name": "drill_PendingExecution",
"inputs": [],
"inputs": [
{
"name": "from",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "to",
"type": "uint8",
"internalType": "uint8"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
Expand Down
Loading