Skip to content

Commit fb0417b

Browse files
committed
Initial commit
0 parents  commit fb0417b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+38379
-0
lines changed

.eslintrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"parserOptions": {
3+
"project": "./tsconfig.json"
4+
},
5+
"parser": "@typescript-eslint/parser",
6+
"plugins": ["prettier"],
7+
"rules": {
8+
"indent": "off",
9+
"@typescript-eslint/indent": "off",
10+
"@typescript-eslint/space-before-function-paren": "off",
11+
"@typescript-eslint/explicit-function-return-type": "off",
12+
"@typescript-eslint/restrict-plus-operands": "off",
13+
"@typescript-eslint/strict-boolean-expressions": "off",
14+
"@typescript-eslint/prefer-nullish-coalescing": "off",
15+
"prettier/prettier": ["error"]
16+
}
17+
}

.github/workflows/publish_npm.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: publish_npm
2+
on:
3+
release:
4+
types: [published]
5+
workflow_dispatch:
6+
jobs:
7+
build:
8+
environment: publish
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: "16.x"
16+
registry-url: "https://registry.npmjs.org"
17+
- env:
18+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
19+
run: |
20+
cd sdk
21+
npm ci
22+
npm run build
23+
npm publish --access public

.github/workflows/test.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
anchor_test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: metadaobuilders/anchor-test@v1
17+
with:
18+
anchor-version: '0.24.2'
19+
solana-cli-version: '1.14.3'
20+
node-version: '16.15.1'
21+
- run: cargo fmt -- --check && cargo clippy

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
target
3+
.anchor
4+
.DS_Store
5+
.vscode

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"singleQuote": true,
3+
"semi": true,
4+
"trailingComma": "all",
5+
"tabWidth": 2,
6+
"printWidth": 80
7+
}

Anchor.toml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[registry]
2+
url = "https://anchor.projectserum.com"
3+
4+
[provider]
5+
cluster = "localnet"
6+
wallet = "~/.config/solana/id.json"
7+
8+
[workspace]
9+
members = ["programs/mmm"]
10+
11+
[test.validator]
12+
url = "https://api.devnet.solana.com"
13+
14+
[[test.genesis]]
15+
address = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
16+
program = "tests/deps/token_metadata.so"
17+
18+
[[test.validator.clone]]
19+
address = "CMTQqjzH6Anr9XcPVt73EFDTjWkJWPzH7H6DtvhHcyzV" # community-managed-token
20+
21+
[[test.validator.clone]]
22+
address = "ocp4vWUzA2z2XMYJ3QhM9vWdyoyoQwAFJhRdVTbvo9E" # ocp: open_creator_protocol
23+
24+
[[test.validator.clone]]
25+
address = "6Huqrb4xxmmNA4NufYdgpmspoLmjXFd3qEfteCddLgSz" # ocp: policy (allow all)
26+
27+
[programs.localnet]
28+
mmm = "mmm3XBJg5gk8XJxEKBvdgptZz6SgK4tXvn36sodowMc"
29+
30+
[scripts]
31+
test = "npx ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.spec.ts"

0 commit comments

Comments
 (0)