Skip to content

Commit

Permalink
Merge branch 'master' into overhaul-hardhat-quickstart
Browse files Browse the repository at this point in the history
  • Loading branch information
anegg0 authored Jan 13, 2025
2 parents dc8b630 + 25aaff0 commit 9f36c9b
Show file tree
Hide file tree
Showing 13 changed files with 229 additions and 17 deletions.
Binary file modified arbitrum-docs/assets/submit-tx-to-sequencer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ Time in L2s is tricky. The timing assumptions one is used to making about Ethere

## RPC methods

Although the majority of RPC methods follow the same behavior than in Ethereum, some methods might produce a different result, or add more information, when used on an Arbitrum chain. You can find more information about these differences in [RPC methods](/build-decentralized-apps/arbitrum-vs-ethereum/03-rpc-methods.mdx).
Although the majority of RPC methods follow the same behavior as Ethereum, some methods might produce a different result, or add more information, when used on an Arbitrum chain. You can find more information about these differences in [RPC methods](/build-decentralized-apps/arbitrum-vs-ethereum/03-rpc-methods.mdx).

## Solidity support

You can deploy Solidity contracts onto Arbitrum just like you do Ethereum. There are only a few minor differences in behavior. Find more information about it in [Solidity support](/build-decentralized-apps/arbitrum-vs-ethereum/04-solidity-support.mdx).
You can deploy Solidity contracts onto Arbitrum just like you do on Ethereum. There are only a few minor differences in behavior. Find more information about it in [Solidity support](/build-decentralized-apps/arbitrum-vs-ethereum/04-solidity-support.mdx).

## Fees

Expand Down
6 changes: 6 additions & 0 deletions arbitrum-docs/for-devs/oracles/oracles-content-map.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ Learn how to run an Arbitrum node.
href="/for-devs/oracles/ora/"
target="_blank"
/>
<Card
title="Pyth"
description="Learn out to use Pyth"
href="/for-devs/oracles/pyth/"
target="_blank"
/>
<Card
title="Supra price feed"
description="Querying price feeds with Supra"
Expand Down
77 changes: 77 additions & 0 deletions arbitrum-docs/for-devs/oracles/pyth/pyth.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
id: 'pyth'
title: 'Pyth'
description: 'Learn how to use Pyth Oracle'
author: pete-vielhaber
sme: pete-vielhaber
sidebar_label: 'pyth'
content_type: how-to
---

The [Pyth network](https://pyth.network/) a first-party oracle network, securely and transparently delivering real-time market data to [multiple chains](https://docs.pyth.network/price-feeds/contract-addresses).

The network comprises some of the world’s [largest exchanges, market makers, and financial services providers](https://pyth.network/publishers). These publish proprietary data on-chain for aggregation and distribution to smart contract applications.

## Pyth price feeds

The Pyth network introduces an innovative low-latency [pull oracle design](https://docs.pyth.network/price-feeds/pull-updates), where users can pull price updates on-chain when needed, enabling everyone in the blockchain environment to access that data point. Pyth network updates the prices every 400ms, making Pyth the fastest on-chain oracle.

Here is a working example of a contract that fetches the latest price of ARB/USD on the Arbitrum network.

You have to pass Pyth's contract address for Arbitrum mainnet/testnet and the desired price feed ID to fetch the latest price.

Install the Pyth SDK Solidity package in your project:

```tsx
npm install @pythnetwork/pyth-sdk-solidity
```

And then, in a few lines of code you can fetch the latest price on the Arbitrum network.

```solidity
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import "@pythnetwork/pyth-sdk-solidity/IPyth.sol";
import "@pythnetwork/pyth-sdk-solidity/PythStructs.sol";
contract MyFirstPythContract {
IPyth pyth;
// Pass the address of Pyth's contract for Arbitrum mainnet(0xff1a0f4744e8582DF1aE09D5611b887B6a12925C)
constructor(address _pyth) {
pyth = IPyth(_pyth);
}
function fetchPrice(
bytes[] calldata updateData,
bytes32 priceFeed
) public payable returns (int64) {
// Fetch the priceUpdate from hermes.
uint updateFee = pyth.getUpdateFee(updateData);
pyth.updatePriceFeeds{value: updateFee}(updateData);
// Fetch the latest price
PythStructs.Price memory price = pyth.getPrice(priceFeed);
return price.price;
}
}
```

Here you can fetch the `updateData` from Pyth's [Hermes](https://hermes.pyth.network/docs/) feed, which listens to Pythnet and Wormhole for price updates; or you can use the [pyth-evm-js](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/sdk/js/src/EvmPriceServiceConnection.ts#L15) SDK. Check [How to Fetch Price Updates](https://docs.pyth.network/price-feeds/fetch-price-updates) to pull the latest data.

## Pyth Entropy

Pyth Entropy allows developers to quickly and easily generate secure **random numbers** on the blockchain.

Check [how to generate random numbers in EVM contracts](https://docs.pyth.network/entropy/generate-random-numbers/evm) for a detailed walkthrough.

### Supported networks for Arbitrum(Pyth Entropy):

- Arbitrum: [`0x7698E925FfC29655576D0b361D75Af579e20AdAc`](https://arbiscan.io/address/0x7698E925FfC29655576D0b361D75Af579e20AdAc)
- Arbitrum Sepolia: [`0x549Ebba8036Ab746611B4fFA1423eb0A4Df61440`](https://sepolia.arbiscan.io/address/0x549Ebba8036Ab746611B4fFA1423eb0A4Df61440)

## Additional resources

Check out the following links to get started with Pyth:

- [Pyth EVM Integration Guide](https://docs.pyth.network/price-feeds/use-real-time-data/evm)
- [Pyth Docs](https://docs.pyth.network/home)
- [Pyth API Reference](https://api-reference.pyth.network/price-feeds/evm/getPrice)
- [Pyth Examples](https://github.com/pyth-network/pyth-examples)
- [Pyth Price Feed Ids](https://pyth.network/developers/price-feed-ids)
129 changes: 129 additions & 0 deletions arbitrum-docs/for-devs/third-party-docs/Webacy/webacy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
---
title: 'What is the Webacy Risk Data Network?'
description: 'Learn about the Webacy Risk Data Network, and how you can use it in your products.'
author: cvince
sme: cvince
sidebar_label: 'Webacy'
third_party_content_owner: cvince
---

[Webacy](https://webacy.com/) is a risk data network that helps wallets & applications protect their users against scams, hacks, and mistakes across the blockchain.

Wallets, protocols, & applications use Webacy throughout their user experience:

### Address trust and safety

- Assess the safety of interacting with a given address (any address: EOA, smart contract, token, etc.). Screen for blocklists, sanctioned addresses, malicious behavior, and other potential flags
- Analyze smart contract code in real-time
- Filter spam and sybil addresses

### Connected wallets

- Block sanctioned addresses and wallets involved in malicious behavior
- Educate users with a Wallet Safety Score
- Delight users by enabling additional features or providing additional value
- Display open approvals and the risks associated

### Before a transaction

- Block harmful dApps and links
- Review address trust and safety prior to signature
- Protect users from interacting with malicious smart contracts

### Monitoring and Notifications

- Monitor all on-chain activity associated with your protocol or smart contracts
- Enable wallet monitoring and flag for risky transactions
- Proactively notify users (or be notified) of any potentially risk activity involved with a given address

## Get started with Webacy

Start building in minutes:

- Reach out to info\@webacy.com for an API key
- Check out the[ Quick Start Integration Guide](https://docs.webacy.com/api-embedded-safety/quick-start-integration-guide)

## APIs

[Webacy’s APIs](https://www.webacy.com/safetyscore) are REST-based APIs that expose your platform to Webacy's Risk Engine and Wallet Watch Notifications Platform.

With over 15+ data providers, along with their data analytics and algorithms, Webacy has the broadest risk coverage across the blockchain ecosystem. From compliance and regulatory data to social engineering scams and crowdsourced reports, they process millions of monthly signals, updating their models with the latest and most up-to-date information.

For detailed technical documentation and to begin testing the APIs directly, visit their [technical documentation](https://webacy.readme.io/reference/webacy-api-overview-pre-release).
Available APIs and corresponding use cases include:

### Threat risks API

This API indicates if a given address is a risk or a threat to others.
It returns risk data associated with the supplied address. It flags if the address appears in any sanctioned databases, has been historically flagged as malicious, is associated with a scam smart contract, and so on. It also includes filtering for spam/sybil signals.

Some common use cases for this endpoint include:

- Filtering addresses for spam
- Blocking high-risk addresses from utilizing your service
- Presenting high-risk addresses to others as potentially risky to interact with
- Protecting your platform by restricting high-risk addresses

### Approval risks API

This API returns a list of approvals for a given address and the associated risk of the spender for that approval. Approvals are commonplace in crypto - now you know which ones put you at risk. Check out your open approvals [here](https://dapp.webacy.com/?mode=approvals).

If you're a wallet interested in native revoke and approval risk scoring, [reach out to Webacy](https://docs.webacy.com/other/contact-us).

### Transaction risks API

This API returns risk data for a given transaction. Pass in any transaction hash, and the API will return a risk score result that incorporates counterparty EOA risk profiles, address risk, involved asset smart contract risk, and more.

Some common use cases for this endpoint include:

- Understanding the historical behavior of an address
- Providing data to give recommendations about on-chain activity
- Gaining insight into a particular transaction or action
- Flagging previously unknown activity that was potentially at risk

### Exposure risk API

The original Webacy Safety Score, this API returns a 'risk profile' or 'exposure risk' of a given address.

This indicates the exposure the address has to risky activity through historical transactions, behavior, and owned assets. This endpoint **does not** assess whether the supplied address is a risk to others (Threat Risk). Instead, it assesses whether the supplied address is **at risk** from others.

Some common use cases for this endpoint include:

- Gaining a holistic understanding of a client or personal wallet
- Enabling recommendations and analysis on past behavior
- Assessing common traits of a user base
- Determining types of users to better serve them
- Triggering warnings to internal teams or external users based on changes in risk profile based on ongoing activity
- Understanding the behavioral activity of a user base

Check out your risk exposure[ here](https://dapp.webacy.com/risk-score).

### Contract risk API

This API returns a contract risk analysis for a given contract address.

The on-demand analysis leverages multiple techniques, such as fuzzing, static analysis, and dynamic analysis, for real-time smart contract scanning.

Some common use cases for this endpoint include:

- Scanning contracts before listing them on your site
- Verifying that you are not promoting malicious contracts
- Checking a contract before interacting with it
- Reviewing code as you build
- Assessing your contracts before submitting them for a formal audit process

### URL risk

Given a URL, this endpoint analyzes its safety. It helps you determine if a given link is a phishing scam, sending you to a dangerous place, or is otherwise malicious.

Some common use cases for this endpoint include:

- Assessing the safety of a dapp/website
- Warning your end-users from interacting with a potentially malicious website
- Blocking websites

### Wallet watch API

These APIs enable you to register users to Webacy's real-time notification infrastructure.

If you're interested in setting up your own private instance with custom messaging and triggers, [contact us](https://docs.webacy.com/other/contact-us).
4 changes: 2 additions & 2 deletions arbitrum-docs/launch-orbit-chain/how-tos/customize-stf.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ To do that, you'll need to first extract the replay binary from the `nitro-node-
docker run --rm --name replay-binary-extractor --entrypoint sleep custom-nitro-node-dev infinity
docker cp replay-binary-extractor:/home/user/target/machines/latest extracted-replay-binary
docker stop replay-binary-extractor
cat extracted-replay-binary/module.root
mv extracted-replay-binary "target/machines/$(cat extracted-replay-binary/module.root)"
cat extracted-replay-binary/module-root.txt
mv extracted-replay-binary "target/machines/$(cat extracted-replay-binary/module-root.txt)"
```

These commands will output the new WASM module root, and create the directory `target/machines/<wasm module root>`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,6 @@ The following parameters need to be configured in those nodes.

:::note

Immediately after configuring fast withdrawals, your chain may not operate at full speed yet. This ramp-up is because the validators must work through the backlog of assertions that have yet to be confirmed. You will see a series of 'NodeCreated' and 'NodeConfirmed' events. Once the backlog is processed, your chain should operate fully at speed.
Immediately after configuring fast withdrawals - your chain may not be operating fully at speed yet. This is because the validators have to work through the backlog of assertions which were not yet confirmed. You will see a series of NodeCreated and NodeConfirmed events. Once the backlog has been processed, your chain should operate fully at speed.

:::
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ For applications that require the ability to transfer assets to chains outside o
- [Across](https://across.to/)
- [Decent](https://www.decent.xyz/)

## Data availability Committee Operators
## Data availability providers for AnyTrust Chains

To reduce transaction fees for Orbit chains, you can configure a Data Availability (DA) solution that stores chain data off-chain with Anytrust Chains.
If you are enabling Fast Withdrawals, you will set up a Data Availability Committee (DAC). We currently recommend (for security and decentralization purposes) to configure a DAC with at least 3 nodes. Here are a few providers:
AnyTrust protocol offers native support data availability. If you are turning on Fast Withdrawals, we recommend having at least 3 members as part of your Data Availability Committee. Here are some providers we recommend:

- [Chainbase](https://chainbase.com/)
- [Ankr](https://www.ankr.com/)
Expand Down Expand Up @@ -95,7 +94,7 @@ RPC endpoints are the primary interface through which users and developers inter
- [QuickNode](https://www.quicknode.com?utm_source=arb-docs)
- [Sequence](https://sequence.xyz/node-gateway)

## Alternative Data availability
## Alternative data availability

One way to reduce transaction fees for Orbit chains is to configure a Data Availability (DA) solution that stores chain data off-chain. Although the AnyTrust protocol offers native support for this functionality (and is configurable by default on Orbit AnyTrust chains), the following third-party providers give you another way to store data off-chain. Note that using these services will limit your chain's ability to leverage AnyTrust protocol improvements as they relate to transaction fee and DA configurability:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,6 @@ Visit the [Orbit Quickstart](./orbit-quickstart.md), start tinkering, and let us

### How can I launch an Orbit chain on mainnet?

While launching a chain on your own is possible, there are multiple infrastructure providers such as [Caldera](https://caldera.xyz/), [Conduit](https://conduit.xyz/), [AltLayer](https://altlayer.io/), and [Gelato](https://www.gelato.network/raas) that are enabling developers to quickly launch their own rollups.
While launching a chain on your own is possible, there are multiple infrastructure providers such as [Caldera](https://caldera.xyz/), [Conduit](https://conduit.xyz/), [AltLayer](https://altlayer.io/), [Zeeve](https://www.zeeve.io/), and [Gelato](https://www.gelato.network/raas) that are enabling developers to quickly launch their own rollups.

[^1]: Although your Orbit chain will be able to exchange information with other Orbit chains (and the L2 chain that it settles to) by default, you're free to modify your Orbit chain's code as much as you'd like. You can even intentionally make your Orbit chain _incompatible_ with other Orbit chains and L2s.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ For <a data-quicklook-from="arbitrum-anytrust-chain">Anytrust chains</a>, you ne
```shell
--node.data-availability.enable
--node.data-availability.rest-aggregator.enable
```
And:
Expand Down
Loading

0 comments on commit 9f36c9b

Please sign in to comment.