Code Monkey home page Code Monkey logo

contracts's People

Contributors

igorls avatar lucca65 avatar newdev42 avatar victorgdev avatar zacck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

contracts's Issues

Change the requirement of voters

Describe the bug
Right now we require a minimum of 2 votes to create a new action. The problem is that this causes a scenario where claims that require two votes (actually all scenario with an even number of required votes) we may reach a scenario of having half of the required votes as "approved" and "disapproved". This will create limbo scenario of ever pending claims.

To Reproduce
Steps to reproduce the behavior:

  1. Create action with a number of two verifications (may have several more validators on the list)
  2. Open a new claim
  3. As the validators, vote positive as the first validator and negative as the second validator
  4. See the zombie claim (never approved or disapproved)

Expected behavior
We should be able to make sure the claim reaches the end of its cycle. To make sure it will happen we should make sure we only accept odd numbers (but bigger than 1)

Action validator list delete more elements than it should during action upset

While trying to update different actions, we allow our users to set a validator list -- a - separated string with accounts.

Every time we are updating that list we first clear all elements from that action and recreate it with all the accounts sent on the validator_str param.

A weird thing happens when we try to send an update sometimes, the contract deletes action validators from another action.

Maybe this can be fixed by adding a scope, but it should work with indexes (current implementation has an action_index). Needs more simulation and investigation

Add features toggle action

Used to fill in what features are enabled on a community

Add and migrate a new community settings table, allowing for those toggles. Make sure the other actions don't work if set

Cant vote on already verified claim

While trying to approve/disapprove actions the contract throws "Can't vote on already verified claim" error from the server. Only the first verifier can verify Claims, all others will get an error.

You can reproduce it in the "AMTB" community with the passphrase razor cable someone foster material say this decade rocket agree move segment on http://staging.cambiatus.io/dashboard

Completing Actions sometimes fails

Describe the bug
During the tests of cambiatus/frontend#485, @heltonlr found a bug where an action that was completed was not being correctly updated by event-source. We need to investigate further.

To Reproduce
We still don't have enough info to debug this

Expected behavior
As the action usages are completed, we need to make sure the action is correctly completed as well.

Screenshots
N/A

Cambiatus Env you are using
Staging

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Change require auth to use require auth2

we should update it to use require_auth2() to use a new permission (we need to decide its name). This will avoid a malicious attack to change the contract's code

Add roles to our contract

Roles will allow us to further improve how we handle granular governance in Cambiatus, its the first step towards a more decentralized community

Add unit tests to our smart contract

Is your feature request related to a problem? Please describe.
We had a few minor bugs after feature deployment that could be avoided

Describe the solution you'd like
We we had a test stack on the smart contract that would be helpful. We can make sure the contract behaves the way we intent it to!

Describe alternatives you've considered
Using the default eosio std lib test framework. Some people has been using other test issues such as RSpec for this but I think integration tests aren't what we need for now. Unit tests will allow us to test the contract and other test suits will allow us to test the deployment flow

Additional context
here is how block one does the contract testing for reference: https://github.com/EOSIO/eosio.contracts/tree/master/tests

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.