Skip to content

Commit d737451

Browse files
committed
Add dummy test program
1 parent 9f54c4b commit d737451

File tree

16 files changed

+8395
-0
lines changed

16 files changed

+8395
-0
lines changed

packages/renderers-rust/e2e/dummy/Cargo.lock

Lines changed: 6297 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[package]
2+
name = "codama-renderers-rust-e2e-dummy"
3+
version = "0.0.0"
4+
edition = "2021"
5+
6+
[features]
7+
anchor = ["dep:anchor-lang"]
8+
anchor-idl-build = ["anchor", "anchor-lang?/idl-build"]
9+
serde = ["dep:serde", "dep:serde_with"]
10+
test-sbf = []
11+
12+
[dependencies]
13+
anchor-lang = { version = "0.30.0", optional = true }
14+
borsh = "^0.10"
15+
kaigan = "0.2.5"
16+
num-derive = "^0.3"
17+
num-traits = "^0.2"
18+
serde = { version = "^1.0", features = ["derive"], optional = true }
19+
serde_with = { version = "^3.0", optional = true }
20+
solana-program = "~1.18"
21+
thiserror = "^1.0"
22+
23+
[dev-dependencies]
24+
assert_matches = "1.5.0"
25+
solana-program-test = "~1.18"
26+
solana-sdk = "~1.18"
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
{
2+
"kind": "rootNode",
3+
"program": {
4+
"kind": "programNode",
5+
"pdas": [],
6+
"accounts": [],
7+
"instructions": [
8+
{
9+
"kind": "instructionNode",
10+
"name": "instruction1",
11+
"optionalAccountStrategy": "programId",
12+
"docs": ["Testing instructions with no accounts or arguments"],
13+
"accounts": [],
14+
"arguments": [],
15+
"remainingAccounts": []
16+
},
17+
{
18+
"kind": "instructionNode",
19+
"name": "instruction2",
20+
"optionalAccountStrategy": "programId",
21+
"docs": ["Testing instructions with remaining accounts only"],
22+
"accounts": [],
23+
"arguments": [],
24+
"remainingAccounts": [
25+
{
26+
"kind": "instructionRemainingAccountsNode",
27+
"value": {
28+
"kind": "argumentValueNode",
29+
"name": "remainingAccounts"
30+
},
31+
"isOptional": true,
32+
"isSigner": false
33+
}
34+
]
35+
},
36+
{
37+
"kind": "instructionNode",
38+
"name": "instruction3",
39+
"optionalAccountStrategy": "programId",
40+
"docs": ["Testing instructions with discriminator only"],
41+
"accounts": [],
42+
"arguments": [
43+
{
44+
"kind": "instructionArgumentNode",
45+
"name": "discriminator",
46+
"type": {
47+
"kind": "numberTypeNode",
48+
"format": "u32",
49+
"endian": "le"
50+
},
51+
"docs": [],
52+
"defaultValue": { "kind": "numberValueNode", "number": 42 },
53+
"defaultValueStrategy": "omitted"
54+
}
55+
],
56+
"discriminators": [
57+
{
58+
"kind": "fieldDiscriminatorNode",
59+
"name": "discriminator",
60+
"offset": 0
61+
}
62+
]
63+
},
64+
{
65+
"kind": "instructionNode",
66+
"name": "instruction4",
67+
"optionalAccountStrategy": "programId",
68+
"docs": ["Testing instructions with arguments only"],
69+
"accounts": [],
70+
"arguments": [
71+
{
72+
"kind": "instructionArgumentNode",
73+
"name": "myArgument",
74+
"type": {
75+
"kind": "numberTypeNode",
76+
"format": "u64",
77+
"endian": "le"
78+
},
79+
"docs": []
80+
}
81+
]
82+
},
83+
{
84+
"kind": "instructionNode",
85+
"name": "instruction5",
86+
"optionalAccountStrategy": "programId",
87+
"docs": ["Testing instructions with optional arguments only"],
88+
"accounts": [],
89+
"arguments": [
90+
{
91+
"kind": "instructionArgumentNode",
92+
"name": "myArgument",
93+
"type": {
94+
"kind": "numberTypeNode",
95+
"format": "u64",
96+
"endian": "le"
97+
},
98+
"defaultValue": { "kind": "numberValueNode", "number": 42 },
99+
"docs": []
100+
}
101+
]
102+
},
103+
{
104+
"kind": "instructionNode",
105+
"name": "instruction6",
106+
"optionalAccountStrategy": "programId",
107+
"docs": ["Testing instructions with accounts only"],
108+
"accounts": [
109+
{
110+
"kind": "instructionAccountNode",
111+
"name": "myAccount",
112+
"isWritable": true,
113+
"isSigner": false,
114+
"isOptional": false,
115+
"docs": []
116+
}
117+
],
118+
"arguments": []
119+
},
120+
{
121+
"kind": "instructionNode",
122+
"name": "instruction7",
123+
"optionalAccountStrategy": "programId",
124+
"docs": ["Testing instructions with optional accounts only"],
125+
"accounts": [
126+
{
127+
"kind": "instructionAccountNode",
128+
"name": "myAccount",
129+
"isWritable": true,
130+
"isSigner": false,
131+
"isOptional": true,
132+
"docs": []
133+
}
134+
],
135+
"arguments": []
136+
}
137+
],
138+
"definedTypes": [],
139+
"errors": [],
140+
"name": "dummy",
141+
"prefix": "",
142+
"publicKey": "Dummy11111111111111111111111111111111111111",
143+
"version": "3.0.1",
144+
"origin": "shank"
145+
},
146+
"additionalPrograms": [],
147+
"standard": "codama",
148+
"version": "1.0.0"
149+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//! This code was AUTOGENERATED using the codama library.
2+
//! Please DO NOT EDIT THIS FILE, instead use visitors
3+
//! to add features, then rerun codama to update it.
4+
//!
5+
//! <https://github.com/codama-idl/codama>
6+
//!

0 commit comments

Comments
 (0)