1"use strict";(self.webpackChunkve_ps=self.webpackChunkve_ps||[]).push([[2120],{4137:(t,e,a)=>{a.d(e,{Zo:()=>p,kt:()=>u});var n=a(7294);function r(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function l(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function o(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?l(Object(a),!0).forEach((function(e){r(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):l(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function i(t,e){if(null==t)return{};var a,n,r=function(t,e){if(null==t)return{};var a,n,r={},l=Object.keys(t);for(n=0;n<l.length;n++)a=l[n],e.indexOf(a)>=0||(r[a]=t[a]);return r}(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(n=0;n<l.length;n++)a=l[n],e.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(r[a]=t[a])}return r}var m=n.createContext({}),s=function(t){var e=n.useContext(m),a=e;return t&&(a="function"==typeof t?t(e):o(o({},e),t)),a},p=function(t){var e=s(t.components);return n.createElement(m.Provider,{value:e},t.children)},c={inlineCode:"code",wrapper:function(t){var e=t.children;return n.createElement(n.Fragment,{},e)}},d=n.forwardRef((function(t,e){var a=t.components,r=t.mdxType,l=t.originalType,m=t.parentName,p=i(t,["components","mdxType","originalType","parentName"]),d=s(a),u=r,k=d["".concat(m,".").concat(u)]||d[u]||c[u]||l;return a?n.createElement(k,o(o({ref:e},p),{},{components:a})):n.createElement(k,o({ref:e},p))}));function u(t,e){var a=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var l=a.length,o=new Array(l);o[0]=d;var i={};for(var m in e)hasOwnProperty.call(e,m)&&(i[m]=e[m]);i.originalType=t,i.mdxType="string"==typeof t?t:r,o[1]=i;for(var s=2;s<l;s++)o[s]=a[s];return n.createElement.apply(null,o)}return n.createElement.apply(null,a)}d.displayName="MDXCreateElement"},3552:(t,e,a)=>{a.r(e),a.d(e,{assets:()=>m,contentTitle:()=>o,default:()=>c,frontMatter:()=>l,metadata:()=>i,toc:()=>s});var n=a(7462),r=(a(7294),a(4137));const l={sidebar_position:2,sidebar_label:"Programming smart contracts"},o="Venom Blockchain FAQ: Programming smart contracts",i={unversionedId:"faq/programming",id:"faq/programming",title:"Venom Blockchain FAQ: Programming smart contracts",description:"I know how to develop Ethereum smart contracts. What is the difference with Venom Blockchain?",source:"@site/docs/faq/programming.md",sourceDirName:"faq",slug:"/faq/programming",permalink:"/faq/programming",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2,sidebar_label:"Programming smart contracts"},sidebar:"faqSidebar",previous:{title:"Integration",permalink:"/faq/integration"}},m={},s=[],p={toc:s};function c(t){let{components:e,...a}=t;return(0,r.kt)("wrapper",(0,n.Z)({},p,a,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"venom-blockchain-faq-programming-smart-contracts"},"Venom Blockchain FAQ: Programming smart contracts"),(0,r.kt)("details",null,(0,r.kt)("summary",null,"I know how to develop Ethereum smart contracts. What is the difference with Venom Blockchain?"),(0,r.kt)("p",null,"Your experience with EVM-based blockchains will be useful for developing smart contracts on Venom Blockchain. But there are some differences and the main one is the contracts communication model. You can check ",(0,r.kt)("a",{parentName:"p",href:"/build/development-guides/comparing-of-ethereum-vs-venom-architectures"},"this")," article to know the difference."),(0,r.kt)("p",null,"Moreover, Venom Blockchain uses Threaded Solidity language, which is a superset of Solidity. You can check its specification ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/tonlabs/TON-Solidity-Compiler/blob/master/API.md"},"here"))),(0,r.kt)("details",null,(0,r.kt)("summary",null,"Which tools can help me for developing on Venom?"),(0,r.kt)("p",null,"Check out ",(0,r.kt)("a",{parentName:"p",href:"/build/quick-start-on-testnet"},"this")," article. We have an awesome ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/venom-blockchain/awesome-venom"},"repository")," as well.")),(0,r.kt)("details",null,(0,r.kt)("summary",null,"Does Venom Blockchain have some improvement proposals or some standards for example of fungible/non-fungible tokens?"),(0,r.kt)("p",null,"Sure! You can check the ",(0,r.kt)("a",{parentName:"p",href:"/standards/VEP/"},"standards")," section, it's right here on the top menu bar :)")),(0,r.kt)("details",null,(0,r.kt)("summary",null,"How can I get a state of another contract from my contract?"),(0,r.kt)("p",null,"Contracts in Venom can't access any smart contract state directly, because of a special communication model. You can check ",(0,r.kt)("a",{parentName:"p",href:"/build/development-guides/comparing-of-ethereum-vs-venom-architectures"},"this")," article to know the difference. So the only way is to send a message to a contract asking it to return the state you need. The smart contract you are calling should implement a special ",(0,r.kt)("inlineCode",{parentName:"p"},"responsible")," function for such calls. Example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-solidity"},"contract RemoteContract {\n // Note this function is marked as responsible to call callback function\n function getCost(uint x) public pure responsible returns (uint) {\n uint cost = x == 0 ? 111 : 222;\n // return cost and set option for outbound internal message.\n return{value: 0, bounce: false, flag: 64} cost;\n }\n}\n\ncontract Caller {\n function test(address addr, uint x) public pure {\n // `getCost` returns result to `onGetCost`\n RemoteContract(addr).getCost{value: 1 ton, callback: Caller.onGetCost}(x);\n }\n\n function onGetCost(uint cost) public {\n // Check if msg.sender is expected address\n // we get cost value, we can handle this value\
1n }\n}\n")),(0,r.kt)("p",null,"There are many examples of this mechanic within the articles in the ",(0,r.kt)("a",{parentName:"p",href:"/build/development-guides/"},"Development Guides")," section. Check this out.")),(0,r.kt)("details",null,(0,r.kt)("summary",null,"What is the 'flag' of the message and which exactly should I use?"),(0,r.kt)("p",null,"The parameter ",(0,r.kt)("inlineCode",{parentName:"p"},"flag")," of the message determines how much funds will be carried with the message and how to operate with the forward fee."),(0,r.kt)("p",null,"Possible values of parameter flag:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"0 - message carries funds equal to the value parameter. The forward fee is subtracted from the ",(0,r.kt)("inlineCode",{parentName:"p"},"value"),".")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"128 - message carries all the remaining balance of the current smart contract. The parameter ",(0,r.kt)("inlineCode",{parentName:"p"},"value")," is ignored. The contract's balance will be equal to zero after the message processing.")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"64 - carries funds equal to the value parameter plus all the remaining ",(0,r.kt)("inlineCode",{parentName:"p"},"value")," of the inbound message (that initiated the contract execution).\nThe parameter ",(0,r.kt)("inlineCode",{parentName:"p"},"flag")," can also be modified:")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"flag + 1 - means that the sender wants to pay transfer fees separately from the contract's balance.")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"flag + 2 - means that any errors arising while processing this message during the action phase should be ignored. But if the message has the wrong format, then the transaction fails and + 2 has no effect.")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"flag + 32 - means that the current account must be destroyed if its resulting balance is zero. For example, flag: 128 + 32 is used to send the whole balance and destroy the contract."))),(0,r.kt)("p",null,"You can check more information about flags in threaded solidity ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/tonlabs/TON-Solidity-Compiler/blob/master/API.md#addresstransfer"},"specification"))),(0,r.kt)("details",null,(0,r.kt)("summary",null,"I've received an error code while developing. What does it mean?"),(0,r.kt)("p",null,"You can meet the TVM exception code:"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Name"),(0,r.kt)("th",{parentName:"tr",align:"center"},"C++ code"),(0,r.kt)("th",{parentName:"tr",align:"center"},"Rust code"),(0,r.kt)("th",{parentName:"tr",align:null},"Definition"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Stack underflow"),(0,r.kt)("td",{parentName:"tr",align:"center"},"2"),(0,r.kt)("td",{parentName:"tr",align:"center"},"-3"),(0,r.kt)("td",{parentName:"tr",align:null},"Not enough arguments in the stack for a primitive")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Stack overflown"),(0,r.kt)("td",{parentName:"tr",align:"center"},"3"),(0,r.kt)("td",{parentName:"tr",align:"center"},"-4"),(0,r.kt)("td",{parentName:"tr",align:null},"More values have been stored on a stack than allowed by this version of TVM")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Integer overflow"),(0,r.kt)("td",{parentName:"tr",align:"center"},"4"),(0,r.kt)("td",{parentName:"tr",align:"center"},"-5"),(0,r.kt)("td",{parentName:"tr",align:null},"Integer does not fit into expected range (by default \u22122",(0,r.kt)("sup",null,"256")," \u2264 x < 2",(0,r.kt)("sup",null,"256"),"), or a division by zero has occurred")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Range check error"),(0,r.kt)("td",{parentName:"tr",align:"center"},"5"),(0,r.kt)("td",{parentName:"tr",align:"center"},"-6"),(0,r.kt)("td",{parentName:"tr",align:null},"Integer out of expected range")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Invalid opcode"),(0,r.kt)("td",{parentName:"tr",align:"center"},"6"),(0,r.kt)("td",{parentName:"tr",align:"center"},"-7"),(0,r.kt)("td",{parentName:"tr",align:null},"Instruction or its immediate arguments cannot be decoded")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Type check error"),(0,r.kt)("td",{parentName:"tr",align:"center"},"7"),(0,r.kt)("td",{parentName:"tr",align:"center"},"-8"),(0,r.kt)("td",{parentName:"tr",align:null},"An argument to a primitive is of incorrect value type")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Cell overflow"),(0,r.kt)("td",{parentName:"tr",align:"center"},"8"),(0,r.kt)("td",{parentName:"tr",align:"center"},"-9"),(0,r.kt)("td",{parentName:"tr",align:null},"Error in one of the serialization primitives")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Cell underflow"),(0,r.kt)("td",{parentName:"tr",align:"center"}
1,"9"),(0,r.kt)("td",{parentName:"tr",align:"center"},"-10"),(0,r.kt)("td",{parentName:"tr",align:null},"Deserialization error")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Dictionary error"),(0,r.kt)("td",{parentName:"tr",align:"center"},"10"),(0,r.kt)("td",{parentName:"tr",align:"center"},"-11"),(0,r.kt)("td",{parentName:"tr",align:null},"Error while deserializing a dictionary object")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Unknown error"),(0,r.kt)("td",{parentName:"tr",align:"center"},"11"),(0,r.kt)("td",{parentName:"tr",align:"center"},"-12"),(0,r.kt)("td",{parentName:"tr",align:null},"Unknown error, may be thrown by user programs")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Fatal error"),(0,r.kt)("td",{parentName:"tr",align:"center"},"12"),(0,r.kt)("td",{parentName:"tr",align:"center"},"-13"),(0,r.kt)("td",{parentName:"tr",align:null},"Thrown by TVM in situations deemed impossible")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Out of gas"),(0,r.kt)("td",{parentName:"tr",align:"center"},"13"),(0,r.kt)("td",{parentName:"tr",align:"center"},"-14"),(0,r.kt)("td",{parentName:"tr",align:null},"Thrown by TVM when the remaining gas (g r ) becomes negative. This exception usually cannot be caught and leads to an immediate termination of TVM")))),(0,r.kt)("p",null,"Or Solidity runtime error:"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Code"),(0,r.kt)("th",{parentName:"tr",align:"center"},"Definition"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"40"),(0,r.kt)("td",{parentName:"tr",align:"center"},"External inbound message has an invalid signature. See ",(0,r.kt)("inlineCode",{parentName:"td"},"tvm.pubkey()")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"msg.pubkey()"),".")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"50"),(0,r.kt)("td",{parentName:"tr",align:"center"},"Array index or index of ",(0,r.kt)("inlineCode",{parentName:"td"},"mapping.at()")," is out of range.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"51"),(0,r.kt)("td",{parentName:"tr",align:"center"},"Contract's constructor has already been called.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"52"),(0,r.kt)("td",{parentName:"tr",align:"center"},"Replay protection exception. See ",(0,r.kt)("inlineCode",{parentName:"td"},"timestamp")," in pragma ",(0,r.kt)("inlineCode",{parentName:"td"},"AbiHeader"),".")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"53"),(0,r.kt)("td",{parentName:"tr",align:"center"},"See ",(0,r.kt)("inlineCode",{parentName:"td"},"address.unpack()"),".")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"54"),(0,r.kt)("td",{parentName:"tr",align:"center"},(0,r.kt)("inlineCode",{parentName:"td"},"array.pop")," call for an empty array.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"55"),(0,r.kt)("td",{parentName:"tr",align:"center"},"See ",(0,r.kt)("inlineCode",{parentName:"td"},"tvm.insertPubkey()"),".")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"57"),(0,r.kt)("td",{parentName:"tr",align:"center"},"External inbound message is expired. See expire in pragma AbiHeader.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"58"),(0,r.kt)("td",{parentName:"tr",align:"center"},"External inbound message has no signature but has public key. See ",(0,r.kt)("inlineCode",{parentName:"td"},"pubkey")," in pragma ",(0,r.kt)("inlineCode",{parentName:"td"},"AbiHeader"),".")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"60"),(0,r.kt)("td",{parentName:"tr",align:"center"},"Inbound message has wrong function id. In the contract there are no functions with such function id and there is no fallback function that could handle the message. See fallback.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"61"),(0,r.kt)("td",{parentName:"tr",align:"center"},"Deploying ",(0,r.kt)("inlineCode",{parentName:"td"},"StateInit")," has no public key in data field.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"62"),(0,r.kt)("td",{parentName:"tr",align:"center"},"Reserved for internal usage.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"63"),(0,r.kt)("td",{parentName:"tr",align:"center"},"See ",(0,r.kt)("inlineCode",{parentName:"td"},"optional(Type).get()"),".")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"64"),(0,r.kt)("td",{parentName:"tr",align:"center"},(0,r.kt)("inlineCode",{parentName:"td"},"tvm.buildExtMSg()")," call with wrong parameters. ",(0,r.kt)("inlineCode",{parentName:"td"},"See tvm.buildExtMsg()"),".")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"66"),(0,r.kt)("td",{parentName:"tr",align:"center"},"Convert an integer to a string with width less than number length. See ",(0,r.kt)("inlineCode",{parentName:"td"},"format()"),".")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"67"),(0,r.kt)("td",{parentName:"tr",align:"center"},"See ",(0,r.kt)("inlineCode",{parentName:"td"},"gasToValue")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"valueToGas"),".")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"68"),(0,r.kt)("td",{parentName:"tr",align:"center"},"There is no config parameter 20 or 21.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"69"),(0,r.kt)("td",{parentName:"tr",align:"center"},"Zero to the power of zero calculation (0**0 in solidity style or 0^0).")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"70"),(0,r.kt)("td",{parentName:"tr",align:"center"},"string method substr was called with substr longer than the whole string.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"71"),(0,r.kt)("td",{parentName:"tr",align:"center"},"Function marked by externalMsg was called by internal message.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null}
1,"72"),(0,r.kt)("td",{parentName:"tr",align:"center"},"Function marked by internalMsg was called by external message.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"73"),(0,r.kt)("td",{parentName:"tr",align:"center"},"The value can't be converted to enum type.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"74"),(0,r.kt)("td",{parentName:"tr",align:"center"},"Await answer message has wrong source address.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"75"),(0,r.kt)("td",{parentName:"tr",align:"center"},"Await answer message has wrong function id.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"76"),(0,r.kt)("td",{parentName:"tr",align:"center"},"Public function was called before constructor.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"77"),(0,r.kt)("td",{parentName:"tr",align:"center"},"It's impossible to convert variant type to target type. See ",(0,r.kt)("inlineCode",{parentName:"td"},"variant.toUint()"),".")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"78"),(0,r.kt)("td",{parentName:"tr",align:"center"},"There's no private function with the function id.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"79"),(0,r.kt)("td",{parentName:"tr",align:"center"},"You are deploying contract that uses pragma upgrade func/oldsol. Use the contract only for updating another contracts.")))),(0,r.kt)("p",null,"Any error with a code over 100 is a user-defined error. Check the code in the contract you call."),(0,r.kt)("p",null,"You can check more information about errors in threaded solidity ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/tonlabs/TON-Solidity-Compiler/blob/master/API.md#tvm-exception-codes"},"specification"))),(0,r.kt)("details",null,(0,r.kt)("summary",null,"My contract needs to receive fungible tokens. How can I do it?"),(0,r.kt)("p",null,"Your contract should have a TIP3 TokenWallet to perform this action. It is not necessary how exactly your contract will get its wallet (ex. you can call ",(0,r.kt)("a",{parentName:"p",href:"/standards/TIP/TIP-3/2#deploy-token-wallet"},"deployWallet")," of TokenRoot inside your contract constructor or deploy it by yourself). Next, your contract should implement an ",(0,r.kt)("a",{parentName:"p",href:"/standards/TIP/TIP-3/2#incoming-transfer-callback"},"onAcceptTokensTransfer")," callback. Pay attention, that a sender should set ",(0,r.kt)("a",{parentName:"p",href:"/standards/TIP/TIP-3/2#transfer-tokens-to-the-recipient"},"notify")," flag to true for this callback to be called."),(0,r.kt)("p",null,"Check out ",(0,r.kt)("a",{parentName:"p",href:"/build/development-guides/how-to-create-your-own-non-fungible-tip-4-token/venom-in-action/simple-nft-auction"},"this")," guide, which shows how to implement a simple auction contract that accepts TIP-3 tokens."),(0,r.kt)("p",null,"Of course, you need to check ",(0,r.kt)("a",{parentName:"p",href:"/standards/TIP/TIP-3/core-description"},"TIP-3 standards")," too.")),(0,r.kt)("details",null,(0,r.kt)("summary",null,"There are amount of fees including storage fees. How should I manipulate gas to be sure that my contract will be able to pay for all of them?"),(0,r.kt)("p",null,"You need to think out the gas management. You need to manipulate with flags of the message your contract sends and use ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/tonlabs/TON-Solidity-Compiler/blob/master/API.md#tvmrawreserve"},(0,r.kt)("inlineCode",{parentName:"a"},"tvm.rawReserve()"))," function. "),(0,r.kt)("p",null,"Check out ",(0,r.kt)("a",{parentName:"p",href:"/build/development-guides/how-to-create-your-own-fungible-tip-3-token/venom-in-action/simple-tokensale"},"this")," guide, that raises the issue of gas management.")))}c.isMDXComponent=!0}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.