Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey committed Jun 29, 2024
1 parent f451910 commit 7901a3f
Show file tree
Hide file tree
Showing 6 changed files with 235 additions and 335 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"version": "0.4.0",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist/"
],
"files": ["dist/"],
"license": "MIT",
"devDependencies": {
"@coral-xyz/anchor": "^0.30.0",
Expand Down
159 changes: 66 additions & 93 deletions tests/anchor-example/puppet.json
Original file line number Diff line number Diff line change
@@ -1,95 +1,68 @@
{
"address": "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS",
"metadata": {
"name": "puppet",
"version": "0.1.0",
"spec": "0.1.0",
"description": "Created with Anchor"
},
"instructions": [
{
"name": "initialize",
"discriminator": [
175,
175,
109,
31,
13,
152,
155,
237
],
"accounts": [
{
"name": "puppet",
"writable": true,
"signer": true
},
{
"name": "user",
"writable": true,
"signer": true
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": []
},
{
"name": "set_data",
"discriminator": [
223,
114,
91,
136,
197,
78,
153,
153
],
"accounts": [
{
"name": "puppet",
"writable": true
}
],
"args": [
{
"name": "data",
"type": "u64"
}
]
}
],
"accounts": [
{
"name": "Data",
"discriminator": [
206,
156,
59,
188,
18,
79,
240,
232
]
}
],
"types": [
{
"name": "Data",
"type": {
"kind": "struct",
"fields": [
{
"name": "data",
"type": "u64"
}
]
}
}
]
"address": "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS",
"metadata": {
"name": "puppet",
"version": "0.1.0",
"spec": "0.1.0",
"description": "Created with Anchor"
},
"instructions": [
{
"name": "initialize",
"discriminator": [175, 175, 109, 31, 13, 152, 155, 237],
"accounts": [
{
"name": "puppet",
"writable": true,
"signer": true
},
{
"name": "user",
"writable": true,
"signer": true
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": []
},
{
"name": "set_data",
"discriminator": [223, 114, 91, 136, 197, 78, 153, 153],
"accounts": [
{
"name": "puppet",
"writable": true
}
],
"args": [
{
"name": "data",
"type": "u64"
}
]
}
],
"accounts": [
{
"name": "Data",
"discriminator": [206, 156, 59, 188, 18, 79, 240, 232]
}
],
"types": [
{
"name": "Data",
"type": {
"kind": "struct",
"fields": [
{
"name": "data",
"type": "u64"
}
]
}
}
]
}
162 changes: 67 additions & 95 deletions tests/anchor-example/puppet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,98 +5,70 @@
* IDL can be found at `target/idl/puppet.json`.
*/
export type Puppet = {
"address": "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS",
"metadata": {
"name": "puppet",
"version": "0.1.0",
"spec": "0.1.0",
"description": "Created with Anchor"
},
"instructions": [
{
"name": "initialize",
"discriminator": [
175,
175,
109,
31,
13,
152,
155,
237
],
"accounts": [
{
"name": "puppet",
"writable": true,
"signer": true
},
{
"name": "user",
"writable": true,
"signer": true
},
{
"name": "systemProgram",
"address": "11111111111111111111111111111111"
}
],
"args": []
},
{
"name": "setData",
"discriminator": [
223,
114,
91,
136,
197,
78,
153,
153
],
"accounts": [
{
"name": "puppet",
"writable": true
}
],
"args": [
{
"name": "data",
"type": "u64"
}
]
}
],
"accounts": [
{
"name": "data",
"discriminator": [
206,
156,
59,
188,
18,
79,
240,
232
]
}
],
"types": [
{
"name": "data",
"type": {
"kind": "struct",
"fields": [
{
"name": "data",
"type": "u64"
}
]
}
}
]
};

address: "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS";
metadata: {
name: "puppet";
version: "0.1.0";
spec: "0.1.0";
description: "Created with Anchor";
};
instructions: [
{
name: "initialize";
discriminator: [175, 175, 109, 31, 13, 152, 155, 237];
accounts: [
{
name: "puppet";
writable: true;
signer: true;
},
{
name: "user";
writable: true;
signer: true;
},
{
name: "systemProgram";
address: "11111111111111111111111111111111";
},
];
args: [];
},
{
name: "setData";
discriminator: [223, 114, 91, 136, 197, 78, 153, 153];
accounts: [
{
name: "puppet";
writable: true;
},
];
args: [
{
name: "data";
type: "u64";
},
];
},
];
accounts: [
{
name: "data";
discriminator: [206, 156, 59, 188, 18, 79, 240, 232];
},
];
types: [
{
name: "data";
type: {
kind: "struct";
fields: [
{
name: "data";
type: "u64";
},
];
};
},
];
};
Loading

0 comments on commit 7901a3f

Please sign in to comment.