@ayanworks/polygon-did-registry-contract 2.0.1-alpha.6 → 2.0.1-alpha.8

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.
@@ -180,8 +180,10 @@ contract PolygonDidRegistry {
180
180
  returns (address, string memory, string memory)
181
181
  {
182
182
  require(_id != address(0), 'Invalid address provided');
183
+ if (bytes(resourceData[_id][_resourceId]).length == 0) {
184
+ keysById[_id].push(_resourceId);
185
+ }
183
186
  resourceData[_id][_resourceId] = _resourcePayload;
184
- keysById[_id].push(_resourceId);
185
187
  emit ResourceAdded(_id, _resourceId, _resourcePayload);
186
188
  return (_id, _resourceId, _resourcePayload);
187
189
  }
package/hardhat.config.js CHANGED
@@ -23,12 +23,12 @@ module.exports = {
23
23
  hardhat: {},
24
24
  amoy: {
25
25
  url: process.env.AMOY_RPCURL,
26
- accounts: [`0x${process.env.SIGNER}`],
26
+ accounts: [`0x${process.env.SIGNER_TESTNET}`],
27
27
  },
28
28
  //Use for mainnet deployment
29
29
  // polygon: {
30
- // url: process.env.RPCURL_POLYON_MAINNET,
31
- // accounts: [`0x${process.env.SIGNER}`],
30
+ // url: process.env.MAINNET_RPCURL,
31
+ // accounts: [`0x${process.env.SIGNER_MAINNET}`],
32
32
  // },
33
33
  },
34
34
  etherscan: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ayanworks/polygon-did-registry-contract",
3
- "version": "2.0.1-alpha.6",
3
+ "version": "2.0.1-alpha.8",
4
4
  "description": "Smart Contract to register DID on Polygon",
5
5
  "main": "build/index.js",
6
6
  "directories": {
package/sst-config.json CHANGED
@@ -1 +1 @@
1
- {"sourceHash":"0x7cfa8ab1c0bc24dcb13a69e00eca9da0d9850c96acb083ce64a7a18ebdca959f"}
1
+ {"sourceHash":"0x97a599fbc455201c7d5253480af7bf0b22264a53b3c5933af397217c88ba64d4"}
@@ -6,7 +6,7 @@ const { describe, it } = require('node:test')
6
6
  const PolygonDIDRegistryJSON = require('../artifacts/contracts/PolygonDidRegistry.sol/PolygonDidRegistry.json')
7
7
 
8
8
  let PolygonUpgradableInstance, PolygonUpgradableInstance_test
9
- walletKey = process.env.SIGNER
9
+ walletKey = process.env.SIGNER_TESTNET
10
10
 
11
11
  // Upgradable with Proxy
12
12
  // Deployment Testing 1.0