Skip to content
Verified contractPartialApache-2.0.

MemoryPageBatcher

Address0xa0f50deff3aba037dd182eb594bdb637a130eab3
Balance

0 ETH

 

Transactions

1,058

 

Compiler

solc 0.6.12

 

Same code

Only this contract

 

Details

Compiler
solc 0.6.12+commit.27d51765
Language
solidity
Optimization
Yes, 100 runs
EVM version
istanbul
License
Apache-2.0.
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
19,627,710
Creation transaction
0x4b8cb91b41…f4564736bc

starkware/solidity/verifier/cpu/MemoryPageBatcher.sol

/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

import "./IMemoryPageRegistry.sol";
import "../../interfaces/Identity.sol";

contract MemoryPageBatcher is Identity {
    IMemoryPageRegistry public immutable memoryPageRegistry;

    event BoundMemoryPageFactRegistry(address memoryPageFactRegistry);

    function identify() external pure virtual override returns (string memory) {
        return "StarkWare_MemoryPageBatcher_2024_1";
    }

    constructor(address memoryPageFactRegistry_) public {
        memoryPageRegistry = IMemoryPageRegistry(memoryPageFactRegistry_);
        emit BoundMemoryPageFactRegistry(memoryPageFactRegistry_);
    }

    function registerContinuousPageBatch(MemoryPageEntry[] calldata memoryPageEntries) external {
        for (uint256 i = 0; i < memoryPageEntries.length; i++) {
            memoryPageRegistry.registerContinuousMemoryPage(
                memoryPageEntries[i].startAddr,
                memoryPageEntries[i].values,
                memoryPageEntries[i].z,
                memoryPageEntries[i].alpha,
                memoryPageEntries[i].prime
            );
        }
    }
}

starkware/solidity/interfaces/Identity.sol

/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.12;

interface Identity {
    /*
      Allows a caller to ensure that the provided address is of the expected type and version.
    */
    function identify() external pure returns (string memory);
}

starkware/solidity/verifier/cpu/IMemoryPageRegistry.sol

/*
  Copyright 2019-2024 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.12;

struct MemoryPageEntry {
    uint256 startAddr;
    uint256[] values;
    uint256 z;
    uint256 alpha;
    uint256 prime;
}

interface IMemoryPageRegistry {
    function registerContinuousMemoryPage(
        uint256 startAddr,
        uint256[] memory values,
        uint256 z,
        uint256 alpha,
        uint256 prime
    )
        external
        returns (
            bytes32,
            uint256,
            uint256
        );
}
Compiler settingsShow
{
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "libraries": {},
  "optimizer": {
    "runs": 100,
    "enabled": true
  },
  "evmVersion": "istanbul",
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.