SimpleWriteAccessController Deployment: Difference between revisions
From Chainlink Community Wiki
No edit summary |
No edit summary |
||
Line 44: | Line 44: | ||
=== '''Deploy the Contract''' === | === '''Deploy the Contract''' === | ||
With the contract compiled, we then need to navigate to the | With the contract compiled, we then need to navigate to the Deploy & run transactions tab | ||
[[File:DeployContractPage.png|frameless]] | [[File:DeployContractPage.png|frameless]] |
Revision as of 21:20, 27 May 2022
The purpose of this page is to provide highly detailed instructions on how to deploy the SimpleWriteAccessController.
If you're here to deploy your own OCR Aggregator, be sure to keep track of which SimpleWriteAccessController you want to use for each purpose.
Deploying the SimpleWriteAccessController Via Remix
Import the Contract into Remix
Navigate to remix.ethereum.org
Once there, create a new doc by clicking on the little page icon
Once you have an empty doc, paste in the below referenece
// SPDX-License-Identifier: MIT
pragma solidity 0.8.0;
import "@chainlink/contracts/src/v0.8/SimpleWriteAccessController.sol";
It should look like the below image:
With the contract imported into remix, We'll need to compile it
Compile the Contract
Once Pasted into Remix, navigate to the Compile page.
In the image above, you can see that the COMPILER version is 0.7.6+...
When deploying the SimpleWriteAccessController.sol
contract, we want to be sure that the version selected here is 0.8.0+commit.c7dfd78e
With the correct version selected, go ahead and compile the contract by clicking the blue button with the circular arrows
Once that succeeds, we can then deploy the contract.
Deploy the Contract
With the contract compiled, we then need to navigate to the Deploy & run transactions tab
Once here, we want to be sure to adjust a couple things before deploying the contract.
First, assuming we are deploying this contract via metamask we want to change the ENVIRONMENT to Injected Web3
The last thing we need to do before deploying the contract is change the CONTRACT we're actually deploying.
Just click the drop down and select SimpleWriteAccessController
Next we just click the Orange deploy button!
Interacting With Deployed Contract
If you want to add a specific address or addresses to the to the SimpleWriteAccessController, we can drop down the addAccess section and paste in the desired address(es).
Once you've done that, click the transact button