[{"data":1,"prerenderedAt":891},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fcli\u002Fusing-beamx-faucet-contract-with-cli-wallet":3,"docs-surround-\u002Fdocs\u002Fcli\u002Fusing-beamx-faucet-contract-with-cli-wallet":880},{"id":4,"title":5,"body":6,"description":78,"extension":872,"image":873,"meta":874,"navTitle":873,"navigation":875,"path":876,"seo":877,"stem":878,"__hash__":879},"docs\u002Fdocs\u002Fcli\u002Fusing-beamx-faucet-contract-with-cli-wallet.md","Using Beam smart contracts with CLI Wallet",{"type":7,"value":8,"toc":844},"minimark",[9,13,18,28,38,41,44,48,61,70,73,80,91,96,118,121,140,146,152,160,163,172,178,182,204,211,217,222,229,256,269,273,279,285,299,308,311,331,334,338,341,347,353,356,362,368,374,380,386,398,402,405,414,417,423,429,438,442,445,448,451,454,462,465,471,477,480,486,509,549,553,558,561,567,570,576,580,587,593,599,605,665,669,680,683,689,695,699,702,708,714,720,741,747,753,759,765,768,774,777,783,789,792],[10,11,5],"h1",{"id":12},"using-beam-smart-contracts-with-cli-wallet",[14,15,17],"h2",{"id":16},"getting-started","Getting Started",[19,20,21,22,27],"p",{},"Beam compatible binaries are available for ",[23,24,26],"a",{"href":25},"\u002Fdownloads\u002Fmainnet-mac","all platforms"," on our main website.",[19,29,30,31,37],{},"Advanced users that wish to build Beam directly from our source code can see this ",[23,32,36],{"href":33,"rel":34},"https:\u002F\u002Fgithub.com\u002FBeamMW\u002Fbeam\u002Fwiki\u002FHow-to-build",[35],"nofollow","guide"," for a more detailed run down.",[19,39,40],{},"We strongly recommend for all users, casual and hardcore, that you download the node, CLI wallet in addition to the Desktop wallet. The application for smart contracts is in its infancy, with many unique and helpful smart contracts lacking a graphical interface, meaning they are only available through the Command-Line.",[19,42,43],{},"Building out your node and operating the CLI wallet will keep you at the forefront of all the latest and coolest features that Beam has to offer. It is a simple process that only takes a minute.",[14,45,47],{"id":46},"getting-the-shaders","Getting the Shaders",[19,49,50,51,55,56,60],{},"Beam Smart Contracts deploy via an application called ",[52,53,54],"strong",{},"Beam Shaders",". Beam Shaders are small (or not so small) programs compatible with several different programming languages before being compiled as a ",[57,58,59],"code",{},".wasm"," file since Beam Virtual Machine (BVM) runs on WebAssembly.",[19,62,63,64,69],{},"No coding experience is necessary; several Beam Shader applications are ready and available to ",[23,65,68],{"href":66,"rel":67},"https:\u002F\u002Fgithub.com\u002FBeamMW\u002Fbeam\u002Ftree\u002Fmainnet\u002Fbvm\u002FShaders",[35],"download",".",[19,71,72],{},"Select from the list of Beam Shader apps and get into some 'shady business!'",[19,74,75],{},[76,77],"img",{"alt":78,"src":79},"",".gitbook\u002Fassets\u002FScreen%20Shot%202021-10-26%20at%2012.43.27%20PM.png",[19,81,82,83,86,87,90],{},"As seen from the above example, there are several app folders, i.e., '",[57,84,85],{},"Faucet",",' '",[57,88,89],{},"Dao-core",",' and inside each folder will be a list of files that will resemble the following:",[19,92,93],{},[76,94],{"alt":78,"src":95},".gitbook\u002Fassets\u002FScreen%20Shot%202021-10-26%20at%2012.39.50%20PM.png",[19,97,98,99,102,103,106,107,110,111,114,115,69],{},"The reason for that is that each application comes in two parts. The first is the contract deployed to the blockchain (",[57,100,101],{},"contract.wasm",") and the second allows the wallet to interact with the contract (",[57,104,105],{},"app.wasm","). We suggest creating a ",[57,108,109],{},"shaders"," folder inside the ",[57,112,113],{},"beam"," folder with the subfolder with specific apps like ",[57,116,117],{},"faucet",[19,119,120],{},"Now let's see how we can run some apps!",[122,123,124,132],"ul",{},[125,126,127],"li",{},[23,128,130],{"href":129},"using-beamx-faucet-contract-with-cli-wallet#faucet-contract",[57,131,85],{},[125,133,134],{},[23,135,137],{"href":136},"using-beamx-faucet-contract-with-cli-wallet#beamx-dao-contract",[57,138,139],{},"BeamX DAO",[14,141,143,145],{"id":142},"faucet-contract",[57,144,85],{}," contract",[19,147,148,149,151],{},"The Beam ",[57,150,85],{}," contract allows users to withdraw or deposit small amounts of Beam coins.",[153,154,156,157,159],"h3",{"id":155},"all-faucet-contract-commands","All ",[57,158,85],{}," contract commands",[19,161,162],{},"To view all the available contract commands, enter this command:",[164,165,170],"pre",{"className":166,"code":168,"language":169},[167],"language-text",".\u002Fbeam-wallet shader --shader_app_file shaders\u002Ffaucet\u002Fapp.wasm -n 127.0.0.1:8501\n","text",[57,171,168],{"__ignoreMap":78},[164,173,176],{"className":174,"code":175,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file shaders\u002Ffaucet\u002Fapp.wasm -n 127.0.0.1:8501\n\nI 2021-10-19.16:16:18.853 Beam Wallet 6.1.12023 (mainnet)\nI 2021-10-19.16:16:18.854 Rules signature: 0-ed91a717313c6eb0, 321321-6d622e615cfd29d0, 777777-1ce8f721bf0c9fa7, 1280000-3eaab6ab65b65f94\nI 2021-10-19.16:16:18.854 starting a wallet...\nI 2021-10-19.16:16:19.093 wallet successfully opened...\nExecuting shader...\nShader output: {\"roles\": {\"manager\": \n{\"create\": {\"backlogPeriod\": \"Height\",\"withdrawLimit\": \"Amount\"},\n\"destroy\": {\"cid\": \"ContractID\"},\"view\": {},\"view_params\": {\"cid\": \"ContractID\"},\n\"view_funds\": {\"cid\": \"ContractID\"},\"view_accounts\": {\"cid\": \"ContractID\"},\n\"view_account\": {\"cid\": \"ContractID\",\"pubKey\": \"PubKey\"}},\n\"my_account\": {\"view\": {\"cid\": \"ContractID\"},\n\"deposit\": {\"cid\": \"ContractID\",\"amount\": \"Amount\",\"aid\": \"AssetID\"},\n\"withdraw\": {\"cid\": \"ContractID\",\"amount\": \"Amount\",\"aid\": \"AssetID\"}}}}\n",[57,177,175],{"__ignoreMap":78},[153,179,181],{"id":180},"view-contract","View contract",[19,183,184,185,191,192,194,195,197,198,200,201,203],{},"Be sure you have the latest version of ",[23,186,189],{"href":187,"rel":188},"https:\u002F\u002Fgithub.com\u002FBeamMW\u002Fbeam\u002Ftree\u002Fmainnet\u002Fbvm\u002FShaders\u002Ffaucet",[35],[57,190,85],{}," inside your ",[57,193,109],{}," folder as instructed. The ",[57,196,105],{}," file uses ",[57,199,85],{}," and ",[57,202,101],{}," interacts with the blockchain.",[19,205,206,207,210],{},"We will use the Beam Faucet contract to retrieve the contract",[57,208,209],{},"CID","from the blockchain for this example.",[19,212,213,214,216],{},"The Command Line instructions for",[57,215,85],{},"are compatible with macOS (Terminal Window), Linux (Shell), and Windows (Command Prompt) but for the example below, we will use Terminal Window commands.",[218,219,221],"h4",{"id":220},"retrieving-the-faucet-contract","Retrieving the Faucet contract",[19,223,224,225,228],{},"We assume that your node is running on a local machine at ",[57,226,227],{},"port 8501",". If your parameters differ from any of the instructions, please adjust them accordingly.",[230,231,232,241],"ol",{},[125,233,234,235],{},"Launch a Terminal Window and change the directory to your Beam CLI wallet by entering the following command:",[164,236,239],{"className":237,"code":238,"language":169},[167],"cd \u002Fwallet_folder\n",[57,240,238],{"__ignoreMap":78},[125,242,243,244,250],{},"Assuming you followed the proper subfolder hierarchy for Faucet, enter the following command:",[164,245,248],{"className":246,"code":247,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file shaders\u002Ffaucet\u002Fapp.wasm -n 127.0.0.1:8501 --shader_args=\"role=manager,action=view\"\n",[57,249,247],{"__ignoreMap":78},[164,251,254],{"className":252,"code":253,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file shaders\u002Ffaucet\u002Fapp.wasm -n 127.0.0.1:8501 --shader_args=\"role=manager,action=view\"\n\nI 2021-10-19.16:16:18.853 Beam Wallet 6.1.12023 (mainnet)\nI 2021-10-19.16:16:18.854 Rules signature: 0-ed91a717313c6eb0, 321321-6d622e615cfd29d0, 777777-1ce8f721bf0c9fa7, 1280000-3eaab6ab65b65f94\nI 2021-10-19.16:16:18.854 starting a wallet...\nI 2021-10-19.16:16:19.093 wallet successfully opened...\nExecuting shader...\nI 2021-10-19.16:34:07.670 Tip has not been changed\nI 2021-10-19.16:34:07.674 Current state is 1463705-3c732eee8cdb116f\nShader output: {\"contracts\": \n[{\"cid\": \"3fdd4171972875e0ac8f0131b3da047e8323cc9c2c8d53327be427c455d2a716\",\n\"Height\": 1280003}]}\n",[57,255,253],{"__ignoreMap":78},[19,257,258,259,262,263,265,266,268],{},"This command will result in a list of Contract ",[57,260,261],{},"IDs"," from shaders of faucet types currently deployed on the network. It is possible for more than one shader because the Application Shader (",[57,264,105],{},") can interact with several different Contract Shaders (",[57,267,101],{},") of the same type.",[153,270,272],{"id":271},"withdraw-beams-from-contract","Withdraw Beams from contract",[19,274,275,276,278],{},"To withdraw 0.05 Beams from the",[57,277,85],{},"contract, enter the following command:",[164,280,283],{"className":281,"code":282,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file shaders\\faucet\\app.wasm --shader_args=\"role=my_account,action=withdraw,cid=3fdd4171972875e0ac8f0131b3da047e8323cc9c2c8d53327be427c455d2a716,amount=6100000\" -n 127.0.0.1:8501\n",[57,284,282],{"__ignoreMap":78},[19,286,287,288,290,291,294,295,69],{},"You can replace the",[57,289,209],{},"parameter with a different contract ",[57,292,293],{},"ID"," that you received in the previous ",[23,296,298],{"href":297},"using-beamx-faucet-contract-with-cli-wallet#view-contract","steps",[19,300,301,307],{},[52,302,303,304,306],{},"A transaction fee of 0.011 Beams automatically subtracts from the",[57,305,85],{},"contract withdrawal",". In total, the action draws 0.061 Beams + the transaction fee, leaving the user with 0.05 Beams.",[19,309,310],{},"This operation can result in several different outcomes:",[122,312,313,319,326],{},[125,314,315,316,318],{},"Each contract",[57,317,85],{},"limits the amount of Beam coins you can withdraw within a given timeframe. These 'constructor parameters' of the shader specify that you should receive the Beams you have requested when you are under that limit.",[125,320,321,322,325],{},"If you exceed this limit, you will receive nothing or a",[57,323,324],{},"Magical Error 17",", depending on the contract implementation.",[125,327,328,330],{},[57,329,324],{},"can also appear for a different glitch within the contract.",[19,332,333],{},"But how do I know what are the contract parameters?",[153,335,337],{"id":336},"contract-parameters","Contract parameters",[19,339,340],{},"To view all available contract parameters, enter the following:",[164,342,345],{"className":343,"code":344,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file shaders\\faucet\\app.wasm --shader_args=\"role=manager,action=view_params,cid=3fdd4171972875e0ac8f0131b3da047e8323cc9c2c8d53327be427c455d2a716\" -n 127.0.0.1:8501\n",[57,346,344],{"__ignoreMap":78},[164,348,351],{"className":349,"code":350,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file shaders\\faucet\\app.wasm --shader_args=\"role=manager,action=view_params,cid=3fdd4171972875e0ac8f0131b3da047e8323cc9c2c8d53327be427c455d2a716\" -n 127.0.0.1:8501\nI 2021-10-19.17:06:35.384 Beam Wallet 6.1.12023 (mainnet)\nI 2021-10-19.17:06:35.385 Rules signature: 0-ed91a717313c6eb0, 321321-6d622e615cfd29d0, 777777-1ce8f721bf0c9fa7, 1280000-3eaab6ab65b65f94\nI 2021-10-19.17:06:35.386 starting a wallet...\nI 2021-10-19.17:06:35.744 wallet successfully opened...\nExecuting shader...\nShader output: {\"params\": {\"backlogPeriod\": 1440,\"withdrawLimit\": 6100000}}\n",[57,352,350],{"__ignoreMap":78},[19,354,355],{},"The shader output should resemble the following:",[164,357,360],{"className":358,"code":359,"language":169},[167],"\"\": {\"params\": {\"backlogPeriod\": 1440,\"withdrawLimit\": 6100000}}\n",[57,361,359],{"__ignoreMap":78},[19,363,364,365,69],{},"The above output means you can extract up to 0.061 Beam every 1440 blocks from this ",[57,366,367],{},"Facuet",[153,369,371,372],{"id":370},"deposit-beams-tofaucet","Deposit Beams to",[57,373,85],{},[19,375,376,377,379],{},"To deposit the 0.05 Beam to the ",[57,378,85],{}," , enter the following:",[164,381,384],{"className":382,"code":383,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file shaders\\faucet\\app.wasm --shader_args=\"role=my_account,action=deposit,cid=3fdd4171972875e0ac8f0131b3da047e8323cc9c2c8d53327be427c455d2a716,amount=5000000\" -n 127.0.0.1:8501\n",[57,385,383],{"__ignoreMap":78},[19,387,287,388,390,391,393,394,397],{},[57,389,209],{},"parameter with any contract ",[57,392,293],{}," received from the ",[23,395,396],{"href":297},"view contract"," step.",[153,399,401],{"id":400},"create-your-faucet","Create your Faucet",[19,403,404],{},"Since the Faucet is not an 'ownable' contract, creating a different faucet contract with the same parameters is impossible. The solution is to create your own parameters.",[19,406,407,408,410,411,413],{},"Be sure you have to ",[57,409,101],{}," file (located in ",[57,412,105],{}," folder) file to properly deploy the new contract to the blockchain.",[19,415,416],{},"With that out of the way, enter the following command:",[164,418,421],{"className":419,"code":420,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file shaders\u002Ffaucet\u002Fapp.wasm -n 127.0.0.1:8501 --shader_args=\"role=manager,action=create,backlogPeriod=13,withdrawLimit=520000000\" --shader_contract_file shaders\u002Ffaucet\u002Fcontract.wasm\n",[57,422,420],{"__ignoreMap":78},[19,424,425,426,428],{},"Assuming a ",[57,427,85],{}," contract has not run within the last 13 blocks, the contract deployment will be successful, and a new contract will issue the return value.",[19,430,431,432,434,435,437],{},"The final step is to deposit funds into the",[57,433,85],{},"contract and share the contract ",[57,436,293],{}," with another user!",[14,439,441],{"id":440},"beamx-dao-contract","BeamX DAO contract",[19,443,444],{},"The founding mission behind Beam was to make the Beam ecosystem as decentralized as possible. The introduction of the BeamX DAO is another step towards realizing that founding mission. The BeamX DAO empowers BeamX stakeholders with total control over the governance protocol.",[19,446,447],{},"Stakeholders have voting power on every aspect of the ecosystem through the BeamX token.",[19,449,450],{},"BeamX stakeholders are encouraged to vote with the personal voting selection, identity, and financial holdings will all remain private.",[19,452,453],{},"BeamX has a 100M total supply with a 4-year emission schedule. Earn BeamX tokens by staking your Beam coins.",[153,455,457,458,461],{"id":456},"view-all-commands-for-beamxdaocontract","View all commands for BeamX",[57,459,460],{},"DAO","contract",[19,463,464],{},"To view all DAO contract commands, enter the following:",[164,466,469],{"className":467,"code":468,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file Shaders\\dao-core\\app.wasm -n 127.0.0.1:8501\n",[57,470,468],{"__ignoreMap":78},[164,472,475],{"className":473,"code":474,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file Shaders\\dao-core\\app.wasm -n 127.0.0.1:8501\nI 2021-10-21.12:12:37.014 Beam Wallet 6.1.12023 (mainnet)\nI 2021-10-21.12:12:37.015 Rules signature: 0-ed91a717313c6eb0, 321321-6d622e615cfd29d0, 777777-1ce8f721bf0c9fa7, 1280000-3eaab6ab65b65f94\nI 2021-10-21.12:12:37.015 starting a wallet...\nI 2021-10-21.12:12:37.229 wallet successfully opened...\nExecuting shader...\nShader output: {\"roles\": {\"manager\": {\"view\": {},\"explicit_upgrade\": {\"cid\": \"ContractID\"},\n\"view_params\": {\"cid\": \"ContractID\"},\"my_xid\": {},\n\"my_admin_key\": {},\"prealloc_totals\": {\"cid\": \"ContractID\"},\n\"prealloc_view\": {\"cid\": \"ContractID\"},\n\"prealloc_withdraw\": {\"cid\": \"ContractID\",\"amount\": \"Amount\"},\n\"farm_view\": {\"cid\": \"ContractID\"},\n\"farm_get_yield\": {\"cid\": \"ContractID\",\"amount\": \"Amount\",\"hPeriod\": \"Height\"},\n\"farm_totals\": {\"cid\": \"ContractID\"},\n\"farm_update\": {\"cid\": \"ContractID\",\"amountBeamX\": \"Amount\",\"amountBeam\": \"Amount\",\"bLockOrUnlock\": \"uint32_t\"}}}}\n",[57,476,474],{"__ignoreMap":78},[153,478,181],{"id":479},"view-contract-1",[218,481,483,484,461],{"id":482},"retrieve-thedaocontract","Retrieve the",[57,485,460],{},[19,487,488,489,492,493,496,497,499,500,502,503,505,506,508],{},"Be sure the latest version of the",[57,490,491],{},"dao-core","contract folder is within the",[57,494,495],{},"shaders_folder"," hierarchy as previously instructed. Both ",[57,498,105],{},"(",[57,501,85],{},") and",[57,504,101],{},"to deploy your ",[57,507,460],{},"contract.",[230,510,511,518],{},[125,512,234,513],{},[164,514,516],{"className":515,"code":238,"language":169},[167],[57,517,238],{"__ignoreMap":78},[125,519,520,521,527,533,536,537,539,540,542,543],{},"Enter the following command:",[164,522,525],{"className":523,"code":524,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file shaders\u002Fdao-core\u002Fapp.wasm -n 127.0.0.1:8501 --shader_args=\"role=manager,action=view\"\n",[57,526,524],{"__ignoreMap":78},[164,528,531],{"className":529,"code":530,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file shaders\u002Fdao-core\u002Fapp.wasm -n 127.0.0.1:8501 --shader_args=\"role=manager,action=view\"\nI 2021-10-19.16:16:18.853 Beam Wallet 6.1.12023 (mainnet)\nI 2021-10-19.16:16:18.854 Rules signature: 0-ed91a717313c6eb0, 321321-6d622e615cfd29d0, 777777-1ce8f721bf0c9fa7, 1280000-3eaab6ab65b65f94\nI 2021-10-19.16:16:18.854 starting a wallet...\nI 2021-10-19.16:16:19.093 wallet successfully opened...\nExecuting shader...\nShader output: {\"versions\": [{\"Number\": 0,\"Height\": 1464845,\"cid\": \"3db292122e26df7b216ae89ae7504c9068b87273f149059915c6f4abbf72ee2d\"}],\n\"contracts\": [{\"cid\": \"3f3d32e38cb27ac7b5b67343f81cf2f8bc53217eb995cc6c5d78ddc5e7b0642b\",\"Height\": 1464852,\"min_upgrade_delay\": 10000,\n\"min_approvers\": 1,\n\"admins\": [{\"id\": 0,\"pk\": \"cbf7c381febb71d61457cc51d52f5b1ce53b45eee92734d2bdb293d82a25355000\"}],\n\"current_version\": 0}]}\n",[57,532,530],{"__ignoreMap":78},[534,535],"br",{},"The result will display the contract registered to the Beam blockchain.",[534,538],{},"The",[57,541,209],{},"contract output should resemble the following:",[164,544,547],{"className":545,"code":546,"language":169},[167],"\"contracts\": [{\"cid\": \"3f3d32e38cb27ac7b5b67343f81cf2f8bc53217eb995cc6c5d78ddc5e7b0642b\"\n",[57,548,546],{"__ignoreMap":78},[153,550,552],{"id":551},"staking-beam","Staking Beam",[19,554,555],{},[52,556,557],{},"The minimum amount of Beam coins users must stake in order to receive BeamX rewards is 16 Beams!",[19,559,560],{},"To receive BeamX tokens, users must first stake their Beam coins by issuing a contract and claiming their BeamX tokens as rewards. To stake their Beam coins, enter the following command:",[164,562,565],{"className":563,"code":564,"language":169},[167],".\u002Fbeam-wallet  shader --shader_app_file Shaders\u002Fdao-core-masternet\u002Fapp.wasm --shader_args role=manager,action=farm_update,cid=3f3d32e38cb27ac7b5b67343f81cf2f8bc53217eb995cc6c5d78ddc5e7b0642b,amountBeam=1600000000,bLockOrUnlock=1 -n 127.0.0.1:8501\n",[57,566,564],{"__ignoreMap":78},[19,568,569],{},"For this example, we will use the minimum 16 Beam coins required to fulfill the staking requirements of this contract.",[164,571,574],{"className":572,"code":573,"language":169},[167],".\u002Fbeam-wallet  shader --shader_app_file Shaders\u002Fdao-core-masternet\u002Fapp.wasm --shader_args role=manager,action=farm_update,cid=3f3d32e38cb27ac7b5b67343f81cf2f8bc53217eb995cc6c5d78ddc5e7b0642b,amountBeam=1600000000,bLockOrUnlock=1 -n 127.0.0.1:8501\nI 2021-10-21.19:42:42.354 Beam Wallet 6.1.12023 (mainnet)\nI 2021-10-21.19:42:42.354 Rules signature: 0-ed91a717313c6eb0, 321321-6d622e615cfd29d0, 777777-1ce8f721bf0c9fa7, 1280000-3eaab6ab65b65f94\nI 2021-10-21.19:42:42.355 starting a wallet...\nI 2021-10-21.19:42:42.607 wallet successfully opened...\nExecuting shader...\nI 2021-10-21.19:42:42.667 Tip has not been changed\nI 2021-10-21.19:42:42.670 Current state is 1466765-f25f1929fb7fff03\nShader output: {}\nCreating new contract invocation tx on behalf of the shader\n        Comment: Lock\u002FUnlock and get farmed beamX tokens        Send 16 BEAM\n        Total fee: 1100000 GROTH\nI 2021-10-21.19:42:51.192 [784c1ac2d03d4832aa5136d2f3762eb2][1] Get proof for kernel: d973ed7374e571f8\nI 2021-10-21.19:42:51.206 [784c1ac2d03d4832aa5136d2f3762eb2] Transaction completed        \n",[57,575,573],{"__ignoreMap":78},[153,577,579],{"id":578},"view-total-beamx-farmed","View total BeamX farmed",[19,581,582,583,586],{},"To view the total amount of BeamX earned or 'farmed,' enter the",[57,584,585],{},"farm_view"," command:",[164,588,591],{"className":589,"code":590,"language":169},[167],".\u002Fbeam-wallet  shader --shader_app_file Shaders\u002Fdao-core-masternet\u002Fapp.wasm --shader_args role=manager,action=farm_view,cid=3f3d32e38cb27ac7b5b67343f81cf2f8bc53217eb995cc6c5d78ddc5e7b0642b -n 127.0.0.1:8501\n",[57,592,590],{"__ignoreMap":78},[164,594,597],{"className":595,"code":596,"language":169},[167],".\u002Fbeam-wallet  shader --shader_app_file Shaders\u002Fdao-core-masternet\u002Fapp.wasm --shader_args role=manager,action=farm_view,cid=3f3d32e38cb27ac7b5b67343f81cf2f8bc53217eb995cc6c5d78ddc5e7b0642b -n 127.0.0.1:8501\nI 2021-10-21.19:48:56.753 Beam Wallet 6.1.12023 (mainnet)\nI 2021-10-21.19:48:56.754 Rules signature: 0-ed91a717313c6eb0, 321321-6d622e615cfd29d0, 777777-1ce8f721bf0c9fa7, 1280000-3eaab6ab65b65f94\nI 2021-10-21.19:48:56.755 starting a wallet...\nI 2021-10-21.19:48:57.005 wallet successfully opened...\nExecuting shader...\nI 2021-10-21.19:48:57.069 Sync up to 1466769-c8c91bf474915cfe\nI 2021-10-21.19:48:57.069 Synchronizing with node: 0% (0\u002F1)\nI 2021-10-21.19:48:57.081 Synchronizing with node: 100% (1\u002F1)\nI 2021-10-21.19:48:57.081 Current state is 1466769-c8c91bf474915cfe\nShader output: {\"farming\": {\"duation\": 268,\"emission\": 203957381876,\"h\": 1466769,\"h0\": 252840},\n\"user\": {\"beams_locked\": 1600000000,\"beamX_old\": 569592,\"beamX_recent\": 65919,\"beamX\": 635511}}\n",[57,598,596],{"__ignoreMap":78},[19,600,601,602,604],{},"The ",[57,603,491],{}," contract parameters are as follows:",[606,607,608,621],"table",{},[609,610,611],"thead",{},[612,613,614,618],"tr",{},[615,616,617],"th",{},"Parameter",[615,619,620],{},"Definition",[622,623,624,635,645,655],"tbody",{},[612,625,626,632],{},[627,628,629],"td",{},[57,630,631],{},"beams_locked",[627,633,634],{},"The total number of Beams staked.",[612,636,637,642],{},[627,638,639],{},[57,640,641],{},"beamX_old",[627,643,644],{},"The number of BeamX tokens credited to your account.",[612,646,647,652],{},[627,648,649],{},[57,650,651],{},"beamX_recent",[627,653,654],{},"BeamX rewards forecast.",[612,656,657,662],{},[627,658,659],{},[57,660,661],{},"beamX",[627,663,664],{},"The total amount of BeamX tokens available for withdrawing from staking.",[153,666,668],{"id":667},"withdraw-beamx","Withdraw BeamX",[19,670,671,672,679],{},"To view the amount of BeamX available in your wallet with the ",[23,673,675,676],{"href":674},"using-beamx-faucet-contract-with-cli-wallet#farm-view","f",[57,677,678],{},"arm_view"," command.",[19,681,682],{},"To withdraw BeamX, enter the following command:",[164,684,687],{"className":685,"code":686,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file Shaders\u002Fdao-core-masternet\u002Fapp.wasm --shader_args role=manager,action=farm_update,cid=3f3d32e38cb27ac7b5b67343f81cf2f8bc53217eb995cc6c5d78ddc5e7b0642b,amountBeamX=635511 -n 127.0.0.1:8501\n",[57,688,686],{"__ignoreMap":78},[164,690,693],{"className":691,"code":692,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file Shaders\u002Fdao-core-masternet\u002Fapp.wasm --shader_args role=manager,action=farm_update,cid=3f3d32e38cb27ac7b5b67343f81cf2f8bc53217eb995cc6c5d78ddc5e7b0642b,amountBeamX=635511 -n 127.0.0.1:8501\nI 2021-10-21.21:34:07.371 Beam Wallet 6.1.12023 (mainnet)\nI 2021-10-21.21:34:07.371 Rules signature: 0-ed91a717313c6eb0, 321321-6d622e615cfd29d0, 777777-1ce8f721bf0c9fa7, 1280000-3eaab6ab65b65f94\nI 2021-10-21.21:34:07.371 starting a wallet...\nI 2021-10-21.21:34:07.620 wallet successfully opened...\nExecuting shader...\nI 2021-10-21.21:34:07.682 Tip has not been changed\nI 2021-10-21.21:34:07.685 Current state is 1466870-f3aa6e59a16e3c3c\nShader output: {}\nCreating new contract invocation tx on behalf of the shader\n        Comment: Lock\u002FUnlock and get farmed beamX tokens        Recv 635511 ASSET-7-GROTH\n        Total fee: 1100000 GROTH\nI 2021-10-21.21:35:06.460 [1a2ca260c4a74a7ca4261c812ba68ed2][1] Get proof for kernel: 7c87ecc149b7c77a\nI 2021-10-21.21:35:06.475 [1a2ca260c4a74a7ca4261c812ba68ed2] Transaction completed\n",[57,694,692],{"__ignoreMap":78},[153,696,698],{"id":697},"stake-and-withdraw-with-one-transaction","Stake and withdraw with one transaction",[19,700,701],{},"To stake additional Beam coins while withdrawing BeamX tokens, enter the following command:",[164,703,706],{"className":704,"code":705,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file Shaders\u002Fdao-core-masternet\u002Fapp.wasm --shader_args role=manager,action=farm_update,cid=3f3d32e38cb27ac7b5b67343f81cf2f8bc53217eb995cc6c5d78ddc5e7b0642b,amountBeamX=635511,amountBeam=10000000,bLockOrUnlock=1 -n 127.0.0.1:8501\n",[57,707,705],{"__ignoreMap":78},[164,709,712],{"className":710,"code":711,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file Shaders\u002Fdao-core-masternet\u002Fapp.wasm --shader_args role=manager,action=farm_update,cid=3f3d32e38cb27ac7b5b67343f81cf2f8bc53217eb995cc6c5d78ddc5e7b0642b,amountBeamX=635511,amountBeam=10000000,bLockOrUnlock=1 -n 127.0.0.1:8501\nI 2021-10-21.21:39:17.636 Beam Wallet 6.1.12023 (mainnet)\nI 2021-10-21.21:39:17.637 Rules signature: 0-ed91a717313c6eb0, 321321-6d622e615cfd29d0, 777777-1ce8f721bf0c9fa7, 1280000-3eaab6ab65b65f94\nI 2021-10-21.21:39:17.637 starting a wallet...\nI 2021-10-21.21:39:17.886 wallet successfully opened...\nExecuting shader...\nI 2021-10-21.21:39:19.075 Sync up to 1466878-4ee8a74a8f1e1175\nI 2021-10-21.21:39:19.075 Synchronizing with node: 0% (0\u002F1)\nI 2021-10-21.21:39:19.076 Synchronizing with node: 100% (1\u002F1)\nI 2021-10-21.21:39:19.077 Current state is 1466878-4ee8a74a8f1e1175\nShader output: {}\nCreating new contract invocation tx on behalf of the shader\n        Comment: Lock\u002FUnlock and get farmed beamX tokens        Send 10000000 GROTH\n        Recv 635511 ASSET-7-GROTH\n        Total fee: 1100000 GROTH\n",[57,713,711],{"__ignoreMap":78},[19,715,716,717],{},"To withdraw Beam and BeamX with one transaction, specify ",[57,718,719],{},"\"bLockOrUnlock= \"in shader_args where : 0 - withdraw Beam , 1 - send Beam",[19,721,722,725,732,735],{},[57,723,724],{},"--shader_args role=manager,action=farm_update,cid=3f3d32e38cb27ac7b5b67343f81cf2f8bc53217eb995cc6c5d78ddc5e7b0642b,amountBeamX=635511,amountBeam=10000000,",[726,727,729],"mark",{"style":728},"color:blue;",[57,730,731],{},"bLockOrUnlock",[57,733,734],{},"=",[726,736,738],{"style":737},"color:red;",[57,739,740],{},"1",[153,742,744,746],{"id":743},"dao-core-contract-parameters",[57,745,89],{}," contract parameters",[19,748,749,750,752],{},"To view the ",[57,751,491],{}," contract parameters, enter the following command:",[164,754,757],{"className":755,"code":756,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file Shaders\u002Fdao-core-masternet\u002Fapp.wasm --shader_args role=manager,action=view_params,cid=3f3d32e38cb27ac7b5b67343f81cf2f8bc53217eb995cc6c5d78ddc5e7b0642b -n 127.0.0.1:8501\n",[57,758,756],{"__ignoreMap":78},[164,760,763],{"className":761,"code":762,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file Shaders\u002Fdao-core-masternet\u002Fapp.wasm --shader_args role=manager,action=view_params,cid=3f3d32e38cb27ac7b5b67343f81cf2f8bc53217eb995cc6c5d78ddc5e7b0642b -n 127.0.0.1:8501\nI 2021-10-21.22:15:32.925 Beam Wallet 6.1.12023 (mainnet)\nI 2021-10-21.22:15:32.926 Rules signature: 0-ed91a717313c6eb0, 321321-6d622e615cfd29d0, 777777-1ce8f721bf0c9fa7, 1280000-3eaab6ab65b65f94\nI 2021-10-21.22:15:32.927 starting a wallet...\nI 2021-10-21.22:15:33.176 wallet successfully opened...\nExecuting shader...\nI 2021-10-21.22:15:33.238 Tip has not been changed\nI 2021-10-21.22:15:33.240 Current state is 1466907-15c917e6c0cdaa1b\nShader output: {\"params\": {\"aid\": 7,\"locked_beamX\": 9999983410129195,\"locked_beams\": 1126598099627933}}\n",[57,764,762],{"__ignoreMap":78},[19,766,767],{},"The output should resemble the following:",[164,769,772],{"className":770,"code":771,"language":169},[167],"Shader output: \"{\"params\": {\"aid\": 7,\"locked_beamX\": 9999983410129195,\"locked_beams\": 1126598099627933}}\nWhere : \naid = 7 is asset number\nlocked_beamX = BeamX that are still available \nlocked_beams = Total amount in the contract\n",[57,773,771],{"__ignoreMap":78},[19,775,776],{},"To view more details such as the number of users staking Beam coins, enter the following command:",[164,778,781],{"className":779,"code":780,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file Shaders\u002Fdao-core-masternet\u002Fapp.wasm --shader_args role=manager,action=view_farm,cid=3f3d32e38cb27ac7b5b67343f81cf2f8bc53217eb995cc6c5d78ddc5e7b0642b -n 127.0.0.1:8501\n",[57,782,780],{"__ignoreMap":78},[164,784,787],{"className":785,"code":786,"language":169},[167],".\u002Fbeam-wallet shader --shader_app_file Shaders\u002Fdao-core-masternet\u002Fapp.wasm --shader_args role=manager,action=view_farm,cid=3f3d32e38cb27ac7b5b67343f81cf2f8bc53217eb995cc6c5d78ddc5e7b0642b -n 127.0.0.1:8501\nI 2021-10-21.22:55:47.434 Beam Wallet 6.1.12023 (mainnet)\nI 2021-10-21.22:55:47.435 Rules signature: 0-ed91a717313c6eb0, 321321-6d622e615cfd29d0, 777777-1ce8f721bf0c9fa7, 1280000-3eaab6ab65b65f94\nI 2021-10-21.22:55:47.435 starting a wallet...\nI 2021-10-21.22:55:48.634 wallet successfully opened...\nExecuting shader...\nI 2021-10-21.22:55:48.695 Tip has not been changed\nI 2021-10-21.22:55:48.697 Current state is 1466935-6d5753dbb8b989d0\nShader output: {\"duation\": 435,\n\"total\": 100000000000000,\n\"total_users\": 1056,\n\"avail\": 331050228045,\n\"received\": 12621458260,\n\"beam_locked\": 1152179812748426}\n",[57,788,786],{"__ignoreMap":78},[19,790,791],{},"Command paramters from the above output:",[606,793,794,802],{},[609,795,796],{},[612,797,798,800],{},[615,799,617],{},[615,801,620],{},[622,803,804,814,824,834],{},[612,805,806,811],{},[627,807,808],{},[57,809,810],{},"total_users",[627,812,813],{},"The total numer of Beams currently staked.",[612,815,816,821],{},[627,817,818],{},[57,819,820],{},"avail",[627,822,823],{},"The total remaining BeamX coins not yet distributed.",[612,825,826,831],{},[627,827,828],{},[57,829,830],{},"received",[627,832,833],{},"The total amount of BeamX coins distributed.",[612,835,836,841],{},[627,837,838],{},[57,839,840],{},"beam_locked",[627,842,843],{},"The total Beam coins currently being staked.",{"title":78,"searchDepth":845,"depth":845,"links":846},2,[847,848,849,861],{"id":16,"depth":845,"text":17},{"id":46,"depth":845,"text":47},{"id":142,"depth":845,"text":850,"children":851},"Faucet contract",[852,855,856,857,858,860],{"id":155,"depth":853,"text":854},3,"All Faucet contract commands",{"id":180,"depth":853,"text":181},{"id":271,"depth":853,"text":272},{"id":336,"depth":853,"text":337},{"id":370,"depth":853,"text":859},"Deposit Beams toFaucet",{"id":400,"depth":853,"text":401},{"id":440,"depth":845,"text":441,"children":862},[863,865,866,867,868,869,870],{"id":456,"depth":853,"text":864},"View all commands for BeamXDAOcontract",{"id":479,"depth":853,"text":181},{"id":551,"depth":853,"text":552},{"id":578,"depth":853,"text":579},{"id":667,"depth":853,"text":668},{"id":697,"depth":853,"text":698},{"id":743,"depth":853,"text":871},"Dao-core contract parameters","md",null,{},true,"\u002Fdocs\u002Fcli\u002Fusing-beamx-faucet-contract-with-cli-wallet",{"title":5,"description":78},"docs\u002Fcli\u002Fusing-beamx-faucet-contract-with-cli-wallet","PRL6iC2nNC6lqjyU4ny1i-h_AovAl1ws5s3qT6Pawtg",[881,886],{"title":882,"path":883,"stem":884,"description":885,"children":-1},"Troubleshooting CLI","\u002Fdocs\u002Fcli\u002Ftroubleshooting-cli","docs\u002Fcli\u002Ftroubleshooting-cli","The command line troubleshooting guide.",{"title":887,"path":888,"stem":889,"description":890,"children":-1},"AVX","\u002Fdocs\u002Fcore-tech\u002Favx","docs\u002Fcore-tech\u002FAVX","Advanced Vector Extensions (AVX, also known as Sandy Bridge New Extensions) are extensions to the x86 instruction set architecture for microprocessors from Intel and AMD proposed by Intel in March 2008 and first supported by Intel with the Sandy Bridge processor shipping in Q1 2011 and later on by AMD with the Bulldozer processor shipping in Q3 2011. AVX provides new features, new instructions and a new coding scheme.",1783006042872]