GithubHelp home page GithubHelp logo

lacnetnetworks / gas-management Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lacchain/gas-management

1.0 1.0 3.0 278.57 MB

This repository contains detailed the technical documentation and code of the GAS distribution mechanism. It also includes manuals to deploy your first smart contracts.

License: Apache License 2.0

Go 68.59% Solidity 24.04% JavaScript 7.37%

gas-management's People

Contributors

allendemarcos avatar antonio-leal-batista avatar ccamaleon5 avatar sergioceron avatar

Stargazers

 avatar

gas-management's Issues

Inconsistent behaviour between direct and indirect calls

As I understand it, the proper way to write a smart contract under the proposed change is the following:

  • If the function is called from an Ethereum account, then msg.sender won't work, and the sending address must be retrieved through _msgSender().
  • If the function is called from another contract, then msg.sender will work, but _msgSender() won't.

If that's correct, I don't think we can go with that model, because we can't expect smart contract authors to know or to restrict how their functions will be called.

What's worse, I don't think a smart contract can detect if it's being called from an account or from another contract, so we will have an unexpected behaviour 50% of the time. If it can be detected however, then that logic should be implemented in _msgSender() so it does behave as a drop-in remplacement for msg.sender.

Can't send transactions with truffle

Using Truffle is possible to deploy contracts, but send transactions return a Error without reason (Error Reverted). It is happening because Truffle regenerate function bytes name using ABI. When ABI is changed due to two extra parameters are needed, then ABI gets another function name.

Inconsistent behaviour between direct and indirect calls

As I understand it, the proper way to write a smart contract under the proposed change is the following:

  • If the function is called from an Ethereum account, then msg.sender won't work, and the sending address must be retrieved through _msgSender().
  • If the function is called from another contract, then msg.sender will work, but _msgSender() won't.

If that's correct, I don't think we can go with that model, because we can't expect smart contract authors to know or to restrict how their functions will be called.

What's worse, I don't think a smart contract can detect if it's being called from an account or from another contract, so we will have an unexpected behaviour 50% of the time. If it can be detected however, then that logic should be implemented in _msgSender() so it does behave as a drop-in remplacement for msg.sender.

pending nonce is not being handled correctly

When a transaction is sent, and it is rejected by the TxRelay smart contract, the pending nonce is not returned correctly, since it is always incrementing. This causes problems in distributed scenarios when the query is made through pending. The pending nonce could be returned equal to the latest nonce, since the TxRelay does not handle pending nonce.

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.