@ayanworks/polygon-did-registry-contract 0.0.1 → 1.1.1
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/.env.sample +2 -0
- package/README.md +11 -12
- package/build/contracts/Migrations.json +1508 -515
- package/build/contracts/PolygonDidRegistry.json +10586 -4949
- package/contracts/PolygonDidRegistry.sol +48 -7
- package/migrations/2_deploy_contract.js +5 -2
- package/package.json +20 -10
- package/sst-config.json +1 -1
- package/test/polygon_did_registry_test.js +322 -17
- package/truffle-config.js +49 -107
package/truffle-config.js
CHANGED
|
@@ -17,111 +17,53 @@
|
|
|
17
17
|
* phrase from a file you've .gitignored so it doesn't accidentally become public.
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
|
-
const HDWalletProvider = require("@truffle/hdwallet-provider");
|
|
21
|
-
|
|
22
|
-
// const HDWalletProvider = require('@truffle/hdwallet-provider');
|
|
23
|
-
// const infuraKey = "fj4jll3k.....";
|
|
24
|
-
//
|
|
25
|
-
// const fs = require('fs');
|
|
26
|
-
// const mnemonic = fs.readFileSync(".secret").toString().trim();
|
|
20
|
+
const HDWalletProvider = require("@truffle/hdwallet-provider");
|
|
21
|
+
const { rpcUrl, mnemonic } = process.env;
|
|
27
22
|
|
|
28
|
-
module.exports = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
// gas: 8500000, // Gas sent with each transaction (default: ~6700000)
|
|
76
|
-
// gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei)
|
|
77
|
-
// from: <address>, // Account to send txs from (default: accounts[0])
|
|
78
|
-
// websocket: true // Enable EventEmitter interface for web3 (default: false)
|
|
79
|
-
// },
|
|
80
|
-
// Useful for deploying to a public network.
|
|
81
|
-
// NB: It's important to wrap the provider as a function.
|
|
82
|
-
// ropsten: {
|
|
83
|
-
// provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`),
|
|
84
|
-
// network_id: 3, // Ropsten's id
|
|
85
|
-
// gas: 5500000, // Ropsten has a lower block limit than mainnet
|
|
86
|
-
// confirmations: 2, // # of confs to wait between deployments. (default: 0)
|
|
87
|
-
// timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50)
|
|
88
|
-
// skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
|
|
89
|
-
// },
|
|
90
|
-
// Useful for private networks
|
|
91
|
-
// private: {
|
|
92
|
-
// provider: () => new HDWalletProvider(mnemonic, `https://network.io`),
|
|
93
|
-
// network_id: 2111, // This network is yours, in the cloud.
|
|
94
|
-
// production: true // Treats this network as if it was a public net. (default: false)
|
|
95
|
-
// }
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
// Set default mocha options here, use special reporters etc.
|
|
99
|
-
mocha: {
|
|
100
|
-
// timeout: 100000
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
// Configure your compilers
|
|
104
|
-
compilers: {
|
|
105
|
-
solc: {
|
|
106
|
-
// version: "0.5.1", // Fetch exact version from solc-bin (default: truffle's version)
|
|
107
|
-
// docker: true, // Use "0.5.1" you've installed locally with docker (default: false)
|
|
108
|
-
// settings: { // See the solidity docs for advice about optimization and evmVersion
|
|
109
|
-
// optimizer: {
|
|
110
|
-
// enabled: false,
|
|
111
|
-
// runs: 200
|
|
112
|
-
// },
|
|
113
|
-
// evmVersion: "byzantium"
|
|
114
|
-
// }
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
// Truffle DB is currently disabled by default; to enable it, change enabled: false to enabled: true
|
|
119
|
-
//
|
|
120
|
-
// Note: if you migrated your contracts prior to enabling this field in your Truffle project and want
|
|
121
|
-
// those previously migrated contracts available in the .db directory, you will need to run the following:
|
|
122
|
-
// $ truffle migrate --reset --compile-all
|
|
123
|
-
|
|
124
|
-
db: {
|
|
125
|
-
enabled: false
|
|
126
|
-
}
|
|
127
|
-
};
|
|
23
|
+
module.exports = {
|
|
24
|
+
/**
|
|
25
|
+
* Networks define how you connect to your ethereum client and let you set the
|
|
26
|
+
* defaults web3 uses to send transactions. If you don't specify one truffle
|
|
27
|
+
* will spin up a development blockchain for you on port 9545 when you
|
|
28
|
+
* run `develop` or `test`. You can ask a truffle command to use a specific
|
|
29
|
+
* network from the command line, e.g
|
|
30
|
+
*
|
|
31
|
+
* $ truffle test --network <network-name>
|
|
32
|
+
*/
|
|
33
|
+
networks: {
|
|
34
|
+
|
|
35
|
+
development: {
|
|
36
|
+
host: "127.0.0.1", // Localhost (default: none)
|
|
37
|
+
port: 8545, // Standard Ethereum port (default: none)
|
|
38
|
+
network_id: "*", // Any network (default: none)
|
|
39
|
+
},
|
|
40
|
+
matic: {
|
|
41
|
+
provider: function () {
|
|
42
|
+
return new HDWalletProvider(mnemonic, rpcUrl);
|
|
43
|
+
},
|
|
44
|
+
network_id: '80001',
|
|
45
|
+
},
|
|
46
|
+
matic_mainnet: {
|
|
47
|
+
provider: function () {
|
|
48
|
+
return new HDWalletProvider(mnemonic, rpcUrl);
|
|
49
|
+
},
|
|
50
|
+
network_id: '137',
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
// Set default mocha options here, use special reporters etc.
|
|
55
|
+
mocha: {
|
|
56
|
+
// timeout: 100000
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
// Configure your compilers
|
|
60
|
+
compilers: {
|
|
61
|
+
solc: {
|
|
62
|
+
version: "0.8.15", // Fetch exact version from solc-bin (default: truffle's version)
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
db: {
|
|
67
|
+
enabled: false
|
|
68
|
+
}
|
|
69
|
+
};
|