-
Notifications
You must be signed in to change notification settings - Fork 627
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f780547
commit d49def3
Showing
4 changed files
with
312 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Shoutout to Nader Dabit for helping w/ this! | ||
// https://twitter.com/dabit3 | ||
|
||
const fs = require('fs') | ||
const anchor = require("@project-serum/anchor") | ||
|
||
const account = anchor.web3.Keypair.generate() | ||
|
||
fs.writeFileSync('./keypair.json', JSON.stringify(account)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
{ | ||
"version": "0.0.0", | ||
"name": "myepicproject2", | ||
"instructions": [ | ||
{ | ||
"name": "startStuffOff", | ||
"accounts": [ | ||
{ | ||
"name": "baseAccount", | ||
"isMut": true, | ||
"isSigner": true | ||
}, | ||
{ | ||
"name": "user", | ||
"isMut": true, | ||
"isSigner": true | ||
}, | ||
{ | ||
"name": "systemProgram", | ||
"isMut": false, | ||
"isSigner": false | ||
} | ||
], | ||
"args": [] | ||
}, | ||
{ | ||
"name": "addPicture", | ||
"accounts": [ | ||
{ | ||
"name": "baseAccount", | ||
"isMut": true, | ||
"isSigner": false | ||
} | ||
], | ||
"args": [ | ||
{ | ||
"name": "pictureLink", | ||
"type": "string" | ||
} | ||
] | ||
} | ||
], | ||
"accounts": [ | ||
{ | ||
"name": "BaseAccount", | ||
"type": { | ||
"kind": "struct", | ||
"fields": [ | ||
{ | ||
"name": "totalPictures", | ||
"type": "u64" | ||
}, | ||
{ | ||
"name": "pictureList", | ||
"type": { | ||
"vec": { | ||
"defined": "ItemStruct" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"types": [ | ||
{ | ||
"name": "ItemStruct", | ||
"type": { | ||
"kind": "struct", | ||
"fields": [ | ||
{ | ||
"name": "pictureLink", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "userAddress", | ||
"type": "publicKey" | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"metadata": { | ||
"address": "GAE6uLmRpzy794wz8UQvDkK89LbLyzVadopBMhLKHofW" | ||
} | ||
} |