Skip to content

Commit

Permalink
added the ARBITRUM network to EvmChain. (#876)
Browse files Browse the repository at this point in the history
  • Loading branch information
b4rtaz authored Dec 6, 2022
1 parent 28aa113 commit 248089f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/shy-cherries-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@moralisweb3/common-evm-utils': patch
---

Added the ARBITRUM network to the `EvmChain` type.
4 changes: 2 additions & 2 deletions .changeset/soft-boats-collect.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
"create-moralis-dapp": patch
"demo-nextjs": patch
'create-moralis-dapp': patch
'demo-nextjs': patch
---

Beta version of the create-moralis-dapp CLI too to quickstart a new project
12 changes: 11 additions & 1 deletion packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,15 @@ export class EvmChain implements MoralisData, EvmChainable {
return EvmChain.create(11297108109);
}

/**
* Returns ARBITRUM chain
*
* @example EvmChain.ARBITRUM
*/
public static get ARBITRUM() {
return EvmChain.create(42161);
}

/**
* Create a new instance of EvmChain from any valid address input.
*
Expand Down Expand Up @@ -311,7 +320,8 @@ export class EvmChain implements MoralisData, EvmChainable {
| '0xfa'
| '0x19'
| '0x152'
| '0x2a15c308d';
| '0x2a15c308d'
| '0xa4B1';
}

/**
Expand Down
6 changes: 4 additions & 2 deletions packages/common/evmUtils/src/operations/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,9 @@ export interface components {
| "cronos"
| "0x19"
| "cronos testnet"
| "0x152";
| "0x152"
| "arbitrum"
| "0xa4b1";
nft: {
/**
* @description The address of the NFT contract
Expand Down Expand Up @@ -1639,7 +1641,7 @@ export interface components {
* @description The number of hits the request counts towards rate limiting
* @example 1
*/
rateLimitWeight: string;
rateLimitCost: string;
/**
* @description The number of compute units the request counts towards billing
* @example 0
Expand Down

1 comment on commit 248089f

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test coverage

Title Lines Statements Branches Functions
api-utils Coverage: 25%
26.34% (49/186) 19.14% (9/47) 22.85% (8/35)
auth Coverage: 90%
92.77% (77/83) 81.81% (18/22) 90% (18/20)
evm-api Coverage: 100%
100% (80/80) 66.66% (6/9) 100% (48/48)
common-evm-utils Coverage: 64%
64.97% (946/1456) 19.43% (123/633) 35.8% (203/567)
sol-api Coverage: 96%
96.66% (29/30) 66.66% (6/9) 91.66% (11/12)
common-sol-utils Coverage: 74%
73.77% (135/183) 60% (12/20) 65.67% (44/67)
common-streams-utils Coverage: 93%
93.13% (787/845) 85.96% (196/228) 84.14% (276/328)
streams Coverage: 87%
86.71% (398/459) 67.14% (47/70) 84.52% (71/84)

Please sign in to comment.