File tree Expand file tree Collapse file tree 3 files changed +5
-20
lines changed Expand file tree Collapse file tree 3 files changed +5
-20
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ lets the VM assume it worked.
162162| Language | CU Usage |
163163| --- | --- |
164164| Rust | 464 |
165- | Zig | 186 |
165+ | Zig | 43 |
166166| C | 103 |
167167| Assembly | 22 |
168168
Original file line number Diff line number Diff line change 1515 // Once all dependencies are fetched, `zig build` no longer requires
1616 // internet connectivity.
1717 .dependencies = .{
18- .base58 = .{
19- .url = "https://github.com/joncinque/base58-zig/archive/refs/tags/v0.13.3.tar.gz" ,
20- .hash = "1220fd067bf167b9062cc29ccf715ff97643c2d3f8958beea863b6036876bb71bcb8" ,
21- },
2218 .@"solana-program-sdk" = .{
23- .url = "https://github.com/joncinque/solana-program-sdk-zig/archive/refs/tags/v0.13.1 .tar.gz" ,
24- .hash = "122030336f1257e3c0aa64243f5243f554b903c6b9ef3a91d48bfbe896c0c7d9b13b " ,
19+ .url = "https://github.com/joncinque/solana-program-sdk-zig/archive/refs/tags/v0.14.0 .tar.gz" ,
20+ .hash = "1220bdfa4ea1ab6330959ce4bc40feb5b39a7f98923a266a94b69e27fd20c3526786 " ,
2521 },
2622 },
27-
28- // Specifies the set of files and directories that are included in this package.
29- // Only files and directories listed here are included in the `hash` that
30- // is computed for this package.
31- // Paths are relative to the build root. Use the empty string (`""`) to refer to
32- // the build root itself.
33- // A directory listed here means that all files within, recursively, are included.
3423 .paths = .{
3524 "build.zig" ,
3625 "build.zig.zon" ,
Original file line number Diff line number Diff line change @@ -2,13 +2,9 @@ const sol = @import("solana-program-sdk");
22
33export fn entrypoint (input : [* ]u8 ) u64 {
44 const context = sol .Context .load (input ) catch return 1 ;
5- const accounts = context .loadRawAccounts (sol .allocator ) catch return 1 ;
6- defer accounts .deinit ();
7-
8- const source = accounts .items [0 ];
9- const destination = accounts .items [1 ];
5+ const source = context .accounts [0 ];
6+ const destination = context .accounts [1 ];
107 source .lamports ().* -= 5 ;
118 destination .lamports ().* += 5 ;
12-
139 return 0 ;
1410}
You can’t perform that action at this time.
0 commit comments