Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00
Cross-Chain Transactions
Loading...
Loading
Contract Name:
AgglayerCrossChain
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
Yes with 10000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.20;
import {Module} from "../../../Module.sol";
import {Role} from "../../../Role.sol";
import {CrossChain} from "./CrossChain.sol";
import {IPolygonZkEVMBridge} from "@zkevm-contracts/interfaces/IPolygonZkEVMBridge.sol";
import {IERC20} from "src/interface/IERC20.sol";
interface IBridge is IPolygonZkEVMBridge {
function networkID() external view returns (uint32);
}
interface IBridgeExtension {
function bridge() external view returns (address);
function bridgeAndCall(
address token,
uint256 amount,
bytes calldata permitData,
uint32 destinationNetwork,
address callAddress,
address fallbackAddress,
bytes calldata callData,
bool forceUpdateGlobalExitRoot
) external payable;
}
library AgglayerCrossChainStorage {
/// @custom:storage-location erc7201:token.bridgeAndCall
bytes32 public constant BRIDGE_AND_CALL_STORAGE_POSITION =
keccak256(abi.encode(uint256(keccak256("token.bridgeAndCall")) - 1)) & ~bytes32(uint256(0xff));
struct Data {
address router;
address bridge;
uint32 networkId;
}
function data() internal pure returns (Data storage data_) {
bytes32 position = BRIDGE_AND_CALL_STORAGE_POSITION;
assembly {
data_.slot := position
}
}
}
contract AgglayerCrossChain is Module, CrossChain {
/*//////////////////////////////////////////////////////////////
EXTENSION CONFIG
//////////////////////////////////////////////////////////////*/
/// @notice Returns all implemented callback and fallback functions.
function getModuleConfig() external pure override returns (ModuleConfig memory config) {
config.fallbackFunctions = new FallbackFunction[](4);
config.fallbackFunctions[0] = FallbackFunction({selector: this.getRouter.selector, permissionBits: 0});
config.fallbackFunctions[1] =
FallbackFunction({selector: this.setRouter.selector, permissionBits: Role._MANAGER_ROLE});
config.fallbackFunctions[2] =
FallbackFunction({selector: this.sendCrossChainTransaction.selector, permissionBits: 0});
config.fallbackFunctions[3] = FallbackFunction({selector: this.bridgeTokens.selector, permissionBits: 0});
config.registerInstallationCallback = true;
}
/// @dev Called by a Core into an Module during the installation of the Module.
function onInstall(bytes calldata data) external {
(address router) = abi.decode(data, (address));
address bridge = IBridgeExtension(router).bridge();
_agglayerStorage().router = router;
_agglayerStorage().bridge = bridge;
_agglayerStorage().networkId = IBridge(bridge).networkID();
}
/// @dev Called by a Core into an Module during the uninstallation of the Module.
function onUninstall(bytes calldata data) external {}
/// @dev Returns bytes encoded install params, to be sent to `onInstall` function
function encodeBytesOnInstall(address router) external pure returns (bytes memory) {
return abi.encode(router);
}
/// @dev Returns bytes encoded uninstall params, to be sent to `onUninstall` function
function encodeBytesOnUninstall() external pure returns (bytes memory) {
return "";
}
/*//////////////////////////////////////////////////////////////
FALLBACK FUNCTIONS
//////////////////////////////////////////////////////////////*/
function getRouter() external view override returns (address) {
return _agglayerStorage().router;
}
function setRouter(address router) external override {
_agglayerStorage().router = router;
}
function sendCrossChainTransaction(
uint64 _destinationNetwork,
address _callAddress,
bytes calldata _payload,
bytes calldata _extraArgs
) external payable override {
(
address _fallbackAddress,
bool _forceUpdateGlobalExitRoot,
address _token,
uint256 _amount,
bytes memory permitData
) = abi.decode(_extraArgs, (address, bool, address, uint256, bytes));
if (_token == address(0) && _amount == 0) {
_bridgeMessage(uint32(_destinationNetwork), _callAddress, _forceUpdateGlobalExitRoot, _payload);
} else if (_payload.length == 0) {
_bridgeAsset(
uint32(_destinationNetwork), _callAddress, _amount, _token, _forceUpdateGlobalExitRoot, permitData
);
} else {
_bridgeAndCall(
_token,
_amount,
permitData,
uint32(_destinationNetwork),
_callAddress,
_fallbackAddress,
_payload,
_forceUpdateGlobalExitRoot
);
}
onCrossChainTransactionSent(_destinationNetwork, _callAddress, _payload, _extraArgs);
}
function bridgeTokens(uint64 _destinationNetwork, address _callAddress, uint256 _amount)
external
payable
{
_bridgeAsset(uint32(_destinationNetwork), _callAddress, _amount, address(this), true, "");
}
/*//////////////////////////////////////////////////////////////
INTERNAL FUNCTIONS
//////////////////////////////////////////////////////////////*/
function _bridgeMessage(
uint32 _destinationNetwork,
address _callAddress,
bool _forceUpdateGlobalExitRoot,
bytes memory _payload
) internal {
IBridge(_agglayerStorage().bridge).bridgeMessage(
uint32(_destinationNetwork), _callAddress, _forceUpdateGlobalExitRoot, _payload
);
}
function _bridgeAsset(
uint32 _destinationNetwork,
address _callAddress,
uint256 _amount,
address _token,
bool _forceUpdateGlobalExitRoot,
bytes memory permitData
) internal {
address bridge = _agglayerStorage().bridge;
IERC20(_token).transferFrom(msg.sender, address(this), _amount);
IERC20(_token).approve(bridge, _amount);
IBridge(bridge).bridgeAsset(
uint32(_destinationNetwork), _callAddress, _amount, _token, _forceUpdateGlobalExitRoot, permitData
);
}
function _bridgeAndCall(
address _token,
uint256 _amount,
bytes memory permitData,
uint32 _destinationNetwork,
address _callAddress,
address _fallbackAddress,
bytes memory _payload,
bool _forceUpdateGlobalExitRoot
) internal {
address router = _agglayerStorage().router;
IERC20(_token).transferFrom(msg.sender, address(this), _amount);
IERC20(_token).approve(router, _amount);
IBridgeExtension(router).bridgeAndCall(
_token,
_amount,
permitData,
_destinationNetwork,
_callAddress,
_fallbackAddress,
_payload,
_forceUpdateGlobalExitRoot
);
}
function onCrossChainTransactionSent(
uint64 _destinationNetwork,
address _callAddress,
bytes calldata _payload,
bytes calldata _extraArgs
) internal override {
/// post cross chain transaction sent logic goes here
}
function onCrossChainTransactionReceived(
uint64 _sourceChain,
address _sourceAddress,
bytes memory _payload,
bytes memory _extraArgs
) internal override {
/// post cross chain transaction received logic goes here
}
function _agglayerStorage() internal pure returns (AgglayerCrossChainStorage.Data storage) {
return AgglayerCrossChainStorage.data();
}
}// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.20;
interface IPolygonZkEVMBridge {
/**
* @dev Thrown when sender is not the PolygonZkEVM address
*/
error OnlyPolygonZkEVM();
/**
* @dev Thrown when the destination network is invalid
*/
error DestinationNetworkInvalid();
/**
* @dev Thrown when the amount does not match msg.value
*/
error AmountDoesNotMatchMsgValue();
/**
* @dev Thrown when user is bridging tokens and is also sending a value
*/
error MsgValueNotZero();
/**
* @dev Thrown when the Ether transfer on claimAsset fails
*/
error EtherTransferFailed();
/**
* @dev Thrown when the message transaction on claimMessage fails
*/
error MessageFailed();
/**
* @dev Thrown when the global exit root does not exist
*/
error GlobalExitRootInvalid();
/**
* @dev Thrown when the smt proof does not match
*/
error InvalidSmtProof();
/**
* @dev Thrown when an index is already claimed
*/
error AlreadyClaimed();
/**
* @dev Thrown when the owner of permit does not match the sender
*/
error NotValidOwner();
/**
* @dev Thrown when the spender of the permit does not match this contract address
*/
error NotValidSpender();
/**
* @dev Thrown when the amount of the permit does not match
*/
error NotValidAmount();
/**
* @dev Thrown when the permit data contains an invalid signature
*/
error NotValidSignature();
function bridgeAsset(
uint32 destinationNetwork,
address destinationAddress,
uint256 amount,
address token,
bool forceUpdateGlobalExitRoot,
bytes calldata permitData
) external payable;
function bridgeMessage(
uint32 destinationNetwork,
address destinationAddress,
bool forceUpdateGlobalExitRoot,
bytes calldata metadata
) external payable;
function claimAsset(
bytes32[32] calldata smtProof,
uint32 index,
bytes32 mainnetExitRoot,
bytes32 rollupExitRoot,
uint32 originNetwork,
address originTokenAddress,
uint32 destinationNetwork,
address destinationAddress,
uint256 amount,
bytes calldata metadata
) external;
function claimMessage(
bytes32[32] calldata smtProof,
uint32 index,
bytes32 mainnetExitRoot,
bytes32 rollupExitRoot,
uint32 originNetwork,
address originAddress,
uint32 destinationNetwork,
address destinationAddress,
uint256 amount,
bytes calldata metadata
) external;
function updateGlobalExitRoot() external;
function activateEmergencyState() external;
function deactivateEmergencyState() external;
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.20;
import {IModule} from "./interface/IModule.sol";
abstract contract Module is IModule {
function getModuleConfig() external pure virtual returns (ModuleConfig memory);
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.20;
library Role {
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* NAMED ROLE CONSTANTS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
uint256 internal constant _MINTER_ROLE = 1 << 0;
uint256 internal constant _MANAGER_ROLE = 1 << 1;
uint256 internal constant _INSTALLER_ROLE = 1 << 255;
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* ROLE CONSTANTS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
uint256 internal constant _ROLE_0 = 1 << 0;
uint256 internal constant _ROLE_1 = 1 << 1;
uint256 internal constant _ROLE_2 = 1 << 2;
uint256 internal constant _ROLE_3 = 1 << 3;
uint256 internal constant _ROLE_4 = 1 << 4;
uint256 internal constant _ROLE_5 = 1 << 5;
uint256 internal constant _ROLE_6 = 1 << 6;
uint256 internal constant _ROLE_7 = 1 << 7;
uint256 internal constant _ROLE_8 = 1 << 8;
uint256 internal constant _ROLE_9 = 1 << 9;
uint256 internal constant _ROLE_10 = 1 << 10;
uint256 internal constant _ROLE_11 = 1 << 11;
uint256 internal constant _ROLE_12 = 1 << 12;
uint256 internal constant _ROLE_13 = 1 << 13;
uint256 internal constant _ROLE_14 = 1 << 14;
uint256 internal constant _ROLE_15 = 1 << 15;
uint256 internal constant _ROLE_16 = 1 << 16;
uint256 internal constant _ROLE_17 = 1 << 17;
uint256 internal constant _ROLE_18 = 1 << 18;
uint256 internal constant _ROLE_19 = 1 << 19;
uint256 internal constant _ROLE_20 = 1 << 20;
uint256 internal constant _ROLE_21 = 1 << 21;
uint256 internal constant _ROLE_22 = 1 << 22;
uint256 internal constant _ROLE_23 = 1 << 23;
uint256 internal constant _ROLE_24 = 1 << 24;
uint256 internal constant _ROLE_25 = 1 << 25;
uint256 internal constant _ROLE_26 = 1 << 26;
uint256 internal constant _ROLE_27 = 1 << 27;
uint256 internal constant _ROLE_28 = 1 << 28;
uint256 internal constant _ROLE_29 = 1 << 29;
uint256 internal constant _ROLE_30 = 1 << 30;
uint256 internal constant _ROLE_31 = 1 << 31;
uint256 internal constant _ROLE_32 = 1 << 32;
uint256 internal constant _ROLE_33 = 1 << 33;
uint256 internal constant _ROLE_34 = 1 << 34;
uint256 internal constant _ROLE_35 = 1 << 35;
uint256 internal constant _ROLE_36 = 1 << 36;
uint256 internal constant _ROLE_37 = 1 << 37;
uint256 internal constant _ROLE_38 = 1 << 38;
uint256 internal constant _ROLE_39 = 1 << 39;
uint256 internal constant _ROLE_40 = 1 << 40;
uint256 internal constant _ROLE_41 = 1 << 41;
uint256 internal constant _ROLE_42 = 1 << 42;
uint256 internal constant _ROLE_43 = 1 << 43;
uint256 internal constant _ROLE_44 = 1 << 44;
uint256 internal constant _ROLE_45 = 1 << 45;
uint256 internal constant _ROLE_46 = 1 << 46;
uint256 internal constant _ROLE_47 = 1 << 47;
uint256 internal constant _ROLE_48 = 1 << 48;
uint256 internal constant _ROLE_49 = 1 << 49;
uint256 internal constant _ROLE_50 = 1 << 50;
uint256 internal constant _ROLE_51 = 1 << 51;
uint256 internal constant _ROLE_52 = 1 << 52;
uint256 internal constant _ROLE_53 = 1 << 53;
uint256 internal constant _ROLE_54 = 1 << 54;
uint256 internal constant _ROLE_55 = 1 << 55;
uint256 internal constant _ROLE_56 = 1 << 56;
uint256 internal constant _ROLE_57 = 1 << 57;
uint256 internal constant _ROLE_58 = 1 << 58;
uint256 internal constant _ROLE_59 = 1 << 59;
uint256 internal constant _ROLE_60 = 1 << 60;
uint256 internal constant _ROLE_61 = 1 << 61;
uint256 internal constant _ROLE_62 = 1 << 62;
uint256 internal constant _ROLE_63 = 1 << 63;
uint256 internal constant _ROLE_64 = 1 << 64;
uint256 internal constant _ROLE_65 = 1 << 65;
uint256 internal constant _ROLE_66 = 1 << 66;
uint256 internal constant _ROLE_67 = 1 << 67;
uint256 internal constant _ROLE_68 = 1 << 68;
uint256 internal constant _ROLE_69 = 1 << 69;
uint256 internal constant _ROLE_70 = 1 << 70;
uint256 internal constant _ROLE_71 = 1 << 71;
uint256 internal constant _ROLE_72 = 1 << 72;
uint256 internal constant _ROLE_73 = 1 << 73;
uint256 internal constant _ROLE_74 = 1 << 74;
uint256 internal constant _ROLE_75 = 1 << 75;
uint256 internal constant _ROLE_76 = 1 << 76;
uint256 internal constant _ROLE_77 = 1 << 77;
uint256 internal constant _ROLE_78 = 1 << 78;
uint256 internal constant _ROLE_79 = 1 << 79;
uint256 internal constant _ROLE_80 = 1 << 80;
uint256 internal constant _ROLE_81 = 1 << 81;
uint256 internal constant _ROLE_82 = 1 << 82;
uint256 internal constant _ROLE_83 = 1 << 83;
uint256 internal constant _ROLE_84 = 1 << 84;
uint256 internal constant _ROLE_85 = 1 << 85;
uint256 internal constant _ROLE_86 = 1 << 86;
uint256 internal constant _ROLE_87 = 1 << 87;
uint256 internal constant _ROLE_88 = 1 << 88;
uint256 internal constant _ROLE_89 = 1 << 89;
uint256 internal constant _ROLE_90 = 1 << 90;
uint256 internal constant _ROLE_91 = 1 << 91;
uint256 internal constant _ROLE_92 = 1 << 92;
uint256 internal constant _ROLE_93 = 1 << 93;
uint256 internal constant _ROLE_94 = 1 << 94;
uint256 internal constant _ROLE_95 = 1 << 95;
uint256 internal constant _ROLE_96 = 1 << 96;
uint256 internal constant _ROLE_97 = 1 << 97;
uint256 internal constant _ROLE_98 = 1 << 98;
uint256 internal constant _ROLE_99 = 1 << 99;
uint256 internal constant _ROLE_100 = 1 << 100;
uint256 internal constant _ROLE_101 = 1 << 101;
uint256 internal constant _ROLE_102 = 1 << 102;
uint256 internal constant _ROLE_103 = 1 << 103;
uint256 internal constant _ROLE_104 = 1 << 104;
uint256 internal constant _ROLE_105 = 1 << 105;
uint256 internal constant _ROLE_106 = 1 << 106;
uint256 internal constant _ROLE_107 = 1 << 107;
uint256 internal constant _ROLE_108 = 1 << 108;
uint256 internal constant _ROLE_109 = 1 << 109;
uint256 internal constant _ROLE_110 = 1 << 110;
uint256 internal constant _ROLE_111 = 1 << 111;
uint256 internal constant _ROLE_112 = 1 << 112;
uint256 internal constant _ROLE_113 = 1 << 113;
uint256 internal constant _ROLE_114 = 1 << 114;
uint256 internal constant _ROLE_115 = 1 << 115;
uint256 internal constant _ROLE_116 = 1 << 116;
uint256 internal constant _ROLE_117 = 1 << 117;
uint256 internal constant _ROLE_118 = 1 << 118;
uint256 internal constant _ROLE_119 = 1 << 119;
uint256 internal constant _ROLE_120 = 1 << 120;
uint256 internal constant _ROLE_121 = 1 << 121;
uint256 internal constant _ROLE_122 = 1 << 122;
uint256 internal constant _ROLE_123 = 1 << 123;
uint256 internal constant _ROLE_124 = 1 << 124;
uint256 internal constant _ROLE_125 = 1 << 125;
uint256 internal constant _ROLE_126 = 1 << 126;
uint256 internal constant _ROLE_127 = 1 << 127;
uint256 internal constant _ROLE_128 = 1 << 128;
uint256 internal constant _ROLE_129 = 1 << 129;
uint256 internal constant _ROLE_130 = 1 << 130;
uint256 internal constant _ROLE_131 = 1 << 131;
uint256 internal constant _ROLE_132 = 1 << 132;
uint256 internal constant _ROLE_133 = 1 << 133;
uint256 internal constant _ROLE_134 = 1 << 134;
uint256 internal constant _ROLE_135 = 1 << 135;
uint256 internal constant _ROLE_136 = 1 << 136;
uint256 internal constant _ROLE_137 = 1 << 137;
uint256 internal constant _ROLE_138 = 1 << 138;
uint256 internal constant _ROLE_139 = 1 << 139;
uint256 internal constant _ROLE_140 = 1 << 140;
uint256 internal constant _ROLE_141 = 1 << 141;
uint256 internal constant _ROLE_142 = 1 << 142;
uint256 internal constant _ROLE_143 = 1 << 143;
uint256 internal constant _ROLE_144 = 1 << 144;
uint256 internal constant _ROLE_145 = 1 << 145;
uint256 internal constant _ROLE_146 = 1 << 146;
uint256 internal constant _ROLE_147 = 1 << 147;
uint256 internal constant _ROLE_148 = 1 << 148;
uint256 internal constant _ROLE_149 = 1 << 149;
uint256 internal constant _ROLE_150 = 1 << 150;
uint256 internal constant _ROLE_151 = 1 << 151;
uint256 internal constant _ROLE_152 = 1 << 152;
uint256 internal constant _ROLE_153 = 1 << 153;
uint256 internal constant _ROLE_154 = 1 << 154;
uint256 internal constant _ROLE_155 = 1 << 155;
uint256 internal constant _ROLE_156 = 1 << 156;
uint256 internal constant _ROLE_157 = 1 << 157;
uint256 internal constant _ROLE_158 = 1 << 158;
uint256 internal constant _ROLE_159 = 1 << 159;
uint256 internal constant _ROLE_160 = 1 << 160;
uint256 internal constant _ROLE_161 = 1 << 161;
uint256 internal constant _ROLE_162 = 1 << 162;
uint256 internal constant _ROLE_163 = 1 << 163;
uint256 internal constant _ROLE_164 = 1 << 164;
uint256 internal constant _ROLE_165 = 1 << 165;
uint256 internal constant _ROLE_166 = 1 << 166;
uint256 internal constant _ROLE_167 = 1 << 167;
uint256 internal constant _ROLE_168 = 1 << 168;
uint256 internal constant _ROLE_169 = 1 << 169;
uint256 internal constant _ROLE_170 = 1 << 170;
uint256 internal constant _ROLE_171 = 1 << 171;
uint256 internal constant _ROLE_172 = 1 << 172;
uint256 internal constant _ROLE_173 = 1 << 173;
uint256 internal constant _ROLE_174 = 1 << 174;
uint256 internal constant _ROLE_175 = 1 << 175;
uint256 internal constant _ROLE_176 = 1 << 176;
uint256 internal constant _ROLE_177 = 1 << 177;
uint256 internal constant _ROLE_178 = 1 << 178;
uint256 internal constant _ROLE_179 = 1 << 179;
uint256 internal constant _ROLE_180 = 1 << 180;
uint256 internal constant _ROLE_181 = 1 << 181;
uint256 internal constant _ROLE_182 = 1 << 182;
uint256 internal constant _ROLE_183 = 1 << 183;
uint256 internal constant _ROLE_184 = 1 << 184;
uint256 internal constant _ROLE_185 = 1 << 185;
uint256 internal constant _ROLE_186 = 1 << 186;
uint256 internal constant _ROLE_187 = 1 << 187;
uint256 internal constant _ROLE_188 = 1 << 188;
uint256 internal constant _ROLE_189 = 1 << 189;
uint256 internal constant _ROLE_190 = 1 << 190;
uint256 internal constant _ROLE_191 = 1 << 191;
uint256 internal constant _ROLE_192 = 1 << 192;
uint256 internal constant _ROLE_193 = 1 << 193;
uint256 internal constant _ROLE_194 = 1 << 194;
uint256 internal constant _ROLE_195 = 1 << 195;
uint256 internal constant _ROLE_196 = 1 << 196;
uint256 internal constant _ROLE_197 = 1 << 197;
uint256 internal constant _ROLE_198 = 1 << 198;
uint256 internal constant _ROLE_199 = 1 << 199;
uint256 internal constant _ROLE_200 = 1 << 200;
uint256 internal constant _ROLE_201 = 1 << 201;
uint256 internal constant _ROLE_202 = 1 << 202;
uint256 internal constant _ROLE_203 = 1 << 203;
uint256 internal constant _ROLE_204 = 1 << 204;
uint256 internal constant _ROLE_205 = 1 << 205;
uint256 internal constant _ROLE_206 = 1 << 206;
uint256 internal constant _ROLE_207 = 1 << 207;
uint256 internal constant _ROLE_208 = 1 << 208;
uint256 internal constant _ROLE_209 = 1 << 209;
uint256 internal constant _ROLE_210 = 1 << 210;
uint256 internal constant _ROLE_211 = 1 << 211;
uint256 internal constant _ROLE_212 = 1 << 212;
uint256 internal constant _ROLE_213 = 1 << 213;
uint256 internal constant _ROLE_214 = 1 << 214;
uint256 internal constant _ROLE_215 = 1 << 215;
uint256 internal constant _ROLE_216 = 1 << 216;
uint256 internal constant _ROLE_217 = 1 << 217;
uint256 internal constant _ROLE_218 = 1 << 218;
uint256 internal constant _ROLE_219 = 1 << 219;
uint256 internal constant _ROLE_220 = 1 << 220;
uint256 internal constant _ROLE_221 = 1 << 221;
uint256 internal constant _ROLE_222 = 1 << 222;
uint256 internal constant _ROLE_223 = 1 << 223;
uint256 internal constant _ROLE_224 = 1 << 224;
uint256 internal constant _ROLE_225 = 1 << 225;
uint256 internal constant _ROLE_226 = 1 << 226;
uint256 internal constant _ROLE_227 = 1 << 227;
uint256 internal constant _ROLE_228 = 1 << 228;
uint256 internal constant _ROLE_229 = 1 << 229;
uint256 internal constant _ROLE_230 = 1 << 230;
uint256 internal constant _ROLE_231 = 1 << 231;
uint256 internal constant _ROLE_232 = 1 << 232;
uint256 internal constant _ROLE_233 = 1 << 233;
uint256 internal constant _ROLE_234 = 1 << 234;
uint256 internal constant _ROLE_235 = 1 << 235;
uint256 internal constant _ROLE_236 = 1 << 236;
uint256 internal constant _ROLE_237 = 1 << 237;
uint256 internal constant _ROLE_238 = 1 << 238;
uint256 internal constant _ROLE_239 = 1 << 239;
uint256 internal constant _ROLE_240 = 1 << 240;
uint256 internal constant _ROLE_241 = 1 << 241;
uint256 internal constant _ROLE_242 = 1 << 242;
uint256 internal constant _ROLE_243 = 1 << 243;
uint256 internal constant _ROLE_244 = 1 << 244;
uint256 internal constant _ROLE_245 = 1 << 245;
uint256 internal constant _ROLE_246 = 1 << 246;
uint256 internal constant _ROLE_247 = 1 << 247;
uint256 internal constant _ROLE_248 = 1 << 248;
uint256 internal constant _ROLE_249 = 1 << 249;
uint256 internal constant _ROLE_250 = 1 << 250;
uint256 internal constant _ROLE_251 = 1 << 251;
uint256 internal constant _ROLE_252 = 1 << 252;
uint256 internal constant _ROLE_253 = 1 << 253;
uint256 internal constant _ROLE_254 = 1 << 254;
uint256 internal constant _ROLE_255 = 1 << 255;
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.20;
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.20;
import {IModuleConfig} from "./IModuleConfig.sol";
interface IModule is IModuleConfig {
/*//////////////////////////////////////////////////////////////
VIEW FUNCTIONS
//////////////////////////////////////////////////////////////*/
/**
* @dev Returns the ModuleConfig of the Module contract.
*/
function getModuleConfig() external pure returns (ModuleConfig memory);
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.20;
interface IModuleConfig {
/*//////////////////////////////////////////////////////////////
STRUCTS & ENUMS
//////////////////////////////////////////////////////////////*/
/**
* @dev Struct for a callback function. Called by a Core into an Module during the execution of some fixed function.
*
* @param selector The 4-byte selector of the function.
* @param callType The type of call to be made to the function.
*/
struct CallbackFunction {
bytes4 selector;
}
/**
* @dev Struct for a fallback function. Called by a Core into an Module via the Core's fallback.
*
* @param selector The 4-byte selector of the function.
* @param callType The type of call to be made to the function.
* @param permissionBits Core’s fallback function MUST check that msg.sender has these permissions before
* performing a call on the Module. (OPTIONAL field)
*/
struct FallbackFunction {
bytes4 selector;
uint256 permissionBits;
}
/**
* @dev Struct containing all information that a Core uses to check whether an Module is compatible for installation.
*
* @param registerInstallationCallback Whether the Module expects onInstall and onUninstall callback function calls at
* installation and uninstallation time, respectively
* @param requiredInterfaces The ERC-165 interface that a Core MUST support to be compatible for installation. OPTIONAL -- can be bytes4(0)
* if there is no required interface id.
* @param supportedInterfaces The ERC-165 interfaces that a Core supports upon installing the Module.
* @param callbackFunctions List of callback functions that the Core MUST call at some point in the execution of its fixed functions.
* @param fallbackFunctions List of functions that the Core MUST call via its fallback function with the Module as the call destination.
*/
struct ModuleConfig {
bool registerInstallationCallback;
bytes4[] requiredInterfaces;
bytes4[] supportedInterfaces;
CallbackFunction[] callbackFunctions;
FallbackFunction[] fallbackFunctions;
}
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.20;
abstract contract CrossChain {
/*//////////////////////////////////////////////////////////////
ERRORS
//////////////////////////////////////////////////////////////*/
error OnCrossChainTransactionSentNotImplemented();
error OnCrossChainTransactionReceivedNotImplemented();
/*//////////////////////////////////////////////////////////////
EXTERNAL FUNCTIONS
//////////////////////////////////////////////////////////////*/
/**
* @notice Sends a cross-chain transaction.
* @param _destinationChain The destination chain ID.
* @param _callAddress The address of the contract on the destination chain.
* @param _payload The payload to send to the destination chain.
* @param _extraArgs The extra arguments to pass
* @dev extraArgs may contain items such as token, amount, feeTokenAddress, receipient, gasLimit, etc
*/
function sendCrossChainTransaction(
uint64 _destinationChain,
address _callAddress,
bytes calldata _payload,
bytes calldata _extraArgs
) external payable virtual;
/**
* @notice callback function for when a cross-chain transaction is sent.
* @param _destinationChain The destination chain ID.
* @param _callAddress The address of the contract on the destination chain.
* @param _payload The payload sent to the destination chain.
* @param _extraArgs The extra arguments sent to the callAddress on the destination chain.
*/
function onCrossChainTransactionSent(
uint64 _destinationChain,
address _callAddress,
bytes calldata _payload,
bytes calldata _extraArgs
) internal virtual {
revert OnCrossChainTransactionSentNotImplemented();
}
/**
* @notice callback function for when a cross-chain transaction is received.
* @param _sourceChain The source chain ID.
* @param _sourceAddress The address of the contract on the source chain.
* @param _payload The payload sent to the destination chain.
* @param _extraArgs The extra arguments sent to the callAddress on the destination chain.
*/
function onCrossChainTransactionReceived(
uint64 _sourceChain,
address _sourceAddress,
bytes memory _payload,
bytes memory _extraArgs
) internal virtual {
revert OnCrossChainTransactionReceivedNotImplemented();
}
function setRouter(address _router) external virtual;
function getRouter() external view virtual returns (address);
}{
"optimizer": {
"enabled": true,
"runs": 10000
},
"evmVersion": "paris",
"remappings": [
":@erc721a-upgradeable/=lib/ERC721A-Upgradeable/contracts/",
":@erc721a/=lib/erc721a/contracts/",
":@limitbreak/creator-token-standards/=lib/creator-token-standards/src/",
":@limitbreak/permit-c/=lib/PermitC/src/",
":@lxly-bridge-and-call/=lib/lxly-bridge-and-call/src/",
":@opensea/tstorish/=lib/creator-token-standards/lib/tstorish/src/",
":@openzeppelin/=lib/creator-token-contracts/node_modules/@openzeppelin/",
":@rari-capital/solmate/=lib/PermitC/lib/solmate/",
":@solady/=lib/solady/src/",
":@zkevm-contracts/=lib/lxly-bridge-and-call/lib/zkevm-contracts/contracts/",
":@zkevm/=lib/lxly-bridge-and-call/lib/zkevm-contracts/contracts/",
":ERC721A-Upgradeable/=lib/ERC721A-Upgradeable/contracts/",
":ERC721A/=lib/creator-token-standards/lib/ERC721A/contracts/",
":PermitC/=lib/PermitC/",
":creator-token-contracts/=lib/creator-token-contracts/contracts/",
":creator-token-standards/=lib/creator-token-standards/",
":ds-test/=lib/forge-std/lib/ds-test/src/",
":erc4626-tests/=lib/lxly-bridge-and-call/lib/openzeppelin-contracts/lib/erc4626-tests/",
":erc721a/=lib/erc721a/contracts/",
":forge-gas-metering/=lib/PermitC/lib/forge-gas-metering/",
":forge-std/=lib/forge-std/src/",
":hardhat/=lib/creator-token-contracts/node_modules/hardhat/",
":lxly-bridge-and-call/=lib/lxly-bridge-and-call/",
":murky/=lib/creator-token-standards/lib/murky/",
":openzeppelin-contracts-upgradeable/=lib/lxly-bridge-and-call/lib/openzeppelin-contracts-upgradeable/",
":openzeppelin-contracts/=lib/lxly-bridge-and-call/lib/openzeppelin-contracts/",
":openzeppelin/=lib/lxly-bridge-and-call/lib/openzeppelin-contracts/contracts/",
":solady/=lib/solady/src/",
":solmate/=lib/PermitC/lib/solmate/src/",
":tstorish/=lib/creator-token-standards/lib/tstorish/src/",
":zkevm-contracts/=lib/lxly-bridge-and-call/lib/zkevm-contracts/contracts/"
],
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"OnCrossChainTransactionReceivedNotImplemented","type":"error"},{"inputs":[],"name":"OnCrossChainTransactionSentNotImplemented","type":"error"},{"inputs":[{"internalType":"uint64","name":"_destinationNetwork","type":"uint64"},{"internalType":"address","name":"_callAddress","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"bridgeTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"router","type":"address"}],"name":"encodeBytesOnInstall","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"encodeBytesOnUninstall","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getModuleConfig","outputs":[{"components":[{"internalType":"bool","name":"registerInstallationCallback","type":"bool"},{"internalType":"bytes4[]","name":"requiredInterfaces","type":"bytes4[]"},{"internalType":"bytes4[]","name":"supportedInterfaces","type":"bytes4[]"},{"components":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"internalType":"struct IModuleConfig.CallbackFunction[]","name":"callbackFunctions","type":"tuple[]"},{"components":[{"internalType":"bytes4","name":"selector","type":"bytes4"},{"internalType":"uint256","name":"permissionBits","type":"uint256"}],"internalType":"struct IModuleConfig.FallbackFunction[]","name":"fallbackFunctions","type":"tuple[]"}],"internalType":"struct IModuleConfig.ModuleConfig","name":"config","type":"tuple"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onInstall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onUninstall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_destinationNetwork","type":"uint64"},{"internalType":"address","name":"_callAddress","type":"address"},{"internalType":"bytes","name":"_payload","type":"bytes"},{"internalType":"bytes","name":"_extraArgs","type":"bytes"}],"name":"sendCrossChainTransaction","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"router","type":"address"}],"name":"setRouter","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
6080604052348015600f57600080fd5b506113738061001f6000396000f3fe6080604052600436106100965760003560e01c80638ff6736b11610069578063b0f479a11161004e578063b0f479a11461018f578063c0d78655146101c9578063f5b75d2a146101e957600080fd5b80638ff6736b14610169578063908a71431461017c57600080fd5b80635d4c0b891461009b5780636d61fe701461010657806389e04e0e146101285780638a91b0e31461014a575b600080fd5b3480156100a757600080fd5b506100f06100b6366004610c4a565b6040805173ffffffffffffffffffffffffffffffffffffffff83166020820152606091016040516020818303038152906040529050919050565b6040516100fd9190610cb4565b60405180910390f35b34801561011257600080fd5b50610126610121366004610d10565b61020a565b005b34801561013457600080fd5b5061013d6103c1565b6040516100fd9190610e10565b34801561015657600080fd5b50610126610165366004610d10565b5050565b610126610177366004610f05565b6105ae565b61012661018a366004610f44565b6105d1565b34801561019b57600080fd5b506101a46106c8565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100fd565b3480156101d557600080fd5b506101266101e4366004610c4a565b6106ee565b3480156101f557600080fd5b506040805160208101909152600081526100f0565b600061021882840184610c4a565b905060008173ffffffffffffffffffffffffffffffffffffffff1663e78cea926040518163ffffffff1660e01b8152600401602060405180830381865afa158015610267573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061028b9190610fdc565b90508161029661073d565b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055806102e261073d565b60010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff1663bab161bf6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561036e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103929190610ff9565b61039a61073d565b60010160146101000a81548163ffffffff021916908363ffffffff16021790555050505050565b6103f56040518060a00160405280600015158152602001606081526020016060815260200160608152602001606081525090565b60408051600480825260a0820190925290816020015b604080518082019091526000808252602082015281526020019060019003908161040b57505060808201908152604080518082019091527fb0f479a100000000000000000000000000000000000000000000000000000000815260006020820181905291518051919290916104825761048261104e565b6020026020010181905250604051806040016040528063c0d7865560e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001600281525081608001516001815181106104e0576104e061104e565b6020026020010181905250604051806040016040528063908a714360e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020016000815250816080015160028151811061053e5761053e61104e565b60200260200101819052506040518060400160405280638ff6736b60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020016000815250816080015160038151811061059c5761059c61104e565b60209081029190910101526001815290565b6105cc8383833060016040518060200160405280600081525061074c565b505050565b6000808080806105e38688018861108b565b93985091965094509250905073ffffffffffffffffffffffffffffffffffffffff8316158015610611575081155b1561065d576106588b8b868c8c8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061092292505050565b6106bb565b6000889003610674576106588b8b8486888661074c565b6106bb8383838e8e8a8f8f8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508e92506109bf915050565b5050505050505050505050565b60006106d261073d565b5473ffffffffffffffffffffffffffffffffffffffff16919050565b806106f761073d565b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b6000610747610ba5565b905090565b600061075661073d565b600101546040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810187905273ffffffffffffffffffffffffffffffffffffffff9182169250908516906323b872dd906064016020604051808303816000875af11580156107d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fd9190611187565b506040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301526024820187905285169063095ea7b3906044016020604051808303816000875af1158015610873573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108979190611187565b506040517fcd58657900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169063cd586579906108f4908a908a908a908a908a908a906004016111a4565b600060405180830381600087803b15801561090e57600080fd5b505af11580156106bb573d6000803e3d6000fd5b61092a61073d565b600101546040517f240ff37800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063240ff37890610987908790879087908790600401611215565b600060405180830381600087803b1580156109a157600080fd5b505af11580156109b5573d6000803e3d6000fd5b5050505050505050565b60006109c961073d565b546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018a905273ffffffffffffffffffffffffffffffffffffffff9182169250908a16906323b872dd906064016020604051808303816000875af1158015610a49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6d9190611187565b506040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152602482018a90528a169063095ea7b3906044016020604051808303816000875af1158015610ae3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b079190611187565b506040517f87057b7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216906387057b7e90610b68908c908c908c908c908c908c908c908c90600401611258565b600060405180830381600087803b158015610b8257600080fd5b505af1158015610b96573d6000803e3d6000fd5b50505050505050505050505050565b6000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00610bf460017fff5b52060289f841046ae219242fe3855fe48dce8b1808c9862e9c7a7fc0d2146112fd565b604051602001610c0691815260200190565b60408051601f1981840301815291905280516020909101201692915050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c4757600080fd5b50565b600060208284031215610c5c57600080fd5b8135610c6781610c25565b9392505050565b6000815180845260005b81811015610c9457602081850181015186830182015201610c78565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610c676020830184610c6e565b60008083601f840112610cd957600080fd5b50813567ffffffffffffffff811115610cf157600080fd5b602083019150836020828501011115610d0957600080fd5b9250929050565b60008060208385031215610d2357600080fd5b823567ffffffffffffffff811115610d3a57600080fd5b610d4685828601610cc7565b90969095509350505050565b600081518084526020840193506020830160005b82811015610da65781517fffffffff0000000000000000000000000000000000000000000000000000000016865260209586019590910190600101610d66565b5093949350505050565b600081518084526020840193506020830160005b82811015610da657815180517fffffffff000000000000000000000000000000000000000000000000000000001687526020908101518188015260409096019590910190600101610dc4565b602081528151151560208201526000602083015160a06040840152610e3860c0840182610d52565b90506040840151601f19848303016060850152610e558282610d52565b6060860151858203601f19016080870152805180835260209182019450600093509101905b80831015610ec0577fffffffff00000000000000000000000000000000000000000000000000000000845151168252602082019150602084019350600183019250610e7a565b5060808601519250601f198582030160a0860152610ede8184610db0565b9695505050505050565b803567ffffffffffffffff81168114610f0057600080fd5b919050565b600080600060608486031215610f1a57600080fd5b610f2384610ee8565b92506020840135610f3381610c25565b929592945050506040919091013590565b60008060008060008060808789031215610f5d57600080fd5b610f6687610ee8565b95506020870135610f7681610c25565b9450604087013567ffffffffffffffff811115610f9257600080fd5b610f9e89828a01610cc7565b909550935050606087013567ffffffffffffffff811115610fbe57600080fd5b610fca89828a01610cc7565b979a9699509497509295939492505050565b600060208284031215610fee57600080fd5b8151610c6781610c25565b60006020828403121561100b57600080fd5b815163ffffffff81168114610c6757600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b8015158114610c4757600080fd5b600080600080600060a086880312156110a357600080fd5b85356110ae81610c25565b945060208601356110be8161107d565b935060408601356110ce81610c25565b925060608601359150608086013567ffffffffffffffff8111156110f157600080fd5b8601601f8101881361110257600080fd5b803567ffffffffffffffff81111561111c5761111c61101f565b604051601f19603f601f19601f8501160116810181811067ffffffffffffffff8211171561114c5761114c61101f565b6040528181528282016020018a101561116457600080fd5b816020840160208301376000602083830101528093505050509295509295909350565b60006020828403121561119957600080fd5b8151610c678161107d565b63ffffffff8716815273ffffffffffffffffffffffffffffffffffffffff8616602082015284604082015273ffffffffffffffffffffffffffffffffffffffff84166060820152821515608082015260c060a0820152600061120960c0830184610c6e565b98975050505050505050565b63ffffffff8516815273ffffffffffffffffffffffffffffffffffffffff841660208201528215156040820152608060608201526000610ede6080830184610c6e565b73ffffffffffffffffffffffffffffffffffffffff891681528760208201526101006040820152600061128f610100830189610c6e565b63ffffffff8816606084015273ffffffffffffffffffffffffffffffffffffffff8716608084015273ffffffffffffffffffffffffffffffffffffffff861660a084015282810360c08401526112e58186610c6e565b91505082151560e08301529998505050505050505050565b81810381811115611337577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9291505056fea2646970667358221220787383a346a24416812c112810812e7c6e90ef1a2a7143c46b0a428e5e7e2a7264736f6c634300081a0033
Deployed Bytecode
0x6080604052600436106100965760003560e01c80638ff6736b11610069578063b0f479a11161004e578063b0f479a11461018f578063c0d78655146101c9578063f5b75d2a146101e957600080fd5b80638ff6736b14610169578063908a71431461017c57600080fd5b80635d4c0b891461009b5780636d61fe701461010657806389e04e0e146101285780638a91b0e31461014a575b600080fd5b3480156100a757600080fd5b506100f06100b6366004610c4a565b6040805173ffffffffffffffffffffffffffffffffffffffff83166020820152606091016040516020818303038152906040529050919050565b6040516100fd9190610cb4565b60405180910390f35b34801561011257600080fd5b50610126610121366004610d10565b61020a565b005b34801561013457600080fd5b5061013d6103c1565b6040516100fd9190610e10565b34801561015657600080fd5b50610126610165366004610d10565b5050565b610126610177366004610f05565b6105ae565b61012661018a366004610f44565b6105d1565b34801561019b57600080fd5b506101a46106c8565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100fd565b3480156101d557600080fd5b506101266101e4366004610c4a565b6106ee565b3480156101f557600080fd5b506040805160208101909152600081526100f0565b600061021882840184610c4a565b905060008173ffffffffffffffffffffffffffffffffffffffff1663e78cea926040518163ffffffff1660e01b8152600401602060405180830381865afa158015610267573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061028b9190610fdc565b90508161029661073d565b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055806102e261073d565b60010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff1663bab161bf6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561036e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103929190610ff9565b61039a61073d565b60010160146101000a81548163ffffffff021916908363ffffffff16021790555050505050565b6103f56040518060a00160405280600015158152602001606081526020016060815260200160608152602001606081525090565b60408051600480825260a0820190925290816020015b604080518082019091526000808252602082015281526020019060019003908161040b57505060808201908152604080518082019091527fb0f479a100000000000000000000000000000000000000000000000000000000815260006020820181905291518051919290916104825761048261104e565b6020026020010181905250604051806040016040528063c0d7865560e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001600281525081608001516001815181106104e0576104e061104e565b6020026020010181905250604051806040016040528063908a714360e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020016000815250816080015160028151811061053e5761053e61104e565b60200260200101819052506040518060400160405280638ff6736b60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020016000815250816080015160038151811061059c5761059c61104e565b60209081029190910101526001815290565b6105cc8383833060016040518060200160405280600081525061074c565b505050565b6000808080806105e38688018861108b565b93985091965094509250905073ffffffffffffffffffffffffffffffffffffffff8316158015610611575081155b1561065d576106588b8b868c8c8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061092292505050565b6106bb565b6000889003610674576106588b8b8486888661074c565b6106bb8383838e8e8a8f8f8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508e92506109bf915050565b5050505050505050505050565b60006106d261073d565b5473ffffffffffffffffffffffffffffffffffffffff16919050565b806106f761073d565b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b6000610747610ba5565b905090565b600061075661073d565b600101546040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810187905273ffffffffffffffffffffffffffffffffffffffff9182169250908516906323b872dd906064016020604051808303816000875af11580156107d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fd9190611187565b506040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301526024820187905285169063095ea7b3906044016020604051808303816000875af1158015610873573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108979190611187565b506040517fcd58657900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169063cd586579906108f4908a908a908a908a908a908a906004016111a4565b600060405180830381600087803b15801561090e57600080fd5b505af11580156106bb573d6000803e3d6000fd5b61092a61073d565b600101546040517f240ff37800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063240ff37890610987908790879087908790600401611215565b600060405180830381600087803b1580156109a157600080fd5b505af11580156109b5573d6000803e3d6000fd5b5050505050505050565b60006109c961073d565b546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018a905273ffffffffffffffffffffffffffffffffffffffff9182169250908a16906323b872dd906064016020604051808303816000875af1158015610a49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6d9190611187565b506040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8281166004830152602482018a90528a169063095ea7b3906044016020604051808303816000875af1158015610ae3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b079190611187565b506040517f87057b7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216906387057b7e90610b68908c908c908c908c908c908c908c908c90600401611258565b600060405180830381600087803b158015610b8257600080fd5b505af1158015610b96573d6000803e3d6000fd5b50505050505050505050505050565b6000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00610bf460017fff5b52060289f841046ae219242fe3855fe48dce8b1808c9862e9c7a7fc0d2146112fd565b604051602001610c0691815260200190565b60408051601f1981840301815291905280516020909101201692915050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c4757600080fd5b50565b600060208284031215610c5c57600080fd5b8135610c6781610c25565b9392505050565b6000815180845260005b81811015610c9457602081850181015186830182015201610c78565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610c676020830184610c6e565b60008083601f840112610cd957600080fd5b50813567ffffffffffffffff811115610cf157600080fd5b602083019150836020828501011115610d0957600080fd5b9250929050565b60008060208385031215610d2357600080fd5b823567ffffffffffffffff811115610d3a57600080fd5b610d4685828601610cc7565b90969095509350505050565b600081518084526020840193506020830160005b82811015610da65781517fffffffff0000000000000000000000000000000000000000000000000000000016865260209586019590910190600101610d66565b5093949350505050565b600081518084526020840193506020830160005b82811015610da657815180517fffffffff000000000000000000000000000000000000000000000000000000001687526020908101518188015260409096019590910190600101610dc4565b602081528151151560208201526000602083015160a06040840152610e3860c0840182610d52565b90506040840151601f19848303016060850152610e558282610d52565b6060860151858203601f19016080870152805180835260209182019450600093509101905b80831015610ec0577fffffffff00000000000000000000000000000000000000000000000000000000845151168252602082019150602084019350600183019250610e7a565b5060808601519250601f198582030160a0860152610ede8184610db0565b9695505050505050565b803567ffffffffffffffff81168114610f0057600080fd5b919050565b600080600060608486031215610f1a57600080fd5b610f2384610ee8565b92506020840135610f3381610c25565b929592945050506040919091013590565b60008060008060008060808789031215610f5d57600080fd5b610f6687610ee8565b95506020870135610f7681610c25565b9450604087013567ffffffffffffffff811115610f9257600080fd5b610f9e89828a01610cc7565b909550935050606087013567ffffffffffffffff811115610fbe57600080fd5b610fca89828a01610cc7565b979a9699509497509295939492505050565b600060208284031215610fee57600080fd5b8151610c6781610c25565b60006020828403121561100b57600080fd5b815163ffffffff81168114610c6757600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b8015158114610c4757600080fd5b600080600080600060a086880312156110a357600080fd5b85356110ae81610c25565b945060208601356110be8161107d565b935060408601356110ce81610c25565b925060608601359150608086013567ffffffffffffffff8111156110f157600080fd5b8601601f8101881361110257600080fd5b803567ffffffffffffffff81111561111c5761111c61101f565b604051601f19603f601f19601f8501160116810181811067ffffffffffffffff8211171561114c5761114c61101f565b6040528181528282016020018a101561116457600080fd5b816020840160208301376000602083830101528093505050509295509295909350565b60006020828403121561119957600080fd5b8151610c678161107d565b63ffffffff8716815273ffffffffffffffffffffffffffffffffffffffff8616602082015284604082015273ffffffffffffffffffffffffffffffffffffffff84166060820152821515608082015260c060a0820152600061120960c0830184610c6e565b98975050505050505050565b63ffffffff8516815273ffffffffffffffffffffffffffffffffffffffff841660208201528215156040820152608060608201526000610ede6080830184610c6e565b73ffffffffffffffffffffffffffffffffffffffff891681528760208201526101006040820152600061128f610100830189610c6e565b63ffffffff8816606084015273ffffffffffffffffffffffffffffffffffffffff8716608084015273ffffffffffffffffffffffffffffffffffffffff861660a084015282810360c08401526112e58186610c6e565b91505082151560e08301529998505050505050505050565b81810381811115611337577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9291505056fea2646970667358221220787383a346a24416812c112810812e7c6e90ef1a2a7143c46b0a428e5e7e2a7264736f6c634300081a0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 36 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.