Skip to content

Commit 72bec39

Browse files
Governance EVM support (#719)
* Governance EVM support * Small adjustments --------- Co-authored-by: Igor Papandinas <26460174+ipapandinas@users.noreply.github.com>
1 parent fc1ffba commit 72bec39

File tree

7 files changed

+45
-25
lines changed

7 files changed

+45
-25
lines changed

docs/build/EVM/precompiles/index.md

+26-17
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,35 @@ The Frontier EVM used on Astar network provides several useful precompiled contr
99

1010
## Ethereum Native Precompiles
1111

12-
| Precompile | Address |
13-
| -------- | -------- |
14-
| ECRecover | 0x0000000000000000000000000000000000000001 |
15-
| Sha256 | 0x0000000000000000000000000000000000000002 |
16-
| Ripemd160 | 0x0000000000000000000000000000000000000003 |
17-
| Identity | 0x0000000000000000000000000000000000000004 |
18-
| Modexp | 0x0000000000000000000000000000000000000005 |
19-
| Bn128Add | 0x0000000000000000000000000000000000000006 |
20-
| Bn128Mul | 0x0000000000000000000000000000000000000007 |
21-
| Bn128Pairing | 0x0000000000000000000000000000000000000008 |
12+
| Precompile | Address |
13+
| ------------- | -------------------------------------------- |
14+
| ECRecover | 0x0000000000000000000000000000000000000001 |
15+
| Sha256 | 0x0000000000000000000000000000000000000002 |
16+
| Ripemd160 | 0x0000000000000000000000000000000000000003 |
17+
| Identity | 0x0000000000000000000000000000000000000004 |
18+
| Modexp | 0x0000000000000000000000000000000000000005 |
19+
| Bn128Add | 0x0000000000000000000000000000000000000006 |
20+
| Bn128Mul | 0x0000000000000000000000000000000000000007 |
21+
| Bn128Pairing | 0x0000000000000000000000000000000000000008 |
22+
23+
## Non-Ethereum Native Precompiles
24+
25+
| Precompile | Address |
26+
| ------------------- | -------------------------------------------- |
27+
| Sha3FIPS256 | 0x0000000000000000000000000000000000000400 |
28+
| Dispatch | 0x0000000000000000000000000000000000000401 |
29+
| ECRecoverPublicKey | 0x0000000000000000000000000000000000000402 |
30+
| Ed25519Verify | 0x0000000000000000000000000000000000000403 |
2231

2332
## Astar Specific Precompiles
2433

25-
| Precompile | Address |
26-
| -------- | -------- |
27-
| [DappsStaking](staking.md) | 0x0000000000000000000000000000000000005001 |
28-
| [Sr25519](sr25519.md) | 0x0000000000000000000000000000000000005002 |
29-
| [SubstrateEcdsa](substrate-ecdsa.md) | 0x0000000000000000000000000000000000005003 |
30-
| [XCM](xcm/xcm.md) | 0x0000000000000000000000000000000000005004 |
31-
| [assets-erc20](xc20.md) | ASSET_PRECOMPILE_ADDRESS_PREFIX |
34+
| Precompile | Address |
35+
| --------------------------------- | -------------------------------------------- |
36+
| [DappsStaking](staking.md) | 0x0000000000000000000000000000000000005001 |
37+
| [Sr25519](sr25519.md) | 0x0000000000000000000000000000000000005002 |
38+
| [SubstrateEcdsa](substrate-ecdsa.md) | 0x0000000000000000000000000000000000005003 |
39+
| [XCM](xcm/xcm.md) | 0x0000000000000000000000000000000000005004 |
40+
| [assets-erc20](xc20.md) | ASSET_PRECOMPILE_ADDRESS_PREFIX |
3241

3342
The interface descriptions for these precompiles can be found in the `precompiles` folder: [Astar repo](https://github.com/AstarNetwork/Astar/).
3443
The Addresses can be checked in the [Astar repo](https://github.com/AstarNetwork/Astar/tree/master/runtime) for each runtime in `precompile.rs` files.

docs/build/EVM/precompiles/staking.md

-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33
The dApp Staking Precompile allows EVM smart contracts to access `pallet-dapp-staking` functionality.
44

55
For more information see `precompiles/dapps-staking-v3` in the [`Astar` repository](https://github.com/AstarNetwork/Astar/).
6-

docs/build/EVM/precompiles/xc20.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ XC20 standard, created by the Moonbeam team, ensures compatibility between the E
44

55
For XC20 overview see the following [page](/docs/learn/interoperability/xcm/building-with-xcm/create-xc20-assets).
66

7-
# See also
7+
## See also
88

99
- https://github.com/ethereum/EIPs/issues/20
1010
- https://github.com/OpenZeppelin/openzeppelin-contracts

docs/learn/governance/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ The solution is live on both **Shibuya** and **Astar** networks.
99

1010
There is no plan to deploy the solution on **Shiden** network.
1111

12+
Regular _Substrate-style_ SS58 accounts can be used to participate in governance, as well as _Ethereum-style_ H160 accounts (via the `dispatch` precompile).
13+
1214
## Approach
1315

1416
`Astar` reuses Polkadot’s so-called **v1** governance model due to its practicality. The core idea is to further decentralize the network, but not completely re-invent the wheel.

docs/use/governance/subsquare_guide.md

+16-6
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ import Figure from "/src/components/figure"
88

99
## Intro
1010

11-
:::note
12-
This is _work-in-progress_.
13-
All information here should be correct, but the guide will be updated prior to the launch on Astar.
14-
:::
15-
1611
Astar Network is transitioning its governance system from off-chain voting through Townhall to on-chain voting. This change empowers Astar stakeholders to directly vote on key network proposals and decisions on-chain. Astar governance allows ASTR token holders to influence and participate in decisions that affect the network, such as protocol improvements, runtime updates, and dApp Staking applications.
1712

1813
To interact with the on-chain governance, users have two primary interfaces to choose from: [Subsquare](https://www.subsquare.io/) or the traditional [Polkadot.js](https://polkadot.js.org/apps/) interface. Subsquare provides a user-friendly interface for governance participation, while Polkadot.js offers a more technical approach.
@@ -26,7 +21,8 @@ Astar governance is a decentralized mechanism where ASTR token holders can propo
2621
For a deeper understanding of Astar governance, including its structure and processes, we encourage you to read the [Astar Governance Overview](/docs/learn/governance/index.md) in our documentation.
2722

2823
## Using Subsquare for On-Chain Governance
29-
[Subsquare](https://www.subsquare.io/) is designed to make on-chain governance participation easy for all users. Through Subsquare, you can:
24+
25+
[Subsquare](https://astar.subsquare.io/) is designed to make on-chain governance participation easy for all users. Through Subsquare, you can:
3026

3127
- View active proposals.
3228
- Participate in discussions.
@@ -39,6 +35,20 @@ Working assumption is that the reader has familiarized themselves with the gover
3935
- [Shibuya Subsquare](https://shibuya.subsquare.io/)
4036
- [Astar Subsquare](https://astar.subsquare.io/)
4137

38+
## Account Selection
39+
40+
Both Substrate & EVM style accounts can participate in governance actions.
41+
42+
When connecting an account to the Subsquare platform, the user can choose between different wallets and account types.
43+
44+
<Figure caption="Substrate Account Selection" src={require('/docs/use/img/25_Subsquare_wallet_account_selection/wallet_account_1.png').default } width="100%" />
45+
46+
Different _Substrate_ account compatible wallets are available. If the user wants to use their EVM account, they should select `EVM` under the option.
47+
48+
<Figure caption="EVM Account Selection" src={require('/docs/use/img/25_Subsquare_wallet_account_selection/wallet_account_2.png').default } width="100%" />
49+
50+
Here, the user can select the desired EVM wallet.
51+
4252
## Token Holder
4353

4454
### Preimages
Loading
Loading

0 commit comments

Comments
 (0)