Glitch Finance Announces EVM Developer Document & Smart Contract Functionality
Glitch Finance is delighted to announce that the initial functionality to run an EVM contract on the mainnet is available to developers. The EVM Developer Document is also now accessible to facilitate the deployment of EVM-compatible smart contracts.
The journey of a thousand miles begins with one step. — Lao Tzu
What benefits does EVM developer documentation provide to the GLITCH mainnet and developers?
- Smart contract developers (at any skill level) can learn how to use Remix to launch an EVM-compatible contract.
- Developers may utilize the documentation to publish the first iteration of their EVM smart contract.
- In addition, the documentation assists developers in understanding the GLITCH code. It will support them in the future in maintaining and updating their decentralized applications (dApps) and the EVM smart contract that operates it.
*Note that only the EVM functionality is available now; Substrate mainnet contracts will be available in future network protocol upgrades. Complete blockchain core functional requirements/tech docs are being compiled now to be published in the near term.
How to Deploy an ERC-20 Smart Contract using Remix IDE
Requirement:
- Use ERC-20 Smart contract: GlitchTest (Below Step 4)
- Use Remix IDE to deploy
- Use MetaMask to add MAINNET network
- Knowledgeable Rust & Solidity language
Step 1: Add ERC-20 smart contract on Remix IDE (Below Step 4)
Step 2: Solidity Compiler
- Compiler: Select the solidity version corresponding with the smart contract. (Example: GlitchTest smart contract is 0.5.0)
- Language: Solidity
- EVM Version: Default
- Contract: CodeWithJoe(ERC20.sol) in GlitchTest smart contract
- Click the [Compile ERC20.sol] button
Step 3: Deploy & Run transactions
- Environment: Injected Web3
- Account: Account connect MetaMask. (Noted: Account has balance)
- Gas Limit: Default
- Value: Default
- Contract: CodeWithJoe — ERC20.sol in GlitchTest smart contract
- Click the [Deploy] button
Step 4: Add contract to MetaMask and transfer
- Add ERC-20 token to Metamask: 0x038a68FF68c393373eC894015816e33Ad41BD564
- Transfer ERC-20 token
GlitchTest Smart Contract
pragma solidity ^0.5.0;// — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — // ERC Token Standard #20 Interface//// — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — contract ERC20Interface {function totalSupply() public view returns (uint);function balanceOf(address tokenOwner) public view returns (uint balance);function allowance(address tokenOwner, address spender) public view returns (uint remaining);function transfer(address to, uint tokens) public returns (bool success);function approve(address spender, uint tokens) public returns (bool success);function transferFrom(address from, address to, uint tokens) public returns (bool success);event Transfer(address indexed from, address indexed to, uint tokens);event Approval(address indexed tokenOwner, address indexed spender, uint tokens);}// — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — // Safe Math Library// — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — contract SafeMath {function safeAdd(uint a, uint b) public pure returns (uint c) {c = a + b;require(c >= a);}function safeSub(uint a, uint b) public pure returns (uint c) {require(b <= a); c = a — b; } function safeMul(uint a, uint b) public pure returns (uint c) { c = a * b; require(a == 0 || c / a == b); } function safeDiv(uint a, uint b) public pure returns (uint c) { require(b > 0);c = a / b;}}contract CodeWithJoe is ERC20Interface, SafeMath {string public name;string public symbol;uint8 public decimals; // 18 decimals is the strongly suggested default, avoid changing ituint256 public _totalSupply;mapping(address => uint) balances;mapping(address => mapping(address => uint)) allowed;/*** Constructor function** Initializes contract with initial supply tokens to the creator of the contract*/constructor() public {name = “GlitchTest”;symbol = “GLCHT”;decimals = 18;_totalSupply = 100000000000000000000000;balances[msg.sender] = _totalSupply;emit Transfer(address(0), msg.sender, _totalSupply);}function totalSupply() public view returns (uint) {return _totalSupply — balances[address(0)];}function balanceOf(address tokenOwner) public view returns (uint balance) {return balances[tokenOwner];}function allowance(address tokenOwner, address spender) public view returns (uint remaining) {return allowed[tokenOwner][spender];}function approve(address spender, uint tokens) public returns (bool success) {allowed[msg.sender][spender] = tokens;emit Approval(msg.sender, spender, tokens);return true;}function transfer(address to, uint tokens) public returns (bool success) {balances[msg.sender] = safeSub(balances[msg.sender], tokens);balances[to] = safeAdd(balances[to], tokens);emit Transfer(msg.sender, to, tokens);return true;}function transferFrom(address from, address to, uint tokens) public returns (bool success) {balances[from] = safeSub(balances[from], tokens);allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);balances[to] = safeAdd(balances[to], tokens);emit Transfer(from, to, tokens);return true;}}
Need further support? Join Discord and ask our development team questions within the [#developers] channel.
Final Thoughts
We are happy to have released the first delivery in line with Phase IV: Bellerophon, which showcases confidence that we are on schedule and keeping our commitments to our community. Finally, we’d like to thank everyone for joining us on this journey as we build a blockchain that will eventually help millions of Web3 developers and users in the coming years. Incentivized by a revenue-sharing model, all users will be able to earn incentives for their level of contributions to the core protocol layer.
The development is moving towards a direction where we’ll need to begin ramping up awareness, and with your continued daily support, we’re in for a wild ride.
We’re Hiring
We’re looking for talented candidates for full-time positions in marketing, operations, and engineering. If you’re a skilled DeFi enthusiast, please join us in taking Glitch to the next level. We want to fill these roles as soon as possible. Browse our vacant positions and apply today!
About Glitch
GLITCH is a blockchain-agnostic super protocol explicitly designed for trustless money markets and decentralized financial applications (dApps). GLITCH solves the expensive fee structure of other blockchain platforms while simultaneously rewarding all ecosystem participants and guaranteeing low network fees through a unique revenue-sharing model. Glitch plans to incorporate token wrapping bridges, where dApps can run more efficiently, all in service of Glitch’s ultimate goal: to become a cornerstone of blockchain infrastructure.
Website | Twitter | Discord | Telegram | Whitepaper