update web examples
MODIFY
examples/web/config.js
examples/web/config.js
module.exports = {
- 'MATIC_PROVIDER': 'http://68.183.166.5:8545/',
- 'PARENT_PROVIDER': 'https://ropsten.infura.io/matic',
- 'ROOTCHAIN_ADDRESS': '0xa1214e7046db461ca3c3fddb19417d8c84a58d64',
- 'WITHDRAWMANAGER_ADDRESS': '0xa407d3c17f2bc54f3c5031a704150d628c8868d8',
- 'SYNCER_URL': 'https://matic-syncer.api.matic.network/api/v1',
- 'WATCHER_URL': 'https://ropsten-watcher.api.matic.network/api/v1',
+ 'MATIC_PROVIDER': 'https://testnet2.matic.network/',
+ 'PARENT_PROVIDER': 'https://ropsten.infura.io/v3/70645f042c3a409599c60f96f6dd9fbc',
+ 'ROOTCHAIN_ADDRESS': '0x60e2b19b9a87a3f37827f2c8c8306be718a5f9b4',
+ 'WITHDRAWMANAGER_ADDRESS': '0x4ef2b60cdd4611fa0bc815792acc14de4c158d22',
+ 'MATIC_WETH_ADDRESS': '0x74f2a31a044c87bd687f2dcd5f858940f9c28d0c',
+ 'SYNCER_URL': 'https://matic-syncer2.api.matic.network/api/v1',
+ 'WATCHER_URL': 'https://ropsten-watcher2.api.matic.network/api/v1',
}

MODIFY
examples/web/main.js
examples/web/main.js
const Matic = require('maticjs')
const config = require('./config')
-const token = '0xC4375B7De8af5a38a93548eb8453a498222C4fF2' // test token address
+const token = '0xcc5de81d1af53dcb5d707b6b33a50f4ee46d983e' // test token address
const recipient = '0x7ed7f36694153ba6eff6ca6726b60f6e2bb17fcf' // test recipient address
const amount = '10000000000000000'
-const from = '0x6e0c217de3235f1d8a95605d10bcc1b36ff7996f' // from address
+const from = '0x87b917F40f7a031e13577200801b5f2f0D3E1b91' // from address
// Create object of Matic
const matic = new Matic({

MODIFY
examples/web/package-lock.json
examples/web/package-lock.json
}
},
"maticjs": {
- "version": "1.0.0-beta.9",
- "resolved": "https://registry.npmjs.org/maticjs/-/maticjs-1.0.0-beta.9.tgz",
- "integrity": "sha512-YVKcMjwX8BBHXZQc+l+g3QLexFzO9s6qWKmKa3GaBKLmPUg0sfKzrdRh1XDZwoudmRZrE78v+BoHcea83ed7Hg==",
+ "version": "1.0.0-beta.12",
+ "resolved": "https://registry.npmjs.org/maticjs/-/maticjs-1.0.0-beta.12.tgz",
+ "integrity": "sha512-qjEI9XdCuyVRzL+VdWK+MLtrizjp3YA7dyO7V+Fz6BAf95tBmrC0JG63OpXsBWH0eW/MH1+FQWQcfPXktwnbyA==",
"requires": {
"@babel/polyfill": "7.0.0",
"@babel/runtime": "7.1.2",
}
},
"rlp": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.2.tgz",
- "integrity": "sha512-Ng2kJEN731Sfv4ZAY2i0ytPMc0BbJKBsVNl0QZY8LxOWSwd+1xpg+fpSRfaMn0heHU447s6Kgy8qfHZR0XTyVw==",
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.3.tgz",
+ "integrity": "sha512-l6YVrI7+d2vpW6D6rS05x2Xrmq8oW7v3pieZOJKBEdjuTF4Kz/iwk55Zyh1Zaz+KOB2kC8+2jZlp2u9L4tTzCQ==",
"requires": {
"bn.js": "^4.11.1",
"safe-buffer": "^5.1.1"
}
},
"secp256k1": {
- "version": "3.6.2",
- "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.6.2.tgz",
- "integrity": "sha512-90nYt7yb0LmI4A2jJs1grglkTAXrBwxYAjP9bpeKjvJKOjG2fOeH/YI/lchDMIvjrOasd5QXwvV2jwN168xNng==",
- "requires": {
- "bindings": "^1.2.1",
- "bip66": "^1.1.3",
- "bn.js": "^4.11.3",
- "create-hash": "^1.1.2",
+ "version": "3.7.0",
+ "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.7.0.tgz",
+ "integrity": "sha512-YlUIghD6ilkMkzmFJpIdVjiamv2S8lNZ9YMwm1XII9JC0NcR5qQiv2DOp/G37sExBtaMStzba4VDJtvBXEbmMQ==",
+ "requires": {
+ "bindings": "^1.5.0",
+ "bip66": "^1.1.5",
+ "bn.js": "^4.11.8",
+ "create-hash": "^1.2.0",
"drbg.js": "^1.0.1",
- "elliptic": "^6.2.3",
- "nan": "^2.2.1",
- "safe-buffer": "^5.1.0"
+ "elliptic": "^6.4.1",
+ "nan": "^2.13.2",
+ "safe-buffer": "^5.1.2"
+ },
+ "dependencies": {
+ "nan": {
+ "version": "2.14.0",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz",
+ "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg=="
+ }
}
},
"seek-bzip": {

MODIFY
examples/web/package.json
examples/web/package.json
"author": "Bhavir Shah <bhavir@matic.network>",
"license": "ISC",
"dependencies": {
- "maticjs": "1.0.0-beta.9",
+ "maticjs": "1.0.0-beta.12",
"web3": "1.0.0-beta.34"
},
"devDependencies": {

update web examples