Skip to content

Commit

Permalink
wip on i9r bump
Browse files Browse the repository at this point in the history
  • Loading branch information
thedavidmeister committed Feb 28, 2024
1 parent 0a36669 commit 272ff50
Show file tree
Hide file tree
Showing 22 changed files with 95 additions and 530 deletions.
6 changes: 3 additions & 3 deletions src/abstract/FlowCommon.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol";
import {LibEncodedDispatch} from "rain.interpreter.interface/lib/caller/LibEncodedDispatch.sol";
import {LibContext} from "rain.interpreter.interface/lib/caller/LibContext.sol";
import {UnregisteredFlow, MIN_FLOW_SENTINELS} from "../interface/unstable/IFlowV4.sol";
import {UnregisteredFlow, MIN_FLOW_SENTINELS} from "../interface/unstable/IFlowV5.sol";
import {LibEvaluable, EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol";
import {
SourceIndexV2,
Expand Down Expand Up @@ -198,10 +198,10 @@ abstract contract FlowCommon is ERC721Holder, ERC1155Holder, Multicall, Reentran
}
}

(uint256[] memory stack, uint256[] memory kvs) = evaluable.interpreter.eval(
(uint256[] memory stack, uint256[] memory kvs) = evaluable.interpreter.eval2(
evaluable.store,
DEFAULT_STATE_NAMESPACE,
LibEncodedDispatch.encode(evaluable.expression, FLOW_ENTRYPOINT, FLOW_MAX_OUTPUTS),
LibEncodedDispatch.encode2(evaluable.expression, FLOW_ENTRYPOINT, FLOW_MAX_OUTPUTS),
context
);
return (stack.dataPointer(), stack.endPointer(), kvs);
Expand Down
52 changes: 0 additions & 52 deletions src/concrete/basic/Flow.meta.json

This file was deleted.

3 changes: 1 addition & 2 deletions src/concrete/basic/Flow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ pragma solidity =0.8.19;

import {ICloneableV2, ICLONEABLE_V2_SUCCESS} from "rain.factory/src/interface/ICloneableV2.sol";
import {FlowCommon, LibContext} from "../../abstract/FlowCommon.sol";
import {IFlowV4, MIN_FLOW_SENTINELS} from "../../interface/unstable/IFlowV4.sol";
import {IFlowV4, MIN_FLOW_SENTINELS, FlowTransferV1} from "../../interface/unstable/IFlowV5.sol";
import {LibFlow} from "../../lib/LibFlow.sol";
import {LibUint256Matrix} from "rain.solmem/lib/LibUint256Matrix.sol";
import {Pointer} from "rain.solmem/lib/LibPointer.sol";
import {LibUint256Array} from "rain.solmem/lib/LibUint256Array.sol";
import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol";
import {FlowTransferV1} from "../../interface/unstable/IFlowV4.sol";
import {SignedContextV1, EvaluableConfigV3} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol";

/// @title Flow
Expand Down
121 changes: 0 additions & 121 deletions src/concrete/erc1155/FlowERC1155.meta.json

This file was deleted.

14 changes: 7 additions & 7 deletions src/concrete/erc1155/FlowERC1155.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
FLOW_ERC1155_HANDLE_TRANSFER_MAX_OUTPUTS,
FLOW_ERC1155_HANDLE_TRANSFER_MIN_OUTPUTS,
FLOW_ERC1155_MIN_FLOW_SENTINELS
} from "../../interface/unstable/IFlowERC1155V4.sol";
} from "../../interface/unstable/IFlowERC1155V5.sol";
import {LibBytecode} from "rain.interpreter.interface/lib/bytecode/LibBytecode.sol";
import {
IInterpreterV2, DEFAULT_STATE_NAMESPACE
Expand Down Expand Up @@ -68,10 +68,10 @@ contract FlowERC1155 is ICloneableV2, IFlowERC1155V4, FlowCommon, ERC1155 {
flowCommonInit(flowERC1155Config.flowConfig, FLOW_ERC1155_MIN_FLOW_SENTINELS);

if (evalHandleTransfer) {
(IInterpreterV1 interpreter, IInterpreterStoreV1 store, address expression) = flowERC1155Config
(IInterpreterV2 interpreter, IInterpreterStoreV2 store, address expression) = flowERC1155Config
.evaluableConfig
.deployer
.deployExpression(
.deployExpression2(
flowERC1155Config.evaluableConfig.bytecode,
flowERC1155Config.evaluableConfig.constants,
LibUint256Array.arrayFrom(FLOW_ERC1155_HANDLE_TRANSFER_MIN_OUTPUTS)
Expand All @@ -83,7 +83,7 @@ contract FlowERC1155 is ICloneableV2, IFlowERC1155V4, FlowCommon, ERC1155 {
// integrity checks are complete.
// The deployer MUST be a trusted contract anyway.
// slither-disable-next-line reentrancy-benign
sEvaluable = Evaluable(interpreter, store, expression);
sEvaluable = EvaluableV2(interpreter, store, expression);
}

return ICLONEABLE_V2_SUCCESS;
Expand Down Expand Up @@ -115,7 +115,7 @@ contract FlowERC1155 is ICloneableV2, IFlowERC1155V4, FlowCommon, ERC1155 {
// Mint and burn access MUST be handled by flow.
// HANDLE_TRANSFER will only restrict subsequent transfers.
if (sEvalHandleTransfer && !(from == address(0) || to == address(0))) {
Evaluable memory evaluable = sEvaluable;
EvaluableV2 memory evaluable = sEvaluable;
uint256[][] memory context;
{
context = LibContext.build(
Expand All @@ -132,10 +132,10 @@ contract FlowERC1155 is ICloneableV2, IFlowERC1155V4, FlowCommon, ERC1155 {
);
}

(uint256[] memory stack, uint256[] memory kvs) = evaluable.interpreter.eval(
(uint256[] memory stack, uint256[] memory kvs) = evaluable.interpreter.eval2(
evaluable.store,
DEFAULT_STATE_NAMESPACE,
LibEncodedDispatch.encode(
LibEncodedDispatch.encode2(
evaluable.expression,
FLOW_ERC1155_HANDLE_TRANSFER_ENTRYPOINT,
FLOW_ERC1155_HANDLE_TRANSFER_MAX_OUTPUTS
Expand Down
115 changes: 0 additions & 115 deletions src/concrete/erc20/FlowERC20.meta.json

This file was deleted.

Loading

0 comments on commit 272ff50

Please sign in to comment.