Skip to content

Commit

Permalink
Makes mainnet that default net. Adds arrowhead
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-then committed Feb 9, 2024
1 parent 86f1348 commit ca4f48e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
node_modules/
.DS_Store
14 changes: 11 additions & 3 deletions tools/PrecompiledAbis.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ <h5 class='text-center'>Simple html page to get bridge methods selectors and eve
</div>
<div class="col-9">
<select id='abiForForkSelect' class='form-select form-select-sm' aria-label=''>
<option selected value='fingerroot'>Fingerroot</option>
<option selected value='arrowhead'>Arrowhead</option>
<option value='fingerroot'>Fingerroot</option>
<option value='hop'>Hop</option>
<option value='iris'>Iris</option>
<option value='papyrus'>Papyrus</option>
Expand Down Expand Up @@ -109,6 +110,7 @@ <h3>Events</h3>
const irisAbisUrl = 'https://raw.githubusercontent.com/rsksmart/precompiled-abis/4.0.2-IRIS/abis/bridge.json';
const hopAbisUrl = 'https://raw.githubusercontent.com/rsksmart/precompiled-abis/5.0.0-HOP/abis/bridge.json';
const fingerrootAbisUrl = 'https://raw.githubusercontent.com/rsksmart/precompiled-abis/5.0.0-FINGERROOT/abis/bridge.json';
const arrowheadAbisUrl = 'https://raw.githubusercontent.com/rsksmart/precompiled-abis/6.0.0-ARROWHEAD/abis/bridge.json';

const abisForkInfoMap = {
orchid: {
Expand Down Expand Up @@ -140,6 +142,11 @@ <h3>Events</h3>
name: '5.0.0-FINGERROOT',
key: 'fingerroot',
url: fingerrootAbisUrl
},
arrowhead: {
name: '6.0.0-ARROWHEAD',
key: 'arrowhead',
url: arrowheadAbisUrl
}
};

Expand All @@ -149,7 +156,8 @@ <h3>Events</h3>
papyrus: null,
iris: null,
hop: null,
fingerroot: null
fingerroot: null,
arrowhead: null,
};

const peginMethods = [
Expand Down Expand Up @@ -199,7 +207,7 @@ <h3>Events</h3>
];

let selectedAbis = null;
let selectedAbiForkInfo = abisForkInfoMap.fingerroot;
let selectedAbiForkInfo = abisForkInfoMap.arrowhead;

const testnetRskUrl = 'https://public-node.testnet.rsk.co/';
let web3;
Expand Down
10 changes: 5 additions & 5 deletions tools/RootstockBridge.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ <h5 class='text-center'>Simple html page to interact with the Rootstock (RSK) Bl
</div>
<div class="col-9">
<select id='selectNetwork' class='form-select form-select-sm' aria-label=''>
<option selected value='testnet'>Testnet</option>
<option value='mainnet'>Mainnet</option>
<option selected value='mainnet'>Mainnet</option>
<option value='testnet'>Testnet</option>
</select>
</div>
</div>
Expand Down Expand Up @@ -136,11 +136,11 @@ <h5 class='text-center'>Simple html page to interact with the Rootstock (RSK) Bl
const bridgeAddress = '0x0000000000000000000000000000000001000006';
const testnetRskUrl = 'https://public-node.testnet.rsk.co/';
const mainnetRskUrl = 'https://public-node.rsk.co/';
let currentUrl = testnetRskUrl;
let currentUrl = mainnetRskUrl;
let bridge;
let web3;
let bridgeAbi;
url.innerText = testnetRskUrl;
url.innerText = mainnetRskUrl;
bridgeAddressElement.innerText = bridgeAddress;
const bytes32FormatExample = '0x0000...1111';
const txHashFormatExample = '1111...1111';
Expand Down Expand Up @@ -382,7 +382,7 @@ <h5 class='text-center'>Simple html page to interact with the Rootstock (RSK) Bl

const setup = async () => {
bridgeAbi = await getBridgeAbi();
web3 = new Web3(testnetRskUrl);
web3 = new Web3(currentUrl);
bridge = new web3.eth.Contract(bridgeAbi, bridgeAddress);
setupBridgeInteractionElements(bridgeAbi);
window.web3 = web3;
Expand Down

0 comments on commit ca4f48e

Please sign in to comment.