daifoundation / maker-otc

The OasisDEX protocol - Simple on-chain market for ERC20 tokens
GNU Affero General Public License v3.0
101 stars 39 forks source link

Cant deploy this contract on Test Network - out of gas #169

Open creotiv opened 6 years ago

creotiv commented 6 years ago

Trying to deploy this contract to Genache test network, but getting out of gas every time. Even with higher limits it still not deploying. It seems like it have forever loop or something.

For deploy im using Truffle. Would be appreciate for help.

gbalabasquer commented 5 years ago

did you try to deploy to some of the testnets? like kovan? to discard there is a specific issue with ganache.

creotiv commented 5 years ago

So the only way i was able to push contracts to the test net is to remove contract size limitation.

Kindly yours, Andrey Nikishaev

Areas ML/DS/CV/Soft Dev/BizDev/Growth Hacking/Customer Rel/IT LinkedIn http://ua.linkedin.com/in/creotiv GitHub http://github.com/creotiv Slideshare https://www.slideshare.net/anikishaev/ Skype creotiv.in.ua Mobile +380632410666

On Wed, Nov 21, 2018 at 7:14 PM Gonzalo Balabasquer < notifications@github.com> wrote:

did you try to deploy to some of the testnets? like kovan? to discard there is a specific issue with ganache.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/makerdao/maker-otc/issues/169#issuecomment-440743790, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPRDe--4TizkXu0hCzFt5ShJb7lRWmlks5uxYoBgaJpZM4X8hSM .

gbalabasquer commented 5 years ago

did you compile the contract using --optimize?

creotiv commented 5 years ago

No, will test it and reply

Kindly yours, Andrey Nikishaev

Areas ML/DS/CV/Soft Dev/BizDev/Growth Hacking/Customer Rel/IT LinkedIn http://ua.linkedin.com/in/creotiv GitHub http://github.com/creotiv Slideshare https://www.slideshare.net/anikishaev/ Skype creotiv.in.ua Mobile +380632410666

On Wed, Nov 21, 2018 at 7:35 PM Gonzalo Balabasquer < notifications@github.com> wrote:

did you compile the contract using --optimize?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/makerdao/maker-otc/issues/169#issuecomment-440750756, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPRDQ3hxnmXQzMEgavMRxHH25EBp3Jrks5uxY7hgaJpZM4X8hSM .

creotiv commented 5 years ago

optimize not helped, still exceeds block gas limit

Kindly yours, Andrey Nikishaev

Areas ML/DS/CV/Soft Dev/BizDev/Growth Hacking/Customer Rel/IT LinkedIn http://ua.linkedin.com/in/creotiv GitHub http://github.com/creotiv Slideshare https://www.slideshare.net/anikishaev/ Skype creotiv.in.ua Mobile +380632410666

On Thu, Nov 22, 2018 at 10:14 PM Андрей Никишаев creotiv@gmail.com wrote:

No, will test it and reply

Kindly yours, Andrey Nikishaev

Areas ML/DS/CV/Soft Dev/BizDev/Growth Hacking/Customer Rel/IT LinkedIn http://ua.linkedin.com/in/creotiv GitHub http://github.com/creotiv Slideshare https://www.slideshare.net/anikishaev/ Skype creotiv.in.ua Mobile +380632410666

On Wed, Nov 21, 2018 at 7:35 PM Gonzalo Balabasquer < notifications@github.com> wrote:

did you compile the contract using --optimize?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/makerdao/maker-otc/issues/169#issuecomment-440750756, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPRDQ3hxnmXQzMEgavMRxHH25EBp3Jrks5uxY7hgaJpZM4X8hSM .

gbalabasquer commented 5 years ago

Just made a test deploy to kovan. It succeed, 3.5 M gas used. You are probably doing something wrong with optimize param. I'm using dapptools, but you could copy the code in Remix and try it there. Remember to paste all the dependencies.

creotiv commented 5 years ago

Im using truffle compile with solc params:

solc: { optimizer: { enabled: true, runs: 200 } },

Kindly yours, Andrey Nikishaev

Areas ML/DS/CV/Soft Dev/BizDev/Growth Hacking/Customer Rel/IT LinkedIn http://ua.linkedin.com/in/creotiv GitHub http://github.com/creotiv Slideshare https://www.slideshare.net/anikishaev/ Skype creotiv.in.ua Mobile +380632410666

On Mon, Nov 26, 2018 at 5:17 PM Gonzalo Balabasquer < notifications@github.com> wrote:

Just made a test deploy to kovan. It succeed, 3.5 M gas used. You are probably doing something wrong with optimize param. I'm using dapptools, but you could copy the code in Remix and try it there. Remember to paste all the dependencies.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/makerdao/maker-otc/issues/169#issuecomment-441674890, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPRDUCq9EPhhGjVpPOjhfuLCms8fYnPks5uzAYFgaJpZM4X8hSM .

gbalabasquer commented 5 years ago

Yeah, that seems correct. Not sure why it is not working with Truffle, but if exceeds the block limit is because the optimisation of the tool is not being applied for some reason.