diff --git a/docs/deploying.md b/docs/deploying.md index f3d958e..88baa7b 100644 --- a/docs/deploying.md +++ b/docs/deploying.md @@ -6,9 +6,9 @@ Once you have tested your bot locally, you are ready to deploy it to the Forta n 2. registering it in the Bot Registry smart contract 3. staking 100 FORT tokens on your bot -## Acquiring Polygon MATIC tokens +## Acquiring Polygon POL tokens -The Bot Registry smart contract currently lives on Polygon mainnet, so you will need **MATIC tokens on Polygon mainnet** in order to deploy your bot. You can acquire some MATIC tokens by following [this guide](matic.md). +The Bot Registry smart contract currently lives on Polygon mainnet, so you will need **POL tokens on Polygon mainnet** in order to deploy your bot. You can acquire some POL tokens by following [this guide](matic.md). ## Using Forta App vs CLI diff --git a/docs/hardhat.md b/docs/hardhat.md index d66ff76..15b7ab4 100644 --- a/docs/hardhat.md +++ b/docs/hardhat.md @@ -78,7 +78,7 @@ Once you are happy with the bot behaviour, you can deploy this bot to the produc npx hardhat forta:publish ``` -You may be prompted to select a specific bot if you have multiple. This command builds a Docker image for the bot and pushes it to a public repository. The image will then be registered in the Bot Registry smart contract. This step requires having MATIC tokens on Polygon mainnet (see [here](matic.md) on how to acquire MATIC tokens). +You may be prompted to select a specific bot if you have multiple. This command builds a Docker image for the bot and pushes it to a public repository. The image will then be registered in the Bot Registry smart contract. This step requires having POL tokens on Polygon mainnet (see [here](matic.md) on how to acquire POL tokens). Another way to deploy your bot is using the [Forta App](https://app.forta.network/). To learn more about deploying bots (including how to enable logging), check out [this section](deploying.md). diff --git a/docs/intro-to-bot-dev.md b/docs/intro-to-bot-dev.md index aa11cbd..ea8e4be 100644 --- a/docs/intro-to-bot-dev.md +++ b/docs/intro-to-bot-dev.md @@ -14,7 +14,7 @@ As mentioned earlier, Forta provides easy to use SDKs for detection bot developm A second development workflow involves the use of the [Forta Hardhat plugin](https://www.npmjs.com/package/hardhat-forta) to create detection bots for your existing smart contract project. Hardhat is a smart contract development framework with a powerful plugin ecosystem. Using the Forta plugin, you can initialize detection bots right into your project. Also, you can choose from a set of low-code templates to setup detection bots for your project quickly. -To deploy your bot to the Forta Network you can use the CLI or the [Forta App](https://app.forta.network/), which provides a convenient UI to deploy and manage your detection bots. Deploying a bot involves making a transaction to the Bot Registry contract on the Polygon blockchain. This requires having MATIC tokens in order to pay the small transaction fee (in the order of a few cents). Developers just need to ensure they have enough MATIC tokens, and the CLI or Forta App will take care of executing the transaction. Once a detection bot is deployed to the Forta Network, users can subscribe to the alerts generated by the bot or consume them through the Forta API. +To deploy your bot to the Forta Network you can use the CLI or the [Forta App](https://app.forta.network/), which provides a convenient UI to deploy and manage your detection bots. Deploying a bot involves making a transaction to the Bot Registry contract on the Polygon blockchain. This requires having POL tokens in order to pay the small transaction fee (in the order of a few cents). Developers just need to ensure they have enough POL tokens, and the CLI or Forta App will take care of executing the transaction. Once a detection bot is deployed to the Forta Network, users can subscribe to the alerts generated by the bot or consume them through the Forta API. ## Great! How do I begin? diff --git a/docs/maintaining.md b/docs/maintaining.md index c4dd270..4ac3cfc 100644 --- a/docs/maintaining.md +++ b/docs/maintaining.md @@ -20,15 +20,15 @@ You can also use the [CLI command](cli.md#logs) `npm run logs` to see recent log If you will not be using the alerts your bot generates (i.e. you were just testing out Forta, which we encourage), we ask that you please disable the bot. You can use [Forta App](https://app.forta.network/) or the CLI to enable or disable your bot. In Forta App, go to the Detection Bots page (from the menu at the top right) and click on the options menu to the right of your bot. From the options menu, you can choose to disable or enable your bot. -You can also use the CLI command `npm run disable`. Just make sure to set the `agentId` property in your **project folder's** forta.config.json before running the command (you should create the forta.config.json if it doesn't exist). You will also need to ensure you have Polygon MATIC tokens in your keyfile address to execute the disable transaction (you can get the keyfile address using `npm run keyfile`). See [this guide](matic.md) on how to acquire Polygon MATIC tokens. Similarly, you can re-enable a disabled bot using `npm run enable`. +You can also use the CLI command `npm run disable`. Just make sure to set the `agentId` property in your **project folder's** forta.config.json before running the command (you should create the forta.config.json if it doesn't exist). You will also need to ensure you have Polygon POL tokens in your keyfile address to execute the disable transaction (you can get the keyfile address using `npm run keyfile`). See [this guide](matic.md) on how to acquire Polygon POL tokens. Similarly, you can re-enable a disabled bot using `npm run enable`. ## Updating your bot You may want to update the code for your bot from time to time (e.g. if you found a bug, or there is a new scenario you want to detect). You can use [Forta App](https://app.forta.network/) or the CLI to update your bot. In Forta App, go to the Detection Bots page (from the menu at the top right) and click on the options menu to the right of your bot. From the options menu, you can choose to edit your bot. -You can also use the CLI command `npm run publish` to update your bot. If you have already deployed a bot, the CLI will know to update the existing bot. Ensure that the keyfile used for updating is the same one you used for creating the bot. Make sure to set the `agentId` property in your **project folder's** forta.config.json before running the command (you should create the forta.config.json if it doesn't exist). You will also need to ensure you have Polygon MATIC tokens in your keyfile address to execute the update transaction (you can get the keyfile address using `npm run keyfile`). See [this guide](matic.md) on how to acquire Polygon MATIC tokens. +You can also use the CLI command `npm run publish` to update your bot. If you have already deployed a bot, the CLI will know to update the existing bot. Ensure that the keyfile used for updating is the same one you used for creating the bot. Make sure to set the `agentId` property in your **project folder's** forta.config.json before running the command (you should create the forta.config.json if it doesn't exist). You will also need to ensure you have Polygon POL tokens in your keyfile address to execute the update transaction (you can get the keyfile address using `npm run keyfile`). See [this guide](matic.md) on how to acquire Polygon POL tokens. ## Viewing the state of your bot -If you want to inspect the current or historic state of your bot, for example checking the last time your bot was updated, you can use the [CLI command](cli.md#info) `npm run info`. \ No newline at end of file +If you want to inspect the current or historic state of your bot, for example checking the last time your bot was updated, you can use the [CLI command](cli.md#info) `npm run info`. diff --git a/docs/matic.md b/docs/matic.md index f95a884..18b16be 100644 --- a/docs/matic.md +++ b/docs/matic.md @@ -1,8 +1,8 @@ -# Acquiring Polygon MATIC +# Acquiring Polygon POL -As of October 18th 2021, Forta smart contracts (including the Bot Registry) have been moved to Polygon, a blockchain scaling solution that enables faster and cheaper transactions. You will need [MATIC](https://coinmarketcap.com/currencies/polygon/) tokens in order to pay gas fees on Polygon when deploying your bot. This guide will walk you through converting your ETH (on Ethereum mainnet) to MATIC (on Polygon mainnet). To learn more about Polygon, visit their [website](https://polygon.technology/). +As of October 18th 2021, Forta smart contracts (including the Bot Registry) have been moved to Polygon, a blockchain scaling solution that enables faster and cheaper transactions. You will need [POL](https://coinmarketcap.com/currencies/polygon/) tokens in order to pay gas fees on Polygon when deploying your bot. This guide will walk you through converting your ETH (on Ethereum mainnet) to POL (on Polygon mainnet). To learn more about Polygon, visit their [website](https://polygon.technology/). -**If you already have MATIC tokens on Ethereum mainnet, you can transfer them over to Polygon using the bridge in step 3.** +**If you already have POL tokens on Ethereum mainnet, you can transfer them over to Polygon using the bridge in step 3.** ## 1. Import your keyfile into Metamask @@ -21,7 +21,7 @@ Your keyfile should now be in Metamask. **Make sure there is some ETH in this ac - Network Name: `Polygon Mainnet` - RPC URL: `https://polygon-rpc.com/` - Chain ID: `137` - - Currency Symbol: `MATIC` + - Currency Symbol: `POL` - Explorer URL: `https://polygonscan.com/` 3. Click the Save button @@ -32,7 +32,7 @@ You can now interact with the Polygon network using your Metamask. 1. Navigate to the [Polygon bridge](https://wallet.polygon.technology) 2. Connect your Metamask wallet if needed (you will be prompted to sign a message) 3. Select Ether from the dropdown as the token to transfer -4. Enter how much ETH you want to transfer (for reference, 1 [MATIC](https://coinmarketcap.com/currencies/polygon/) will allow you to publish ~80 bots) +4. Enter how much ETH you want to transfer (for reference, 1 [POL](https://coinmarketcap.com/currencies/polygon/) will allow you to publish ~80 bots) 5. Click the Transfer button, then click Continue on the following dialogs 6. In the Metamask transaction dialog, review the gas fees and click Confirm 7. Wait for the transaction to complete on Ethereum mainnet @@ -40,16 +40,16 @@ You can now interact with the Polygon network using your Metamask. You have now transferred ETH from Ethereum mainnet over to Polygon mainnet. -## 4. Swap ETH for MATIC using the swap tool +## 4. Swap ETH for POL using the swap tool 1. Navigate to the [Polygon swap tool](https://wallet.polygon.technology/swap/) 2. Connect your Metamask wallet if needed (you will be prompted to sign a message) -3. Select how much MATIC you want to receive (for reference, 1 [MATIC](https://coinmarketcap.com/currencies/polygon/) will allow you to publish ~80 bots) +3. Select how much POL you want to receive (for reference, 1 [POL](https://coinmarketcap.com/currencies/polygon/) will allow you to publish ~80 bots) 4. Select WETH as the token to swap (will be labelled "Ether (PoS-WETH)") 5. Click the Approve button 6. Click the Swap button 7. Wait for the transaction to complete on Polyon mainnet -8. Verify your account balance on Polygon mainnet using the [Polygon block explorer](https://polygonscan.com/). You should have received the specified amount of **MATIC** +8. Verify your account balance on Polygon mainnet using the [Polygon block explorer](https://polygonscan.com/). You should have received the specified amount of **POL** -You should now have MATIC tokens on Polygon mainnet in order to pay gas fees! You can now continue [deploying your bot](deploying.md). +You should now have POL tokens on Polygon mainnet in order to pay gas fees! You can now continue [deploying your bot](deploying.md). diff --git a/docs/quickstart.md b/docs/quickstart.md index 11ca994..7825d82 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -11,7 +11,7 @@ Before you start, please make sure you have the following: - [Python v3.10+](https://www.python.org/) (only if you want to build Python detection bots) - [Docker Desktop v4.16+](https://docs.docker.com/desktop) - Basic understanding of [Ethereum](https://ethereum.org/) and smart contracts -- MATIC tokens for deploying your bot (see [this guide](matic.md)) +- POL tokens for deploying your bot (see [this guide](matic.md)) ## Initializing a project