Skip to content

Latest commit

 

History

History
307 lines (270 loc) · 8.58 KB

MockStore.md

File metadata and controls

307 lines (270 loc) · 8.58 KB

MockStore.sol

View Source: contracts/mock/base/MockStore.sol

↗ Extends: FakeStore ↘ Derived Contracts: MockCxTokenStore, MockProcessorStore, MockProcessorStoreLib

MockStore

Functions

setBool

function setBool(bytes32 prefix, address a) external nonpayable

Arguments

Name Type Description
prefix bytes32
a address
Source Code
function setBool(bytes32 prefix, address a) external {
    bytes32 k = keccak256(abi.encodePacked(prefix, a));
    this.setBool(k, true);
  }

unsetBool

function unsetBool(bytes32 prefix, address a) external nonpayable

Arguments

Name Type Description
prefix bytes32
a address
Source Code
function unsetBool(bytes32 prefix, address a) external {
    bytes32 k = keccak256(abi.encodePacked(prefix, a));
    this.deleteBool(k);
  }

setAddress

function setAddress(bytes32 k1, bytes32 k2, address v) public nonpayable

Arguments

Name Type Description
k1 bytes32
k2 bytes32
v address
Source Code
function setAddress(
    bytes32 k1,
    bytes32 k2,
    address v
  ) public {
    this.setAddress(keccak256(abi.encodePacked(k1, k2)), v);
  }

setAddress

function setAddress(bytes32 k1, bytes32 k2, bytes32 k3, address v) external nonpayable

Arguments

Name Type Description
k1 bytes32
k2 bytes32
k3 bytes32
v address
Source Code
function setAddress(
    bytes32 k1,
    bytes32 k2,
    bytes32 k3,
    address v
  ) external {
    this.setAddress(keccak256(abi.encodePacked(k1, k2, k3)), v);
  }

setUint

function setUint(bytes32 k1, bytes32 k2, uint256 v) external nonpayable

Arguments

Name Type Description
k1 bytes32
k2 bytes32
v uint256
Source Code
function setUint(
    bytes32 k1,
    bytes32 k2,
    uint256 v
  ) external {
    this.setUint(keccak256(abi.encodePacked(k1, k2)), v);
  }

Contracts