diff --git a/content/contracts-cairo/2.x/erc721.mdx b/content/contracts-cairo/2.x/erc721.mdx index cee0e614..7de264e4 100644 --- a/content/contracts-cairo/2.x/erc721.mdx +++ b/content/contracts-cairo/2.x/erc721.mdx @@ -121,7 +121,7 @@ The difference between both functions consists of accepting `data` as an argumen `safe_transfer_from` by default accepts the `data` argument which is interpreted as `Span`. If `data` is not used, simply pass an empty array. * ERC721 utilizes [SRC5](./introspection#src5) to declare and query interface support on Starknet as opposed to Ethereum’s [EIP165](https://eips.ethereum.org/EIPS/eip-165). -The design for `SRC5` is similar to OpenZeppelin’s [ERC165Storage](https://docs.openzeppelin.com/contracts/4.xapi/utils#ERC165Storage). +The design for `SRC5` is similar to OpenZeppelin’s [ERC165Storage](https://docs.openzeppelin.com/contracts/4.x/api/utils#ERC165Storage). * `IERC721Receiver` compliant contracts return a hardcoded interface ID according to Starknet selectors (as opposed to selector calculation in Solidity). ## Token transfers diff --git a/content/contracts-cairo/3.x/erc721.mdx b/content/contracts-cairo/3.x/erc721.mdx index cf3936f4..1da7ee44 100644 --- a/content/contracts-cairo/3.x/erc721.mdx +++ b/content/contracts-cairo/3.x/erc721.mdx @@ -121,7 +121,7 @@ The difference between both functions consists of accepting `data` as an argumen `safe_transfer_from` by default accepts the `data` argument which is interpreted as `Span`. If `data` is not used, simply pass an empty array. * ERC721 utilizes [SRC5](./introspection#src5) to declare and query interface support on Starknet as opposed to Ethereum’s [EIP165](https://eips.ethereum.org/EIPS/eip-165). -The design for `SRC5` is similar to OpenZeppelin’s [ERC165Storage](https://docs.openzeppelin.com/contracts/4.xapi/utils#ERC165Storage). +The design for `SRC5` is similar to OpenZeppelin’s [ERC165Storage](https://docs.openzeppelin.com/contracts/4.x/api/utils#ERC165Storage). * `IERC721Receiver` compliant contracts return a hardcoded interface ID according to Starknet selectors (as opposed to selector calculation in Solidity). ## Token transfers diff --git a/content/contracts/5.x/learn/deploying-and-interacting.mdx b/content/contracts/5.x/learn/deploying-and-interacting.mdx index 815f2b26..a749ed81 100644 --- a/content/contracts/5.x/learn/deploying-and-interacting.mdx +++ b/content/contracts/5.x/learn/deploying-and-interacting.mdx @@ -116,7 +116,7 @@ Remember that local blockchains ***do not*** persist their state throughout mult With our `Box` contract [deployed](#deploying-a-smart-contract), we can start using it right away. -We will use the [Hardhat console](https://hardhat.org/guides/hardhat-console.html) to interact with our deployed `Box` contract on our localhost network. +We will use the [Hardhat console](https://hardhat.org/hardhat-runner/docs/guides/hardhat-console) to interact with our deployed `Box` contract on our localhost network. We need to specify the address of our `Box` contract we displayed in our deploy script. @@ -167,14 +167,14 @@ Our `Box` contract returns `uint256` which is too large a number for JavaScript ``` -To learn more about using the console, check out the [Hardhat documentation](https://hardhat.org/guides/hardhat-console.html). +To learn more about using the console, check out the [Hardhat documentation](https://hardhat.org/hardhat-runner/docs/guides/hardhat-console). ## Interacting programmatically The console is useful for prototyping and running one-off queries or transactions. However, eventually you will want to interact with your contracts from your own code. -In this section, we'll see how to interact with our contracts from JavaScript, and use [Hardhat to run our script](https://hardhat.org/guides/scripts.html) with our Hardhat configuration. +In this section, we'll see how to interact with our contracts from JavaScript, and use [Hardhat to run our script](https://hardhat.org/hardhat-runner/docs/advanced/scripts) with our Hardhat configuration. Keep in mind that there are many other JavaScript libraries available, and you can use whichever you like the most. Once a contract is deployed, you can interact with it through any library! diff --git a/content/contracts/5.x/learn/developing-smart-contracts.mdx b/content/contracts/5.x/learn/developing-smart-contracts.mdx index b65f88b1..30cb7791 100644 --- a/content/contracts/5.x/learn/developing-smart-contracts.mdx +++ b/content/contracts/5.x/learn/developing-smart-contracts.mdx @@ -15,7 +15,7 @@ We won’t cover language concepts such as syntax or keywords in this guide. For * For a general overview of how Ethereum and smart contracts work, the official website hosts a [Learn about Ethereum](https://ethereum.org/learn/) section with lots of beginner-friendly content. * If you’re new to the language, the [official Solidity documentation](https://solidity.readthedocs.io/en/latest/introduction-to-smart-contracts.html) is a good resource to have handy. Take a look at their [security recommendations](https://solidity.readthedocs.io/en/latest/security-considerations.html), which nicely go over the differences between blockchains and traditional software platforms. -* Consensys' [best practices](https://consensys.github.io/smart-contract-best-practices/) are quite extensive, and include both [proven patterns](https://consensys.github.io/smart-contract-best-practices/development-recommendations/) to learn from and [known pitfalls](https://consensys.github.io/smart-contract-best-practices/attacks/) to avoid. +* Consensys' [best practices](https://consensys.github.io/smart-contract-best-practices/) are quite extensive, and include both [proven patterns](https://consensysdiligence.github.io/smart-contract-best-practices/development-recommendations/) to learn from and [known pitfalls](https://consensysdiligence.github.io/smart-contract-best-practices/attacks/) to avoid. * The [Ethernaut](https://ethernaut.openzeppelin.com/) web-based game will have you look for subtle vulnerabilities in smart contracts as you advance through levels of increasing difficulty. With that out of the way, let’s get started! @@ -112,7 +112,7 @@ npx hardhat compile # Compiled 1 Solidity file successfully (evm target: paris). ``` -The [`compile`](https://hardhat.org/guides/compile-contracts.html#compiling-your-contracts) built-in task will automatically look for all contracts in the `contracts` directory, and compile them using the Solidity compiler using the configuration in [`hardhat.config.js`](https://hardhat.org/config/#solidity-configuration). +The [`compile`](https://hardhat.org/hardhat-runner/docs/guides/compile-contracts) built-in task will automatically look for all contracts in the `contracts` directory, and compile them using the Solidity compiler using the configuration in [`hardhat.config.js`](https://hardhat.org/config/#solidity-configuration). You will notice an `artifacts` directory was created: it holds the compiled artifacts (bytecode and metadata), which are .json files. It’s a good idea to add this directory to your `.gitignore`. diff --git a/content/contracts/5.x/learn/upgrading-smart-contracts.mdx b/content/contracts/5.x/learn/upgrading-smart-contracts.mdx index 2edc268b..86c89742 100644 --- a/content/contracts/5.x/learn/upgrading-smart-contracts.mdx +++ b/content/contracts/5.x/learn/upgrading-smart-contracts.mdx @@ -111,7 +111,7 @@ Box deployed to: 0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0 We can then interact with our `Box` contract to `retrieve` the value that we stored during initialization. -We will use the [Hardhat console](https://hardhat.org/guides/hardhat-console.html) to interact with our upgraded `Box` contract. +We will use the [Hardhat console](https://hardhat.org/hardhat-runner/docs/guides/hardhat-console) to interact with our upgraded `Box` contract. We need to specify the address of our proxy contract from when we deployed our `Box` contract. diff --git a/content/upgrades-plugins/foundry/foundry-upgrades.mdx b/content/upgrades-plugins/foundry/foundry-upgrades.mdx index f0dd1ffa..e955a654 100644 --- a/content/upgrades-plugins/foundry/foundry-upgrades.mdx +++ b/content/upgrades-plugins/foundry/foundry-upgrades.mdx @@ -256,7 +256,7 @@ address proxy = UnsafeUpgrades.deployUUPSProxy( ## Deploying and Verifying -Run your script with `forge script` to broadcast and deploy. See Foundry’s [Solidity Scripting](https://book.getfoundry.sh/guides/scripting-with-solidity) guide. +Run your script with `forge script` to broadcast and deploy. See Foundry’s [Solidity Scripting](https://getfoundry.sh/forge/scripting) guide. Include the `--sender
` flag for the `forge script` command when performing upgrades, specifying an address that owns the proxy or proxy admin. Otherwise, `OwnableUnauthorizedAccount` errors will occur. diff --git a/content/upgrades-plugins/hardhat-2/hardhat-upgrades.mdx b/content/upgrades-plugins/hardhat-2/hardhat-upgrades.mdx index 8c420d05..d31c6f07 100644 --- a/content/upgrades-plugins/hardhat-2/hardhat-upgrades.mdx +++ b/content/upgrades-plugins/hardhat-2/hardhat-upgrades.mdx @@ -29,7 +29,7 @@ require('@openzeppelin/hardhat-upgrades'); ### Proxies -You can use this plugin in a [Hardhat script](https://hardhat.org/guides/scripts.html) to deploy an upgradeable instance of one of your contracts via the `deployProxy` function: +You can use this plugin in a [Hardhat script](https://hardhat.org/hardhat-runner/docs/advanced/scripts) to deploy an upgradeable instance of one of your contracts via the `deployProxy` function: ```js // scripts/create-box.js diff --git a/content/upgrades-plugins/migrate-from-cli.mdx b/content/upgrades-plugins/migrate-from-cli.mdx index f7632727..85b7be0e 100644 --- a/content/upgrades-plugins/migrate-from-cli.mdx +++ b/content/upgrades-plugins/migrate-from-cli.mdx @@ -22,7 +22,7 @@ Keeping that aside, everything else remains the same since both the CLI and plug ## Installation -[Install Hardhat](https://hardhat.org/tutorial/creating-a-new-hardhat-project.html) and when initializing it, select the `Create an empty hardhat.config.js` option. +[Install Hardhat](https://hardhat.org/tutorial/creating-a-new-hardhat-project) and when initializing it, select the `Create an empty hardhat.config.js` option. ```bash $ npm install --save-dev hardhat @@ -183,7 +183,7 @@ And this is how it would look like if we decided to upgrade our `Box` contract t These scripts are just examples of how to use the exported data. We make no suggestions on whether to keep that file as it is or how to handle its data. This is up to the user now. -With Hardhat, we would write a script (**you can read more about Hardhat scripts [here](https://hardhat.org/guides/scripts.html) and about using the `hardhat-upgrades` plugin [here](/upgrades-plugins/hardhat-upgrades)**): +With Hardhat, we would write a script (**you can read more about Hardhat scripts [here](https://hardhat.org/hardhat-runner/docs/advanced/scripts) and about using the `hardhat-upgrades` plugin [here](/upgrades-plugins/hardhat-upgrades)**): ```jsx