Skip to content
Open
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
9 changes: 1 addition & 8 deletions .github/workflows/manual-sol-artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
- flare
- arbitrum
- base

jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -23,13 +22,10 @@ jobs:
echo "verify_secret_name=CI_DEPLOY_${network^^}_VERIFY" >> $GITHUB_ENV
echo "verifier_secret_name=CI_DEPLOY_${network^^}_VERIFIER" >> $GITHUB_ENV
echo "verifier_url_secret_name=CI_DEPLOY_${network^^}_VERIFIER_URL" >> $GITHUB_ENV
echo "metaboard_address_secret_name=CI_DEPLOY_${network^^}_METABOARD_ADDRESS" >> $GITHUB_ENV

- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- uses: nixbuild/nix-quick-install-action@v30
with:
nix_conf: |
Expand All @@ -46,16 +42,14 @@ jobs:
# before trying to save a new cache
# 1G = 1073741824
gc-max-store-size-linux: 1G

- run: nix develop -c rainix-sol-prelude
working-directory: ./lib/rain.interpreter
- run: nix develop -c rainix-rs-prelude
working-directory: ./lib/rain.interpreter
- run: nix develop -c i9r-prelude
working-directory: ./lib/rain.interpreter

- run: nix develop -c rainix-sol-prelude

- run: nix develop -c rain-pyth-prelude
- run: nix develop -c rainix-sol-artifacts
env:
DEPLOY_BROADCAST: '1'
Expand All @@ -65,4 +59,3 @@ jobs:
DEPLOY_VERIFY: ${{ secrets[env.verify_secret_name] || vars[env.verify_secret_name] || '' }}
DEPLOY_VERIFIER: ${{ secrets[env.verifier_secret_name] || vars[env.verifier_secret_name] || '' }}
DEPLOY_VERIFIER_URL: ${{ secrets[env.verifier_url_secret_name] || vars[env.verifier_url_secret_name] || '' }}
DEPLOY_METABOARD_ADDRESS: ${{ secrets[env.metaboard_address_secret_name] || vars[env.metaboard_address_secret_name] || '' }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
out
cache
cache
.pre-commit-config.yaml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Don’t ignore the shared pre-commit config.

.pre-commit-config.yaml is normally repository-owned; ignoring it makes hook updates easy to miss and forces git add -f if the project later adopts pre-commit.

♻️ Proposed cleanup
-.pre-commit-config.yaml
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.pre-commit-config.yaml
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.gitignore at line 3, Remove the .pre-commit-config.yaml entry from
.gitignore so the shared pre-commit configuration is tracked by the repository;
locate the .gitignore line that lists ".pre-commit-config.yaml" and delete that
line (or stop ignoring that specific filename) so the repository can update and
version the pre-commit hooks without requiring forced adds.

144 changes: 118 additions & 26 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion script/Deploy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ import {PythWords} from "../src/concrete/PythWords.sol";
import {IMetaBoardV1_2} from "rain.metadata/interface/unstable/IMetaBoardV1_2.sol";
import {LibDescribedByMeta} from "rain.metadata/lib/LibDescribedByMeta.sol";

/// @dev Deterministic MetaBoard address deployed via Zoltu factory.
/// https://github.com/rainlanguage/rain.metadata
address constant METABOARD_ADDRESS = 0xfb8437AeFBB8031064E274527C5fc08e30Ac6928;

contract Deploy is Script {
function run() public {
uint256 deployerPrivateKey = vm.envUint("DEPLOYMENT_KEY");
bytes memory subParserDescribedByMeta = vm.readFileBinary("meta/PythWords.rain.meta");
IMetaBoardV1_2 metaboard = IMetaBoardV1_2(vm.envAddress("DEPLOY_METABOARD_ADDRESS"));
IMetaBoardV1_2 metaboard = IMetaBoardV1_2(METABOARD_ADDRESS);

vm.startBroadcast(deployerPrivateKey);
PythWords subParser = new PythWords();
Expand Down
20 changes: 6 additions & 14 deletions src/abstract/PythExtern.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,9 @@ abstract contract PythExtern is BaseRainterpreterExternNPE2 {
}

function buildOpcodeFunctionPointers() external pure returns (bytes memory) {
function(OperandV2, StackItem[] memory)
internal
view
returns (StackItem[] memory)[] memory fs = new function(OperandV2, StackItem[] memory)
internal
view
returns (StackItem[] memory)[](OPCODE_FUNCTION_POINTERS_LENGTH);
function(OperandV2, StackItem[] memory) internal view returns (StackItem[] memory)[] memory fs = new function(OperandV2, StackItem[] memory)
internal
view returns (StackItem[] memory)[](OPCODE_FUNCTION_POINTERS_LENGTH);
fs[OPCODE_PYTH_PRICE] = LibOpPythPrice.run;

uint256[] memory pointers;
Expand All @@ -42,13 +38,9 @@ abstract contract PythExtern is BaseRainterpreterExternNPE2 {
}

function buildIntegrityFunctionPointers() external pure returns (bytes memory) {
function(OperandV2, uint256, uint256)
internal
pure
returns (uint256, uint256)[] memory fs = new function(OperandV2, uint256, uint256)
internal
pure
returns (uint256, uint256)[](OPCODE_FUNCTION_POINTERS_LENGTH);
function(OperandV2, uint256, uint256) internal pure returns (uint256, uint256)[] memory fs = new function(OperandV2, uint256, uint256)
internal
pure returns (uint256, uint256)[](OPCODE_FUNCTION_POINTERS_LENGTH);
fs[OPCODE_PYTH_PRICE] = LibOpPythPrice.integrity;

uint256[] memory pointers;
Expand Down
16 changes: 5 additions & 11 deletions src/abstract/PythSubParser.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@ abstract contract PythSubParser is BaseRainterpreterSubParserNPE2 {
}

function buildOperandHandlerFunctionPointers() external pure returns (bytes memory) {
function(bytes32[] memory) internal pure returns (OperandV2)[] memory fs = new function(bytes32[] memory)
internal
pure
returns (OperandV2)[](SUB_PARSER_WORD_PARSERS_LENGTH);
function(bytes32[] memory) internal pure returns (OperandV2)[] memory fs =
new function(bytes32[] memory) internal pure returns (OperandV2)[](SUB_PARSER_WORD_PARSERS_LENGTH);
fs[SUB_PARSER_WORD_PYTH_PRICE] = LibParseOperand.handleOperandDisallowed;

uint256[] memory pointers;
Expand All @@ -57,13 +55,9 @@ abstract contract PythSubParser is BaseRainterpreterSubParserNPE2 {
}

function buildSubParserWordParsers() external pure returns (bytes memory) {
function(uint256, uint256, OperandV2)
internal
view
returns (bool, bytes memory, bytes32[] memory)[] memory fs = new function(uint256, uint256, OperandV2)
internal
view
returns (bool, bytes memory, bytes32[] memory)[](SUB_PARSER_WORD_PARSERS_LENGTH);
function(uint256, uint256, OperandV2) internal view returns (bool, bytes memory, bytes32[] memory)[] memory fs = new function(uint256, uint256, OperandV2)
internal
view returns (bool, bytes memory, bytes32[] memory)[](SUB_PARSER_WORD_PARSERS_LENGTH);
fs[SUB_PARSER_WORD_PYTH_PRICE] = pythPriceSubParser;

uint256[] memory pointers;
Expand Down
2 changes: 1 addition & 1 deletion src/generated/PythWords.pointers.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pragma solidity ^0.8.25;
// file needs the contract to exist so that it can be compiled.

/// @dev Hash of the known bytecode.
bytes32 constant BYTECODE_HASH = bytes32(0x75f6cf625295be434800bc1143b31558b8835fe1566aaca5960b8d3058a776ff);
bytes32 constant BYTECODE_HASH = bytes32(0xfd467e959e3b5d8cdbb20330135e8de3612b3833714b30b0096e259d314b8a92);

/// @dev The hash of the meta that describes the contract.
bytes32 constant DESCRIBED_BY_META_HASH = bytes32(0xe7bb5842b2cf1d25681a9885109fbf8943495bcebb9ec049bc3790e5db57fa80);
Expand Down
Loading
Loading