Code like IntegerType(160, IntegerType::Modifier::Address); is very common and should be replaced by something like ElementaryTypes::Address (i.e. ElementaryTypes should be a struct that contains several static members initialized to specific instances of the types) at least for the more common elementary types to improve readability.
Note that the Type class inherits from std::enabled_shared_from_this and thus is always a shared_ptr. The elements of the ElementaryTypes struct should be the types themselves, but this has to be checked during implementation what is more common.
The elementary types should be:
bytes32, byte, address, uint256 and others that are found in the code.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
__This issue now has a funding of 225.0 DAI (225.0 USD @ $1.0/DAI) attached to it.__
@chriseth can you please point me to places where i would need to make changes and add the struct containing Elementary types so that i can accelerate the work a bit , also i could not find any instances of bytes32 , unit256 or bytes being used like IntegerType(160, IntegerType::Modifier::Address);
@vaibhavchellani please start with all occurrences of IntegerType(160, IntegerType::Modifier::Address). I think something like ArrayType(DataLocation::Memory) and ArrayType(DataLocation::Memory, true) should also be replaced by something like ElementaryTypes::BytesMemory and ElementaryTypes::StringMemory, respectively.
The struct should be placed in Types.h, I think.
@vaibhavchellani Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
yeah i am working on this issue
Thanks for the update @vaibhavchellani!
@vaibhavchellani Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
yeah i am trying to wrap my head around the codebase , i actually did a basic implementation and shall create a PR before the weekend , sorry for the delay guys !
@vaibhavchellani Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
Hi @vaibhavchellani do you have an update to provide today/tomorrow? If not, we may have to send it back to the crowd.
hey @vs77bb , opening up a PR before tomorrow .
@vaibhavchellani Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
yes i am working on it , facing some issues
Hi @vaibhavchellani after checking with @chriseth we decided it's time to return this to the crowd. Thanks for your efforts and please do check Gitcoin again for other potential issues to work!
I've replaced all occurrences of IntegerType(160, IntegerType::Modifier::Address) with ElementaryTypes::Address, ArrayType(DataLocation::Memory) with ElementaryTypes::BytesMemory, and ArrayType(DataLocation::Memory, true) with ElementaryTypes::StringMemory. Compilation completes successfully. Any other types that should be replaced?
Also, is there anything in the README / documentation that I need to add? Or anything in the changelog?
@lastmjs , I have seen many places code like make_shared<IntegerType>(160, IntegerType::Modifier::Address).
Please check with @chriseth , if we would like to change such occurrences.
I've got a PR up, need more direction @chriseth @vs77bb
@lastmjs Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
I'm working on this and have a pr up but haven't heard back from anyone
@vs77bb @chriseth I'm nearly finished, but I need direction on what you'd like me to do to finish up.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
__Work for 225.0 DAI (225.0 USD @ $1.0/DAI) has been submitted by__:
@vs77bb please take a look at the submitted work:
@lastmjs Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
I'm still working on this with the updated information I needed
@lastmjs Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
I'll be getting to these updates soon
On Mon, Sep 10, 2018, 10:16 AM Gitcoin.co Bot notifications@github.com
wrote:
@lastmjs https://github.com/lastmjs Hello from Gitcoin Core - are you
still working on this issue? Please submit a WIP PR or comment back within
the next 3 days or you will be removed from this ticket and it will be
returned to an ‘Open’ status. Please let us know if you have questions!
- warning (3 days)
- escalation to mods (6 days)
Funders only: Snooze warnings for 1 day
https://gitcoin.co/issue/ethereum/solidity/4502/777?snooze=1 | 3 days
https://gitcoin.co/issue/ethereum/solidity/4502/777?snooze=3 | 5 days
https://gitcoin.co/issue/ethereum/solidity/4502/777?snooze=5 | 10 days
https://gitcoin.co/issue/ethereum/solidity/4502/777?snooze=10 | 100 days
https://gitcoin.co/issue/ethereum/solidity/4502/777?snooze=100—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ethereum/solidity/issues/4502#issuecomment-419971127,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGrSjwFfd7zlNs8LVEMj9DG2x179mwH-ks5uZpBEgaJpZM4VNewo
.
Thanks for the update @lastmjs
PR updated as asked on the PR thread.
The pull request has been merged
@vs77bb I submitted this work on Gitcoin a while ago, do I need to submit again now that it's complete?
Issue Status: 1. Open 2. Cancelled
__The funding of 225.0 DAI (225.0 USD @ $1.0/DAI) attached to this issue has been cancelled by the bounty submitter__
⚡️ A tip worth 225.00000 DAI (225.0 USD @ $1.0/DAI) has been granted to @lastmjs for this issue from @. ⚡️
Nice work @lastmjs! To redeem your tip, login to Gitcoin at https://gitcoin.co/explorer and select 'Claim Tip' from dropdown menu in the top right, or check your email for a link to the tip redemption page.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
__The funding of 225.0 DAI (225.0 USD @ $1.0/DAI) attached to this issue has been approved & issued.__
I'm trying to redeem the tip, but it doesn't work and when I look at the console I get this error: Uncaught Error: Invalid number of arguments to Solidity function
I wonder if it has something to do with the creator of the tip not putting their name in correctly or something
@lastmjs Sent this to our dev team; will message you on Gitcoin Slack when we figure it out 👍
Most helpful comment
@vaibhavchellani please start with all occurrences of
IntegerType(160, IntegerType::Modifier::Address). I think something likeArrayType(DataLocation::Memory)andArrayType(DataLocation::Memory, true)should also be replaced by something likeElementaryTypes::BytesMemoryandElementaryTypes::StringMemory, respectively.The struct should be placed in
Types.h, I think.