Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
fix verifreg tests (#126)
Browse files Browse the repository at this point in the history
* fix verifreg tests

* universal receiver hook still broken

* update dependecies; remove universal hook function form tests;

* update cargo.log
  • Loading branch information
rllola authored Jan 6, 2023
1 parent 4ae7fba commit 4b03f82
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 89 deletions.
6 changes: 6 additions & 0 deletions contracts/v0.8/cbor/BigIntCbor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ library BigIntCBOR {

function deserializeBigNum(bytes memory raw) internal pure returns (BigInt memory) {
// TODO improve gas efficiency by using assembly code

// Is an empty byte a valid BigInt ? We should have the sign byte at least
if (raw.length == 0) {
return BigInt(hex"00", false);
}

bytes memory val = new bytes(raw.length - 1);
bool neg = false;

Expand Down
2 changes: 1 addition & 1 deletion contracts/v0.8/types/VerifRegTypes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ library VerifRegTypes {
bytes constant ActorCode = hex"0006";
uint constant GetClaimsMethodNum = 2199871187;
uint constant AddVerifierClientMethodNum = 3916220144;
uint constant RemoveExpiredAllocationsMethodNum = 2873373899;
uint constant RemoveExpiredAllocationsMethodNum = 2421068268;
uint constant ExtendClaimTermsMethodNum = 1752273514;
uint constant RemoveExpiredClaimsMethodNum = 2873373899;
uint constant UniversalReceiverMethodNum = 3726118371;
Expand Down
1 change: 0 additions & 1 deletion script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ fn main() {
println!("MinerCountExported {}", MinerCountExported);
println!("MinerConsensusCountExported {}", MinerConsensusCountExported);


println!("VERIFIED REGISTRY EXPORTED METHOD NUM");

let AddVerifiedClientExported = frc42_dispatch::method_hash!("AddVerifiedClient");
Expand Down
Loading

0 comments on commit 4b03f82

Please sign in to comment.