Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master sync #214

Merged
merged 49 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
23ee6d3
Deployed to mainnet
gsoares85 Nov 17, 2023
79b4033
Testnet Deploy
gsoares85 Nov 29, 2023
86729e5
Merge pull request #186 from rsksmart/feature/newTestNetDepploy
MaximStanciu8 Nov 29, 2023
1c00712
Added dao fee collector address
gsoares85 Dec 4, 2023
17b9add
Fixed comments
gsoares85 Dec 4, 2023
7591374
Merge pull request #187 from rsksmart/feature/add-FeeCollectorAddress…
MaximStanciu8 Dec 5, 2023
8952ae2
Upgraded LBC to testnet
gsoares85 Dec 14, 2023
347733d
Merge pull request #188 from rsksmart/feature/testnetUpgrade
MaximStanciu8 Dec 14, 2023
0df33e9
Merge pull request #189 from rsksmart/QA-Test
MaximStanciu8 Dec 14, 2023
a1adc68
fix update script
Luisfc68 Dec 16, 2023
e9be74a
Merge pull request #190 from rsksmart/fix-script
MaximStanciu8 Dec 18, 2023
8df6b53
LBC upgrade
gsoares85 Dec 19, 2023
41da36d
Merge branch 'QA-Test' into feature/testnetUpgrade
gsoares85 Dec 19, 2023
8c592e5
Merge pull request #191 from rsksmart/feature/testnetUpgrade
gsoares85 Dec 19, 2023
5ba9657
fix test broken when adding productFeeAmount
Luisfc68 Dec 21, 2023
f6dd197
enforce test to run on each environment branch
Luisfc68 Dec 21, 2023
d2b5b24
fix time dependant test to run in pipeline
Luisfc68 Dec 21, 2023
3570c9d
Merge pull request #192 from rsksmart/test-fix
MaximStanciu8 Dec 21, 2023
6bacc12
Migrate to BtcUtils published library
Luisfc68 Dec 21, 2023
10f96a6
fix unsafe integer calculation in test
Luisfc68 Dec 21, 2023
8751b04
update to avoid tx to the fee collector if productFee is 0
Luisfc68 Jan 2, 2024
dc6dd34
contract size optimizations
Luisfc68 Jan 2, 2024
5e137b1
Merge pull request #193 from rsksmart/feature/GBI-1578
MaximStanciu8 Jan 3, 2024
334abbb
separate gasFee from callFee
Luisfc68 Jan 3, 2024
0eb6e30
update integration tests
Luisfc68 Jan 3, 2024
3bcdb5a
Merge pull request #194 from rsksmart/feature/GBI-1578
MaximStanciu8 Jan 4, 2024
5d026bf
remove addresses from regtest config
Luisfc68 Jan 5, 2024
d93ca3a
Merge pull request #195 from rsksmart/regtest-config-fix
MaximStanciu8 Jan 5, 2024
29713dd
Merge pull request #197 from rsksmart/QA-Test
MaximStanciu8 Jan 5, 2024
713e8da
testnet upgrade information
Luisfc68 Jan 5, 2024
df330ea
Merge pull request #198 from rsksmart/testnet-update
MaximStanciu8 Jan 5, 2024
a221de4
Merge pull request #185 from rsksmart/feature/mainnet-deploy
MaximStanciu8 Jan 12, 2024
ea91426
Merge pull request #199 from rsksmart/QA-Test
MaximStanciu8 Jan 12, 2024
8b370fe
ci: add npm config
Luisfc68 Jan 31, 2024
1958357
Merge pull request #200 from rsksmart/npm-config
MaximStanciu8 Jan 31, 2024
dd361d2
fix: install lib from new registry
Luisfc68 Jan 31, 2024
092eb64
fix: add linebreak in .npmrc
Luisfc68 Jan 31, 2024
3be456c
Merge pull request #201 from rsksmart/npm-config
MaximStanciu8 Jan 31, 2024
5c4c1fe
feat: update BtcUtils library
Luisfc68 Feb 6, 2024
016d2a0
Merge pull request #203 from rsksmart/feature/GBI-1652
Luisfc68 Feb 7, 2024
8de563f
testnet upgrade
Luisfc68 Feb 7, 2024
572fe2a
Merge pull request #204 from rsksmart/testnet-upgrade
MaximStanciu8 Feb 7, 2024
f43277a
Merge pull request #205 from rsksmart/QA-Test
MaximStanciu8 Feb 7, 2024
119eb75
1.1.1
Luisfc68 Feb 7, 2024
ab77f1f
Merge pull request #206 from rsksmart/version-update
MaximStanciu8 Feb 7, 2024
9f3f698
Merge pull request #207 from rsksmart/QA-Test
MaximStanciu8 Feb 7, 2024
a60c2e5
Qa test (#212)
Luisfc68 Feb 20, 2024
ceb7b4b
Stable test (#211) (#213)
Luisfc68 Feb 20, 2024
3bb8cf0
Merge branch 'Stable-Test' into master-sync
Luisfc68 Feb 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
node-version: '19.6.0'

- name: NPM Login
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
run: npm config set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }}

- name: Install truffle
run: npm install -g truffle
Expand Down
367 changes: 367 additions & 0 deletions .openzeppelin/unknown-31.json
Original file line number Diff line number Diff line change
Expand Up @@ -2541,6 +2541,373 @@
}
}
}
},
"5f8d16007d06cb460d5d9f35efd903dca17132c79941d9ebd70b99c3b405b092": {
"address": "0xf87F5dEEd6F527C62b718a509d65494dfFB8Dc6C",
"txHash": "0x17018de742d304ef560f7a606ceb6c5335e3b47c683d3adde3f7b5f313d25107",
"layout": {
"solcVersion": "0.8.18",
"storage": [
{
"contract": "Initializable",
"label": "_initialized",
"type": "t_uint8",
"src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62",
"retypedFrom": "bool"
},
{
"contract": "Initializable",
"label": "_initializing",
"type": "t_bool",
"src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67"
},
{
"contract": "ContextUpgradeable",
"label": "__gap",
"type": "t_array(t_uint256)50_storage",
"src": "../@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36"
},
{
"contract": "OwnableUpgradeable",
"label": "_owner",
"type": "t_address",
"src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22"
},
{
"contract": "OwnableUpgradeable",
"label": "__gap",
"type": "t_array(t_uint256)49_storage",
"src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94"
},
{
"contract": "ReentrancyGuardUpgradeable",
"label": "_status",
"type": "t_uint256",
"src": "../@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38"
},
{
"contract": "ReentrancyGuardUpgradeable",
"label": "__gap",
"type": "t_array(t_uint256)49_storage",
"src": "../@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:80"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "bridge",
"type": "t_contract(Bridge)3208",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:92"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "balances",
"type": "t_mapping(t_address,t_uint256)",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:93"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "collateral",
"type": "t_mapping(t_address,t_uint256)",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:94"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "pegoutCollateral",
"type": "t_mapping(t_address,t_uint256)",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:95"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "liquidityProviders",
"type": "t_mapping(t_uint256,t_struct(LiquidityProvider)7056_storage)",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:96"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "callRegistry",
"type": "t_mapping(t_bytes32,t_struct(Registry)7038_storage)",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:97"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "resignationBlockNum",
"type": "t_mapping(t_address,t_uint256)",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:98"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "minCollateral",
"type": "t_uint256",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:100"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "minPegIn",
"type": "t_uint256",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:101"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "rewardP",
"type": "t_uint32",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:103"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "resignDelayInBlocks",
"type": "t_uint32",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:104"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "dust",
"type": "t_uint256",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:105"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "providerId",
"type": "t_uint256",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:106"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "btcBlockTime",
"type": "t_uint256",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:108"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "mainnet",
"type": "t_bool",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:109"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "processedQuotes",
"type": "t_mapping(t_bytes32,t_uint8)",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:111"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "registeredPegoutQuotes",
"type": "t_mapping(t_bytes32,t_struct(PegOutQuote)10194_storage)",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:112"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "pegoutRegistry",
"type": "t_mapping(t_bytes32,t_struct(PegoutRecord)7043_storage)",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:113"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "productFeePercentage",
"type": "t_uint256",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:115"
},
{
"contract": "LiquidityBridgeContractV2",
"label": "daoFeeCollectorAddress",
"type": "t_address",
"src": "../project:/contracts/LiquidityBridgeContractV2.sol:116"
}
],
"types": {
"t_contract(Bridge)3208": {
"label": "contract Bridge"
},
"t_mapping(t_address,t_uint256)": {
"label": "mapping(address => uint256)"
},
"t_address": {
"label": "address"
},
"t_uint256": {
"label": "uint256"
},
"t_mapping(t_uint256,t_struct(LiquidityProvider)7056_storage)": {
"label": "mapping(uint256 => struct LiquidityBridgeContractV2.LiquidityProvider)"
},
"t_struct(LiquidityProvider)7056_storage": {
"label": "struct LiquidityBridgeContractV2.LiquidityProvider",
"members": [
{
"label": "id",
"type": "t_uint256"
},
{
"label": "provider",
"type": "t_address"
},
{
"label": "name",
"type": "t_string_storage"
},
{
"label": "apiBaseUrl",
"type": "t_string_storage"
},
{
"label": "status",
"type": "t_bool"
},
{
"label": "providerType",
"type": "t_string_storage"
}
]
},
"t_string_storage": {
"label": "string"
},
"t_bool": {
"label": "bool"
},
"t_mapping(t_bytes32,t_struct(Registry)7038_storage)": {
"label": "mapping(bytes32 => struct LiquidityBridgeContractV2.Registry)"
},
"t_bytes32": {
"label": "bytes32"
},
"t_struct(Registry)7038_storage": {
"label": "struct LiquidityBridgeContractV2.Registry",
"members": [
{
"label": "timestamp",
"type": "t_uint32"
},
{
"label": "success",
"type": "t_bool"
}
]
},
"t_uint32": {
"label": "uint32"
},
"t_mapping(t_bytes32,t_uint8)": {
"label": "mapping(bytes32 => uint8)"
},
"t_uint8": {
"label": "uint8"
},
"t_mapping(t_bytes32,t_struct(PegOutQuote)10194_storage)": {
"label": "mapping(bytes32 => struct QuotesV2.PegOutQuote)"
},
"t_struct(PegOutQuote)10194_storage": {
"label": "struct QuotesV2.PegOutQuote",
"members": [
{
"label": "lbcAddress",
"type": "t_address"
},
{
"label": "lpRskAddress",
"type": "t_address"
},
{
"label": "btcRefundAddress",
"type": "t_bytes_storage"
},
{
"label": "rskRefundAddress",
"type": "t_address"
},
{
"label": "lpBtcAddress",
"type": "t_bytes_storage"
},
{
"label": "callFee",
"type": "t_uint256"
},
{
"label": "penaltyFee",
"type": "t_uint256"
},
{
"label": "nonce",
"type": "t_int64"
},
{
"label": "deposityAddress",
"type": "t_bytes_storage"
},
{
"label": "value",
"type": "t_uint256"
},
{
"label": "agreementTimestamp",
"type": "t_uint32"
},
{
"label": "depositDateLimit",
"type": "t_uint32"
},
{
"label": "depositConfirmations",
"type": "t_uint16"
},
{
"label": "transferConfirmations",
"type": "t_uint16"
},
{
"label": "transferTime",
"type": "t_uint32"
},
{
"label": "expireDate",
"type": "t_uint32"
},
{
"label": "expireBlock",
"type": "t_uint32"
},
{
"label": "productFeeAmount",
"type": "t_uint256"
},
{
"label": "gasFee",
"type": "t_uint256"
}
]
},
"t_bytes_storage": {
"label": "bytes"
},
"t_int64": {
"label": "int64"
},
"t_uint16": {
"label": "uint16"
},
"t_mapping(t_bytes32,t_struct(PegoutRecord)7043_storage)": {
"label": "mapping(bytes32 => struct LiquidityBridgeContractV2.PegoutRecord)"
},
"t_struct(PegoutRecord)7043_storage": {
"label": "struct LiquidityBridgeContractV2.PegoutRecord",
"members": [
{
"label": "depositTimestamp",
"type": "t_uint256"
},
{
"label": "completed",
"type": "t_bool"
}
]
},
"t_array(t_uint256)49_storage": {
"label": "uint256[49]"
},
"t_array(t_uint256)50_storage": {
"label": "uint256[50]"
}
}
}
}
}
}
1 change: 1 addition & 0 deletions contracts/LiquidityBridgeContractV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ contract LiquidityBridgeContractV2 is Initializable, OwnableUpgradeable, Reentra
require(quote.lbcAddress != address(0), "LBC042");
BtcUtils.TxRawOutput[] memory outputs = BtcUtils.getOutputs(btcTx);
bytes memory scriptContent = BtcUtils.parseNullDataScript(outputs[QUOTE_HASH_OUTPUT].pkScript);
require(scriptContent.length == 33 && scriptContent[0] == 0x20, "LBC075");
// shift the array to remove the first byte (the size)
for (uint8 i = 0 ; i < scriptContent.length - 1; i++) {
scriptContent[i] = scriptContent[i + 1];
Expand Down
3 changes: 2 additions & 1 deletion errorCodes.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,6 @@
"LBC071": "Intentional overflow on quote values",
"LBC072": "Minimum collateral for registration can't be lower than 0.6 RBTC",
"LBC073": "Resign delay blocks lower than minimal",
"LBC074": "Error sending fee to DAO"
"LBC074": "Error sending fee to DAO",
"LBC075": "Malformed BTC transaction output"
}
Loading
Loading