Files
pezkuwi-sdk/bizinikiwi/pezframe/revive/fixtures/contracts/System.sol
T
pezkuwichain 1c0e57d984 feat: Rebrand Polkadot/Substrate references to PezkuwiChain
This commit systematically rebrands various references from Parity Technologies'
Polkadot/Substrate ecosystem to PezkuwiChain within the kurdistan-sdk.

Key changes include:
- Updated external repository URLs (zombienet-sdk, parity-db, parity-scale-codec, wasm-instrument) to point to pezkuwichain forks.
- Modified internal documentation and code comments to reflect PezkuwiChain naming and structure.
- Replaced direct references to  with  or specific paths within the  for XCM, Pezkuwi, and other modules.
- Cleaned up deprecated  issue and PR references in various  and  files, particularly in  and  modules.
- Adjusted image and logo URLs in documentation to point to PezkuwiChain assets.
- Removed or rephrased comments related to external Polkadot/Substrate PRs and issues.

This is a significant step towards fully customizing the SDK for the PezkuwiChain ecosystem.
2025-12-14 00:04:10 +03:00

90 lines
2.3 KiB
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract System {
constructor(bool panic) {
if (panic) {
revert("Reverted because revert=true was set as constructor argument");
}
}
function keccak256Func(bytes memory data) public pure returns (bytes32) {
return keccak256(data);
}
function addressFunc() public view returns (address) {
return address(this);
}
function caller() public view returns (address) {
return msg.sender;
}
function callvalue() public payable returns (uint64) {
return uint64(msg.value);
}
function calldataload(uint64 offset) public pure returns (bytes32) {
bytes32 data;
assembly {
data := calldataload(offset)
}
return data;
}
function calldatasize() public pure returns (uint64) {
return uint64(msg.data.length);
}
function calldatacopy(uint64 destOffset, uint64 offset, uint64 size) public pure returns (bytes memory) {
bytes memory data = new bytes(size);
assembly {
calldatacopy(add(data, 0x20), offset, size)
}
return data;
}
function codesize() public pure returns (uint64) {
uint256 size;
assembly {
size := codesize()
}
return uint64(size);
}
function codecopy(uint64, /* destOffset */ uint64, /* offset */ uint64 size) public pure returns (bytes memory) {
bytes memory code = new bytes(size);
return code;
}
function returndatasize(address _callee, bytes memory _data, uint64 _gas) public returns (uint64) {
uint256 size;
_callee.staticcall{gas: _gas}(_data);
assembly {
size := returndatasize()
}
return uint64(size);
}
function returndatacopy(
address _callee,
bytes memory _data,
uint64 _gas,
uint64 destOffset,
uint64 offset,
uint64 size
) public returns (bytes memory) {
bytes memory data = new bytes(size);
_callee.staticcall{gas: _gas}(_data);
assembly {
returndatacopy(add(data, 0x20), offset, size)
}
return data;
}
function gas() public view returns (uint64) {
return uint64(gasleft());
}
}