Source Code
Overview
ETH Balance
ETH Value
$0.00Latest 1 from a total of 1 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Set Authorized S... | 8320485 | 539 days ago | IN | 0 ETH | 0.00000321 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 27866931 | 25 days ago | 0 ETH | ||||
| 27866931 | 25 days ago | 0 ETH | ||||
| 27866894 | 25 days ago | 0 ETH | ||||
| 27866894 | 25 days ago | 0 ETH | ||||
| 18285685 | 293 days ago | 0 ETH | ||||
| 18285685 | 293 days ago | 0 ETH | ||||
| 16686823 | 338 days ago | 0 ETH | ||||
| 16686823 | 338 days ago | 0 ETH | ||||
| 15685054 | 363 days ago | 0 ETH | ||||
| 15685054 | 363 days ago | 0 ETH | ||||
| 14613902 | 390 days ago | 0 ETH | ||||
| 14613902 | 390 days ago | 0 ETH | ||||
| 14613276 | 390 days ago | 0 ETH | ||||
| 14613276 | 390 days ago | 0 ETH | ||||
| 13750217 | 411 days ago | 0 ETH | ||||
| 13750217 | 411 days ago | 0 ETH | ||||
| 13750180 | 411 days ago | 0 ETH | ||||
| 13750180 | 411 days ago | 0 ETH | ||||
| 13750123 | 411 days ago | 0 ETH | ||||
| 13750123 | 411 days ago | 0 ETH | ||||
| 13750089 | 411 days ago | 0 ETH | ||||
| 13750089 | 411 days ago | 0 ETH | ||||
| 13750047 | 411 days ago | 0 ETH | ||||
| 13750047 | 411 days ago | 0 ETH | ||||
| 13749999 | 411 days ago | 0 ETH |
Loading...
Loading
Contract Name:
ECDSAModule
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
No with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;
import { AbstractModule } from "../abstracts/AbstractModule.sol";
import { AttestationPayload } from "../types/Structs.sol";
import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
contract ECDSAModule is AbstractModule, Ownable {
using ECDSA for bytes32;
address public portal;
mapping(address signer => bool authorizedSigners) public authorizedSigners;
/// @notice Error thrown when an array length mismatch occurs
error ArrayLengthMismatch();
/// @notice Error thrown when a signer is not authorized by the module
error SignerNotAuthorized();
/// @notice Event emitted when the authorized signers are set
event SignersAuthorized(address indexed portal, address[] signers, bool[] authorizationStatus);
/**
* @notice Contract constructor sets the portal address
*/
constructor(address _portal) {
portal = _portal;
}
/**
* @notice Set the accepted status of schemaIds
* @param signers The signers to be set
* @param authorizationStatus The authorization status of signers
*/
function setAuthorizedSigners(
address[] memory signers,
bool[] memory authorizationStatus
) public onlyOwner {
if (signers.length != authorizationStatus.length) revert ArrayLengthMismatch();
for (uint256 i = 0; i < signers.length; i++) {
authorizedSigners[signers[i]] = authorizationStatus[i];
}
emit SignersAuthorized(portal, signers, authorizationStatus);
}
/**
* @notice The main method for the module, running the check
* @param _attestationPayload The Payload of the attestation
* @param _validationPayload The validation payload required for the module
*/
function run(
AttestationPayload memory _attestationPayload,
bytes memory _validationPayload,
address /*txSender*/,
uint256 /*_value*/
) public view override {
bytes32 messageHash = keccak256(abi.encode(_attestationPayload));
address messageSigner = messageHash.toEthSignedMessageHash().recover(_validationPayload);
if (!authorizedSigners[messageSigner]) revert SignerNotAuthorized();
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.0;
import "../Strings.sol";
/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV // Deprecated in v4.8
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert("ECDSA: invalid signature");
} else if (error == RecoverError.InvalidSignatureLength) {
revert("ECDSA: invalid signature length");
} else if (error == RecoverError.InvalidSignatureS) {
revert("ECDSA: invalid signature 's' value");
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature` or error string. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*
* _Available since v4.3._
*/
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
/// @solidity memory-safe-assembly
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else {
return (address(0), RecoverError.InvalidSignatureLength);
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*
* _Available since v4.3._
*/
function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*
* _Available since v4.2._
*/
function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, r, vs);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*
* _Available since v4.3._
*/
function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature);
}
return (signer, RecoverError.NoError);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, v, r, s);
_throwError(error);
return recovered;
}
/**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {
// 32 is the length in bytes of hash,
// enforced by the type signature above
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, "\x19Ethereum Signed Message:\n32")
mstore(0x1c, hash)
message := keccak256(0x00, 0x3c)
}
}
/**
* @dev Returns an Ethereum Signed Message, created from `s`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
}
/**
* @dev Returns an Ethereum Signed Typed Data, created from a
* `domainSeparator` and a `structHash`. This produces hash corresponding
* to the one signed with the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
* JSON-RPC method as part of EIP-712.
*
* See {recover}.
*/
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {
/// @solidity memory-safe-assembly
assembly {
let ptr := mload(0x40)
mstore(ptr, "\x19\x01")
mstore(add(ptr, 0x02), domainSeparator)
mstore(add(ptr, 0x22), structHash)
data := keccak256(ptr, 0x42)
}
}
/**
* @dev Returns an Ethereum Signed Data with intended validator, created from a
* `validator` and `data` according to the version 0 of EIP-191.
*
* See {recover}.
*/
function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x00", validator, data));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
* with further edits by Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
require(denominator > prod1, "Math: mulDiv overflow");
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
// See https://cs.stackexchange.com/q/138556/92363.
// Does not overflow because the denominator cannot be zero at this stage in the function.
uint256 twos = denominator & (~denominator + 1);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
// in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMath {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
*/
function average(int256 a, int256 b) internal pure returns (int256) {
// Formula from the book "Hacker's Delight"
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// must be unchecked in order to support `n = type(int256).min`
return uint256(n >= 0 ? n : -n);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/Math.sol";
import "./math/SignedMath.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `int256` to its ASCII `string` decimal representation.
*/
function toString(int256 value) internal pure returns (string memory) {
return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
/**
* @dev Returns true if the two strings are equal.
*/
function equal(string memory a, string memory b) internal pure returns (bool) {
return keccak256(bytes(a)) == keccak256(bytes(b));
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;
import { AttestationPayload } from "../types/Structs.sol";
import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
/**
* @title Abstract Module
* @author Consensys
* @notice Defines the minimal Module interface
*/
abstract contract AbstractModule is IERC165 {
/// @notice Error thrown when someone else than the portal's owner is trying to revoke
error OnlyPortalOwner();
/**
* @notice Executes the module's custom logic.
* @param attestationPayload The incoming attestation data.
* @param validationPayload Additional data required for verification.
* @param txSender The transaction sender's address.
* @param value The transaction value.
*/
function run(
AttestationPayload memory attestationPayload,
bytes memory validationPayload,
address txSender,
uint256 value
) public virtual;
/**
* @notice Checks if the contract implements the Module interface.
* @param interfaceID The ID of the interface to check.
* @return A boolean indicating interface support.
*/
function supportsInterface(bytes4 interfaceID) public pure virtual override returns (bool) {
return interfaceID == type(AbstractModule).interfaceId || interfaceID == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;
struct AttestationPayload {
bytes32 schemaId; // The identifier of the schema this attestation adheres to.
uint64 expirationDate; // The expiration date of the attestation.
bytes subject; // The ID of the attestee, EVM address, DID, URL etc.
bytes attestationData; // The attestation data.
}
struct Attestation {
bytes32 attestationId; // The unique identifier of the attestation.
bytes32 schemaId; // The identifier of the schema this attestation adheres to.
bytes32 replacedBy; // Whether the attestation was replaced by a new one.
address attester; // The address issuing the attestation to the subject.
address portal; // The id of the portal that created the attestation.
uint64 attestedDate; // The date the attestation is issued.
uint64 expirationDate; // The expiration date of the attestation.
uint64 revocationDate; // The date when the attestation was revoked.
uint16 version; // Version of the registry when the attestation was created.
bool revoked; // Whether the attestation is revoked or not.
bytes subject; // The ID of the attestee, EVM address, DID, URL etc.
bytes attestationData; // The attestation data.
}
struct Schema {
string name; // The name of the schema.
string description; // A description of the schema.
string context; // The context of the schema.
string schema; // The schema definition.
}
struct Portal {
address id; // The unique identifier of the portal.
address ownerAddress; // The address of the owner of this portal.
address[] modules; // Addresses of modules implemented by the portal.
bool isRevocable; // Whether attestations issued can be revoked.
string name; // The name of the portal.
string description; // A description of the portal.
string ownerName; // The name of the owner of this portal.
}
struct Module {
address moduleAddress; // The address of the module.
string name; // The name of the module.
string description; // A description of the module.
}{
"evmVersion": "paris",
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_portal","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ArrayLengthMismatch","type":"error"},{"inputs":[],"name":"OnlyPortalOwner","type":"error"},{"inputs":[],"name":"SignerNotAuthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"portal","type":"address"},{"indexed":false,"internalType":"address[]","name":"signers","type":"address[]"},{"indexed":false,"internalType":"bool[]","name":"authorizationStatus","type":"bool[]"}],"name":"SignersAuthorized","type":"event"},{"inputs":[{"internalType":"address","name":"signer","type":"address"}],"name":"authorizedSigners","outputs":[{"internalType":"bool","name":"authorizedSigners","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"portal","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"schemaId","type":"bytes32"},{"internalType":"uint64","name":"expirationDate","type":"uint64"},{"internalType":"bytes","name":"subject","type":"bytes"},{"internalType":"bytes","name":"attestationData","type":"bytes"}],"internalType":"struct AttestationPayload","name":"_attestationPayload","type":"tuple"},{"internalType":"bytes","name":"_validationPayload","type":"bytes"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"run","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"signers","type":"address[]"},{"internalType":"bool[]","name":"authorizationStatus","type":"bool[]"}],"name":"setAuthorizedSigners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040523480156200001157600080fd5b50604051620019bd380380620019bd8339818101604052810190620000379190620001d5565b620000576200004b6200009f60201b60201c565b620000a760201b60201c565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505062000207565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200019d8262000170565b9050919050565b620001af8162000190565b8114620001bb57600080fd5b50565b600081519050620001cf81620001a4565b92915050565b600060208284031215620001ee57620001ed6200016b565b5b6000620001fe84828501620001be565b91505092915050565b6117a680620002176000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063715018a61161005b578063715018a6146101275780638da5cb5b14610131578063cbf0196f1461014f578063f2fde38b1461016b57610088565b806301ffc9a71461008d578063378144b0146100bd5780635d2b6a4e146100d95780636425666b14610109575b600080fd5b6100a760048036038101906100a29190610a44565b610187565b6040516100b49190610a8c565b60405180910390f35b6100d760048036038101906100d29190610db1565b610259565b005b6100f360048036038101906100ee9190610e50565b61032e565b6040516101009190610a8c565b60405180910390f35b61011161034e565b60405161011e9190610e8c565b60405180910390f35b61012f610374565b005b610139610388565b6040516101469190610e8c565b60405180910390f35b6101696004803603810190610164919061105e565b6103b1565b005b61018560048036038101906101809190610e50565b610515565b005b60007f367e8d17000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061025257507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60008460405160200161026c91906111dd565b60405160208183030381529060405280519060200120905060006102a18561029384610598565b6105ce90919063ffffffff16565b9050600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610326576040517f23866ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050565b60026020528060005260406000206000915054906101000a900460ff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61037c6105f5565b6103866000610673565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6103b96105f5565b80518251146103f4576040517fa24a13a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b825181101561049e57818181518110610413576104126111ff565b5b602002602001015160026000858481518110610432576104316111ff565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806104969061125d565b9150506103f7565b50600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f280c6f8f1fb7e8c0b540114434383b08881fa06e270944506aef05d2df8e59668383604051610509929190611421565b60405180910390a25050565b61051d6105f5565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361058c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610583906114db565b60405180910390fd5b61059581610673565b50565b60007f19457468657265756d205369676e6564204d6573736167653a0a33320000000060005281601c52603c6000209050919050565b60008060006105dd8585610737565b915091506105ea81610788565b819250505092915050565b6105fd6108ee565b73ffffffffffffffffffffffffffffffffffffffff1661061b610388565b73ffffffffffffffffffffffffffffffffffffffff1614610671576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066890611547565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008060418351036107785760008060006020860151925060408601519150606086015160001a905061076c878285856108f6565b94509450505050610781565b60006002915091505b9250929050565b6000600481111561079c5761079b611567565b5b8160048111156107af576107ae611567565b5b03156108eb57600160048111156107c9576107c8611567565b5b8160048111156107dc576107db611567565b5b0361081c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610813906115e2565b60405180910390fd5b600260048111156108305761082f611567565b5b81600481111561084357610842611567565b5b03610883576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161087a9061164e565b60405180910390fd5b6003600481111561089757610896611567565b5b8160048111156108aa576108a9611567565b5b036108ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108e1906116e0565b60405180910390fd5b5b50565b600033905090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c11156109315760006003915091506109cf565b600060018787878760405160008152602001604052604051610956949392919061172b565b6020604051602081039080840390855afa158015610978573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036109c6576000600192509250506109cf565b80600092509250505b94509492505050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610a21816109ec565b8114610a2c57600080fd5b50565b600081359050610a3e81610a18565b92915050565b600060208284031215610a5a57610a596109e2565b5b6000610a6884828501610a2f565b91505092915050565b60008115159050919050565b610a8681610a71565b82525050565b6000602082019050610aa16000830184610a7d565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610af582610aac565b810181811067ffffffffffffffff82111715610b1457610b13610abd565b5b80604052505050565b6000610b276109d8565b9050610b338282610aec565b919050565b600080fd5b6000819050919050565b610b5081610b3d565b8114610b5b57600080fd5b50565b600081359050610b6d81610b47565b92915050565b600067ffffffffffffffff82169050919050565b610b9081610b73565b8114610b9b57600080fd5b50565b600081359050610bad81610b87565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115610bd857610bd7610abd565b5b610be182610aac565b9050602081019050919050565b82818337600083830152505050565b6000610c10610c0b84610bbd565b610b1d565b905082815260208101848484011115610c2c57610c2b610bb8565b5b610c37848285610bee565b509392505050565b600082601f830112610c5457610c53610bb3565b5b8135610c64848260208601610bfd565b91505092915050565b600060808284031215610c8357610c82610aa7565b5b610c8d6080610b1d565b90506000610c9d84828501610b5e565b6000830152506020610cb184828501610b9e565b602083015250604082013567ffffffffffffffff811115610cd557610cd4610b38565b5b610ce184828501610c3f565b604083015250606082013567ffffffffffffffff811115610d0557610d04610b38565b5b610d1184828501610c3f565b60608301525092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610d4882610d1d565b9050919050565b610d5881610d3d565b8114610d6357600080fd5b50565b600081359050610d7581610d4f565b92915050565b6000819050919050565b610d8e81610d7b565b8114610d9957600080fd5b50565b600081359050610dab81610d85565b92915050565b60008060008060808587031215610dcb57610dca6109e2565b5b600085013567ffffffffffffffff811115610de957610de86109e7565b5b610df587828801610c6d565b945050602085013567ffffffffffffffff811115610e1657610e156109e7565b5b610e2287828801610c3f565b9350506040610e3387828801610d66565b9250506060610e4487828801610d9c565b91505092959194509250565b600060208284031215610e6657610e656109e2565b5b6000610e7484828501610d66565b91505092915050565b610e8681610d3d565b82525050565b6000602082019050610ea16000830184610e7d565b92915050565b600067ffffffffffffffff821115610ec257610ec1610abd565b5b602082029050602081019050919050565b600080fd5b6000610eeb610ee684610ea7565b610b1d565b90508083825260208201905060208402830185811115610f0e57610f0d610ed3565b5b835b81811015610f375780610f238882610d66565b845260208401935050602081019050610f10565b5050509392505050565b600082601f830112610f5657610f55610bb3565b5b8135610f66848260208601610ed8565b91505092915050565b600067ffffffffffffffff821115610f8a57610f89610abd565b5b602082029050602081019050919050565b610fa481610a71565b8114610faf57600080fd5b50565b600081359050610fc181610f9b565b92915050565b6000610fda610fd584610f6f565b610b1d565b90508083825260208201905060208402830185811115610ffd57610ffc610ed3565b5b835b8181101561102657806110128882610fb2565b845260208401935050602081019050610fff565b5050509392505050565b600082601f83011261104557611044610bb3565b5b8135611055848260208601610fc7565b91505092915050565b60008060408385031215611075576110746109e2565b5b600083013567ffffffffffffffff811115611093576110926109e7565b5b61109f85828601610f41565b925050602083013567ffffffffffffffff8111156110c0576110bf6109e7565b5b6110cc85828601611030565b9150509250929050565b6110df81610b3d565b82525050565b6110ee81610b73565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561112e578082015181840152602081019050611113565b60008484015250505050565b6000611145826110f4565b61114f81856110ff565b935061115f818560208601611110565b61116881610aac565b840191505092915050565b600060808301600083015161118b60008601826110d6565b50602083015161119e60208601826110e5565b50604083015184820360408601526111b6828261113a565b915050606083015184820360608601526111d0828261113a565b9150508091505092915050565b600060208201905081810360008301526111f78184611173565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061126882610d7b565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361129a5761129961122e565b5b600182019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6112da81610d3d565b82525050565b60006112ec83836112d1565b60208301905092915050565b6000602082019050919050565b6000611310826112a5565b61131a81856112b0565b9350611325836112c1565b8060005b8381101561135657815161133d88826112e0565b9750611348836112f8565b925050600181019050611329565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61139881610a71565b82525050565b60006113aa838361138f565b60208301905092915050565b6000602082019050919050565b60006113ce82611363565b6113d8818561136e565b93506113e38361137f565b8060005b838110156114145781516113fb888261139e565b9750611406836113b6565b9250506001810190506113e7565b5085935050505092915050565b6000604082019050818103600083015261143b8185611305565b9050818103602083015261144f81846113c3565b90509392505050565b600082825260208201905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006114c5602683611458565b91506114d082611469565b604082019050919050565b600060208201905081810360008301526114f4816114b8565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000611531602083611458565b915061153c826114fb565b602082019050919050565b6000602082019050818103600083015261156081611524565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b60006115cc601883611458565b91506115d782611596565b602082019050919050565b600060208201905081810360008301526115fb816115bf565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b6000611638601f83611458565b915061164382611602565b602082019050919050565b600060208201905081810360008301526116678161162b565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b60006116ca602283611458565b91506116d58261166e565b604082019050919050565b600060208201905081810360008301526116f9816116bd565b9050919050565b61170981610b3d565b82525050565b600060ff82169050919050565b6117258161170f565b82525050565b60006080820190506117406000830187611700565b61174d602083018661171c565b61175a6040830185611700565b6117676060830184611700565b9594505050505056fea264697066735822122017070f3a5c0d822674640dbb5b423d2348129d7c36c3b4076125be837dc90e7364736f6c6343000815003300000000000000000000000092300aed0cb2b0d392dbf912085b01c4b2251b7d
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063715018a61161005b578063715018a6146101275780638da5cb5b14610131578063cbf0196f1461014f578063f2fde38b1461016b57610088565b806301ffc9a71461008d578063378144b0146100bd5780635d2b6a4e146100d95780636425666b14610109575b600080fd5b6100a760048036038101906100a29190610a44565b610187565b6040516100b49190610a8c565b60405180910390f35b6100d760048036038101906100d29190610db1565b610259565b005b6100f360048036038101906100ee9190610e50565b61032e565b6040516101009190610a8c565b60405180910390f35b61011161034e565b60405161011e9190610e8c565b60405180910390f35b61012f610374565b005b610139610388565b6040516101469190610e8c565b60405180910390f35b6101696004803603810190610164919061105e565b6103b1565b005b61018560048036038101906101809190610e50565b610515565b005b60007f367e8d17000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061025257507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60008460405160200161026c91906111dd565b60405160208183030381529060405280519060200120905060006102a18561029384610598565b6105ce90919063ffffffff16565b9050600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610326576040517f23866ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050565b60026020528060005260406000206000915054906101000a900460ff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61037c6105f5565b6103866000610673565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6103b96105f5565b80518251146103f4576040517fa24a13a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b825181101561049e57818181518110610413576104126111ff565b5b602002602001015160026000858481518110610432576104316111ff565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806104969061125d565b9150506103f7565b50600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f280c6f8f1fb7e8c0b540114434383b08881fa06e270944506aef05d2df8e59668383604051610509929190611421565b60405180910390a25050565b61051d6105f5565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361058c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610583906114db565b60405180910390fd5b61059581610673565b50565b60007f19457468657265756d205369676e6564204d6573736167653a0a33320000000060005281601c52603c6000209050919050565b60008060006105dd8585610737565b915091506105ea81610788565b819250505092915050565b6105fd6108ee565b73ffffffffffffffffffffffffffffffffffffffff1661061b610388565b73ffffffffffffffffffffffffffffffffffffffff1614610671576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066890611547565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008060418351036107785760008060006020860151925060408601519150606086015160001a905061076c878285856108f6565b94509450505050610781565b60006002915091505b9250929050565b6000600481111561079c5761079b611567565b5b8160048111156107af576107ae611567565b5b03156108eb57600160048111156107c9576107c8611567565b5b8160048111156107dc576107db611567565b5b0361081c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610813906115e2565b60405180910390fd5b600260048111156108305761082f611567565b5b81600481111561084357610842611567565b5b03610883576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161087a9061164e565b60405180910390fd5b6003600481111561089757610896611567565b5b8160048111156108aa576108a9611567565b5b036108ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108e1906116e0565b60405180910390fd5b5b50565b600033905090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c11156109315760006003915091506109cf565b600060018787878760405160008152602001604052604051610956949392919061172b565b6020604051602081039080840390855afa158015610978573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036109c6576000600192509250506109cf565b80600092509250505b94509492505050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610a21816109ec565b8114610a2c57600080fd5b50565b600081359050610a3e81610a18565b92915050565b600060208284031215610a5a57610a596109e2565b5b6000610a6884828501610a2f565b91505092915050565b60008115159050919050565b610a8681610a71565b82525050565b6000602082019050610aa16000830184610a7d565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610af582610aac565b810181811067ffffffffffffffff82111715610b1457610b13610abd565b5b80604052505050565b6000610b276109d8565b9050610b338282610aec565b919050565b600080fd5b6000819050919050565b610b5081610b3d565b8114610b5b57600080fd5b50565b600081359050610b6d81610b47565b92915050565b600067ffffffffffffffff82169050919050565b610b9081610b73565b8114610b9b57600080fd5b50565b600081359050610bad81610b87565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115610bd857610bd7610abd565b5b610be182610aac565b9050602081019050919050565b82818337600083830152505050565b6000610c10610c0b84610bbd565b610b1d565b905082815260208101848484011115610c2c57610c2b610bb8565b5b610c37848285610bee565b509392505050565b600082601f830112610c5457610c53610bb3565b5b8135610c64848260208601610bfd565b91505092915050565b600060808284031215610c8357610c82610aa7565b5b610c8d6080610b1d565b90506000610c9d84828501610b5e565b6000830152506020610cb184828501610b9e565b602083015250604082013567ffffffffffffffff811115610cd557610cd4610b38565b5b610ce184828501610c3f565b604083015250606082013567ffffffffffffffff811115610d0557610d04610b38565b5b610d1184828501610c3f565b60608301525092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610d4882610d1d565b9050919050565b610d5881610d3d565b8114610d6357600080fd5b50565b600081359050610d7581610d4f565b92915050565b6000819050919050565b610d8e81610d7b565b8114610d9957600080fd5b50565b600081359050610dab81610d85565b92915050565b60008060008060808587031215610dcb57610dca6109e2565b5b600085013567ffffffffffffffff811115610de957610de86109e7565b5b610df587828801610c6d565b945050602085013567ffffffffffffffff811115610e1657610e156109e7565b5b610e2287828801610c3f565b9350506040610e3387828801610d66565b9250506060610e4487828801610d9c565b91505092959194509250565b600060208284031215610e6657610e656109e2565b5b6000610e7484828501610d66565b91505092915050565b610e8681610d3d565b82525050565b6000602082019050610ea16000830184610e7d565b92915050565b600067ffffffffffffffff821115610ec257610ec1610abd565b5b602082029050602081019050919050565b600080fd5b6000610eeb610ee684610ea7565b610b1d565b90508083825260208201905060208402830185811115610f0e57610f0d610ed3565b5b835b81811015610f375780610f238882610d66565b845260208401935050602081019050610f10565b5050509392505050565b600082601f830112610f5657610f55610bb3565b5b8135610f66848260208601610ed8565b91505092915050565b600067ffffffffffffffff821115610f8a57610f89610abd565b5b602082029050602081019050919050565b610fa481610a71565b8114610faf57600080fd5b50565b600081359050610fc181610f9b565b92915050565b6000610fda610fd584610f6f565b610b1d565b90508083825260208201905060208402830185811115610ffd57610ffc610ed3565b5b835b8181101561102657806110128882610fb2565b845260208401935050602081019050610fff565b5050509392505050565b600082601f83011261104557611044610bb3565b5b8135611055848260208601610fc7565b91505092915050565b60008060408385031215611075576110746109e2565b5b600083013567ffffffffffffffff811115611093576110926109e7565b5b61109f85828601610f41565b925050602083013567ffffffffffffffff8111156110c0576110bf6109e7565b5b6110cc85828601611030565b9150509250929050565b6110df81610b3d565b82525050565b6110ee81610b73565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561112e578082015181840152602081019050611113565b60008484015250505050565b6000611145826110f4565b61114f81856110ff565b935061115f818560208601611110565b61116881610aac565b840191505092915050565b600060808301600083015161118b60008601826110d6565b50602083015161119e60208601826110e5565b50604083015184820360408601526111b6828261113a565b915050606083015184820360608601526111d0828261113a565b9150508091505092915050565b600060208201905081810360008301526111f78184611173565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061126882610d7b565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361129a5761129961122e565b5b600182019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6112da81610d3d565b82525050565b60006112ec83836112d1565b60208301905092915050565b6000602082019050919050565b6000611310826112a5565b61131a81856112b0565b9350611325836112c1565b8060005b8381101561135657815161133d88826112e0565b9750611348836112f8565b925050600181019050611329565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61139881610a71565b82525050565b60006113aa838361138f565b60208301905092915050565b6000602082019050919050565b60006113ce82611363565b6113d8818561136e565b93506113e38361137f565b8060005b838110156114145781516113fb888261139e565b9750611406836113b6565b9250506001810190506113e7565b5085935050505092915050565b6000604082019050818103600083015261143b8185611305565b9050818103602083015261144f81846113c3565b90509392505050565b600082825260208201905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006114c5602683611458565b91506114d082611469565b604082019050919050565b600060208201905081810360008301526114f4816114b8565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000611531602083611458565b915061153c826114fb565b602082019050919050565b6000602082019050818103600083015261156081611524565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b60006115cc601883611458565b91506115d782611596565b602082019050919050565b600060208201905081810360008301526115fb816115bf565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b6000611638601f83611458565b915061164382611602565b602082019050919050565b600060208201905081810360008301526116678161162b565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b60006116ca602283611458565b91506116d58261166e565b604082019050919050565b600060208201905081810360008301526116f9816116bd565b9050919050565b61170981610b3d565b82525050565b600060ff82169050919050565b6117258161170f565b82525050565b60006080820190506117406000830187611700565b61174d602083018661171c565b61175a6040830185611700565b6117676060830184611700565b9594505050505056fea264697066735822122017070f3a5c0d822674640dbb5b423d2348129d7c36c3b4076125be837dc90e7364736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000092300aed0cb2b0d392dbf912085b01c4b2251b7d
-----Decoded View---------------
Arg [0] : _portal (address): 0x92300aeD0Cb2b0d392DbF912085b01C4b2251B7D
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000092300aed0cb2b0d392dbf912085b01c4b2251b7d
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
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.