@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/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
- const mnemonic = "Place your mnemonic here";
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
- * Networks define how you connect to your ethereum client and let you set the
31
- * defaults web3 uses to send transactions. If you don't specify one truffle
32
- * will spin up a development blockchain for you on port 9545 when you
33
- * run `develop` or `test`. You can ask a truffle command to use a specific
34
- * network from the command line, e.g
35
- *
36
- * $ truffle test --network <network-name>
37
- */
38
-
39
-
40
- networks: {
41
-
42
- development: {
43
- host: "127.0.0.1", // Localhost (default: none)
44
- port: 8545, // Standard Ethereum port (default: none)
45
- network_id: "*", // Any network (default: none)
46
- },
47
- matic: {
48
- provider: function () {
49
- return new HDWalletProvider(mnemonic, "https://rpc-mumbai.matic.today");
50
- },
51
- network_id: '80001',
52
- },
53
- matic_mainnet: {
54
- provider: function () {
55
- return new HDWalletProvider(mnemonic, "https://rpc-mainnet.maticvigil.com/");
56
- },
57
- network_id: '137',
58
- }
59
-
60
- // Useful for testing. The `development` name is special - truffle uses it by default
61
- // if it's defined here and no other network is specified at the command line.
62
- // You should run a client (like ganache-cli, geth or parity) in a separate terminal
63
- // tab if you use this network and you must also set the `host`, `port` and `network_id`
64
- // options below to some value.
65
- //
66
- // development: {
67
- // host: "127.0.0.1", // Localhost (default: none)
68
- // port: 8545, // Standard Ethereum port (default: none)
69
- // network_id: "*", // Any network (default: none)
70
- // },
71
- // Another network with more advanced options...
72
- // advanced: {
73
- // port: 8777, // Custom port
74
- // network_id: 1342, // Custom network
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
+ };