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

chore: tron shasta upgrade to v2 #37

Merged
merged 20 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e393a61
chore: update npm dependencies and add @openzeppelin/truffle-upgrades
OnahProsperity May 15, 2024
553f69e
chore: add Tron package, deployto shasta and update Tron network conf…
OnahProsperity May 15, 2024
a7ef695
chore: update Tron network configuration to use network ID 12002
OnahProsperity May 18, 2024
fc37c30
chore: remove commented code in setSupportedTokens.ts
OnahProsperity May 18, 2024
4e86a6e
chore: remove commented code in setSupportedTokens.ts
OnahProsperity May 18, 2024
34c683b
chore: add script to set supported institutions for Tron
OnahProsperity Jun 10, 2024
5084e11
feat: remove set institutions from V2
OnahProsperity Jun 10, 2024
53f0af0
chore: add @api/tron package and update Tron network configuration
OnahProsperity Jun 10, 2024
e6e4072
chore: tron lock files
OnahProsperity Jun 10, 2024
e6f6469
chore: Remove setSupportedInstitutions script for Tron
OnahProsperity Jun 10, 2024
0337fd7
chore: tron shasta upgrade to v2
OnahProsperity Jun 10, 2024
e268ea7
chore: fix conflits with base contract
OnahProsperity Jun 10, 2024
6590fb4
chore: update invalid institution test with allowance checks
OnahProsperity Jun 10, 2024
e42281e
chore: update Tron network configuration and add support for Tron Mai…
OnahProsperity Jun 11, 2024
3211801
chore: remove unused SharedStructs library and institutions updates
OnahProsperity Jun 11, 2024
e4b6be0
chore: update gateway test and message hash to support institution code
OnahProsperity Jun 11, 2024
1948589
chore: clean unused code
chibie Jun 12, 2024
91c6458
chore: remove unused @api/tron package
OnahProsperity Jun 12, 2024
994e3d1
chore: update readme and package.json
OnahProsperity Jun 12, 2024
ac624bd
Merge branch 'tron' of https://github.com/paycrest/contracts into tron
OnahProsperity Jun 12, 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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
.env
.vscode
coverage
coverage.json
typechain
Expand All @@ -11,3 +12,7 @@ publicKey.txt
cache
# artifacts

# Tron Package
src/js/metacoin-config.js


204 changes: 204 additions & 0 deletions .openzeppelin/unknown-2494104990.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
"address": "0x08d650f780cc9959165d719130bcf04873d35377",
"txHash": "bd889a0c9718592d1b315d3d0d2b850de8dfe9ce1a9db427ee75e8b4da5aaefb",
"kind": "transparent"
},
{
"address": "0xadcd442c3605d4beec551b9505c1f051bc638011",
"txHash": "2aa271ccbaaac8b05860378090c687d04aff139e68e9704a850a079d01504b8e",
"kind": "transparent"
}
],
"impls": {
Expand Down Expand Up @@ -508,6 +513,205 @@
},
"namespaces": {}
}
},
"8e07f2115f4c1497ea960d739431d778511f0fa07a20cf26a97567bb7df1e232": {
"address": "0x3ed371e17efeace4a4c0cbae6d01a393a8b996a5",
"txHash": "95c8e4f91fef7a0e7dd43c30fdcf8b2ad3f02152ddd9e685e5f457fa526c6064",
"layout": {
"solcVersion": "0.8.18",
"storage": [
{
"contract": "Initializable",
"label": "_initialized",
"type": "t_uint8",
"src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63",
"retypedFrom": "bool"
},
{
"contract": "Initializable",
"label": "_initializing",
"type": "t_bool",
"src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68"
},
{
"contract": "ContextUpgradeable",
"label": "__gap",
"type": "t_array(t_uint256)50_storage",
"src": "../@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40"
},
{
"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": "Ownable2StepUpgradeable",
"label": "_pendingOwner",
"type": "t_address",
"src": "../@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:21"
},
{
"contract": "Ownable2StepUpgradeable",
"label": "__gap",
"type": "t_array(t_uint256)49_storage",
"src": "../@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:70"
},
{
"contract": "GatewaySettingManager",
"label": "MAX_BPS",
"type": "t_uint256",
"src": "GatewaySettingManager.sol:12"
},
{
"contract": "GatewaySettingManager",
"label": "protocolFeePercent",
"type": "t_uint64",
"src": "GatewaySettingManager.sol:13"
},
{
"contract": "GatewaySettingManager",
"label": "treasuryAddress",
"type": "t_address",
"src": "GatewaySettingManager.sol:14"
},
{
"contract": "GatewaySettingManager",
"label": "_aggregatorAddress",
"type": "t_address",
"src": "GatewaySettingManager.sol:15"
},
{
"contract": "GatewaySettingManager",
"label": "_isTokenSupported",
"type": "t_mapping(t_address,t_uint256)",
"src": "GatewaySettingManager.sol:16"
},
{
"contract": "GatewaySettingManager",
"label": "__gap",
"type": "t_array(t_uint256)50_storage",
"src": "GatewaySettingManager.sol:19"
},
{
"contract": "PausableUpgradeable",
"label": "_paused",
"type": "t_bool",
"src": "../@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29"
},
{
"contract": "PausableUpgradeable",
"label": "__gap",
"type": "t_array(t_uint256)49_storage",
"src": "../@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116"
},
{
"contract": "Gateway",
"label": "order",
"type": "t_mapping(t_bytes32,t_struct(Order)842_storage)",
"src": "Gateway.sol:19"
},
{
"contract": "Gateway",
"label": "_nonce",
"type": "t_mapping(t_address,t_uint256)",
"src": "Gateway.sol:20"
},
{
"contract": "Gateway",
"label": "__gap",
"type": "t_array(t_uint256)50_storage",
"src": "Gateway.sol:21"
}
],
"types": {
"t_mapping(t_bytes32,t_struct(Order)842_storage)": {
"label": "mapping(bytes32 => struct IGateway.Order)"
},
"t_bytes32": {
"label": "bytes32"
},
"t_struct(Order)842_storage": {
"label": "struct IGateway.Order",
"members": [
{
"label": "sender",
"type": "t_address"
},
{
"label": "token",
"type": "t_address"
},
{
"label": "senderFeeRecipient",
"type": "t_address"
},
{
"label": "senderFee",
"type": "t_uint256"
},
{
"label": "protocolFee",
"type": "t_uint256"
},
{
"label": "isFulfilled",
"type": "t_bool"
},
{
"label": "isRefunded",
"type": "t_bool"
},
{
"label": "refundAddress",
"type": "t_address"
},
{
"label": "currentBPS",
"type": "t_uint96"
},
{
"label": "amount",
"type": "t_uint256"
}
]
},
"t_address": {
"label": "address"
},
"t_uint256": {
"label": "uint256"
},
"t_bool": {
"label": "bool"
},
"t_uint96": {
"label": "uint96"
},
"t_mapping(t_address,t_uint256)": {
"label": "mapping(address => uint256)"
},
"t_array(t_uint256)50_storage": {
"label": "uint256[50]"
},
"t_array(t_uint256)49_storage": {
"label": "uint256[49]"
},
"t_uint64": {
"label": "uint64"
},
"t_uint8": {
"label": "uint8"
}
},
"namespaces": {}
}
}
}
}
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ npx hardhat run scripts/upgrade.ts --network <network>
Update network settings, currencies, and supported institutions in `scripts/config.ts`

```bash
npx hardhat run scripts/setSupportedInstitutions.ts --network <network>

npx hardhat run scripts/setSupportedTokens.ts --network <network>

npx hardhat run scripts/updateProtocolAddresses.ts --network <network>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/be92c7424fbba6d94f9f797b1fbd8e03.json"
"buildInfo": "../../../../build-info/d775da09ef809423b637832990bde81f.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/be92c7424fbba6d94f9f797b1fbd8e03.json"
"buildInfo": "../../../../build-info/d775da09ef809423b637832990bde81f.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/be92c7424fbba6d94f9f797b1fbd8e03.json"
"buildInfo": "../../../../../build-info/d775da09ef809423b637832990bde81f.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/be92c7424fbba6d94f9f797b1fbd8e03.json"
"buildInfo": "../../../../build-info/d775da09ef809423b637832990bde81f.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/be92c7424fbba6d94f9f797b1fbd8e03.json"
"buildInfo": "../../../../build-info/d775da09ef809423b637832990bde81f.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/be92c7424fbba6d94f9f797b1fbd8e03.json"
"buildInfo": "../../../../build-info/d775da09ef809423b637832990bde81f.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/be92c7424fbba6d94f9f797b1fbd8e03.json"
"buildInfo": "../../../../../build-info/d775da09ef809423b637832990bde81f.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/be92c7424fbba6d94f9f797b1fbd8e03.json"
"buildInfo": "../../../../../build-info/d775da09ef809423b637832990bde81f.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../../build-info/be92c7424fbba6d94f9f797b1fbd8e03.json"
"buildInfo": "../../../../../../build-info/d775da09ef809423b637832990bde81f.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/be92c7424fbba6d94f9f797b1fbd8e03.json"
"buildInfo": "../../../../build-info/d775da09ef809423b637832990bde81f.json"
}
1 change: 1 addition & 0 deletions artifacts/build-info/0dbe503a07cb4d0e0edd2b1d16930510.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion artifacts/build-info/be92c7424fbba6d94f9f797b1fbd8e03.json

This file was deleted.

1 change: 0 additions & 1 deletion artifacts/build-info/eb9240473b2cb7463d0c0c1e49e041e7.json

This file was deleted.

2 changes: 1 addition & 1 deletion artifacts/contracts/Gateway.sol/Gateway.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/eb9240473b2cb7463d0c0c1e49e041e7.json"
"buildInfo": "../../build-info/0dbe503a07cb4d0e0edd2b1d16930510.json"
}
Loading
Loading