Source Code
Overview
HYPE Balance
HYPE Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
BLSVerifier
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@kevincharm/bls-bn254/contracts/BLS.sol";
/**
* @title BLSVerifier
* @notice Dedicated contract for BLS signature verification
* @dev This contract houses the heavy BLS operations, allowing the main VRF contract
* to remain small enough for small-block deployment on HyperEVM
*/
contract BLSVerifier {
/**
* @notice Checks if a signature is valid (on curve)
* @param sig The signature to validate
* @return bool True if signature is valid
*/
function isValidSignature(uint256[2] calldata sig) external pure returns (bool) {
return BLS.isValidSignature(sig);
}
/**
* @notice Verifies a single BLS signature against a public key and message
* @param sig The signature to verify
* @param pk The public key (G2 point)
* @param message The message that was signed (G1 point)
* @return ok True if signature verification passed
* @return callSuccess True if the pairing check succeeded
*/
function verifySingle(
uint256[2] calldata sig,
uint256[4] calldata pk,
uint256[2] calldata message
) external view returns (bool ok, bool callSuccess) {
return BLS.verifySingle(sig, pk, message);
}
/**
* @notice Hashes arbitrary bytes to a point on the BN254 G1 curve
* @param dst Domain separation tag
* @param msgBytes The message bytes to hash
* @return The resulting G1 point
*/
function hashToPoint(bytes calldata dst, bytes calldata msgBytes)
external view returns (uint256[2] memory)
{
return BLS.hashToPoint(dst, msgBytes);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8;
import {ModexpInverse, ModexpSqrt} from "./ModExp.sol";
/// @title Boneh–Lynn–Shacham (BLS) signature scheme on Barreto-Naehrig 254 bit curve (BN-254)
/// @notice We use BLS signature aggregation to reduce the size of signature data to store on chain.
/// @dev We use G1 points for signatures and messages, and G2 points for public keys
/// @dev Adapted from https://github.com/thehubbleproject/hubble-contracts
library BLS {
// Field order
// prettier-ignore
uint256 private constant N = 21888242871839275222246405745257275088696311157297823662689037894645226208583;
// Negated generator of G2
// prettier-ignore
uint256 private constant N_G2_X1 = 11559732032986387107991004021392285783925812861821192530917403151452391805634;
// prettier-ignore
uint256 private constant N_G2_X0 = 10857046999023057135944570762232829481370756359578518086990519993285655852781;
// prettier-ignore
uint256 private constant N_G2_Y1 = 17805874995975841540914202342111839520379459829704422454583296818431106115052;
// prettier-ignore
uint256 private constant N_G2_Y0 = 13392588948715843804641432497768002650278120570034223513918757245338268106653;
// prettier-ignore
uint256 private constant T24 = 0x1000000000000000000000000000000000000000000000000;
// prettier-ignore
uint256 private constant MASK24 = 0xffffffffffffffffffffffffffffffffffffffffffffffff;
/// @notice Param A of BN254
uint256 private constant A = 0;
/// @notice Param B of BN254
uint256 private constant B = 3;
/// @notice Param Z for SVDW over E
uint256 private constant Z = 1;
/// @notice g(Z) where g(x) = x^3 + 3
uint256 private constant C1 = 0x4;
/// @notice -Z / 2 (mod N)
uint256 private constant C2 =
0x183227397098d014dc2822db40c0ac2ecbc0b548b438e5469e10460b6c3e7ea3;
/// @notice C3 = sqrt(-g(Z) * (3 * Z^2 + 4 * A)) (mod N)
/// and sgn0(C3) == 0
uint256 private constant C3 =
0x16789af3a83522eb353c98fc6b36d713d5d8d1cc5dffffffa;
/// @notice 4 * -g(Z) / (3 * Z^2 + 4 * A) (mod N)
uint256 private constant C4 =
0x10216f7ba065e00de81ac1e7808072c9dd2b2385cd7b438469602eb24829a9bd;
/// @notice (N - 1) / 2
uint256 private constant C5 =
0x183227397098d014dc2822db40c0ac2ecbc0b548b438e5469e10460b6c3e7ea3;
error BNAddFailed(uint256[4] input);
error InvalidFieldElement(uint256 x);
error MapToPointFailed(uint256 noSqrt);
error InvalidDSTLength(bytes dst);
error ModExpFailed(uint256 base, uint256 exponent, uint256 modulus);
function verifySingle(
uint256[2] memory signature,
uint256[4] memory pubkey,
uint256[2] memory message
) internal view returns (bool pairingSuccess, bool callSuccess) {
uint256[12] memory input = [
signature[0],
signature[1],
N_G2_X1,
N_G2_X0,
N_G2_Y1,
N_G2_Y0,
message[0],
message[1],
pubkey[1],
pubkey[0],
pubkey[3],
pubkey[2]
];
uint256[1] memory out;
// solium-disable-next-line security/no-inline-assembly
assembly {
callSuccess := staticcall(
sub(gas(), 2000),
8,
input,
384,
out,
0x20
)
}
return (out[0] != 0, callSuccess);
}
/// @notice Hash to BN254 G1
/// @param domain Domain separation tag
/// @param message Message to hash
/// @return Point in G1
function hashToPoint(
bytes memory domain,
bytes memory message
) internal view returns (uint256[2] memory) {
uint256[2] memory u = hashToField(domain, message);
uint256[2] memory p0 = mapToPoint(u[0]);
uint256[2] memory p1 = mapToPoint(u[1]);
uint256[4] memory bnAddInput;
bnAddInput[0] = p0[0];
bnAddInput[1] = p0[1];
bnAddInput[2] = p1[0];
bnAddInput[3] = p1[1];
bool success;
// solium-disable-next-line security/no-inline-assembly
assembly {
success := staticcall(sub(gas(), 2000), 6, bnAddInput, 128, p0, 64)
}
if (!success) revert BNAddFailed(bnAddInput);
return p0;
}
/// @notice Check if `signature` is a valid signature
/// @param signature Signature to check
function isValidSignature(
uint256[2] memory signature
) internal pure returns (bool) {
if ((signature[0] >= N) || (signature[1] >= N)) {
return false;
} else {
return isOnCurveG1(signature);
}
}
/// @notice Check if `publicKey` is a valid public key
/// @param publicKey PK to check
function isValidPublicKey(
uint256[4] memory publicKey
) internal pure returns (bool) {
if (
(publicKey[0] >= N) ||
(publicKey[1] >= N) ||
(publicKey[2] >= N || (publicKey[3] >= N))
) {
return false;
} else {
return isOnCurveG2(publicKey);
}
}
/// @notice Check if `point` is in G1
/// @param point Point to check
function isOnCurveG1(
uint256[2] memory point
) internal pure returns (bool _isOnCurve) {
// solium-disable-next-line security/no-inline-assembly
assembly {
let t0 := mload(point)
let t1 := mload(add(point, 32))
let t2 := mulmod(t0, t0, N)
t2 := mulmod(t2, t0, N)
t2 := addmod(t2, 3, N)
t1 := mulmod(t1, t1, N)
_isOnCurve := eq(t1, t2)
}
}
/// @notice Check if `point` is in G2
/// @param point Point to check
function isOnCurveG2(
uint256[4] memory point
) internal pure returns (bool _isOnCurve) {
// solium-disable-next-line security/no-inline-assembly
assembly {
// x0, x1
let t0 := mload(point)
let t1 := mload(add(point, 32))
// x0 ^ 2
let t2 := mulmod(t0, t0, N)
// x1 ^ 2
let t3 := mulmod(t1, t1, N)
// 3 * x0 ^ 2
let t4 := add(add(t2, t2), t2)
// 3 * x1 ^ 2
let t5 := addmod(add(t3, t3), t3, N)
// x0 * (x0 ^ 2 - 3 * x1 ^ 2)
t2 := mulmod(add(t2, sub(N, t5)), t0, N)
// x1 * (3 * x0 ^ 2 - x1 ^ 2)
t3 := mulmod(add(t4, sub(N, t3)), t1, N)
// x ^ 3 + b
t0 := addmod(
t2,
0x2b149d40ceb8aaae81be18991be06ac3b5b4c5e559dbefa33267e6dc24a138e5,
N
)
t1 := addmod(
t3,
0x009713b03af0fed4cd2cafadeed8fdf4a74fa084e52d1852e4a2bd0685c315d2,
N
)
// y0, y1
t2 := mload(add(point, 64))
t3 := mload(add(point, 96))
// y ^ 2
t4 := mulmod(addmod(t2, t3, N), addmod(t2, sub(N, t3), N), N)
t3 := mulmod(shl(1, t2), t3, N)
// y ^ 2 == x ^ 3 + b
_isOnCurve := and(eq(t0, t4), eq(t1, t3))
}
}
/// @notice sqrt(xx) mod N
/// @param xx Input
function sqrt(uint256 xx) internal pure returns (uint256 x, bool hasRoot) {
x = ModexpSqrt.run(xx);
hasRoot = mulmod(x, x, N) == xx;
}
/// @notice a^{-1} mod N
/// @param a Input
function inverse(uint256 a) internal pure returns (uint256) {
return ModexpInverse.run(a);
}
/// @notice Hash a message to the field
/// @param domain Domain separation tag
/// @param message Message to hash
function hashToField(
bytes memory domain,
bytes memory message
) internal pure returns (uint256[2] memory) {
bytes memory _msg = expandMsgTo96(domain, message);
uint256 u0;
uint256 u1;
uint256 a0;
uint256 a1;
// solium-disable-next-line security/no-inline-assembly
assembly {
let p := add(_msg, 24)
u1 := and(mload(p), MASK24)
p := add(_msg, 48)
u0 := and(mload(p), MASK24)
a0 := addmod(mulmod(u1, T24, N), u0, N)
p := add(_msg, 72)
u1 := and(mload(p), MASK24)
p := add(_msg, 96)
u0 := and(mload(p), MASK24)
a1 := addmod(mulmod(u1, T24, N), u0, N)
}
return [a0, a1];
}
/// @notice Expand arbitrary message to 96 pseudorandom bytes, as described
/// in rfc9380 section 5.3.1, using H = keccak256.
/// @param DST Domain separation tag
/// @param message Message to expand
function expandMsgTo96(
bytes memory DST,
bytes memory message
) internal pure returns (bytes memory) {
uint256 domainLen = DST.length;
if (domainLen > 255) {
revert InvalidDSTLength(DST);
}
bytes memory zpad = new bytes(136);
bytes memory b_0 = abi.encodePacked(
zpad,
message,
uint8(0),
uint8(96),
uint8(0),
DST,
uint8(domainLen)
);
bytes32 b0 = keccak256(b_0);
bytes memory b_i = abi.encodePacked(
b0,
uint8(1),
DST,
uint8(domainLen)
);
bytes32 bi = keccak256(b_i);
bytes memory out = new bytes(96);
uint256 ell = 3;
for (uint256 i = 1; i < ell; i++) {
b_i = abi.encodePacked(
b0 ^ bi,
uint8(1 + i),
DST,
uint8(domainLen)
);
assembly {
let p := add(32, out)
p := add(p, mul(32, sub(i, 1)))
mstore(p, bi)
}
bi = keccak256(b_i);
}
assembly {
let p := add(32, out)
p := add(p, mul(32, sub(ell, 1)))
mstore(p, bi)
}
return out;
}
/// @notice Map field element to E using SvdW
/// @param u Field element to map
/// @return p Point on curve
function mapToPoint(uint256 u) internal view returns (uint256[2] memory p) {
if (u >= N) revert InvalidFieldElement(u);
uint256 tv1 = mulmod(mulmod(u, u, N), C1, N);
uint256 tv2 = addmod(1, tv1, N);
tv1 = addmod(1, N - tv1, N);
uint256 tv3 = inverse(mulmod(tv1, tv2, N));
uint256 tv5 = mulmod(mulmod(mulmod(u, tv1, N), tv3, N), C3, N);
uint256 x1 = addmod(C2, N - tv5, N);
uint256 x2 = addmod(C2, tv5, N);
uint256 tv7 = mulmod(tv2, tv2, N);
uint256 tv8 = mulmod(tv7, tv3, N);
uint256 x3 = addmod(Z, mulmod(C4, mulmod(tv8, tv8, N), N), N);
bool hasRoot;
uint256 gx;
if (legendre(g(x1)) == 1) {
p[0] = x1;
gx = g(x1);
(p[1], hasRoot) = sqrt(gx);
if (!hasRoot) revert MapToPointFailed(gx);
} else if (legendre(g(x2)) == 1) {
p[0] = x2;
gx = g(x2);
(p[1], hasRoot) = sqrt(gx);
if (!hasRoot) revert MapToPointFailed(gx);
} else {
p[0] = x3;
gx = g(x3);
(p[1], hasRoot) = sqrt(gx);
if (!hasRoot) revert MapToPointFailed(gx);
}
if (sgn0(u) != sgn0(p[1])) {
p[1] = N - p[1];
}
}
/// @notice g(x) = y^2 = x^3 + 3
function g(uint256 x) private pure returns (uint256) {
return addmod(mulmod(mulmod(x, x, N), x, N), B, N);
}
/// @notice https://datatracker.ietf.org/doc/html/rfc9380#name-the-sgn0-function
function sgn0(uint256 x) private pure returns (uint256) {
return x % 2;
}
/// @notice Compute Legendre symbol of u
/// @param u Field element
/// @return 1 if u is a quadratic residue, -1 if not, or 0 if u = 0 (mod p)
function legendre(uint256 u) private view returns (int8) {
uint256 x = modexpLegendre(u);
if (x == N - 1) {
return -1;
}
if (x != 0 && x != 1) {
revert MapToPointFailed(u);
}
return int8(int256(x));
}
/// @notice This is cheaper than an addchain for exponent (N-1)/2
function modexpLegendre(uint256 u) private view returns (uint256 output) {
bytes memory input = new bytes(192);
bool success;
assembly {
let p := add(input, 32)
mstore(p, 32) // len(u)
p := add(p, 32)
mstore(p, 32) // len(exp)
p := add(p, 32)
mstore(p, 32) // len(mod)
p := add(p, 32)
mstore(p, u) // u
p := add(p, 32)
mstore(p, C5) // (N-1)/2
p := add(p, 32)
mstore(p, N) // N
success := staticcall(
gas(),
5,
add(input, 32),
192,
0x00, // scratch space <- result
32
)
output := mload(0x00) // output <- result
}
if (!success) {
revert ModExpFailed(u, C5, N);
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8;
/**
@title Compute Inverse by Modular Exponentiation
@notice Compute $input^(N - 2) mod N$ using Addition Chain method.
Where N = 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47
and N - 2 = 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd45
@dev the function body is generated with the modified addchain script
see https://github.com/kobigurk/addchain/commit/2c37a2ace567a9bdc680b4e929c94aaaa3ec700f
*/
library ModexpInverse {
function run(uint256 t2) internal pure returns (uint256 t0) {
// solium-disable-next-line security/no-inline-assembly
assembly {
let
n
:= 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47
t0 := mulmod(t2, t2, n)
let t5 := mulmod(t0, t2, n)
let t1 := mulmod(t5, t0, n)
let t3 := mulmod(t5, t5, n)
let t8 := mulmod(t1, t0, n)
let t4 := mulmod(t3, t5, n)
let t6 := mulmod(t3, t1, n)
t0 := mulmod(t3, t3, n)
let t7 := mulmod(t8, t3, n)
t3 := mulmod(t4, t3, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t5, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t2, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t2, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t8, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t8, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t2, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t8, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t2, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t5, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t7, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t1, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t5, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t8, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t1, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t2, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t6, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t7, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t1, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t5, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t1, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t5, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t6, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t6, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t1, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t8, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t6, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t1, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t4, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t6, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t2, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t8, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t8, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t1, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t2, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t7, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t3, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t2, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t2, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t5, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t6, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t5, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t5, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t3, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t4, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t3, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t1, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t2, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t1, n)
}
}
}
/**
@title Compute Square Root by Modular Exponentiation
@notice Compute $input^{(N + 1) / 4} mod N$ using Addition Chain method.
Where N = 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47
and (N + 1) / 4 = 0xc19139cb84c680a6e14116da060561765e05aa45a1c72a34f082305b61f3f52
*/
library ModexpSqrt {
function run(uint256 t6) internal pure returns (uint256 t0) {
// solium-disable-next-line security/no-inline-assembly
assembly {
let
n
:= 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47
t0 := mulmod(t6, t6, n)
let t4 := mulmod(t0, t6, n)
let t2 := mulmod(t4, t0, n)
let t3 := mulmod(t4, t4, n)
let t8 := mulmod(t2, t0, n)
let t1 := mulmod(t3, t4, n)
let t5 := mulmod(t3, t2, n)
t0 := mulmod(t3, t3, n)
let t7 := mulmod(t8, t3, n)
t3 := mulmod(t1, t3, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t4, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t6, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t6, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t8, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t8, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t6, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t8, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t6, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t4, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t7, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t2, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t4, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t8, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t2, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t6, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t5, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t7, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t2, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t4, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t2, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t4, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t5, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t5, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t2, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t8, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t5, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t2, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t1, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t5, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t6, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t8, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t8, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t2, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t6, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t7, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t3, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t6, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t6, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t4, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t5, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t4, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t4, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t3, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t1, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t3, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t2, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t0, n)
t0 := mulmod(t0, t1, n)
t0 := mulmod(t0, t0, n)
}
}
}{
"metadata": {
"bytecodeHash": "none"
},
"viaIR": true,
"optimizer": {
"enabled": true,
"runs": 200,
"details": {
"yul": true,
"yulDetails": {
"stackAllocation": true
}
}
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"uint256[4]","name":"input","type":"uint256[4]"}],"name":"BNAddFailed","type":"error"},{"inputs":[{"internalType":"bytes","name":"dst","type":"bytes"}],"name":"InvalidDSTLength","type":"error"},{"inputs":[{"internalType":"uint256","name":"x","type":"uint256"}],"name":"InvalidFieldElement","type":"error"},{"inputs":[{"internalType":"uint256","name":"noSqrt","type":"uint256"}],"name":"MapToPointFailed","type":"error"},{"inputs":[{"internalType":"uint256","name":"base","type":"uint256"},{"internalType":"uint256","name":"exponent","type":"uint256"},{"internalType":"uint256","name":"modulus","type":"uint256"}],"name":"ModExpFailed","type":"error"},{"inputs":[{"internalType":"bytes","name":"dst","type":"bytes"},{"internalType":"bytes","name":"msgBytes","type":"bytes"}],"name":"hashToPoint","outputs":[{"internalType":"uint256[2]","name":"","type":"uint256[2]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[2]","name":"sig","type":"uint256[2]"}],"name":"isValidSignature","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256[2]","name":"sig","type":"uint256[2]"},{"internalType":"uint256[4]","name":"pk","type":"uint256[4]"},{"internalType":"uint256[2]","name":"message","type":"uint256[2]"}],"name":"verifySingle","outputs":[{"internalType":"bool","name":"ok","type":"bool"},{"internalType":"bool","name":"callSuccess","type":"bool"}],"stateMutability":"view","type":"function"}]Contract Creation Code
6080806040523461001657611a29908161001c8239f35b600080fdfe6080604052600436101561001257600080fd5b6000803560e01c908163247dd9fb1461004a5750806354894f58146100455763ebbdac911461004057600080fd5b610238565b61012b565b346100ac5760403660031901126100ac57610064366100af565b9061006f60c0604052565b60809160408101913683116100ac5750915b81831061009c5760206100926104ab565b6040519015158152f35b8235815260209283019201610081565b80fd5b906004916044116100bc57565b600080fd5b9060c491610104116100bc57565b9181601f840112156100bc5782359167ffffffffffffffff83116100bc57602083818601950101116100bc57565b6040810192916000915b6002831061011457505050565b600190825181526020809101920192019190610107565b346100bc576040806003193601126100bc5767ffffffffffffffff6004358181116100bc5761015e9036906004016100cf565b916024359081116100bc576101b19261019a6101816101a29336906004016100cf565b949092878051610190816103aa565b3690373691610542565b923691610542565b906101ab6104f5565b506105b7565b6101c860206101c0835161091a565b92015161091a565b60206101d2610509565b8351815281840151828201528251858201529101516060820152610201838360808460066107cf195a01fa1590565b61021857506102149151918291826100fd565b0390f35b8251630251c7e160e31b81529081906102349060048301610589565b0390fd5b346100bc57610100806003193601126100bc57610254366100af565b3660c4116100bc57610180916040602092610279610271366100c1565b913690610439565b928461028f61028736610473565b933690610439565b81610298610409565b96805188520151828701527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c2858701527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed60608701527f275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec60808701527f1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d60a0870152805160c0870152015160e0850152848201519084015280516101208401526060810151610140840152015161016082015261037361051d565b92839160086107cf195a01fa90516040805191151582529115156020820152f35b634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff8211176103c657604052565b610394565b6080810190811067ffffffffffffffff8211176103c657604052565b90601f8019910116810190811067ffffffffffffffff8211176103c657604052565b60405190610180820182811067ffffffffffffffff8211176103c657604052565b60405190610437826103aa565b565b919060405192610448846103aa565b8390604081019283116100bc57905b82821061046357505050565b8135815260209182019101610457565b9060405191610481836103cb565b8260c49182116100bc576044905b82821061049b57505050565b813581526020918201910161048f565b6080516000805160206119fd8339815191528082108015906104e9575b156104d4575050600090565b8060038160a051948181800909089180091490565b508060a05110156104c8565b60405190610502826103aa565b6040368337565b60405190610516826103cb565b6080368337565b604051906020820182811067ffffffffffffffff8211176103c6576040526020368337565b92919267ffffffffffffffff82116103c6576040519161056c601f8201601f1916602001846103e7565b8294818452818301116100bc578281602093846000960137010152565b6080810192916000915b600483106105a057505050565b600190825181526020809101920192019190610593565b906040918280516105c7816103aa565b36903780519060ff821161070d57909260ff6105e1610778565b9416815194856105f9838660209889850195866107e9565b039561060d601f19978881018352826103e7565b5190208251858101906106328161062686898787610852565b038981018352826103e7565b5190209361063e6107a4565b966001945b87600387106106ab575050505050505080606084015260018060c01b0392836018820151169084604881603084015116920151169161068061042a565b956000805160206119fd8339815191529485809481600160c01b809609088852169209089082015290565b938787986106ed86976106e18a6107039798996106d26106cc899e9f6108f0565b60ff1690565b8a51978895860199188961088c565b038781018452836103e7565b6000198a0160051b8c018b0152519020966108dc565b9493929190610643565b83516313727cdd60e11b8152908190610234906004830161074c565b60005b83811061073c5750506000910152565b818101518382015260200161072c565b6040916020825261076c8151809281602086015260208686019101610729565b601f01601f1916010190565b6040519060c0820182811067ffffffffffffffff8211176103c6576040526088825260a0366020840137565b604051906107b1826103cb565b6060808352366020840137565b6040519060e0820182811067ffffffffffffffff8211176103c65760405260c0808352366020840137565b9161081360206004969594610805829582815194859201610729565b019182815194859201610729565b0160008152600360fd1b60018201526000600282015261083d825180936020600385019101610729565b019060ff60f81b9060f81b1660038201520190565b60229392918152600160f81b6020820152610877825180936020602185019101610729565b019060ff60f81b9060f81b1660218201520190565b6022949391815260ff60f81b809360f81b1660208201526108b7825180936020602185019101610729565b019160f81b1660218201520190565b634e487b7160e01b600052601160045260246000fd5b60001981146108eb5760010190565b6108c6565b60010190816001116108eb57565b906000805160206119fd8339815191529182039182116108eb57565b906109236104f5565b916000805160206119fd83398151915280821015610abb578060048184800909906001918161095581838608926108fe565b840890828080808078016789af3a83522eb353c98fc6b36d713d5d8d1cc5dffffffa818b81610986818b8d096112e6565b9a8b92090909958180610998896108fe565b98817f183227397098d014dc2822db40c0ac2ecbc0b548b438e5469e10460b6c3e7ea39a8b0899089680090980097f10216f7ba065e00de81ac1e7808072c9dd2b2385cd7b438469602eb24829a9bd0985089083600381858181800909089385610a0186611201565b60000b03610a61575050508552610a1781610ad4565b90602087015215610a4757505b6020840191825191808316911603610a3a575050565b610a43906108fe565b9052565b60405163396ec77160e01b81526004810191909152602490fd5b919350915080600381848181800909089284610a7c85611201565b60000b03610aa25750508552610a9181610ad4565b90602087015215610a475750610a24565b81935060039250808852818180090908610a9181610ad4565b60405163d53e941560e01b815260048101839052602490fd5b906000805160206119fd8339815191528080808080808080808b8180808080808080808080808080808f8180828180808080808080808080809e8180808080858180808080808087819e8280808080808681808080808080809e8180808381808080808080808089819e828080808080808080808080808d819e8280808080808080888180808080809e8180808080808080888180808080809e818080808080808080808a818080809e818080808080808080808a818080809e8180808080808080808981808080809e8180808080808681808080808080809e8180808080858180808080808080809e8180808084818080808080808080809e8180808084818080808080808080809e81808080808080808080809a8180808080808080808080808c818080808080808080808a818080808080808080808080808d81808080808581808080808080808080808b8181800909818c81818009090981808c8181800909818d8181800909090980098009800980098180878181800909918009098009800980090980098009800980090980098009800981808c818082800991818082800991818180090909099181808280099180090909800980098009800981808088800981808a8009818b8181800909090991800909800980098009098009800980098180808a800981808c8009818d8181800909090991800909800980098009800980090980098009800981808b81818009099180090980098009800980098009928180808381818009098184818180090909918180828009918180828009918181800909090909918180828009918009090980098009800980098009800980098009800981808d818082800991818180090909918009098009800980098180898181800909918009098009800980099281808280099181808280099181818009090909918009098009800980098009800980098180808b8009818c818180090909918009098009800980098009800980090980098009800980098009818080808c8009818d818180090909818c8180828181800909918181800909090991818082800991800909098009800980098009928180808381818009098184818180090909918180828009918180828009918181800909090909918009098009800981808d818082800991818180090909918009098009800980098009800980098009928181800909918009098009800980098009800980098009800992818082800991818180090909918009098009800981808d818180090991800909800980098009800980098009800992818080838009818481818009090991818082818180090991818180090909099180090980098009800981808d81808083800981848181800909099181808281818009099181818009090909918009098009800980098009818080898009818a8181800909099180090980098009928180828009918180828009918181800909090991800909800980098009800980098009800980098009818080808b8009818c81818009090981808c8181800909818d8181800909090991800909800980098009928180828009918181800909099180090980098009800981808d8180828181800909918180828181800909918181800909090991818082800991800909098009800980098009800980098180808088800981898181800909098180898181800909818a81818009090909918009098009800909800980098009800980098009928180828009918180828009918181800909090991800909800980098009800980098180808c8009818d818082800991818180090909099180090980098009800980098180808780098188818180090909918009098009800909800980098009800980098009928180808381818009098184818180090909918180828009918180828009918181800909090909918009098009800980098009818080808b8181800909818c81818009090981808c8181800909818d81808281818009099181818009090909099181808280099180090909800980098009800980090980098009800980098009800909800980098009800992818180090991800909800980098009800980098009800980098180808c818082800991818180090909818d8180828181800909918181800909090991800909800980098180888181800909918009098009800992818180090991800909800980098009800980098009800981808d8180808381818009098184818180090909918180828181800909918180828181800909918181800909090909918009098009800980098180808a818180090981808c8181800909818d818180090909099180090980098009800992818080838181800909818481818009090991818082818180090991818082818180090991818180090909090991800909800980098180808c8009818d8181800909099180090980098009800980098180808781818009098180898181800909818a81818009090909918009098009916000805160206119fd8339815191528380091490565b6112096107be565b9060c060206000828286018381528360408801528360608801528560808801527f183227397098d014dc2822db40c0ac2ecbc0b548b438e5469e10460b6c3e7ea3968760a08201526000805160206119fd833981519152958691015260055afa9260005193156112c35750507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4682146112bb57811515806112b0575b610a47575060000b90565b5060018214156112a5565b505060001990565b606493506040519263c6daf7ab60e01b8452600484015260248301526044820152fd5b806000805160206119fd833981519152808080808080808881808080809e8180808080808080808981808080809e8180808080808080888180808080809e8180808080808080888180808080809e8181818080808080808781808080809e8180808080808681808080808080809e8181818080808080808080808080809e8181818080808080808080898180809e81808080808080808080808b8180809e818080808080808080808080808d819e828080808080808080808080808d819e8280808080808080808080808c81809e8180808080808080808981808080809e8180808080808080888180808080809e8180808080808087818080808080809e8180808080808087818080808080809e81808080808080808080808080809d8180808080808080808080808c818080808080808080808a818080808080808080808080808d81808080808581808080808080808080808b8181800909818c81818009090981808c8181800909818d8181800909090980098009800980098180878181800909918009098009800980090980098009800980090980098009800981808c818082800991818082800991818180090909099181808280099180090909800980098009800981808088800981808a8009818b8181800909090991800909800980098009098009800980098180808a800981808c8009818d8181800909090991800909800980098009800980090980098009800981808b81818009099180090980098009800980098009928180808381818009098184818180090909918180828009918180828009918181800909090909918180828009918009090980098009800980098009800980098009800981808d818082800991818180090909918009098009800980098180898181800909918009098009800980099281808280099181808280099181818009090909918009098009800980098009800980098180808b8009818c818180090909918009098009800980098009800980090980098009800980098009818080808c8009818d818180090909818c8180828181800909918181800909090991818082800991800909098009800980098009928180808381818009098184818180090909918180828009918180828009918181800909090909918009098009800981808d818082800991818180090909918009098009800980098009800980098009928181800909918009098009800980098009800980098009800992818082800991818180090909918009098009800981808d818180090991800909800980098009800980098009800992818080838009818481818009090991818082818180090991818180090909099180090980098009800981808d81808083800981848181800909099181808281818009099181818009090909918009098009800980098009818080898009818a8181800909099180090980098009928180828009918180828009918181800909090991800909800980098009800980098009800980098009818080808b8009818c81818009090981808c8181800909818d8181800909090991800909800980098009928180828009918181800909099180090980098009800981808d8180828181800909918180828181800909918181800909090991818082800991800909098009800980098009800980098180808088800981898181800909098180898181800909818a81818009090909918009098009800909800980098009800980098009928180828009918180828009918181800909090991800909800980098009800980098180808c8009818d818082800991818180090909099180090980098009800980098180808780098188818180090909918009098009800909800980098009800980098009928180808381818009098184818180090909918180828009918180828009918181800909090909918009098009800980098009818080808b8181800909818c81818009090981808c8181800909818d8180828181800909918181800909090909918180828009918009090980098009800980098009098009800980098009800980090980098009800980099281818009099180090980098009800980098009800980098009818080808a8009818b81818009090981808b8181800909818c818180090909099180090980098009928181800909918009098009800981808d81818009099180090980098009800980098009800980099281808083818180090981848181800909099181808281818009099181808281818009099181818009090909099180090980098009800981808d8180828181800909918180828181800909918181800909090991800909800980098009818080808b8181800909818c81818009090981808c8181800909818d8180828181800909918181800909090909918009098009800981808087800981888181800909099180090980098009098009800980098009800992818082800991818180090909918009099056fe30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47a164736f6c6343000814000a
Deployed Bytecode
0x6080604052600436101561001257600080fd5b6000803560e01c908163247dd9fb1461004a5750806354894f58146100455763ebbdac911461004057600080fd5b610238565b61012b565b346100ac5760403660031901126100ac57610064366100af565b9061006f60c0604052565b60809160408101913683116100ac5750915b81831061009c5760206100926104ab565b6040519015158152f35b8235815260209283019201610081565b80fd5b906004916044116100bc57565b600080fd5b9060c491610104116100bc57565b9181601f840112156100bc5782359167ffffffffffffffff83116100bc57602083818601950101116100bc57565b6040810192916000915b6002831061011457505050565b600190825181526020809101920192019190610107565b346100bc576040806003193601126100bc5767ffffffffffffffff6004358181116100bc5761015e9036906004016100cf565b916024359081116100bc576101b19261019a6101816101a29336906004016100cf565b949092878051610190816103aa565b3690373691610542565b923691610542565b906101ab6104f5565b506105b7565b6101c860206101c0835161091a565b92015161091a565b60206101d2610509565b8351815281840151828201528251858201529101516060820152610201838360808460066107cf195a01fa1590565b61021857506102149151918291826100fd565b0390f35b8251630251c7e160e31b81529081906102349060048301610589565b0390fd5b346100bc57610100806003193601126100bc57610254366100af565b3660c4116100bc57610180916040602092610279610271366100c1565b913690610439565b928461028f61028736610473565b933690610439565b81610298610409565b96805188520151828701527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c2858701527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed60608701527f275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec60808701527f1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d60a0870152805160c0870152015160e0850152848201519084015280516101208401526060810151610140840152015161016082015261037361051d565b92839160086107cf195a01fa90516040805191151582529115156020820152f35b634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff8211176103c657604052565b610394565b6080810190811067ffffffffffffffff8211176103c657604052565b90601f8019910116810190811067ffffffffffffffff8211176103c657604052565b60405190610180820182811067ffffffffffffffff8211176103c657604052565b60405190610437826103aa565b565b919060405192610448846103aa565b8390604081019283116100bc57905b82821061046357505050565b8135815260209182019101610457565b9060405191610481836103cb565b8260c49182116100bc576044905b82821061049b57505050565b813581526020918201910161048f565b6080516000805160206119fd8339815191528082108015906104e9575b156104d4575050600090565b8060038160a051948181800909089180091490565b508060a05110156104c8565b60405190610502826103aa565b6040368337565b60405190610516826103cb565b6080368337565b604051906020820182811067ffffffffffffffff8211176103c6576040526020368337565b92919267ffffffffffffffff82116103c6576040519161056c601f8201601f1916602001846103e7565b8294818452818301116100bc578281602093846000960137010152565b6080810192916000915b600483106105a057505050565b600190825181526020809101920192019190610593565b906040918280516105c7816103aa565b36903780519060ff821161070d57909260ff6105e1610778565b9416815194856105f9838660209889850195866107e9565b039561060d601f19978881018352826103e7565b5190208251858101906106328161062686898787610852565b038981018352826103e7565b5190209361063e6107a4565b966001945b87600387106106ab575050505050505080606084015260018060c01b0392836018820151169084604881603084015116920151169161068061042a565b956000805160206119fd8339815191529485809481600160c01b809609088852169209089082015290565b938787986106ed86976106e18a6107039798996106d26106cc899e9f6108f0565b60ff1690565b8a51978895860199188961088c565b038781018452836103e7565b6000198a0160051b8c018b0152519020966108dc565b9493929190610643565b83516313727cdd60e11b8152908190610234906004830161074c565b60005b83811061073c5750506000910152565b818101518382015260200161072c565b6040916020825261076c8151809281602086015260208686019101610729565b601f01601f1916010190565b6040519060c0820182811067ffffffffffffffff8211176103c6576040526088825260a0366020840137565b604051906107b1826103cb565b6060808352366020840137565b6040519060e0820182811067ffffffffffffffff8211176103c65760405260c0808352366020840137565b9161081360206004969594610805829582815194859201610729565b019182815194859201610729565b0160008152600360fd1b60018201526000600282015261083d825180936020600385019101610729565b019060ff60f81b9060f81b1660038201520190565b60229392918152600160f81b6020820152610877825180936020602185019101610729565b019060ff60f81b9060f81b1660218201520190565b6022949391815260ff60f81b809360f81b1660208201526108b7825180936020602185019101610729565b019160f81b1660218201520190565b634e487b7160e01b600052601160045260246000fd5b60001981146108eb5760010190565b6108c6565b60010190816001116108eb57565b906000805160206119fd8339815191529182039182116108eb57565b906109236104f5565b916000805160206119fd83398151915280821015610abb578060048184800909906001918161095581838608926108fe565b840890828080808078016789af3a83522eb353c98fc6b36d713d5d8d1cc5dffffffa818b81610986818b8d096112e6565b9a8b92090909958180610998896108fe565b98817f183227397098d014dc2822db40c0ac2ecbc0b548b438e5469e10460b6c3e7ea39a8b0899089680090980097f10216f7ba065e00de81ac1e7808072c9dd2b2385cd7b438469602eb24829a9bd0985089083600381858181800909089385610a0186611201565b60000b03610a61575050508552610a1781610ad4565b90602087015215610a4757505b6020840191825191808316911603610a3a575050565b610a43906108fe565b9052565b60405163396ec77160e01b81526004810191909152602490fd5b919350915080600381848181800909089284610a7c85611201565b60000b03610aa25750508552610a9181610ad4565b90602087015215610a475750610a24565b81935060039250808852818180090908610a9181610ad4565b60405163d53e941560e01b815260048101839052602490fd5b906000805160206119fd8339815191528080808080808080808b8180808080808080808080808080808f8180828180808080808080808080809e8180808080858180808080808087819e8280808080808681808080808080809e8180808381808080808080808089819e828080808080808080808080808d819e8280808080808080888180808080809e8180808080808080888180808080809e818080808080808080808a818080809e818080808080808080808a818080809e8180808080808080808981808080809e8180808080808681808080808080809e8180808080858180808080808080809e8180808084818080808080808080809e8180808084818080808080808080809e81808080808080808080809a8180808080808080808080808c818080808080808080808a818080808080808080808080808d81808080808581808080808080808080808b8181800909818c81818009090981808c8181800909818d8181800909090980098009800980098180878181800909918009098009800980090980098009800980090980098009800981808c818082800991818082800991818180090909099181808280099180090909800980098009800981808088800981808a8009818b8181800909090991800909800980098009098009800980098180808a800981808c8009818d8181800909090991800909800980098009800980090980098009800981808b81818009099180090980098009800980098009928180808381818009098184818180090909918180828009918180828009918181800909090909918180828009918009090980098009800980098009800980098009800981808d818082800991818180090909918009098009800980098180898181800909918009098009800980099281808280099181808280099181818009090909918009098009800980098009800980098180808b8009818c818180090909918009098009800980098009800980090980098009800980098009818080808c8009818d818180090909818c8180828181800909918181800909090991818082800991800909098009800980098009928180808381818009098184818180090909918180828009918180828009918181800909090909918009098009800981808d818082800991818180090909918009098009800980098009800980098009928181800909918009098009800980098009800980098009800992818082800991818180090909918009098009800981808d818180090991800909800980098009800980098009800992818080838009818481818009090991818082818180090991818180090909099180090980098009800981808d81808083800981848181800909099181808281818009099181818009090909918009098009800980098009818080898009818a8181800909099180090980098009928180828009918180828009918181800909090991800909800980098009800980098009800980098009818080808b8009818c81818009090981808c8181800909818d8181800909090991800909800980098009928180828009918181800909099180090980098009800981808d8180828181800909918180828181800909918181800909090991818082800991800909098009800980098009800980098180808088800981898181800909098180898181800909818a81818009090909918009098009800909800980098009800980098009928180828009918180828009918181800909090991800909800980098009800980098180808c8009818d818082800991818180090909099180090980098009800980098180808780098188818180090909918009098009800909800980098009800980098009928180808381818009098184818180090909918180828009918180828009918181800909090909918009098009800980098009818080808b8181800909818c81818009090981808c8181800909818d81808281818009099181818009090909099181808280099180090909800980098009800980090980098009800980098009800909800980098009800992818180090991800909800980098009800980098009800980098180808c818082800991818180090909818d8180828181800909918181800909090991800909800980098180888181800909918009098009800992818180090991800909800980098009800980098009800981808d8180808381818009098184818180090909918180828181800909918180828181800909918181800909090909918009098009800980098180808a818180090981808c8181800909818d818180090909099180090980098009800992818080838181800909818481818009090991818082818180090991818082818180090991818180090909090991800909800980098180808c8009818d8181800909099180090980098009800980098180808781818009098180898181800909818a81818009090909918009098009916000805160206119fd8339815191528380091490565b6112096107be565b9060c060206000828286018381528360408801528360608801528560808801527f183227397098d014dc2822db40c0ac2ecbc0b548b438e5469e10460b6c3e7ea3968760a08201526000805160206119fd833981519152958691015260055afa9260005193156112c35750507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4682146112bb57811515806112b0575b610a47575060000b90565b5060018214156112a5565b505060001990565b606493506040519263c6daf7ab60e01b8452600484015260248301526044820152fd5b806000805160206119fd833981519152808080808080808881808080809e8180808080808080808981808080809e8180808080808080888180808080809e8180808080808080888180808080809e8181818080808080808781808080809e8180808080808681808080808080809e8181818080808080808080808080809e8181818080808080808080898180809e81808080808080808080808b8180809e818080808080808080808080808d819e828080808080808080808080808d819e8280808080808080808080808c81809e8180808080808080808981808080809e8180808080808080888180808080809e8180808080808087818080808080809e8180808080808087818080808080809e81808080808080808080808080809d8180808080808080808080808c818080808080808080808a818080808080808080808080808d81808080808581808080808080808080808b8181800909818c81818009090981808c8181800909818d8181800909090980098009800980098180878181800909918009098009800980090980098009800980090980098009800981808c818082800991818082800991818180090909099181808280099180090909800980098009800981808088800981808a8009818b8181800909090991800909800980098009098009800980098180808a800981808c8009818d8181800909090991800909800980098009800980090980098009800981808b81818009099180090980098009800980098009928180808381818009098184818180090909918180828009918180828009918181800909090909918180828009918009090980098009800980098009800980098009800981808d818082800991818180090909918009098009800980098180898181800909918009098009800980099281808280099181808280099181818009090909918009098009800980098009800980098180808b8009818c818180090909918009098009800980098009800980090980098009800980098009818080808c8009818d818180090909818c8180828181800909918181800909090991818082800991800909098009800980098009928180808381818009098184818180090909918180828009918180828009918181800909090909918009098009800981808d818082800991818180090909918009098009800980098009800980098009928181800909918009098009800980098009800980098009800992818082800991818180090909918009098009800981808d818180090991800909800980098009800980098009800992818080838009818481818009090991818082818180090991818180090909099180090980098009800981808d81808083800981848181800909099181808281818009099181818009090909918009098009800980098009818080898009818a8181800909099180090980098009928180828009918180828009918181800909090991800909800980098009800980098009800980098009818080808b8009818c81818009090981808c8181800909818d8181800909090991800909800980098009928180828009918181800909099180090980098009800981808d8180828181800909918180828181800909918181800909090991818082800991800909098009800980098009800980098180808088800981898181800909098180898181800909818a81818009090909918009098009800909800980098009800980098009928180828009918180828009918181800909090991800909800980098009800980098180808c8009818d818082800991818180090909099180090980098009800980098180808780098188818180090909918009098009800909800980098009800980098009928180808381818009098184818180090909918180828009918180828009918181800909090909918009098009800980098009818080808b8181800909818c81818009090981808c8181800909818d8180828181800909918181800909090909918180828009918009090980098009800980098009098009800980098009800980090980098009800980099281818009099180090980098009800980098009800980098009818080808a8009818b81818009090981808b8181800909818c818180090909099180090980098009928181800909918009098009800981808d81818009099180090980098009800980098009800980099281808083818180090981848181800909099181808281818009099181808281818009099181818009090909099180090980098009800981808d8180828181800909918180828181800909918181800909090991800909800980098009818080808b8181800909818c81818009090981808c8181800909818d8180828181800909918181800909090909918009098009800981808087800981888181800909099180090980098009098009800980098009800992818082800991818180090909918009099056fe30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47a164736f6c6343000814000a
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in HYPE
Multichain Portfolio | 35 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.