Skip to content

Commit

Permalink
feat(pg): Add support for Darwinia Pangolin
Browse files Browse the repository at this point in the history
  • Loading branch information
RPate97 committed Apr 7, 2024
1 parent 0f192f7 commit 19370da
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/sweet-rockets-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@sphinx-labs/contracts': patch
'@sphinx-labs/plugins': patch
---

Add support for Darwinia Pangolin
13 changes: 11 additions & 2 deletions packages/contracts/contracts/foundry/SphinxConstants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ contract SphinxConstants {
address public constant safeSingletonAddress = 0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552;
address public constant sphinxModuleImplAddress = 0x8f4E4d51B8050B0ff713eff1F88f3dD8b5e8a530;

uint8 internal constant numSupportedNetworks = 46;
uint8 internal constant numSupportedNetworks = 47;

function getNetworkInfoArray() public pure returns (NetworkInfo[] memory) {
NetworkInfo[] memory all = new NetworkInfo[](numSupportedNetworks);
Expand Down Expand Up @@ -386,6 +386,14 @@ contract SphinxConstants {
dripSize: 25000000000000000,
dripSizeString: '0.025 ETH'
});
all[46] = NetworkInfo({
network: Network.darwinia_pangolin,
name: "darwinia_pangolin",
chainId: 43,
networkType: NetworkType.Testnet,
dripSize: 1000000000000000000,
dripSizeString: '1 RING'
});
return all;
}
}
Expand Down Expand Up @@ -436,5 +444,6 @@ enum Network {
blast,
taiko_katla,
mode_sepolia,
mode
mode,
darwinia_pangolin
}
18 changes: 18 additions & 0 deletions packages/contracts/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1242,4 +1242,22 @@ export const SPHINX_NETWORKS: Array<SupportedNetwork> = [
useHigherMaxGasLimit: false,
eip2028: true,
},
{
name: 'darwinia_pangolin',
displayName: 'Darwinia Pangolin',
chainId: BigInt(43),
rpcUrl: () => process.env.DARWINIA_PANGOLIN_URL!,
rpcUrlId: 'DARWINIA_PANGOLIN_URL',
blockexplorers: {},
currency: 'RING',
dripSize: '1',
networkType: 'Testnet',
dripVersion: 0,
decimals: 18,
queryFilterBlockLimit: 2000,
legacyTx: false,
actionGasLimitBuffer: false,
useHigherMaxGasLimit: false,
eip2028: true,
},
]
1 change: 1 addition & 0 deletions packages/core/test/convert.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ describe('Convert EthersJS Objects', () => {
167008:
'0x6a869d63d8c722ed2a4ec2f9af48ec3486f954a46b8f00a0b2ee4411c95f3b78',
59141: '0x2c9b7cd04f5db3b6ab923dc8e8eabc256f1a1d15467df6014609109965b763fa',
43: '0x8562f6585e1a345e6a09a214799f0f99ec63e36182da54d32f6e099ae90fe86c',
}

before(async () => {
Expand Down

0 comments on commit 19370da

Please sign in to comment.