Coder Social home page Coder Social logo

agfin's Introduction

Aggregated USD

The home of stability

The AgFin repo has 2 uses:

React website

How to install

npm install
# or, if using yarn
yarn install

How to start/build

# start dev. server
npm start
# or
yarn start

# build react site
npm run build
# or
yarn build

Constants

Aggregated provides a src/constants.js file to allow devs to easily test/modify the code to suit their contract addresses. For now, the only key is agusd:

module.exports = {
  agusd: "0x000000000000000000000000000000000000dEaD" // <== your new contract address
}

Contract/Tests

The contract

contracts/AgUSD.sol contains the solidity file for AgUSD. The contracts you may want to take a look at are (line #'s may not be accurate):

  • AgUSD => Line 337
  • Cooldown => Line 315
  • AGUSDErrors => Line 6

Compiling

To compile the contract run npx hardhat compile. The output should be:

Solidity 0.8.10 is not fully supported yet. You can still use Hardhat, but some features, like stack traces, might not work correctly.

Learn more at https://hardhat.org/reference/solidity-support

Compiled 1 Solidity file successfully

Running tests

All tests are currently located in tests/AgUSD.js. Run them with npx hardhat test tests/AgUSD.js. The output should be:

AgUSD - Basic ERC20 read functions.
  √ Should return AggregatedUSD as the name (3177ms)
  √ Should return AgUSD as the symbol (334ms)
  √ Should return 0 as the totalSupply (263ms)

AgUSD - Basic ERC20 write functions.
  √ Approve and test approval (288ms)

AgUSD - Custom functions
  √ Test cooldown timer (should be over 0) (315ms)
  √ Changing gate availability (352ms)
  √ Changing treasurySend (355ms)
  √ Changing multisig (308ms)


8 passing (5s)

The end!

Make sure to⭐star or 👀 watch the repo to be notified for updates!

Signed, AgTeam.

agfin's People

Contributors

pokesi avatar pseudopymander avatar

Watchers

 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.