文件 1 的 1:TreatsStakingProxy.sol
pragma solidity ^0.8.0;
contract TreatsStakingProxy {
event myEvent(bytes);
constructor(bytes memory constructData, address contractLogic) public {
assembly {
sstore(0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7, contractLogic)
}
(bool success, bytes memory __ ) = contractLogic.delegatecall(constructData);
emit myEvent(__);
require(success, "Construction failed");
}
fallback() external payable {
assembly {
let contractLogic := sload(0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7)
calldatacopy(0x0, 0x0, calldatasize())
let success := delegatecall(gas(), contractLogic, 0x0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
switch success
case 0 {
revert(0, returndatasize())
}
default {
return(0, returndatasize())
}
}
}
}
{
"compilationTarget": {
"TreatsStakingProxy.sol": "TreatsStakingProxy"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
}