@gooddollar/goodprotocol 2.0.29 → 2.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/hardhat.config.ts CHANGED
@@ -253,6 +253,12 @@ const hhconfig: HardhatUserConfig = {
253
253
  initialBaseFeePerGas: 0,
254
254
  gasPrice: 8e6
255
255
  },
256
+ "production-base": {
257
+ accounts: [deployerPrivateKey],
258
+ url: "https://mainnet.base.org",
259
+ initialBaseFeePerGas: 0,
260
+ gasPrice: 8e6
261
+ },
256
262
  gnosis: {
257
263
  accounts: [deployerPrivateKey],
258
264
  url: "https://rpc.gnosischain.com",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddollar/goodprotocol",
3
- "version": "2.0.29",
3
+ "version": "2.0.30",
4
4
  "description": "GoodDollar Protocol",
5
5
  "engines": {
6
6
  "node": ">=16.x"
@@ -614,5 +614,10 @@
614
614
  "ProxyFactory": "0x5B22F5623ECB00E288539346F389E05f65e226ae",
615
615
  "AdminWallet": "0x6672C998C49635aA6825Be355fF2e731f417B674",
616
616
  "SuperfluidFaucet": "0x0c86C82eb8d6a8E991bbc37C58e23344b20520a2"
617
+ },
618
+ "production-base": {
619
+ "ProxyFactory": "0xD86cd6Bb3c2a576b2C2CEF4e047b1A7adC5Be62D",
620
+ "SuperfluidFaucet": "0x51A073a0F910B3902a98a584397101211F01d81F",
621
+ "AdminWallet": "0x7119CD89D4792aF90277d84cDffa3F2Ab22a0022"
617
622
  }
618
623
  }
package/scripts/fv.ts CHANGED
@@ -5,6 +5,18 @@ import { bulkIsWhitelisted, bulkLastAuth } from "./utils";
5
5
 
6
6
  //create tunnel to fv server ssh -L 9090:server:8080 -N user@server -i sshkey
7
7
 
8
+ const saveImage = async (id, idx) => {
9
+ const age = await fetch("http://localhost:9090/estimate-age-3d-v2", {
10
+ method: "POST",
11
+ body: JSON.stringify({ externalDatabaseRefID: id }),
12
+ headers: { "content-type": "applcation/json" }
13
+ }).then(_ => _.json());
14
+ console.log({ age });
15
+ const i1 = await fetch("http://localhost:9090/enrollment-3d/" + id).then(_ => _.json());
16
+ fs.writeFileSync("fvimages/" + id + "_" + idx + ".jpg", i1.auditTrailBase64, {
17
+ encoding: "base64"
18
+ });
19
+ };
8
20
  const saveImages = async a => {
9
21
  const i1 = await fetch("http://localhost:9090/enrollment-3d/" + a[1]).then(_ => _.json());
10
22
  const i2 = await fetch("http://localhost:9090/enrollment-3d/" + a[2]).then(_ => _.json());
@@ -206,8 +218,29 @@ const deleteIdentifiers = async password => {
206
218
  const res = await Promise.all(ps);
207
219
  console.log(res);
208
220
  };
221
+
222
+ const exportScans = async ids => {
223
+ console.log(ids.length, "unique:", uniqBy(ids).length);
224
+ const exports = ids.map(async (_, idx) => {
225
+ if (fs.existsSync("fvimages/" + idx + ".jpg")) return;
226
+ const { faceMapBase64, auditTrailBase64 } = await fetch("http://localhost:9090/enrollment-3d/" + _).then(_ =>
227
+ _.json()
228
+ );
229
+ const { exportedFaceTecDataForDebugBase64 } = await fetch("http://localhost:9090/export-for-facetec/", {
230
+ method: "POST",
231
+ headers: { "content-type": "application/json" },
232
+ body: JSON.stringify({ faceScanOrFaceMapOrIDScan: faceMapBase64 })
233
+ }).then(_ => _.json());
234
+ console.log(_, exportedFaceTecDataForDebugBase64.length);
235
+ fs.writeFileSync("fvimages/export_" + idx + ".txt", exportedFaceTecDataForDebugBase64);
236
+ fs.writeFileSync("fvimages/" + idx + ".jpg", auditTrailBase64, {
237
+ encoding: "base64"
238
+ });
239
+ });
240
+ await Promise.all(exports);
241
+ };
209
242
  // checkIndexedOrDelete();
210
- fixInvalidIndexed();
243
+ // fixInvalidIndexed();
211
244
  // console.log(process.env.ADMIN_PASSWORD);
212
245
  // deleteIdentifiers(process.env.ADMIN_PASSWORD);
213
246
  // main();
@@ -6,15 +6,17 @@ import releaser from "../../scripts/releaser";
6
6
  import dao from "../../releases/deployment.json";
7
7
 
8
8
  const { name } = network;
9
-
9
+ const celoProxyByteCode =
10
+ "0x608060405234801561001057600080fd5b5060405161002060208201610044565b601f1982820381018352601f90910116604052805160209190910120600055610051565b6105c680610d8383390190565b610d23806100606000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80630bf61a011461005c5780631b903b841461008557806340ad200d1461009857806381ae1f5b146100ab578063b3eeb5e2146100be575b600080fd5b61006f61006a366004610512565b6100d1565b60405161007c9190610568565b60405180910390f35b61006f61009336600461057c565b6100e7565b61006f6100a63660046105f7565b61016c565b61006f6100b936600461062c565b6101df565b61006f6100cc366004610658565b6101f5565b60006100df848484336102f2565b949350505050565b60008061012b853386868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103cd92505050565b90507fcf78cf0d6f3d8371e1075c69c492ab4ec5d8cf23a1a239b6a51a1d00be7ca3128160405161015c9190610568565b60405180910390a1949350505050565b60008061017985856103fe565b6040516001600160f81b031960208201526001600160601b03193060601b166021820152603581018290526055810185905290915060009060750160408051808303601f1901815291905280516020909101206001600160a01b03169695505050505050565b60006101ee838360005461016c565b9392505050565b6000808360601b9050604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528160148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f09250507efffc2da0b561cae30d9826d37709e9421c4725faebc226cbbb7ef5fc5e7349826040516102709190610568565b60405180910390a18251156102eb576000826001600160a01b03168460405161029991906106c9565b6000604051808303816000865af19150503d80600081146102d6576040519150601f19603f3d011682016040523d82523d6000602084013e6102db565b606091505b50509050806102e957600080fd5b505b5092915050565b6000806040518060200161030590610447565b601f1982820381018352601f90910116604052905060006103278785846103cd565b60405163347d5e2560e21b815290915081906001600160a01b0382169063d1f578949061035a908a908a906004016106e5565b600060405180830381600087803b15801561037457600080fd5b505af1158015610388573d6000803e3d6000fd5b505050507efffc2da0b561cae30d9826d37709e9421c4725faebc226cbbb7ef5fc5e7349816040516103ba9190610568565b60405180910390a1979650505050505050565b60008060006103dc86866103fe565b9050808451602086016000f59150813b6103f557600080fd5b50949350505050565b6000828260405160200161042992919091825260601b6001600160601b031916602082015260340190565b60405160208183030381529060405280519060200120905092915050565b6105c68061072883390190565b80356001600160a01b038116811461046b57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261049757600080fd5b81356001600160401b03808211156104b1576104b1610470565b604051601f8301601f19908116603f011681019082821181831017156104d9576104d9610470565b816040528381528660208588010111156104f257600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060006060848603121561052757600080fd5b8335925061053760208501610454565b915060408401356001600160401b0381111561055257600080fd5b61055e86828701610486565b9150509250925092565b6001600160a01b0391909116815260200190565b60008060006040848603121561059157600080fd5b8335925060208401356001600160401b03808211156105af57600080fd5b818601915086601f8301126105c357600080fd5b8135818111156105d257600080fd5b8760208285010111156105e457600080fd5b6020830194508093505050509250925092565b60008060006060848603121561060c57600080fd5b8335925061061c60208501610454565b9150604084013590509250925092565b6000806040838503121561063f57600080fd5b8235915061064f60208401610454565b90509250929050565b6000806040838503121561066b57600080fd5b61067483610454565b915060208301356001600160401b0381111561068f57600080fd5b61069b85828601610486565b9150509250929050565b60005b838110156106c05781810151838201526020016106a8565b50506000910152565b600082516106db8184602087016106a5565b9190910192915050565b60018060a01b038316815260406020820152600082518060408401526107128160608501602087016106a5565b601f01601f191691909101606001939250505056fe608060405234801561001057600080fd5b506105a6806100206000396000f3fe6080604052600436106100225760003560e01c8063d1f578941461003957610031565b366100315761002f61004c565b005b61002f61004c565b61002f6100473660046103ef565b61005e565b61005c61005761013d565b61014c565b565b6000610068610170565b6001600160a01b0316146100b15760405162461bcd60e51b815260206004820152600b60248201526a1a5b9a5d1a585b1a5e995960aa1b60448201526064015b60405180910390fd5b6100dc60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd61047f565b60008051602061052a833981519152146100f8576100f86104a0565b6101388383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250925061018c915050565b505050565b6000610147610170565b905090565b3660008037600080366000845af43d6000803e80801561016b573d6000f35b3d6000fd5b60008051602061052a833981519152546001600160a01b031690565b610195836101b7565b6000825111806101a25750805b15610138576101b183836101f7565b50505050565b6101c081610225565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061021c838360405180606001604052806027815260200161054a602791396102bf565b90505b92915050565b61022e81610337565b6102905760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016100a8565b60008051602061052a83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080856001600160a01b0316856040516102dc91906104da565b600060405180830381855af49150503d8060008114610317576040519150601f19603f3d011682016040523d82523d6000602084013e61031c565b606091505b509150915061032d86838387610346565b9695505050505050565b6001600160a01b03163b151590565b606083156103b35782516000036103ac5761036085610337565b6103ac5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016100a8565b50816103bd565b6103bd83836103c5565b949350505050565b8151156103d55781518083602001fd5b8060405162461bcd60e51b81526004016100a891906104f6565b60008060006040848603121561040457600080fd5b83356001600160a01b038116811461041b57600080fd5b925060208401356001600160401b038082111561043757600080fd5b818601915086601f83011261044b57600080fd5b81358181111561045a57600080fd5b87602082850101111561046c57600080fd5b6020830194508093505050509250925092565b8181038181111561021f57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052600160045260246000fd5b60005b838110156104d15781810151838201526020016104b9565b50506000910152565b600082516104ec8184602087016104b6565b9190910192915050565b60208152600082518060208401526105158160408501602087016104b6565b601f01601f1916919091016040019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220700964e1863e921cf409e58babd7df4199472bb8aeeac1315f61421b99f6fd5864736f6c63430008100033a264697066735822122015cbe254261934ea1f570e1c22223384888b3a09d774864acb6e95dfb8d4915e64736f6c63430008100033608060405234801561001057600080fd5b506105a6806100206000396000f3fe6080604052600436106100225760003560e01c8063d1f578941461003957610031565b366100315761002f61004c565b005b61002f61004c565b61002f6100473660046103ef565b61005e565b61005c61005761013d565b61014c565b565b6000610068610170565b6001600160a01b0316146100b15760405162461bcd60e51b815260206004820152600b60248201526a1a5b9a5d1a585b1a5e995960aa1b60448201526064015b60405180910390fd5b6100dc60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd61047f565b60008051602061052a833981519152146100f8576100f86104a0565b6101388383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250925061018c915050565b505050565b6000610147610170565b905090565b3660008037600080366000845af43d6000803e80801561016b573d6000f35b3d6000fd5b60008051602061052a833981519152546001600160a01b031690565b610195836101b7565b6000825111806101a25750805b15610138576101b183836101f7565b50505050565b6101c081610225565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061021c838360405180606001604052806027815260200161054a602791396102bf565b90505b92915050565b61022e81610337565b6102905760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016100a8565b60008051602061052a83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080856001600160a01b0316856040516102dc91906104da565b600060405180830381855af49150503d8060008114610317576040519150601f19603f3d011682016040523d82523d6000602084013e61031c565b606091505b509150915061032d86838387610346565b9695505050505050565b6001600160a01b03163b151590565b606083156103b35782516000036103ac5761036085610337565b6103ac5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016100a8565b50816103bd565b6103bd83836103c5565b949350505050565b8151156103d55781518083602001fd5b8060405162461bcd60e51b81526004016100a891906104f6565b60008060006040848603121561040457600080fd5b83356001600160a01b038116811461041b57600080fd5b925060208401356001600160401b038082111561043757600080fd5b818601915086601f83011261044b57600080fd5b81358181111561045a57600080fd5b87602082850101111561046c57600080fd5b6020830194508093505050509250925092565b8181038181111561021f57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052600160045260246000fd5b60005b838110156104d15781810151838201526020016104b9565b50506000910152565b600082516104ec8184602087016104b6565b9190910192915050565b60208152600082518060208401526105158160408501602087016104b6565b601f01601f1916919091016040019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220700964e1863e921cf409e58babd7df4199472bb8aeeac1315f61421b99f6fd5864736f6c63430008100033";
10
11
  export const deployUniversalProxyFactory = async () => {
11
12
  const f = await ethers.getContractFactory("ProxyFactory1967");
13
+
12
14
  const isProduction = name.includes("production");
13
15
  const deployTx = {
14
16
  nonce: 0,
15
17
  gasPrice: 50e9,
16
18
  gasLimit: 891002,
17
- data: f.bytecode
19
+ data: celoProxyByteCode
18
20
  };
19
21
 
20
22
  let signer = {
@@ -116,7 +116,7 @@ const upgrade = async () => {
116
116
  console.log(res.transactionHash);
117
117
  };
118
118
  export const main = async () => {
119
- await upgrade();
120
- // await deployHelpers();
119
+ // await upgrade();
120
+ await deployHelpers();
121
121
  };
122
122
  if (process.argv[1].includes("7_superfluidfaucet")) main();