-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync API ref docs with smart contracts commit 71509c4c
- Loading branch information
1 parent
2a8820e
commit 8bdcc06
Showing
63 changed files
with
36,597 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
--- | ||
section_icon: api-icon.svg | ||
section_icon_type: filled-svg | ||
hide: | ||
- navigation | ||
--- | ||
|
||
# APIs | ||
|
||
Select one of the topics below: | ||
|
||
## Access Nodes | ||
## Flare API Documentation | ||
|
||
* [Public RPC nodes](../dev/reference/network-config.md) for Flare, Songbird and Coston. | ||
* [Public RPC nodes for connected chains](../dev/reference/network-config.md#connected-networks) | ||
* [Flare API Portal](../tech/api-portal.md) (private nodes) | ||
* [Smart Contracts API](./smart-contracts/index.md) (Work in progress) | ||
|
||
## API Documentation | ||
## External Documentation | ||
|
||
* [Flare API](../dev/reference/index.md) | ||
* [web3.js API](https://docs.web3js.org/api) | ||
* [ethers.js API](https://docs.ethers.org) | ||
|
||
!!! info "Access Nodes" | ||
|
||
* [Public RPC nodes](../dev/reference/network-config.md) for Flare, Songbird and Coston. | ||
* [Public RPC nodes for connected chains](../dev/reference/network-config.md#connected-networks) | ||
* [Flare API Portal](../tech/api-portal.md) (private nodes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
--- | ||
title: AddressUpdatable | ||
--- | ||
|
||
<!-- This is an autogenerated file. Do not edit! --> | ||
|
||
# `AddressUpdatable` { #ct_addressupdatable } | ||
|
||
<div class="api-node-source" markdown> | ||
[Source](https://gitlab.com/flarenetwork/flare-smart-contracts/-/tree/master/contracts/addressUpdater/implementation/AddressUpdatable.sol) | Inherits from [IIAddressUpdatable](./IIAddressUpdatable.md) | ||
</div> | ||
|
||
<div class="api-node-internal" markdown> | ||
|
||
Abstract base class for contracts that depend on other contracts whose addresses can change. | ||
|
||
The [`AddressUpdater`](./AddressUpdater.md) contract keeps a list of addresses for all unique and special | ||
platform contracts. By inheriting from [`AddressUpdatable`](./AddressUpdatable.md) a contract will receive updates | ||
if any of the platform contract addresses change. | ||
|
||
A contract's address changes when it is redeployed, so [`AddressUpdatable`](./AddressUpdatable.md) offers a way | ||
to keep up to date with the latest address for all dependencies. | ||
|
||
</div> | ||
|
||
<div class="api-node-type" markdown> | ||
|
||
## Functions | ||
|
||
<div class="api-node" markdown> | ||
|
||
### `getAddressUpdater` { #fn_getaddressupdater } | ||
|
||
<div class="api-node-source" markdown> | ||
Defined in `AddressUpdatable` ([Docs](./AddressUpdatable.md), [Source](https://gitlab.com/flarenetwork/flare-smart-contracts/-/tree/master/contracts/addressUpdater/implementation/AddressUpdatable.sol)). | ||
</div> | ||
|
||
<div class="api-node-internal" markdown> | ||
|
||
```solidity | ||
function getAddressUpdater( | ||
) public view returns ( | ||
address _addressUpdater); | ||
``` | ||
|
||
Returns the configured address updater. | ||
|
||
| Returns | Type | Description | | ||
| ------- | ---- | ----------- | | ||
| `_addressUpdater` | `address` | The `AddresUpdater` contract that can update our contract address list, as a response to a governance call. | | ||
</div> | ||
</div> | ||
|
||
<div class="api-node" markdown> | ||
|
||
### `updateContractAddresses` { #fn_updatecontractaddresses } | ||
|
||
<div class="api-node-source" markdown> | ||
Defined in `AddressUpdatable` ([Docs](./AddressUpdatable.md), [Source](https://gitlab.com/flarenetwork/flare-smart-contracts/-/tree/master/contracts/addressUpdater/implementation/AddressUpdatable.sol)). | ||
</div> | ||
|
||
<div class="api-node-internal" markdown> | ||
|
||
```solidity | ||
function updateContractAddresses( | ||
bytes32[] _contractNameHashes, | ||
address[] _contractAddresses | ||
) external; | ||
``` | ||
|
||
External method called from [`AddressUpdater`](./AddressUpdater.md) only. | ||
|
||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
<div class="api-node-type" markdown> | ||
|
||
## Modifiers | ||
|
||
<div class="api-node" markdown> | ||
|
||
### `onlyAddressUpdater` { #md_onlyaddressupdater } | ||
|
||
<div class="api-node-source" markdown> | ||
Defined in `AddressUpdatable` ([Docs](./AddressUpdatable.md), [Source](https://gitlab.com/flarenetwork/flare-smart-contracts/-/tree/master/contracts/addressUpdater/implementation/AddressUpdatable.sol)). | ||
</div> | ||
|
||
<div class="api-node-internal" markdown> | ||
|
||
```solidity | ||
modifier onlyAddressUpdater() | ||
``` | ||
|
||
Only the `AdressUpdater` contract can call this method. | ||
Its address is set at construction time but it can also update itself. | ||
|
||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
<div class="api-node-type" markdown> | ||
|
||
## Variables | ||
|
||
</div> | ||
|
Oops, something went wrong.