Edgeware Documentation
website·Indexed 29 days ago
https://new-edgeware-docs.vercel.app/Developer guides for building on Edgeware, featuring comprehensive tutorials for both EVM and WASM smart contracts. Includes instructions for using tools like Hardhat, Truffle, Remix, and MetaMask for EVM development, as well as ink! and cargo-contract for WASM contracts, including PSP22 and ERC20 implementations. Also covers advanced topics such as Parachains and XCMP interaction with SPREE.
What's inside Edgeware
- Hummingbot is an open-source trading bot intended to connect to Centralized Exchanges (CEXs) supporting EDG and Decentralized Exchanges (DEXs). The goal of this integration is to enable market making contributions and improve liquidity across markets. Currently, EDG support on exchanges is limited to native Substrate integration, which Hummingbot does not yet fully support. The most immediate path for integration is through EVM support, though this requires bridging to EVM-based chains with DEXs or obtaining EdgeEVM support on CEXs.
Overview of the Balances Pallet
The Balances Pallet is the core module that defines the native token (EDG). It manages the storage of user tokens, provides functions for transferring and managing tokens, and offers APIs for other modules to mint or burn tokens. It is used by other system components for governance votes, treasury management, staking rewards, and funding smart contracts in the EVM pallet.Overview of the Edgeware Lockdrop token distribution
The Edgeware lockdrop was a token distribution event for Ether (ETH) holders that took place between June 1 and August 30, 2019. It is currently closed. Participants received EDG tokens based on whether they 'Locked' their ETH for a specific duration (3, 6, or 12 months) or 'Signaled' their intent to participate without locking tokens. Longer lock durations resulted in proportionally higher EDG allocations. EDG tokens were automatically credited to the owners' wallet addresses upon the network launch on February 17, 2020, requiring no manual retrieval.Overview of the Edgeware Network
Edgeware is an on-chain governed, Nominated Proof-of-Stake (PoS) smart contract platform built on Parity Substrate. It utilizes a WebAssembly (WASM) runtime and supports the execution of both Ethereum Virtual Machine (EVM/Solidity) contracts and Rust (ink!) contracts. The platform is designed for decentralized governance, allowing participants to vote, delegate, and fund upgrades through DAOs and cryptographic voting systems.Overview of Edgeware Public Referenda Governance
The public referenda chamber is one of two on-chain governance bodies in Edgeware (the other being the council). Any token holder can propose and vote on referenda provided they provide a bond. Proposals are moved to the active voting table every 'Launch Period' based on which proposal received the most seconding (by value). Voters can amplify their vote weight by locking tokens for longer durations.Overview of Smart Contract support on Edgeware
Edgeware is a blockchain platform that supports two primary types of smart contracts:
- WASM Contracts: Supported via the WASM Contracts Pallet, typically developed using the ink! language.
- EVM Contracts: Supported via an Ethereum compatibility layer, allowing the use of Ethereum-based tools and languages.
Overview of Edgeware Nominated Proof-of-Stake (NPoS)
Edgeware uses Nominated Proof-of-Stake (NPoS) to select its validator set. The system consists of two primary roles: validators and nominators. Validators are responsible for producing and validating blocks and guaranteeing finality. Nominators back trusted validator candidates with their stake to earn rewards. To maximize network security and prevent power concentration, the NPoS mechanism aims to distribute stake as evenly as possible across the elected validator set.Overview of the ink! Ballot Contract tutorial
The Ballot contract tutorial demonstrates how to build a complex smart contract using ink!. The contract allows users to register as voters, add proposals to a ballot, and vote on those proposals, all overseen by a contract owner (chairperson). Key development concepts covered include:
- Creating and managing custom structs.
- Storing and updating structs within vectors and hash maps.
- Utilizing the
ink_preludecrate. - Implementing essential traits for contract data:
Clone,Debug,PackedLayout, andSpreadLayout.
Overview of the Edgeware Contracts Pallet
The Contracts pallet enables the Edgeware runtime to deploy and execute WebAssembly (Wasm) smart contracts. It uses an account-based system where contract accounts possess an AccountID, a Balance, associated Wasm contract code, and persistent storage. The execution is handled by a Wasm sandboxing interface, currently implemented using thewasmiinterpreter.Overview of Edgeware Zero-Knowledge Primitives
Edgeware integrates zero-knowledge (ZK) primitives directly at the runtime level. This architectural choice allows developers to implement private transactions and other ZK-based use cases without incurring the high fees typically associated with such operations, preventing those costs from being passed on to the end user.Overview of Edgeware Public Grants
Edgeware provides public grants funded by transaction fees, validator fees, and inflation. Grants are currently available only in EDG. The process typically takes 9 days for on-chain approval, though the drafting and community engagement phase usually lasts 1-1.5 months.Understand the Edgeware Nominated Proof-of-Stake (NPoS) consensus scheme
Edgeware utilizes a Nominated Proof-of-Stake (NPoS) scheme to select validators for its consensus protocol. This system allows the network to select validators with high aggregate stake, ensuring security by making it costly for adversarial entities to get elected or attack the system.
Key characteristics include:
- Security via Stake: High aggregate stake is required for election, and attacks result in 'slashing' (the loss of staked EDG, which is transferred to the Edgeware Treasury).
- Inclusivity: All EDG holders can participate in securing the network and earning rewards through nomination, regardless of whether they have the technical capability to run a validator node.
- Efficiency: NPoS is more efficient than Proof-of-Work (PoW) and faster than standard Proof-of-Stake (PoS).
- Deterministic Finality: The network maintains a limited validator set (adjustable via governance) to achieve deterministic finality.