Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add support for newer IDL standard #6

Merged
merged 2 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SharedBuildProperties.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Product>Solana.Unity.Anchor</Product>
<Version>0.2.11</Version>
<Version>0.2.12</Version>
<Copyright>Copyright 2023 &#169; Magicblock</Copyright>
<Authors>Magicblock</Authors>
<PublisherName>Magicblock</PublisherName>
Expand Down
227 changes: 227 additions & 0 deletions Solana.Unity.Anchor.Test/Resources/PlayerData.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
{
"address": "EragBXpF9jU2fxZh2FQC4ZWksrxkujdwcx6mcU5CoRB3",
"metadata": {
"name": "playerdata",
"version": "0.1.5",
"spec": "0.1.0",
"description": "Created with Bolt"
},
"instructions": [
{
"name": "initialize",
"discriminator": [
175,
175,
109,
31,
13,
152,
155,
237
],
"accounts": [
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "data",
"writable": true
},
{
"name": "entity"
},
{
"name": "authority"
},
{
"name": "instruction_sysvar_account",
"address": "Sysvar1nstructions1111111111111111111111111"
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": []
},
{
"name": "update",
"discriminator": [
219,
200,
88,
176,
158,
63,
253,
127
],
"accounts": [
{
"name": "bolt_component",
"writable": true
},
{
"name": "authority"
},
{
"name": "instruction_sysvar_account",
"address": "Sysvar1nstructions1111111111111111111111111"
}
],
"args": [
{
"name": "data",
"type": "bytes"
}
]
}
],
"accounts": [
{
"name": "Entity",
"discriminator": [
46,
157,
161,
161,
254,
46,
79,
24
]
},
{
"name": "PlayerData",
"discriminator": [
197,
65,
216,
202,
43,
139,
147,
128
]
}
],
"errors": [
{
"code": 6000,
"name": "PlayerDataNotInitialized",
"msg": "Player Data is not initialized."
},
{
"code": 6001,
"name": "PlayerDataAlreadyInitialized",
"msg": "Player Data cannot be initialized multiple times."
},
{
"code": 6002,
"name": "InvalidOwner",
"msg": "Signer did not have authority over entity."
},
{
"code": 6003,
"name": "NotActive",
"msg": "Player not active in world"
}
],
"types": [
{
"name": "BoltMetadata",
"docs": [
"Metadata for the component."
],
"type": {
"kind": "struct",
"fields": [
{
"name": "authority",
"type": "pubkey"
}
]
}
},
{
"name": "Entity",
"type": {
"kind": "struct",
"fields": [
{
"name": "id",
"type": "u64"
}
]
}
},
{
"name": "Heading",
"type": {
"kind": "enum",
"variants": [
{
"name": "North"
},
{
"name": "East"
},
{
"name": "South"
},
{
"name": "West"
}
]
}
},
{
"name": "PlayerData",
"type": {
"kind": "struct",
"fields": [
{
"name": "is_active",
"type": "bool"
},
{
"name": "owner",
"type": {
"option": "pubkey"
}
},
{
"name": "world_pos_x",
"type": {
"option": "i32"
}
},
{
"name": "world_pos_y",
"type": {
"option": "i32"
}
},
{
"name": "heading",
"type": {
"defined": {
"name": "Heading"
}
}
},
{
"name": "bolt_metadata",
"type": {
"defined": {
"name": "BoltMetadata"
}
}
}
]
}
}
]
}
Loading
Loading