MCPcopy Create free account
hub / github.com/PolymathNetwork/polymath-core / compareStorageLayouts

Function compareStorageLayouts

scripts/compareStorageLayout.js:55–72  ·  view source on GitHub ↗
(logicLayout, proxyLayout)

Source from the content-addressed store, hash-verified

53}
54
55function compareStorageLayouts(logicLayout, proxyLayout) {
56 function makeComp(x) {
57 return [x.constant, x.name, x.stateVariable, x.storageLocation, x.type, x.value, x.visibility].join(":");
58 }
59 // if(newLayout.length < oldLayout.length) return false;
60 for (var i = 0; i < logicLayout.length; i++) {
61 const a = logicLayout[i].attributes;
62 const comp1 = makeComp(a);
63 console.log(comp1);
64 const b = proxyLayout[i].attributes;
65 const comp2 = makeComp(b);
66 console.log(comp2);
67 if (comp1 != comp2) {
68 return false;
69 }
70 }
71 return true;
72}
73
74function parseContract(input) {
75

Callers 1

Calls 1

makeCompFunction · 0.85

Tested by

no test coverage detected