GithubHelp home page GithubHelp logo

codergrade / furucombo-contract Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dinngo/furucombo-contract

0.0 0.0 0.0 5.16 MB

License: MIT License

Shell 0.49% JavaScript 61.27% Ruby 1.47% Python 0.18% Nix 0.01% Makefile 0.01% Solidity 36.57%

furucombo-contract's Introduction

Furucombo

Overview

Furucombo is a platform that allows user to build their DeFi strategies without hardcore codings.

Installation

$ npm install

Test

The testing is performed through the fork function of ganache-cli. The location of the data source is defined under $RPC_URL. You may perform the testing by your own rpc node instance or service provider like Infura.

$ export RPC_URL=https://mainnet.infura.io/v3/{Your_project_ID}
$ npm run test

or

$ RPC_URL=https://mainnet.infura.io/v3/{Your_project_ID} npm run test

Deploy

In-memory hardhat node

Deploy all contracts under deploy/

npx hardhat deploy

Private beta node

Take HFunds for example.

1. Add ETH_BETA_SECRET to .env
2. npx hardhat --network ethBeta deploy --tags HFunds
3. Add the new address of HFunds to deploy/utils/addresses_eth_beta.js
4. npx hardhat --network ethBeta deploy --tags HFundsPostSetup

Production

Take HFunds for example. Refer to hardhat.config.js for the network name.

1. Add ${network_name}_SECRET to .env
2. npx hardhat --network ${network_name} deploy --tags HFunds
3. Add the new address of HFunds to deploy/utils/addresses_${network_name}.js
4. Register the new address using Gnosis Safe

Usage

Furucombo contracts contains three different parts, Proxy, Registry and Handler.

Proxy

Proxy is the gateway of every execution. Proxy does not hold any state and should be clean after every execution.

Registry

Registry handles the verification for the valid handlers called by proxy, and valid callers calling proxy. Every handler and caller should be registered in Registry and unregistered when deprecated. This is also the only part that requires ownership. A halt() can be executed by owner to halt the validation of handlers and callers from proxy, which is able to halt the execution of proxy. A bannedAgent mapping is maintained to verify if the validation requesting agent is valid.

Handler

Handler implements the logic to interact with the external services. Handlers should be treated as libraries, which does not hold states. Handler parameters may apply the execution result of another, for the details please refer to the Chained Input guideline.

Contribute

Please refer to the contribution guide.

License

Furucombo is released under the MIT License.

furucombo-contract's People

Contributors

hihiben avatar robinpan1 avatar ksin751119 avatar zodahu avatar jeff-cch avatar shellygr avatar mussinalin avatar clearwood avatar chouandy avatar yaronvel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.