Page 60 - MSDN Magazine, November 2019
P. 60

Figure 7 Invoking the Smart Contract on the PrivateNet
$ neo-express contract invoke HelloWorld --account testWallet {
"contract-context": < omitted for clarity > "script-hashes": < omitted for clarity > "hash-data": < omitted for clarity > "engine-state": {
"state": 1, "gas-consumed": "1.017", "result-stack": []
} }
{ "txid":
"0x785346a3a338d70dd5bee6a70e1fc807a891d23a8d12d138b6a151b5eeae771e" }
$ neo-express contract storage helloWorld 0x48656c6c6f
key (as string) : Hello
value (as bytes) : 0x576f726c64
(as string) : World constant value : False
The imported contract can now be deployed via the contract deploy command.Youmustspecifyawalletaccounttopaythedeployment GAS price. Invoking a smart contract without specifying a wallet account to pay the invocation GAS cost won’t modify the state of the blockchain. For the HelloWorld contract, this means that nothing will be written to blockchain storage. If you want a contract invo- cation to make durable changes, you can specify a wallet account to pay the GAS cost via the --account argument, as shown in Figure 7.
The HelloWorld contract takes no parameters and returns no values. However, it does modify contract storage in the block- chain. You can dump the storage state for a given contract with the contract storage command. This command lists all the key/value pairs in the blockchain, showing both keys and values as both a hex-encoded byte array and as a UTF-8 encoded string.
Wrapping Up
Smart contracts promise to transform our economic institutions, and the economic relationships and transactions that constitute these institutions. With benefits including standardization, security, reduced latency and transaction certainty and more, the benefits of smart contracts span domains ranging from the securities market, through clinical research and trials, to enterprise supply chains.
In this article we’ve focused on the what, why and how of smart contracts and provided a step-by-step approach to developing, debugging and deploying your first smart contract in C#. n
John deVadoss leads development for NEO Global Development in Seattle. Previously he built Microsoft Digital, .NET Patterns & Practices and .NET Archi­ tecture Strategy. He also incubated Microsoft Azure when he was at Microsoft. Most recently, he launched two machine learning start­ups. deVadoss did his Ph.D. work in machine learning, specializing in recurrent neural networks.
Peng huang is a leading industry blockchain platform strategist. Previously at Microsoft he led the Developer Tools and ISV strategy for Greater China, and product management for .NET Patterns & Practices in Redmond. He’s a senior member of ACM and began his career as an Assembly language coder on the SPARC and x86 platforms.
Thanks to the following technical expert for reviewing this article: Harry Pierson
magazine
STATEMENT OF OWNERSHIP, MANAGEMENT AND CIRCULATION
1. Publication Title: MSDN Magazine
2. Publication Number: 1528-4859
3. Filing Date: September 30, 2019
4. Frequency of Issue: Monthly with a special issue in December
5. Number of Issues Published Annually: 13
6. Annual Subscription Price: US $35, International $60
7. Complete Mailing Address of Known Office of Publication: 6300 Canoga Ave., Ste.
1150, Woodland Hills, CA 91367
8. Complete Mailing Address of the Headquarters of General Business Offices of the
Publisher: Same as above.
9. Full Name and Complete Mailing Address of Publisher, Editor, and Managing Editor:
Dan LaBianca, Chief Revenue Officer, 14901 Quorum Drive, Ste 425, Dallas, TX 75254
Michael Desmond, Editor-in-Chief, 8251 Greensboro Drive, Suite 510, McLean, VA 22102
10. Owner(s): 1105 Media, Inc. dba: 101 Communications LLC, 6300 Canoga Ave., Ste. 1150, Woodland Hills, CA 91367 Listing of shareholders in 1105 Media, Inc.
11. Known Bondholders, Mortgagees, and Other Security Holders Owning or Holding
1 Percent or more of the Total Amount of Bonds, Mortgages or Other Securities: Nautic Partners V, L.P., 50 Kennedy Plaza, 12th Flr., Providence, RI 02903 Kennedy Plaza Partners III, LLC, 50 Kennedy Plaza, 12th Flr., Providence, RI 02903 Alta Communications IX, L.P., 1000 Winter Street, South Entrance, Suite 3500, Waltham, MA 02451
Alta Communications IX, B-L.P., 1000 Winter Street, South Entrance, Suite 3500, Waltham, MA 02451
Alta Communications IX, Associates LLC, 1000 Winter Street, South Entrance, Suite 3500, Waltham, MA 02451
12. The tax status has not changed during the preceding 12 months.
13. Publication Title: MSDN Magazine
14. Issue date for Circulation Data Below: September 2019
15. Extent & Nature of Circulation:
a. b.
c.
e. f. g. h. i.
Total Number of Copies (Net Press Run) Legitimate Paid/and or Requested Distribution
1. Outside County Paid/Requested Mail Subscriptions Stated on PS Form 3541
2. In-County Paid/Requested Mail Subscriptions Stated on PS Form 3541
3. Sales Through Dealers and Carriers, Street Vendors, Counter Sales, and Other Paid or Requested Distribution Outside USPS®
4. Requested Copies Distributed by Other Mail Classes Through the USPS®
Total Paid and/or Requested Circulation Nonrequested Distribution
1. Outside County Nonrequested Copies
Stated on PS Form 3541
2. In-County Nonrequested Copies Distribution
Stated on PS Form 3541
3. Nonrequested Copies Distribution Through
the USPS by Other Classes of Mail
4. Nonrequested Copies Distributed
Outside the Mail
Total Nonrequested Distribution
Total Distribution Copies not Distributed
Total
Percent paid and/or Requested Circulation 16. Electronic Copy Circulation
69,855 47,065
0 755
0
47,820
21,496
0
0
461
21,957 69,777 78 69,855 68.53%
a. Requested and Paid Electronic Copies
b. Total Requested and Paid Print Copies (Line 15c) + Requested/Paid Electronic
Copies
c. Total Requested Copy Distribution (Line15f) + Requested/Paid Electronic
Copies (Line 16a)
d. Percent Paid and/or Requested Circulation (Both print & Electronic Copies)
(16b divided by 16c x 100)
þ I certify that 50% of all my distributed copies (electronic and paid print
are legitimate request or paid copies.
17. Publication of Statement of Ownership for a Requester Publication is required and will be printed in the November 2019 issue of this publication.
18. I certify that all information furnished on this form is true and complete: Tillie Carlin, Manager, Print Production
Average No. Copies Each Month During Preceding 12 Months
No. Copies of Single Issue Published Nearest to Filing Date
64,950 34,508
0 667
0
35,175
29,526
0
0
205
29,731 64,906 44 64,950 54.19%


































































































   58   59   60   61   62