Comments (5)
@IgorKoval There's no solution provided for this issue in the documentation
from tvm-solidity-compiler.
I've removed tvm.accept() from DirectSell Contract, still it's not working & throwing the same error
from tvm-solidity-compiler.
Contract was deployed, but constructor function call wasn't successful.
When you deploy contract from contract you've send message with contract code + data and arguments to call constructor function within.
So in case there any issues in constructor function call, contract will be deployed but contructor wasn't successfuly called and you can not call any function before successful constructor function call.
Just look at first transaction on DirectSell.tsol to figure out what error code it has (look both on action and compute phase).
In your case, you've tried to reverse tvm.rawReserve(0.5 ever, 0) on children contract but only attach 0.5 ever when deploy.
You'll pay for sending deploy message + gas for constructior call and after it you will not have enough value to reserve - constructor call failed.
from tvm-solidity-compiler.
Hey, that worked!!!! @mnill
but there's one thing I'm still struggling with.
Which flag should I use to reserve tokens.
if I use tvm.rawreserve with flag 0, whole contract's balance get's transferred to msg.sender, which is wrong
if I use tvm.rawreserve with flag 4, msg.value gets added to contract & child contract doesn't get deployed.
HOW CAN I SOLVE THIS!!!!
I WANT USER TO PAY FOR DEPLOYING CHILD CONTRACT & REVERSE SOME TOKENS IN THE CONTRACT, ONLY REMAINING BALANCE WHICH IS LEFT AFTER RESERVING & DEPLOYING CHILD CONTRACT SHOULD BE RETURNED TO MSG.SENDER
from tvm-solidity-compiler.
I think such a question is not related to the compiler, and it's better to use Discord or Telegram groups to find an answer.
However, tmv.rawReserve(0.5 ever, 0) will hold 0.5 ever on your contract balance. So if there was more than 0.5 ever, the client will receive everything greater than 0.5 ever. If there was less than 0.5 ever, necessary this amount will be deducted from msg.value.
tmv.rawReserve(0.5 ever, 4) will hold the account balance plus 0.5 ever, which is deducted from msg.value.
from tvm-solidity-compiler.
Related Issues (20)
- Error: failed to recognize selector form linker v0.17.3 HOT 1
- Missed elements in AST tree HOT 1
- Proposal: add onConstructorRetry special contract function. HOT 1
- Bug: invalid decode inside afterSignatureCheck function passes compilation HOT 1
- Bug: invalid abi.encode for lot of params HOT 1
- Necessary
- I need the private key or the pass phrase
- Segmentation fault: 11 for numbers more than 2**256 - 1 inside math.muldiv() HOT 1
- pragma version error HOT 1
- Potential Optimizations in TON Solidity Compiler HOT 2
- Proposal: Add the ability to attach stateinit when calling contract interface HOT 2
- Bug: Сompiler crashes without error description HOT 2
- Proposal: Add variables to msg namespace HOT 3
- Proposal: change tx.timestamp naming HOT 1
- Proposal: Add method for mapping HOT 2
- For Int got error the value must be in the range 1 - 256 HOT 1
- block.logicaltime doesn't work & block.timestamp output's wrong unix time, ex:- "35012461000000" HOT 4
- Deserialization error, Exit Code -> 9 HOT 1
- Compiler segfaults on internal function calls attributed with "{value: ...}" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tvm-solidity-compiler.