Skip to content

Commit 16f9db0

Browse files
authored
Merge pull request #192 from rsksmart/add-getEstimatedFeesForPegOutAmount
Added new method getEstimatedFeesForPegOutAmount to bridge abi
2 parents 5a818e0 + d8f827b commit 16f9db0

File tree

6 files changed

+75
-37
lines changed

6 files changed

+75
-37
lines changed

abis/bridge.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,23 @@
10091009
"type": "uint256"
10101010
}
10111011
]
1012+
},
1013+
{
1014+
"name": "getEstimatedFeesForPegOutAmount",
1015+
"type": "function",
1016+
"stateMutability": "view",
1017+
"inputs": [
1018+
{
1019+
"name": "pegOutAmountInWeis",
1020+
"type": "uint256"
1021+
}
1022+
],
1023+
"outputs": [
1024+
{
1025+
"name": "",
1026+
"type": "uint256"
1027+
}
1028+
]
10121029
},
10131030
{
10141031
"name": "getNextPegoutCreationBlockNumber",

package-lock.json

Lines changed: 44 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rsksmart/rsk-precompiled-abis",
3-
"version": "8.1.1-REED",
3+
"version": "9.0.0-VETIVER",
44
"description": "Utility to interact with RSK native contracts",
55
"main": "index.js",
66
"repository": {

tests/bridge.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('Bridge', () => {
1111
});
1212

1313
it('has all the expected signatures', () => {
14-
assert.equal(bridge.abi.length, 100);
14+
assert.equal(bridge.abi.length, 101);
1515
});
1616

1717
it('should build the bridge contract with Ethers', () => {
@@ -22,7 +22,7 @@ describe('Bridge', () => {
2222

2323
it('has all the expected functions with the expected properties', () => {
2424
const functions = bridge.abi.filter(item => item.type === 'function');
25-
assert.equal(functions.length, 81);
25+
assert.equal(functions.length, 82);
2626

2727
functions.forEach(func => {
2828
assertFunctionHasNotDeprecatedProperties(func);

tools/PrecompiledAbis.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ <h5 class='text-center'>Simple html page to get bridge methods selectors and eve
8585
</div>
8686
<div class="col-9">
8787
<select id='abiForForkSelect' class='form-select form-select-sm' aria-label=''>
88-
<option selected value='reed'>Reed</option>
88+
<option selected value='vetiver'>Vetiver</option>
89+
<option value='reed'>Reed</option>
8990
<option value='lovell'>Lovell</option>
9091
<option value='arrowhead'>Arrowhead</option>
9192
<option value='fingerroot'>Fingerroot</option>
@@ -168,6 +169,7 @@ <h5 class="modal-title" id="exampleModalLabel">Abi</h5>
168169
const lovellAbisUrl = 'https://raw.githubusercontent.com/rsksmart/rsk-precompiled-abis/7.0.0-LOVELL/abis/bridge.json';
169170
const reedAbisUrl = 'https://raw.githubusercontent.com/rsksmart/rsk-precompiled-abis/8.0.0-REED/abis/bridge.json';
170171
const reed810AbisUrl = 'https://raw.githubusercontent.com/rsksmart/rsk-precompiled-abis/8.1.0-REED/abis/bridge.json';
172+
const vetiverAbisUrl = 'https://raw.githubusercontent.com/rsksmart/rsk-precompiled-abis/9.0.0-VETIVER/abis/bridge.json';
171173

172174
const abisForkInfoMap = {
173175
orchid: {
@@ -220,6 +222,11 @@ <h5 class="modal-title" id="exampleModalLabel">Abi</h5>
220222
key: 'reed810',
221223
url: reed810AbisUrl
222224
},
225+
vetiver: {
226+
name: '9.0.0-VETIVER',
227+
key: 'vetiver',
228+
url: vetiverAbisUrl
229+
},
223230
};
224231

225232
const abiCache = {
@@ -233,6 +240,7 @@ <h5 class="modal-title" id="exampleModalLabel">Abi</h5>
233240
lovell: null,
234241
reed: null,
235242
reed810: null,
243+
vetiver: null,
236244
};
237245

238246
const peginMethods = [
@@ -282,7 +290,7 @@ <h5 class="modal-title" id="exampleModalLabel">Abi</h5>
282290
];
283291

284292
let selectedAbis = null;
285-
let selectedAbiForkInfo = abisForkInfoMap.reed810;
293+
let selectedAbiForkInfo = abisForkInfoMap.vetiver;
286294

287295
selectedAbisUrl.href = selectedAbiForkInfo.url;
288296
selectedAbisUrl.textContent = selectedAbiForkInfo.url;

tools/RootstockBridge.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ <h5 class='text-center'>Simple html page to interact with the Rootstock (RSK) Bl
132132
'getBtcBlockchainBlockHeaderByHash',
133133
'getBtcBlockchainBlockHeaderByHeight',
134134
'getBtcBlockchainParentBlockHeaderByHash',
135+
'getEstimatedFeesForPegOutAmount',
135136
'getEstimatedFeesForNextPegOutEvent',
136137
'getNextPegoutCreationBlockNumber',
137138
'getQueuedPegoutsCount',

0 commit comments

Comments
 (0)