Develop an application on Rust that allow to do this:
Disperse:
Being able to send ETH to multiples wallets at the same time using an smart contract BUT ALSO any ERC20 tokens. I can also select % instead of amount.
Collect:
Being able to collect ETH from multiples at the same time and send just to one wallet using an smart contrct but ALSO ERC20 tokens using % of the wallet.
Application needs to have an API where you can send your body and it will process it and return tx hash. Develop the smart contract using solidity under Foundry framework. Optimize it for gas as much.
Read-Only Files
- .gitignore
- .gitmodules
- api/Cargo.toml
- api/Cargo.lock
- README.md
Environment
First of all you have to make some required installations. To make it relevant to your OS please visit official websites:
-
Rustprogramming language - official download. Make surecargoalso has been installed. -
Install
Foundary:
$ juscurl -L https://foundry.paradigm.xyz | bash && foundryup-
Also you need to install
solcofficial download -
!Install!
truffle:
$ npm install -g truffleUsage Example First of all complile your contract
$ truffle init && truffle compileCompile contract abi
$ solc --optimize --bin --abi src/Contract.sol -o build/Then to execute main.rs script first of all you need to make build. Go to api dir:
$ cargo buildAfter your build has been done, just execute build file with next command:
$ .target/debug/api