![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
solidity-patricia-tree
Advanced tools
This is a rewritten version of Christian Reitwießner's patricia-trie to use his patricia tree implementation as a solidity library through npm.
npm i solidity-patricia-tree
pragma solidity ^0.4.25;
import {PatriciaTree} from "solidity-patricia-tree/contracts/tree.sol";
contract TestPatriciaTree {
using PatriciaTree for PatriciaTree.Tree;
PatriciaTree.Tree tree;
function test() public {
// testInsert();
testProofs();
}
function testInsert() internal {
tree.insert("one", "ONE");
tree.insert("two", "ONE");
tree.insert("three", "ONE");
tree.insert("four", "ONE");
tree.insert("five", "ONE");
tree.insert("six", "ONE");
tree.insert("seven", "ONE");
// update
tree.insert("one", "TWO");
}
function testProofs() internal {
tree.insert("one", "ONE");
uint branchMask;
bytes32[] memory siblings;
(branchMask, siblings) = tree.getProof("one");
PatriciaTree.verifyProof(tree.root, "one", "ONE", branchMask, siblings);
tree.insert("two", "TWO");
(branchMask, siblings) = tree.getProof("one");
PatriciaTree.verifyProof(tree.root, "one", "ONE", branchMask, siblings);
(branchMask, siblings) = tree.getProof("two");
PatriciaTree.verifyProof(tree.root, "two", "TWO", branchMask, siblings);
}
}
npm install -g truffle
npm install -g ganache
npm install
Test cases include the information about how the functions work, but also includes a demo scenario. Running and reading the test cases will help you understand how it works.
npm run test
FAQs
Patricia Tree solidity implemenation
The npm package solidity-patricia-tree receives a total of 2 weekly downloads. As such, solidity-patricia-tree popularity was classified as not popular.
We found that solidity-patricia-tree demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.