Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ All notable changes to this project will be documented in this file.

The format is based on [Common Changelog](https://common-changelog.org/).

[1.2.0]: https://github.com/chronicleprotocol/uscribe/releases/tag/v1.2.0
[1.1.0]: https://github.com/chronicleprotocol/uscribe/releases/tag/v1.1.0
[1.0.0]: https://github.com/chronicleprotocol/uscribe/releases/tag/v1.0.0

## [1.2.0] - 2025-06-16

### Fixed

- Modified the Chronicle Signed Message function add missing hash ([#6](https://github.com/chronicleprotocol/uscribe/pull/6))

## [1.1.0] - 2025-04-29

### Added
Expand Down
7 changes: 5 additions & 2 deletions src/UScribe.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {LibSecp256k1} from "./libs/LibSecp256k1.sol";

/**
* @title UScribe
* @custom:version 1.1.0
* @custom:version 1.2.0
*
* @notice A universal Oracle
*
Expand Down Expand Up @@ -184,7 +184,10 @@ abstract contract UScribe is IUScribe, Auth {
"\x19Chronicle Signed Message:\n32",
keccak256(
abi.encodePacked(
scheme, wat, uPokeData.payload, uPokeData.proofURI
scheme,
wat,
keccak256(abi.encodePacked(uPokeData.payload)),
keccak256(abi.encodePacked(uPokeData.proofURI))
)
)
)
Expand Down
20 changes: 10 additions & 10 deletions test/UScribe.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -459,14 +459,14 @@ contract UScribeTest is Test {
// Construct FROST public key.
//
// The key was generated using a 3 of 5 setup. The secrets are:
// - 319564716152412347247552246407185122966667010516121584212641301417448007896896
// - 315553287393230738186054985516315559944730514454648054793817431557429535317214
// - 386545967056707118336559986962684329089278522132968898680006837722005826054531
// - 185166487430892901428354295720227706841798340713859402723394030486622395625836
// - 290375294702369064579292836832385232466477791592694088837004825558870051502814
// - 101621752079514819030095615001343379560707867251270597732680937497960135346763
// - 23107132871461652285177980102167043793869306851179575161172399583345662337728
// - 96445750284220385729625819719843124630897537340409796462443789978506896599127
// - 90053425843158628516297163836995806366117430160811452871284782400407515142286
// - 3930159548276380645192012453625088999528985312384544387695376849047517967205
LibSecp256k1.Point memory frostPubKey = LibSecp256k1.Point(
1046666380883525877290896698470011009907878904846152238980080396875967445023,
18289632782974915667847294961520078393696577127662538020223760415989520241062
38160016738932871419969135953791298009753203844553773829884127239326553659393,
38200619774409025385554732759321469929488099627633617961249207264236284654293
);
uint8 id = uint8(uint(uint160(frostPubKey.toAddress())) >> 152);

Expand All @@ -485,11 +485,11 @@ contract UScribeTest is Test {
// The signature for the Chronicle Signed Message of the uPokeData.
SchnorrData memory schnorrData = SchnorrData({
signature: bytes32(
0x11dd88c990738a00b1785d4a3d057e975a1fecec1f6c191b5f952379118ae6da
0x21c173797a5c3b231ada65e0e78fa4fb028346988c4edc2cd313a58f5c9ab24d
),
commitment: LibSecp256k1.Point(
6340110420811610656928001409194766834203496523599024652304649721226179725011,
52480649916900484388424402331993416731649345044251763677678341534064318195540
10578237103375682655625641405360605765058814223605141317539567733393036796144,
30415411520210736918477132960702374330335990645041888510402237612683212927241
).toAddress(),
validatorIds: abi.encodePacked(id)
});
Expand Down