Skip to content

Commit d69a42a

Browse files
committed
apply CL style guide + Receiver update
1 parent 881c94b commit d69a42a

File tree

3 files changed

+177
-80
lines changed

3 files changed

+177
-80
lines changed

src/content/cre/getting-started/part-4-writing-onchain-go.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ Here is the source code for the contract so you can see how it works:
3939
// SPDX-License-Identifier: MIT
4040
pragma solidity ^0.8.19;
4141
42-
import { IReceiverTemplate } from "./keystone/IReceiverTemplate.sol";
42+
import { ReceiverTemplate } from "./ReceiverTemplate.sol";
4343
4444
/**
4545
* @title CalculatorConsumer (Testing Version)
4646
* @notice This contract receives reports from a CRE workflow and stores the results of a calculation onchain.
47-
* @dev This version uses IReceiverTemplate without configuring any security checks, making it compatible
47+
* @dev This version uses ReceiverTemplate without configuring any security checks, making it compatible
4848
* with the mock Forwarder used during simulation. All permission fields remain at their default zero
4949
* values (disabled).
5050
*/
51-
contract CalculatorConsumer is IReceiverTemplate {
51+
contract CalculatorConsumer is ReceiverTemplate {
5252
// Struct to hold the data sent in a report from the workflow
5353
struct CalculatorResult {
5454
uint256 offchainValue;
@@ -66,13 +66,13 @@ contract CalculatorConsumer is IReceiverTemplate {
6666
6767
/**
6868
* @dev The constructor doesn't set any security checks.
69-
* The IReceiverTemplate parent constructor will initialize all permission fields to zero (disabled).
69+
* The ReceiverTemplate parent constructor will initialize all permission fields to zero (disabled).
7070
*/
7171
constructor() {}
7272
7373
/**
7474
* @notice Implements the core business logic for processing reports.
75-
* @dev This is called automatically by IReceiverTemplate's onReport function after security checks.
75+
* @dev This is called automatically by ReceiverTemplate's onReport function after security checks.
7676
*/
7777
function _processReport(bytes calldata report) internal override {
7878
// Decode the report bytes into our CalculatorResult struct

src/content/cre/getting-started/part-4-writing-onchain-ts.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ Here is the source code for the contract so you can see how it works:
3939
// SPDX-License-Identifier: MIT
4040
pragma solidity ^0.8.19;
4141
42-
import { IReceiverTemplate } from "./keystone/IReceiverTemplate.sol";
42+
import { ReceiverTemplate } from "./ReceiverTemplate.sol";
4343
4444
/**
4545
* @title CalculatorConsumer (Testing Version)
4646
* @notice This contract receives reports from a CRE workflow and stores the results of a calculation onchain.
47-
* @dev This version uses IReceiverTemplate without configuring any security checks, making it compatible
47+
* @dev This version uses ReceiverTemplate without configuring any security checks, making it compatible
4848
* with the mock Forwarder used during simulation. All permission fields remain at their default zero
4949
* values (disabled).
5050
*/
51-
contract CalculatorConsumer is IReceiverTemplate {
51+
contract CalculatorConsumer is ReceiverTemplate {
5252
// Struct to hold the data sent in a report from the workflow
5353
struct CalculatorResult {
5454
uint256 offchainValue;
@@ -66,13 +66,13 @@ contract CalculatorConsumer is IReceiverTemplate {
6666
6767
/**
6868
* @dev The constructor doesn't set any security checks.
69-
* The IReceiverTemplate parent constructor will initialize all permission fields to zero (disabled).
69+
* The ReceiverTemplate parent constructor will initialize all permission fields to zero (disabled).
7070
*/
7171
constructor() {}
7272
7373
/**
7474
* @notice Implements the core business logic for processing reports.
75-
* @dev This is called automatically by IReceiverTemplate's onReport function after security checks.
75+
* @dev This is called automatically by ReceiverTemplate's onReport function after security checks.
7676
*/
7777
function _processReport(bytes calldata report) internal override {
7878
// Decode the report bytes into our CalculatorResult struct

0 commit comments

Comments
 (0)