Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m3s
CI/CD Pipeline / Security Scanning (push) Successful in 2m18s
CI/CD Pipeline / Lint and Format (push) Failing after 34s
CI/CD Pipeline / Terraform Validation (push) Failing after 20s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 22s
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 40s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 49s
OMNL reconcile anchor / Run omnl:reconcile and upload artifacts (push) Failing after 21s
Validation / validate-genesis (push) Successful in 25s
Validation / validate-terraform (push) Failing after 21s
Validation / validate-kubernetes (push) Failing after 8s
Validation / validate-smart-contracts (push) Failing after 8s
Validation / validate-security (push) Failing after 1m11s
Validation / validate-documentation (push) Failing after 14s
Verify Deployment / Verify Deployment (push) Failing after 45s
Ship AddressActivityRegistry V1/V2, ISO20022IntakeGateway, Chain138ParticipantSurface, checkpoint hub contracts, checkpoint-core package, aggregator/indexer/sdk services, relay profile guards, M00 diamond bridge facet, and OMNL compliance contracts. Co-authored-by: Cursor <cursoragent@cursor.com>
46 lines
1.4 KiB
Solidity
46 lines
1.4 KiB
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.20;
|
|
|
|
/**
|
|
* @title RWAEIP712
|
|
* @notice EIP-712 domain and type hashes for index publisher attestations (off-chain or on-chain verify).
|
|
*/
|
|
library RWAEIP712 {
|
|
bytes32 public constant INDEX_VALUE_TYPEHASH = keccak256(
|
|
"IndexValueAttestation(string indexTicker,uint256 newValue,uint256 nonce,uint256 deadline)"
|
|
);
|
|
|
|
function domainSeparator(
|
|
string memory name,
|
|
string memory version,
|
|
uint256 chainId,
|
|
address verifyingContract
|
|
) internal pure returns (bytes32) {
|
|
bytes32 typeHash = keccak256(
|
|
"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
|
|
);
|
|
return keccak256(
|
|
abi.encode(
|
|
typeHash,
|
|
keccak256(bytes(name)),
|
|
keccak256(bytes(version)),
|
|
chainId,
|
|
verifyingContract
|
|
)
|
|
);
|
|
}
|
|
|
|
function hashIndexAttestation(
|
|
bytes32 domain,
|
|
string memory indexTicker,
|
|
uint256 newValue,
|
|
uint256 nonce,
|
|
uint256 deadline
|
|
) internal pure returns (bytes32) {
|
|
bytes32 structHash = keccak256(
|
|
abi.encode(INDEX_VALUE_TYPEHASH, keccak256(bytes(indexTicker)), newValue, nonce, deadline)
|
|
);
|
|
return keccak256(abi.encodePacked("\x19\x01", domain, structHash));
|
|
}
|
|
}
|