EVM Integration
#
NetworksEVM support is currently available on the following findora networks:
Network Type | Network Name | Chain ID | RPC URL | Currency Symbol (optional) |
---|---|---|---|---|
Devnet | Findora Devnet | 523 | https://dev-evm.dev.findora.org:8545 | FRA |
#
1. Setup Ethereum AccountMetamask and create an account.#
1. Install#
2. (Optional) Setup accountIf you already have an Ethereum address, skip step #2 and step #3 If you need to use the command
fn
in any of the steps, please refer to the section "Setup Findora Account" below. Note: Thefn
generated account is only used for testing (unsafe), recommend to use Metamask or other ethereum wallet.
fn gen-eth-key
output:
Mnemonic: lumber friend abstract swarm rifle inner syrup physical farm van urban cubePrivateKey: e0713a27b18115da437e4f981eb460be2a6bc0e88cd0dd24ed7f7d43ce6af876Address: 0xf5224110db945b54466d275cd224fed2dd110e67
#
3. (Optional) Import new account to metamaskIf you already have an Ethereum address, skip this step.
#
4. Connect to Findora Devnet#
5. Deposit FRA to your Ethereum accountThe most common and fastest way to deposit FRA to your Ethereum address is via our Discord bot FindoraBot
.
Discord faucet#
1. Request funds fromYou should send a private message to the FindoraBot
in the following format.
!evm 0x9c0700E390f0E9c98b894bF4Fc4d5c1Ac3e02D6B
where 0x9c0700E390f0E9c98b894bF4Fc4d5c1Ac3e02D6B should be replaced with your own Ethereum address.
Note that there must be a seperator (such as an empty space) between
!evm
and the address.
Findora Address
starting with fra
, you could also do an internal transfer with the following steps to deposit FRA to your Ethereum address.#
2. If you had FRA in your - Deposit FRA to ethereum address
FRA decimals is 6.
fn contract-deposit --address 0xf5224110db945b54466d275cd224fed2dd110e67 --amount 100000000
- Check your Ethereum account balance.
fn account -a 0xf5224110db945b54466d275cd224fed2dd110e67
output:
AccountId: fra1753yzyxmj3d4g3ndyawdyf876tw3zrn8qqqqqqqqqqqqqqqqqqqq5me93zSmartAccount { nonce: 0, balance: 100000000, reserved: 0, assets: {},}
You can also check on metamask. Now you can use all the functions of metamask normally.
- Withdraw FRA to findora account (optional)
fn contract-withdraw --amount 10000000 --eth-key "lumber friend abstract swarm rifle inner syrup physical farm van urban cube"
#
Remix#
Deploy and run a sample smart contractUse this document. for a step by step process
#
Truffle#
Deploy ERC20 ContractsHere is an example: https://github.com/tylerztl/findora-erc20-demo
#
Setup Findora Accountfn (command tools)#
1. Downloadchmod +x fn
#
2. Create a new account (ed25519) on the FindoraNote: The
fn
generated account is only used for testing (unsafe), recommend to use Findora Official Wallet .If you already have a Findora account, skip this step.
fn genkey
output:
Wallet Address: fra1vs8j62uxd9v5w6qa6h4lgxx4gdq20p2x8g907rygupwdkmh829fqr9aud8Mnemonic: front fan poverty crawl party electric slim spin pair wool media page over box sample slush lab copy decorate stem recycle search essay delayKey: { "pub_key": "ZA8tK4ZpWUdoHdXr9BjVQ0CnhUY6Cv8MiOBc227nUVI=", "sec_key": "n0g9kHcBqKR9D-jzH1ga-2tVdjn2GbylpBZ8IKej2FA="}
- Connect to remote findora node
fn setup -S https://dev-evm.dev.findora.org
- Load your Findora account to request funds from the faucet
Save the mnemonic phrase generated above to
mnemonic.key
file.eg: front fan poverty crawl party electric slim spin pair wool media page over box sample slush lab copy decorate stem recycle search essay delay
fn setup -O $PWD/mnemonic.key
Note: must be absolute path!
- Query account
fn show -b
output:
Server URL:https://dev-evm.dev.findora.org
Findora Address:fra1vk4aqtlqj78qs8qxy3cwyaesp02d5pqmvh3ve98y3cm8x3ktaeaseccwla
Findora Public Key:ZavQL-CXjggcBiRw4ncwC9TaBBtl4syU5I42c0bL7ns=
Balance:0 FRA units
You can also check on Findora official wallet.
#
Compatibility#
Web3 JSON-RPC protocol- eth_protocolVersion
- eth_chainId
- eth_accounts
- eth_getBalance
- eth_sendTransaction
- eth_call
- eth_coinbase
- eth_gasPrice
- eth_blockNumber
- eth_getStorageAt
- eth_getBlockByHash
- eth_getBlockByNumber
- eth_getTransactionCount
- eth_getBlockTransactionCountByHash
- eth_getBlockTransactionCountByNumber
- eth_getCode
- eth_sendRawTransaction
- eth_estimateGas
- eth_getTransactionByHash
- eth_getTransactionByBlockHashAndIndex
- eth_getTransactionByBlockNumberAndIndex
- eth_getTransactionReceipt
- eth_getLogs
- eth_hashrate
- eth_syncing
- eth_mining
- eth_getUncleCountByBlockHash
- eth_getUncleCountByBlockNumber
- eth_getUncleByBlockHashAndIndex
- eth_getUncleByBlockNumberAndIndex
- eth_getWork
- eth_submitWork
- eth_submitHashrate
#
Precompile contractsAddress | Name | Features |
---|---|---|
0x1 | ECRecover | ECDSA public key recovery |
0x2 | SHA256 | SHA-2 256-bit hash function |
0x3 | RIPEMD160 | RIPEMD 160-bit hash function |
0x4 | Identity | Identity function |
0x5 | ModExp | Big integer modular exponentiation |
0x6 | BN128Add | Elliptic curve addition |
0x7 | BN128Mul | Elliptic curve scalar multiplication |
0x8 | BN128Pair | Elliptic curve pairing check |