├── .env.example ├── .gitignore ├── Anchor.toml ├── Cargo.lock ├── Cargo.toml ├── app ├── .env.example ├── .eslintrc ├── .gitignore ├── README.md ├── next-env.d.ts ├── next.config.js ├── package.json ├── pages │ ├── _app.tsx │ ├── _document.tsx │ └── index.tsx ├── public │ ├── favicon.ico │ ├── macro.png │ ├── sol.png │ └── vercel.svg ├── src │ ├── components │ │ ├── ConnectButton │ │ │ └── index.tsx │ │ ├── Footer │ │ │ ├── Footer.module.css │ │ │ └── index.tsx │ │ ├── Notify │ │ │ └── index.tsx │ │ ├── SwapButton │ │ │ ├── SwapButton.module.css │ │ │ └── index.tsx │ │ ├── WalletConnectionProvider │ │ │ └── index.tsx │ │ ├── layout │ │ │ ├── Layout.tsx │ │ │ ├── MainNavigation.module.css │ │ │ └── MainNavigation.tsx │ │ └── swap │ │ │ ├── RateBox.tsx │ │ │ ├── SolDropdown.tsx │ │ │ ├── SwapInterface.module.css │ │ │ ├── SwapInterface.tsx │ │ │ └── TokenDropdown.tsx │ ├── interactions │ │ ├── common.ts │ │ ├── macro.ts │ │ ├── macroswap.ts │ │ └── sol.ts │ ├── utils │ │ ├── bigNumber.ts │ │ └── index.ts │ └── web3 │ │ ├── idl │ │ ├── macroswap.json │ │ └── macroswap.ts │ │ └── index.ts ├── styles │ ├── Home.module.css │ ├── Stats.module.css │ └── globals.css ├── tsconfig.json └── yarn.lock ├── migrations └── script.ts ├── package.json ├── programs └── macroswap │ ├── Cargo.toml │ ├── Xargo.toml │ └── src │ ├── account.rs │ ├── context.rs │ ├── error.rs │ ├── event.rs │ └── lib.rs ├── tests ├── macroswap.ts └── utils.ts ├── tsconfig.json └── yarn.lock /.env.example: -------------------------------------------------------------------------------- 1 | SECRET_KEY=1,2,3,4 2 | PROGRAM_ID=QWERTYUIOP 3 | RPC_URL=http://127.0.0.1:8899 4 | ANCHOR_WALLET=$HOME/.config/solana/id.json 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | wallet 2 | test-ledger 3 | .anchor 4 | .DS_Store 5 | target 6 | **/*.rs.bk 7 | node_modules 8 | .env -------------------------------------------------------------------------------- /Anchor.toml: -------------------------------------------------------------------------------- 1 | [programs.localnet] 2 | macroswap = "FqwbZ8hJwL2uaANW61tXA7JX6KUQq4THhaeUb2AXnMPj" 3 | 4 | [programs.devnet] 5 | macroswap = "FqwbZ8hJwL2uaANW61tXA7JX6KUQq4THhaeUb2AXnMPj" 6 | 7 | [registry] 8 | url = "https://anchor.projectserum.com" 9 | 10 | [provider] 11 | cluster = "devnet" 12 | wallet = "/Users/riomain/.config/solana/id.json" 13 | 14 | [scripts] 15 | test = "ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" 16 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "ahash" 7 | version = "0.4.7" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" 10 | 11 | [[package]] 12 | name = "aho-corasick" 13 | version = "0.7.18" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" 16 | dependencies = [ 17 | "memchr", 18 | ] 19 | 20 | [[package]] 21 | name = "alloc-traits" 22 | version = "0.1.1" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "6b2d54853319fd101b8dd81de382bcbf3e03410a64d8928bbee85a3e7dcde483" 25 | 26 | [[package]] 27 | name = "anchor-attribute-access-control" 28 | version = "0.17.0" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "7b8ab97bfde16e49bc399586a857e9bd56e7c867a66a89ca809134d53d999138" 31 | dependencies = [ 32 | "anchor-syn", 33 | "anyhow", 34 | "proc-macro2", 35 | "quote", 36 | "regex", 37 | "syn", 38 | ] 39 | 40 | [[package]] 41 | name = "anchor-attribute-account" 42 | version = "0.17.0" 43 | source = "registry+https://github.com/rust-lang/crates.io-index" 44 | checksum = "40d3c2f1ebf823c4a8f0e41c57125991713177d4f02957600f8c1da8bd87adfd" 45 | dependencies = [ 46 | "anchor-syn", 47 | "anyhow", 48 | "bs58 0.4.0", 49 | "proc-macro2", 50 | "quote", 51 | "rustversion", 52 | "syn", 53 | ] 54 | 55 | [[package]] 56 | name = "anchor-attribute-error" 57 | version = "0.17.0" 58 | source = "registry+https://github.com/rust-lang/crates.io-index" 59 | checksum = "f8b5b954878c4cb1ad373143b42765abaf789691e13dbd0a3a8707dbfd0612cd" 60 | dependencies = [ 61 | "anchor-syn", 62 | "proc-macro2", 63 | "quote", 64 | "syn", 65 | ] 66 | 67 | [[package]] 68 | name = "anchor-attribute-event" 69 | version = "0.17.0" 70 | source = "registry+https://github.com/rust-lang/crates.io-index" 71 | checksum = "418daba265c778d2386c27191b4ec927c24be270ed6a8667be81de9e541c7a3e" 72 | dependencies = [ 73 | "anchor-syn", 74 | "anyhow", 75 | "proc-macro2", 76 | "quote", 77 | "syn", 78 | ] 79 | 80 | [[package]] 81 | name = "anchor-attribute-interface" 82 | version = "0.17.0" 83 | source = "registry+https://github.com/rust-lang/crates.io-index" 84 | checksum = "fd2159348897db16999d76ff396ba8722fb101e0e0cc6845b3722eb7472bd0d0" 85 | dependencies = [ 86 | "anchor-syn", 87 | "anyhow", 88 | "heck", 89 | "proc-macro2", 90 | "quote", 91 | "syn", 92 | ] 93 | 94 | [[package]] 95 | name = "anchor-attribute-program" 96 | version = "0.17.0" 97 | source = "registry+https://github.com/rust-lang/crates.io-index" 98 | checksum = "e6695b491d73439ad9839565beb0749107f5acca6d96b4cbaaaef428ba7b6c11" 99 | dependencies = [ 100 | "anchor-syn", 101 | "anyhow", 102 | "proc-macro2", 103 | "quote", 104 | "syn", 105 | ] 106 | 107 | [[package]] 108 | name = "anchor-attribute-state" 109 | version = "0.17.0" 110 | source = "registry+https://github.com/rust-lang/crates.io-index" 111 | checksum = "4bcbbeade2b868e597b55d90418dc51334c4e388f988c0eea1af5d511083ed10" 112 | dependencies = [ 113 | "anchor-syn", 114 | "anyhow", 115 | "proc-macro2", 116 | "quote", 117 | "syn", 118 | ] 119 | 120 | [[package]] 121 | name = "anchor-derive-accounts" 122 | version = "0.17.0" 123 | source = "registry+https://github.com/rust-lang/crates.io-index" 124 | checksum = "dc82ef304c38e7529883176c428acfab9a7bb9e851aa694fff53c8789fbc47b3" 125 | dependencies = [ 126 | "anchor-syn", 127 | "anyhow", 128 | "proc-macro2", 129 | "quote", 130 | "syn", 131 | ] 132 | 133 | [[package]] 134 | name = "anchor-lang" 135 | version = "0.17.0" 136 | source = "registry+https://github.com/rust-lang/crates.io-index" 137 | checksum = "ff6b7025eb65638005fd2af58e2bd136b61c2ecbadda379e908a5af541351a3a" 138 | dependencies = [ 139 | "anchor-attribute-access-control", 140 | "anchor-attribute-account", 141 | "anchor-attribute-error", 142 | "anchor-attribute-event", 143 | "anchor-attribute-interface", 144 | "anchor-attribute-program", 145 | "anchor-attribute-state", 146 | "anchor-derive-accounts", 147 | "base64 0.13.0", 148 | "borsh", 149 | "bytemuck", 150 | "solana-program", 151 | "thiserror", 152 | ] 153 | 154 | [[package]] 155 | name = "anchor-spl" 156 | version = "0.17.0" 157 | source = "registry+https://github.com/rust-lang/crates.io-index" 158 | checksum = "b49dfaf04f0794ecbdafa1f5dda93d47fc042ae70478fc079194c6c7cd265e94" 159 | dependencies = [ 160 | "anchor-lang", 161 | "lazy_static", 162 | "serum_dex", 163 | "solana-program", 164 | "spl-associated-token-account", 165 | "spl-token", 166 | ] 167 | 168 | [[package]] 169 | name = "anchor-syn" 170 | version = "0.17.0" 171 | source = "registry+https://github.com/rust-lang/crates.io-index" 172 | checksum = "321cca8ea1c35b199956e11b2869e8b1b1ae2d547326a12fc45375d0806470c8" 173 | dependencies = [ 174 | "anyhow", 175 | "bs58 0.3.1", 176 | "heck", 177 | "proc-macro2", 178 | "proc-macro2-diagnostics", 179 | "quote", 180 | "serde", 181 | "serde_json", 182 | "sha2", 183 | "syn", 184 | "thiserror", 185 | ] 186 | 187 | [[package]] 188 | name = "anyhow" 189 | version = "1.0.44" 190 | source = "registry+https://github.com/rust-lang/crates.io-index" 191 | checksum = "61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1" 192 | 193 | [[package]] 194 | name = "arrayref" 195 | version = "0.3.6" 196 | source = "registry+https://github.com/rust-lang/crates.io-index" 197 | checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" 198 | 199 | [[package]] 200 | name = "arrayvec" 201 | version = "0.5.2" 202 | source = "registry+https://github.com/rust-lang/crates.io-index" 203 | checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" 204 | 205 | [[package]] 206 | name = "atty" 207 | version = "0.2.14" 208 | source = "registry+https://github.com/rust-lang/crates.io-index" 209 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 210 | dependencies = [ 211 | "hermit-abi", 212 | "libc", 213 | "winapi", 214 | ] 215 | 216 | [[package]] 217 | name = "autocfg" 218 | version = "1.0.1" 219 | source = "registry+https://github.com/rust-lang/crates.io-index" 220 | checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" 221 | 222 | [[package]] 223 | name = "base64" 224 | version = "0.12.3" 225 | source = "registry+https://github.com/rust-lang/crates.io-index" 226 | checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" 227 | 228 | [[package]] 229 | name = "base64" 230 | version = "0.13.0" 231 | source = "registry+https://github.com/rust-lang/crates.io-index" 232 | checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 233 | 234 | [[package]] 235 | name = "bincode" 236 | version = "1.3.3" 237 | source = "registry+https://github.com/rust-lang/crates.io-index" 238 | checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" 239 | dependencies = [ 240 | "serde", 241 | ] 242 | 243 | [[package]] 244 | name = "blake3" 245 | version = "0.3.8" 246 | source = "registry+https://github.com/rust-lang/crates.io-index" 247 | checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3" 248 | dependencies = [ 249 | "arrayref", 250 | "arrayvec", 251 | "cc", 252 | "cfg-if 0.1.10", 253 | "constant_time_eq", 254 | "crypto-mac", 255 | "digest 0.9.0", 256 | ] 257 | 258 | [[package]] 259 | name = "block-buffer" 260 | version = "0.9.0" 261 | source = "registry+https://github.com/rust-lang/crates.io-index" 262 | checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" 263 | dependencies = [ 264 | "block-padding", 265 | "generic-array 0.14.4", 266 | ] 267 | 268 | [[package]] 269 | name = "block-padding" 270 | version = "0.2.1" 271 | source = "registry+https://github.com/rust-lang/crates.io-index" 272 | checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" 273 | 274 | [[package]] 275 | name = "borsh" 276 | version = "0.9.1" 277 | source = "registry+https://github.com/rust-lang/crates.io-index" 278 | checksum = "18dda7dc709193c0d86a1a51050a926dc3df1cf262ec46a23a25dba421ea1924" 279 | dependencies = [ 280 | "borsh-derive", 281 | "hashbrown", 282 | ] 283 | 284 | [[package]] 285 | name = "borsh-derive" 286 | version = "0.9.1" 287 | source = "registry+https://github.com/rust-lang/crates.io-index" 288 | checksum = "684155372435f578c0fa1acd13ebbb182cc19d6b38b64ae7901da4393217d264" 289 | dependencies = [ 290 | "borsh-derive-internal", 291 | "borsh-schema-derive-internal", 292 | "proc-macro-crate 0.1.5", 293 | "proc-macro2", 294 | "syn", 295 | ] 296 | 297 | [[package]] 298 | name = "borsh-derive-internal" 299 | version = "0.9.1" 300 | source = "registry+https://github.com/rust-lang/crates.io-index" 301 | checksum = "2102f62f8b6d3edeab871830782285b64cc1830168094db05c8e458f209bc5c3" 302 | dependencies = [ 303 | "proc-macro2", 304 | "quote", 305 | "syn", 306 | ] 307 | 308 | [[package]] 309 | name = "borsh-schema-derive-internal" 310 | version = "0.9.1" 311 | source = "registry+https://github.com/rust-lang/crates.io-index" 312 | checksum = "196c978c4c9b0b142d446ef3240690bf5a8a33497074a113ff9a337ccb750483" 313 | dependencies = [ 314 | "proc-macro2", 315 | "quote", 316 | "syn", 317 | ] 318 | 319 | [[package]] 320 | name = "bs58" 321 | version = "0.3.1" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" 324 | 325 | [[package]] 326 | name = "bs58" 327 | version = "0.4.0" 328 | source = "registry+https://github.com/rust-lang/crates.io-index" 329 | checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" 330 | 331 | [[package]] 332 | name = "bv" 333 | version = "0.11.1" 334 | source = "registry+https://github.com/rust-lang/crates.io-index" 335 | checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" 336 | dependencies = [ 337 | "feature-probe", 338 | "serde", 339 | ] 340 | 341 | [[package]] 342 | name = "bytemuck" 343 | version = "1.7.2" 344 | source = "registry+https://github.com/rust-lang/crates.io-index" 345 | checksum = "72957246c41db82b8ef88a5486143830adeb8227ef9837740bdec67724cf2c5b" 346 | 347 | [[package]] 348 | name = "byteorder" 349 | version = "1.4.3" 350 | source = "registry+https://github.com/rust-lang/crates.io-index" 351 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 352 | 353 | [[package]] 354 | name = "cc" 355 | version = "1.0.71" 356 | source = "registry+https://github.com/rust-lang/crates.io-index" 357 | checksum = "79c2681d6594606957bbb8631c4b90a7fcaaa72cdb714743a437b156d6a7eedd" 358 | 359 | [[package]] 360 | name = "cfg-if" 361 | version = "0.1.10" 362 | source = "registry+https://github.com/rust-lang/crates.io-index" 363 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 364 | 365 | [[package]] 366 | name = "cfg-if" 367 | version = "1.0.0" 368 | source = "registry+https://github.com/rust-lang/crates.io-index" 369 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 370 | 371 | [[package]] 372 | name = "constant_time_eq" 373 | version = "0.1.5" 374 | source = "registry+https://github.com/rust-lang/crates.io-index" 375 | checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" 376 | 377 | [[package]] 378 | name = "cpufeatures" 379 | version = "0.2.1" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" 382 | dependencies = [ 383 | "libc", 384 | ] 385 | 386 | [[package]] 387 | name = "crunchy" 388 | version = "0.2.2" 389 | source = "registry+https://github.com/rust-lang/crates.io-index" 390 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 391 | 392 | [[package]] 393 | name = "crypto-mac" 394 | version = "0.8.0" 395 | source = "registry+https://github.com/rust-lang/crates.io-index" 396 | checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" 397 | dependencies = [ 398 | "generic-array 0.14.4", 399 | "subtle", 400 | ] 401 | 402 | [[package]] 403 | name = "curve25519-dalek" 404 | version = "2.1.3" 405 | source = "registry+https://github.com/rust-lang/crates.io-index" 406 | checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" 407 | dependencies = [ 408 | "byteorder", 409 | "digest 0.8.1", 410 | "rand_core", 411 | "subtle", 412 | "zeroize", 413 | ] 414 | 415 | [[package]] 416 | name = "derivative" 417 | version = "2.2.0" 418 | source = "registry+https://github.com/rust-lang/crates.io-index" 419 | checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" 420 | dependencies = [ 421 | "proc-macro2", 422 | "quote", 423 | "syn", 424 | ] 425 | 426 | [[package]] 427 | name = "digest" 428 | version = "0.8.1" 429 | source = "registry+https://github.com/rust-lang/crates.io-index" 430 | checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" 431 | dependencies = [ 432 | "generic-array 0.12.4", 433 | ] 434 | 435 | [[package]] 436 | name = "digest" 437 | version = "0.9.0" 438 | source = "registry+https://github.com/rust-lang/crates.io-index" 439 | checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" 440 | dependencies = [ 441 | "generic-array 0.14.4", 442 | ] 443 | 444 | [[package]] 445 | name = "either" 446 | version = "1.6.1" 447 | source = "registry+https://github.com/rust-lang/crates.io-index" 448 | checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" 449 | 450 | [[package]] 451 | name = "enumflags2" 452 | version = "0.6.4" 453 | source = "registry+https://github.com/rust-lang/crates.io-index" 454 | checksum = "83c8d82922337cd23a15f88b70d8e4ef5f11da38dd7cdb55e84dd5de99695da0" 455 | dependencies = [ 456 | "enumflags2_derive", 457 | ] 458 | 459 | [[package]] 460 | name = "enumflags2_derive" 461 | version = "0.6.4" 462 | source = "registry+https://github.com/rust-lang/crates.io-index" 463 | checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce" 464 | dependencies = [ 465 | "proc-macro2", 466 | "quote", 467 | "syn", 468 | ] 469 | 470 | [[package]] 471 | name = "env_logger" 472 | version = "0.8.4" 473 | source = "registry+https://github.com/rust-lang/crates.io-index" 474 | checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" 475 | dependencies = [ 476 | "atty", 477 | "humantime", 478 | "log", 479 | "regex", 480 | "termcolor", 481 | ] 482 | 483 | [[package]] 484 | name = "feature-probe" 485 | version = "0.1.1" 486 | source = "registry+https://github.com/rust-lang/crates.io-index" 487 | checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" 488 | 489 | [[package]] 490 | name = "field-offset" 491 | version = "0.3.4" 492 | source = "registry+https://github.com/rust-lang/crates.io-index" 493 | checksum = "1e1c54951450cbd39f3dbcf1005ac413b49487dabf18a720ad2383eccfeffb92" 494 | dependencies = [ 495 | "memoffset", 496 | "rustc_version 0.3.3", 497 | ] 498 | 499 | [[package]] 500 | name = "generic-array" 501 | version = "0.12.4" 502 | source = "registry+https://github.com/rust-lang/crates.io-index" 503 | checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" 504 | dependencies = [ 505 | "typenum", 506 | ] 507 | 508 | [[package]] 509 | name = "generic-array" 510 | version = "0.14.4" 511 | source = "registry+https://github.com/rust-lang/crates.io-index" 512 | checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" 513 | dependencies = [ 514 | "serde", 515 | "typenum", 516 | "version_check", 517 | ] 518 | 519 | [[package]] 520 | name = "getrandom" 521 | version = "0.1.16" 522 | source = "registry+https://github.com/rust-lang/crates.io-index" 523 | checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" 524 | dependencies = [ 525 | "cfg-if 1.0.0", 526 | "libc", 527 | "wasi", 528 | ] 529 | 530 | [[package]] 531 | name = "hashbrown" 532 | version = "0.9.1" 533 | source = "registry+https://github.com/rust-lang/crates.io-index" 534 | checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" 535 | dependencies = [ 536 | "ahash", 537 | ] 538 | 539 | [[package]] 540 | name = "heck" 541 | version = "0.3.3" 542 | source = "registry+https://github.com/rust-lang/crates.io-index" 543 | checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" 544 | dependencies = [ 545 | "unicode-segmentation", 546 | ] 547 | 548 | [[package]] 549 | name = "hermit-abi" 550 | version = "0.1.19" 551 | source = "registry+https://github.com/rust-lang/crates.io-index" 552 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 553 | dependencies = [ 554 | "libc", 555 | ] 556 | 557 | [[package]] 558 | name = "hex" 559 | version = "0.4.3" 560 | source = "registry+https://github.com/rust-lang/crates.io-index" 561 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 562 | 563 | [[package]] 564 | name = "hmac" 565 | version = "0.8.1" 566 | source = "registry+https://github.com/rust-lang/crates.io-index" 567 | checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" 568 | dependencies = [ 569 | "crypto-mac", 570 | "digest 0.9.0", 571 | ] 572 | 573 | [[package]] 574 | name = "hmac-drbg" 575 | version = "0.3.0" 576 | source = "registry+https://github.com/rust-lang/crates.io-index" 577 | checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" 578 | dependencies = [ 579 | "digest 0.9.0", 580 | "generic-array 0.14.4", 581 | "hmac", 582 | ] 583 | 584 | [[package]] 585 | name = "humantime" 586 | version = "2.1.0" 587 | source = "registry+https://github.com/rust-lang/crates.io-index" 588 | checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" 589 | 590 | [[package]] 591 | name = "itertools" 592 | version = "0.9.0" 593 | source = "registry+https://github.com/rust-lang/crates.io-index" 594 | checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" 595 | dependencies = [ 596 | "either", 597 | ] 598 | 599 | [[package]] 600 | name = "itoa" 601 | version = "0.4.8" 602 | source = "registry+https://github.com/rust-lang/crates.io-index" 603 | checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" 604 | 605 | [[package]] 606 | name = "keccak" 607 | version = "0.1.0" 608 | source = "registry+https://github.com/rust-lang/crates.io-index" 609 | checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" 610 | 611 | [[package]] 612 | name = "lazy_static" 613 | version = "1.4.0" 614 | source = "registry+https://github.com/rust-lang/crates.io-index" 615 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 616 | 617 | [[package]] 618 | name = "libc" 619 | version = "0.2.104" 620 | source = "registry+https://github.com/rust-lang/crates.io-index" 621 | checksum = "7b2f96d100e1cf1929e7719b7edb3b90ab5298072638fccd77be9ce942ecdfce" 622 | 623 | [[package]] 624 | name = "libsecp256k1" 625 | version = "0.5.0" 626 | source = "registry+https://github.com/rust-lang/crates.io-index" 627 | checksum = "bd1137239ab33b41aa9637a88a28249e5e70c40a42ccc92db7f12cc356c1fcd7" 628 | dependencies = [ 629 | "arrayref", 630 | "base64 0.12.3", 631 | "digest 0.9.0", 632 | "hmac-drbg", 633 | "libsecp256k1-core", 634 | "libsecp256k1-gen-ecmult", 635 | "libsecp256k1-gen-genmult", 636 | "rand", 637 | "serde", 638 | "sha2", 639 | "typenum", 640 | ] 641 | 642 | [[package]] 643 | name = "libsecp256k1-core" 644 | version = "0.2.2" 645 | source = "registry+https://github.com/rust-lang/crates.io-index" 646 | checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" 647 | dependencies = [ 648 | "crunchy", 649 | "digest 0.9.0", 650 | "subtle", 651 | ] 652 | 653 | [[package]] 654 | name = "libsecp256k1-gen-ecmult" 655 | version = "0.2.1" 656 | source = "registry+https://github.com/rust-lang/crates.io-index" 657 | checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" 658 | dependencies = [ 659 | "libsecp256k1-core", 660 | ] 661 | 662 | [[package]] 663 | name = "libsecp256k1-gen-genmult" 664 | version = "0.2.1" 665 | source = "registry+https://github.com/rust-lang/crates.io-index" 666 | checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" 667 | dependencies = [ 668 | "libsecp256k1-core", 669 | ] 670 | 671 | [[package]] 672 | name = "log" 673 | version = "0.4.14" 674 | source = "registry+https://github.com/rust-lang/crates.io-index" 675 | checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" 676 | dependencies = [ 677 | "cfg-if 1.0.0", 678 | ] 679 | 680 | [[package]] 681 | name = "macroswap" 682 | version = "0.1.0" 683 | dependencies = [ 684 | "anchor-lang", 685 | "anchor-spl", 686 | "spl-token", 687 | ] 688 | 689 | [[package]] 690 | name = "memchr" 691 | version = "2.4.1" 692 | source = "registry+https://github.com/rust-lang/crates.io-index" 693 | checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" 694 | 695 | [[package]] 696 | name = "memmap2" 697 | version = "0.1.0" 698 | source = "registry+https://github.com/rust-lang/crates.io-index" 699 | checksum = "d9b70ca2a6103ac8b665dc150b142ef0e4e89df640c9e6cf295d189c3caebe5a" 700 | dependencies = [ 701 | "libc", 702 | ] 703 | 704 | [[package]] 705 | name = "memoffset" 706 | version = "0.6.4" 707 | source = "registry+https://github.com/rust-lang/crates.io-index" 708 | checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" 709 | dependencies = [ 710 | "autocfg", 711 | ] 712 | 713 | [[package]] 714 | name = "num-derive" 715 | version = "0.3.3" 716 | source = "registry+https://github.com/rust-lang/crates.io-index" 717 | checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" 718 | dependencies = [ 719 | "proc-macro2", 720 | "quote", 721 | "syn", 722 | ] 723 | 724 | [[package]] 725 | name = "num-traits" 726 | version = "0.2.14" 727 | source = "registry+https://github.com/rust-lang/crates.io-index" 728 | checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" 729 | dependencies = [ 730 | "autocfg", 731 | ] 732 | 733 | [[package]] 734 | name = "num_enum" 735 | version = "0.5.4" 736 | source = "registry+https://github.com/rust-lang/crates.io-index" 737 | checksum = "3f9bd055fb730c4f8f4f57d45d35cd6b3f0980535b056dc7ff119cee6a66ed6f" 738 | dependencies = [ 739 | "derivative", 740 | "num_enum_derive", 741 | ] 742 | 743 | [[package]] 744 | name = "num_enum_derive" 745 | version = "0.5.4" 746 | source = "registry+https://github.com/rust-lang/crates.io-index" 747 | checksum = "486ea01961c4a818096de679a8b740b26d9033146ac5291b1c98557658f8cdd9" 748 | dependencies = [ 749 | "proc-macro-crate 1.1.0", 750 | "proc-macro2", 751 | "quote", 752 | "syn", 753 | ] 754 | 755 | [[package]] 756 | name = "opaque-debug" 757 | version = "0.3.0" 758 | source = "registry+https://github.com/rust-lang/crates.io-index" 759 | checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" 760 | 761 | [[package]] 762 | name = "pest" 763 | version = "2.1.3" 764 | source = "registry+https://github.com/rust-lang/crates.io-index" 765 | checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" 766 | dependencies = [ 767 | "ucd-trie", 768 | ] 769 | 770 | [[package]] 771 | name = "ppv-lite86" 772 | version = "0.2.14" 773 | source = "registry+https://github.com/rust-lang/crates.io-index" 774 | checksum = "c3ca011bd0129ff4ae15cd04c4eef202cadf6c51c21e47aba319b4e0501db741" 775 | 776 | [[package]] 777 | name = "proc-macro-crate" 778 | version = "0.1.5" 779 | source = "registry+https://github.com/rust-lang/crates.io-index" 780 | checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" 781 | dependencies = [ 782 | "toml", 783 | ] 784 | 785 | [[package]] 786 | name = "proc-macro-crate" 787 | version = "1.1.0" 788 | source = "registry+https://github.com/rust-lang/crates.io-index" 789 | checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83" 790 | dependencies = [ 791 | "thiserror", 792 | "toml", 793 | ] 794 | 795 | [[package]] 796 | name = "proc-macro2" 797 | version = "1.0.30" 798 | source = "registry+https://github.com/rust-lang/crates.io-index" 799 | checksum = "edc3358ebc67bc8b7fa0c007f945b0b18226f78437d61bec735a9eb96b61ee70" 800 | dependencies = [ 801 | "unicode-xid", 802 | ] 803 | 804 | [[package]] 805 | name = "proc-macro2-diagnostics" 806 | version = "0.9.1" 807 | source = "registry+https://github.com/rust-lang/crates.io-index" 808 | checksum = "4bf29726d67464d49fa6224a1d07936a8c08bb3fba727c7493f6cf1616fdaada" 809 | dependencies = [ 810 | "proc-macro2", 811 | "quote", 812 | "syn", 813 | "version_check", 814 | "yansi", 815 | ] 816 | 817 | [[package]] 818 | name = "quote" 819 | version = "1.0.10" 820 | source = "registry+https://github.com/rust-lang/crates.io-index" 821 | checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" 822 | dependencies = [ 823 | "proc-macro2", 824 | ] 825 | 826 | [[package]] 827 | name = "rand" 828 | version = "0.7.3" 829 | source = "registry+https://github.com/rust-lang/crates.io-index" 830 | checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" 831 | dependencies = [ 832 | "getrandom", 833 | "libc", 834 | "rand_chacha", 835 | "rand_core", 836 | "rand_hc", 837 | ] 838 | 839 | [[package]] 840 | name = "rand_chacha" 841 | version = "0.2.2" 842 | source = "registry+https://github.com/rust-lang/crates.io-index" 843 | checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" 844 | dependencies = [ 845 | "ppv-lite86", 846 | "rand_core", 847 | ] 848 | 849 | [[package]] 850 | name = "rand_core" 851 | version = "0.5.1" 852 | source = "registry+https://github.com/rust-lang/crates.io-index" 853 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 854 | dependencies = [ 855 | "getrandom", 856 | ] 857 | 858 | [[package]] 859 | name = "rand_hc" 860 | version = "0.2.0" 861 | source = "registry+https://github.com/rust-lang/crates.io-index" 862 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 863 | dependencies = [ 864 | "rand_core", 865 | ] 866 | 867 | [[package]] 868 | name = "regex" 869 | version = "1.5.4" 870 | source = "registry+https://github.com/rust-lang/crates.io-index" 871 | checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" 872 | dependencies = [ 873 | "aho-corasick", 874 | "memchr", 875 | "regex-syntax", 876 | ] 877 | 878 | [[package]] 879 | name = "regex-syntax" 880 | version = "0.6.25" 881 | source = "registry+https://github.com/rust-lang/crates.io-index" 882 | checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" 883 | 884 | [[package]] 885 | name = "rustc_version" 886 | version = "0.2.3" 887 | source = "registry+https://github.com/rust-lang/crates.io-index" 888 | checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 889 | dependencies = [ 890 | "semver 0.9.0", 891 | ] 892 | 893 | [[package]] 894 | name = "rustc_version" 895 | version = "0.3.3" 896 | source = "registry+https://github.com/rust-lang/crates.io-index" 897 | checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" 898 | dependencies = [ 899 | "semver 0.11.0", 900 | ] 901 | 902 | [[package]] 903 | name = "rustversion" 904 | version = "1.0.5" 905 | source = "registry+https://github.com/rust-lang/crates.io-index" 906 | checksum = "61b3909d758bb75c79f23d4736fac9433868679d3ad2ea7a61e3c25cfda9a088" 907 | 908 | [[package]] 909 | name = "ryu" 910 | version = "1.0.5" 911 | source = "registry+https://github.com/rust-lang/crates.io-index" 912 | checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" 913 | 914 | [[package]] 915 | name = "safe-transmute" 916 | version = "0.11.2" 917 | source = "registry+https://github.com/rust-lang/crates.io-index" 918 | checksum = "98a01dab6acf992653be49205bdd549f32f17cb2803e8eacf1560bf97259aae8" 919 | 920 | [[package]] 921 | name = "semver" 922 | version = "0.9.0" 923 | source = "registry+https://github.com/rust-lang/crates.io-index" 924 | checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 925 | dependencies = [ 926 | "semver-parser 0.7.0", 927 | ] 928 | 929 | [[package]] 930 | name = "semver" 931 | version = "0.11.0" 932 | source = "registry+https://github.com/rust-lang/crates.io-index" 933 | checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" 934 | dependencies = [ 935 | "semver-parser 0.10.2", 936 | ] 937 | 938 | [[package]] 939 | name = "semver-parser" 940 | version = "0.7.0" 941 | source = "registry+https://github.com/rust-lang/crates.io-index" 942 | checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 943 | 944 | [[package]] 945 | name = "semver-parser" 946 | version = "0.10.2" 947 | source = "registry+https://github.com/rust-lang/crates.io-index" 948 | checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" 949 | dependencies = [ 950 | "pest", 951 | ] 952 | 953 | [[package]] 954 | name = "serde" 955 | version = "1.0.130" 956 | source = "registry+https://github.com/rust-lang/crates.io-index" 957 | checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" 958 | dependencies = [ 959 | "serde_derive", 960 | ] 961 | 962 | [[package]] 963 | name = "serde_bytes" 964 | version = "0.11.5" 965 | source = "registry+https://github.com/rust-lang/crates.io-index" 966 | checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" 967 | dependencies = [ 968 | "serde", 969 | ] 970 | 971 | [[package]] 972 | name = "serde_derive" 973 | version = "1.0.130" 974 | source = "registry+https://github.com/rust-lang/crates.io-index" 975 | checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" 976 | dependencies = [ 977 | "proc-macro2", 978 | "quote", 979 | "syn", 980 | ] 981 | 982 | [[package]] 983 | name = "serde_json" 984 | version = "1.0.68" 985 | source = "registry+https://github.com/rust-lang/crates.io-index" 986 | checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8" 987 | dependencies = [ 988 | "itoa", 989 | "ryu", 990 | "serde", 991 | ] 992 | 993 | [[package]] 994 | name = "serum_dex" 995 | version = "0.4.0" 996 | source = "registry+https://github.com/rust-lang/crates.io-index" 997 | checksum = "02705854bae4622e552346c8edd43ab90c7425da35d63d2c689f39238f8d8b25" 998 | dependencies = [ 999 | "arrayref", 1000 | "bincode", 1001 | "bytemuck", 1002 | "byteorder", 1003 | "enumflags2", 1004 | "field-offset", 1005 | "itertools", 1006 | "num-traits", 1007 | "num_enum", 1008 | "safe-transmute", 1009 | "serde", 1010 | "solana-program", 1011 | "spl-token", 1012 | "static_assertions", 1013 | "thiserror", 1014 | "without-alloc", 1015 | ] 1016 | 1017 | [[package]] 1018 | name = "sha2" 1019 | version = "0.9.8" 1020 | source = "registry+https://github.com/rust-lang/crates.io-index" 1021 | checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa" 1022 | dependencies = [ 1023 | "block-buffer", 1024 | "cfg-if 1.0.0", 1025 | "cpufeatures", 1026 | "digest 0.9.0", 1027 | "opaque-debug", 1028 | ] 1029 | 1030 | [[package]] 1031 | name = "sha3" 1032 | version = "0.9.1" 1033 | source = "registry+https://github.com/rust-lang/crates.io-index" 1034 | checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" 1035 | dependencies = [ 1036 | "block-buffer", 1037 | "digest 0.9.0", 1038 | "keccak", 1039 | "opaque-debug", 1040 | ] 1041 | 1042 | [[package]] 1043 | name = "solana-frozen-abi" 1044 | version = "1.7.11" 1045 | source = "registry+https://github.com/rust-lang/crates.io-index" 1046 | checksum = "21ddfc2b65a555c0e0156c043bce092d473bc4f00daa7ca3c223d97d92d2e807" 1047 | dependencies = [ 1048 | "bs58 0.3.1", 1049 | "bv", 1050 | "generic-array 0.14.4", 1051 | "log", 1052 | "memmap2", 1053 | "rustc_version 0.2.3", 1054 | "serde", 1055 | "serde_derive", 1056 | "sha2", 1057 | "solana-frozen-abi-macro", 1058 | "solana-logger", 1059 | "thiserror", 1060 | ] 1061 | 1062 | [[package]] 1063 | name = "solana-frozen-abi-macro" 1064 | version = "1.7.11" 1065 | source = "registry+https://github.com/rust-lang/crates.io-index" 1066 | checksum = "a876aa31298fdee6560c8ee0695ebed313bbdbb6fbbee439ac3b9df8aebfb87c" 1067 | dependencies = [ 1068 | "proc-macro2", 1069 | "quote", 1070 | "rustc_version 0.2.3", 1071 | "syn", 1072 | ] 1073 | 1074 | [[package]] 1075 | name = "solana-logger" 1076 | version = "1.7.11" 1077 | source = "registry+https://github.com/rust-lang/crates.io-index" 1078 | checksum = "98a07290cc521e529bff0b0afd3aacd1d3904a41f35321ede6d1f3574efa3e94" 1079 | dependencies = [ 1080 | "env_logger", 1081 | "lazy_static", 1082 | "log", 1083 | ] 1084 | 1085 | [[package]] 1086 | name = "solana-program" 1087 | version = "1.7.11" 1088 | source = "registry+https://github.com/rust-lang/crates.io-index" 1089 | checksum = "49ffc60d33a318300682e42d28ff4f1276327f6374cab9591c8620a54be7aec1" 1090 | dependencies = [ 1091 | "bincode", 1092 | "blake3", 1093 | "borsh", 1094 | "borsh-derive", 1095 | "bs58 0.3.1", 1096 | "bv", 1097 | "curve25519-dalek", 1098 | "hex", 1099 | "itertools", 1100 | "lazy_static", 1101 | "libsecp256k1", 1102 | "log", 1103 | "num-derive", 1104 | "num-traits", 1105 | "rand", 1106 | "rustc_version 0.2.3", 1107 | "rustversion", 1108 | "serde", 1109 | "serde_bytes", 1110 | "serde_derive", 1111 | "sha2", 1112 | "sha3", 1113 | "solana-frozen-abi", 1114 | "solana-frozen-abi-macro", 1115 | "solana-logger", 1116 | "solana-sdk-macro", 1117 | "thiserror", 1118 | ] 1119 | 1120 | [[package]] 1121 | name = "solana-sdk-macro" 1122 | version = "1.7.11" 1123 | source = "registry+https://github.com/rust-lang/crates.io-index" 1124 | checksum = "b453dca160617b1676c47e3cfd4361f455dc5bb1c93659ec84b0c5d566b5c039" 1125 | dependencies = [ 1126 | "bs58 0.3.1", 1127 | "proc-macro2", 1128 | "quote", 1129 | "rustversion", 1130 | "syn", 1131 | ] 1132 | 1133 | [[package]] 1134 | name = "spl-associated-token-account" 1135 | version = "1.0.3" 1136 | source = "registry+https://github.com/rust-lang/crates.io-index" 1137 | checksum = "393e2240d521c3dd770806bff25c2c00d761ac962be106e14e22dd912007f428" 1138 | dependencies = [ 1139 | "solana-program", 1140 | "spl-token", 1141 | ] 1142 | 1143 | [[package]] 1144 | name = "spl-token" 1145 | version = "3.2.0" 1146 | source = "registry+https://github.com/rust-lang/crates.io-index" 1147 | checksum = "93bfdd5bd7c869cb565c7d7635c4fafe189b988a0bdef81063cd9585c6b8dc01" 1148 | dependencies = [ 1149 | "arrayref", 1150 | "num-derive", 1151 | "num-traits", 1152 | "num_enum", 1153 | "solana-program", 1154 | "thiserror", 1155 | ] 1156 | 1157 | [[package]] 1158 | name = "static_assertions" 1159 | version = "1.1.0" 1160 | source = "registry+https://github.com/rust-lang/crates.io-index" 1161 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 1162 | 1163 | [[package]] 1164 | name = "subtle" 1165 | version = "2.4.1" 1166 | source = "registry+https://github.com/rust-lang/crates.io-index" 1167 | checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" 1168 | 1169 | [[package]] 1170 | name = "syn" 1171 | version = "1.0.80" 1172 | source = "registry+https://github.com/rust-lang/crates.io-index" 1173 | checksum = "d010a1623fbd906d51d650a9916aaefc05ffa0e4053ff7fe601167f3e715d194" 1174 | dependencies = [ 1175 | "proc-macro2", 1176 | "quote", 1177 | "unicode-xid", 1178 | ] 1179 | 1180 | [[package]] 1181 | name = "termcolor" 1182 | version = "1.1.2" 1183 | source = "registry+https://github.com/rust-lang/crates.io-index" 1184 | checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" 1185 | dependencies = [ 1186 | "winapi-util", 1187 | ] 1188 | 1189 | [[package]] 1190 | name = "thiserror" 1191 | version = "1.0.30" 1192 | source = "registry+https://github.com/rust-lang/crates.io-index" 1193 | checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" 1194 | dependencies = [ 1195 | "thiserror-impl", 1196 | ] 1197 | 1198 | [[package]] 1199 | name = "thiserror-impl" 1200 | version = "1.0.30" 1201 | source = "registry+https://github.com/rust-lang/crates.io-index" 1202 | checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" 1203 | dependencies = [ 1204 | "proc-macro2", 1205 | "quote", 1206 | "syn", 1207 | ] 1208 | 1209 | [[package]] 1210 | name = "toml" 1211 | version = "0.5.8" 1212 | source = "registry+https://github.com/rust-lang/crates.io-index" 1213 | checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" 1214 | dependencies = [ 1215 | "serde", 1216 | ] 1217 | 1218 | [[package]] 1219 | name = "typenum" 1220 | version = "1.14.0" 1221 | source = "registry+https://github.com/rust-lang/crates.io-index" 1222 | checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" 1223 | 1224 | [[package]] 1225 | name = "ucd-trie" 1226 | version = "0.1.3" 1227 | source = "registry+https://github.com/rust-lang/crates.io-index" 1228 | checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" 1229 | 1230 | [[package]] 1231 | name = "unicode-segmentation" 1232 | version = "1.8.0" 1233 | source = "registry+https://github.com/rust-lang/crates.io-index" 1234 | checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" 1235 | 1236 | [[package]] 1237 | name = "unicode-xid" 1238 | version = "0.2.2" 1239 | source = "registry+https://github.com/rust-lang/crates.io-index" 1240 | checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" 1241 | 1242 | [[package]] 1243 | name = "version_check" 1244 | version = "0.9.3" 1245 | source = "registry+https://github.com/rust-lang/crates.io-index" 1246 | checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" 1247 | 1248 | [[package]] 1249 | name = "wasi" 1250 | version = "0.9.0+wasi-snapshot-preview1" 1251 | source = "registry+https://github.com/rust-lang/crates.io-index" 1252 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" 1253 | 1254 | [[package]] 1255 | name = "winapi" 1256 | version = "0.3.9" 1257 | source = "registry+https://github.com/rust-lang/crates.io-index" 1258 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1259 | dependencies = [ 1260 | "winapi-i686-pc-windows-gnu", 1261 | "winapi-x86_64-pc-windows-gnu", 1262 | ] 1263 | 1264 | [[package]] 1265 | name = "winapi-i686-pc-windows-gnu" 1266 | version = "0.4.0" 1267 | source = "registry+https://github.com/rust-lang/crates.io-index" 1268 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1269 | 1270 | [[package]] 1271 | name = "winapi-util" 1272 | version = "0.1.5" 1273 | source = "registry+https://github.com/rust-lang/crates.io-index" 1274 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 1275 | dependencies = [ 1276 | "winapi", 1277 | ] 1278 | 1279 | [[package]] 1280 | name = "winapi-x86_64-pc-windows-gnu" 1281 | version = "0.4.0" 1282 | source = "registry+https://github.com/rust-lang/crates.io-index" 1283 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1284 | 1285 | [[package]] 1286 | name = "without-alloc" 1287 | version = "0.2.1" 1288 | source = "registry+https://github.com/rust-lang/crates.io-index" 1289 | checksum = "5e34736feff52a0b3e5680927e947a4d8fac1f0b80dc8120b080dd8de24d75e2" 1290 | dependencies = [ 1291 | "alloc-traits", 1292 | ] 1293 | 1294 | [[package]] 1295 | name = "yansi" 1296 | version = "0.5.0" 1297 | source = "registry+https://github.com/rust-lang/crates.io-index" 1298 | checksum = "9fc79f4a1e39857fc00c3f662cbf2651c771f00e9c15fe2abc341806bd46bd71" 1299 | 1300 | [[package]] 1301 | name = "zeroize" 1302 | version = "1.4.2" 1303 | source = "registry+https://github.com/rust-lang/crates.io-index" 1304 | checksum = "bf68b08513768deaa790264a7fac27a58cbf2705cfcdc9448362229217d7e970" 1305 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "programs/*" 4 | ] 5 | -------------------------------------------------------------------------------- /app/.env.example: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_RPC_URL=http://127.0.0.1:8899 2 | NEXT_PUBLIC_PROGRAM_ID= 3 | NEXT_PUBLIC_MACRO_MINT= 4 | NEXT_PUBLIC_POOL_WSOL= 5 | NEXT_PUBLIC_POOL_MACRO= 6 | NEXT_PUBLIC_POOL_OWNER= 7 | NEXT_PUBLIC_MACROSWAP_ACCOUNT= -------------------------------------------------------------------------------- /app/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["next", "next/core-web-vitals"] 3 | } 4 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env 29 | .env.local 30 | .env.development.local 31 | .env.test.local 32 | .env.production.local 33 | 34 | # vercel 35 | .vercel 36 | -------------------------------------------------------------------------------- /app/README.md: -------------------------------------------------------------------------------- 1 | ## Getting Started 2 | 3 | ### Pre Requisites 4 | 5 | Download dependencies: 6 | 7 | ```bash 8 | yarn 9 | ``` 10 | 11 | Build typechain files: 12 | ```bash 13 | yarn generate-types 14 | ``` 15 | Note: requires json abi files at ./src/contracts/abis 16 | 17 | ### Development 18 | 19 | Run the development server: 20 | 21 | ```bash 22 | yarn dev 23 | ``` 24 | 25 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 26 | 27 | You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. 28 | 29 | [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.tsx`. 30 | 31 | The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. 32 | 33 | ## Learn More 34 | 35 | To learn more about Next.js, take a look at the following resources: 36 | 37 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 38 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. 39 | 40 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 41 | 42 | ## Deploy on Vercel 43 | 44 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. 45 | 46 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 47 | -------------------------------------------------------------------------------- /app/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | 5 | // NOTE: This file should not be edited 6 | // see https://nextjs.org/docs/basic-features/typescript for more information. 7 | -------------------------------------------------------------------------------- /app/next.config.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-var-requires */ 2 | const withTM = require('next-transpile-modules')([ 3 | '@blocto/sdk', 4 | '@solana/wallet-adapter-base', 5 | '@solana/wallet-adapter-react', 6 | '@solana/wallet-adapter-wallets', 7 | '@solana/wallet-adapter-react-ui', 8 | '@solana/wallet-adapter-bitkeep', 9 | '@solana/wallet-adapter-bitpie', 10 | '@solana/wallet-adapter-blocto', 11 | '@solana/wallet-adapter-clover', 12 | '@solana/wallet-adapter-coin98', 13 | '@solana/wallet-adapter-ledger', 14 | '@solana/wallet-adapter-mathwallet', 15 | '@solana/wallet-adapter-phantom', 16 | '@solana/wallet-adapter-safepal', 17 | '@solana/wallet-adapter-slope', 18 | '@solana/wallet-adapter-solflare', 19 | '@solana/wallet-adapter-sollet', 20 | '@solana/wallet-adapter-solong', 21 | '@solana/wallet-adapter-torus', 22 | ]); 23 | 24 | module.exports = withTM({ 25 | reactStrictMode: true, 26 | webpack5: true, 27 | webpack: (config, { isServer }) => { 28 | if (!isServer) { 29 | config.resolve.fallback.fs = false; 30 | } 31 | return config; 32 | }, 33 | }); -------------------------------------------------------------------------------- /app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "macroswap-interface", 3 | "version": "1.0.0", 4 | "main": "index.ts", 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "author": "REGO350", 12 | "license": "MIT", 13 | "dependencies": { 14 | "@material-ui/core": "^4.12.3", 15 | "@material-ui/icons": "^4.11.2", 16 | "@project-serum/anchor": "^0.18.0", 17 | "@project-serum/common": "^0.0.1-beta.3", 18 | "@solana/spl-token": "^0.1.8", 19 | "@solana/wallet-adapter-base": "^0.7.0", 20 | "@solana/wallet-adapter-react": "^0.13.1", 21 | "@solana/wallet-adapter-react-ui": "^0.6.0", 22 | "@solana/wallet-adapter-wallets": "^0.11.1", 23 | "@solana/web3.js": "^1.30.0", 24 | "@types/styled-components": "^5.1.12", 25 | "bn.js": "^5.2.0", 26 | "bootstrap": "5.0.2", 27 | "next": "11.1.0", 28 | "notistack": "^1.0.10", 29 | "react": "^17.0.2", 30 | "react-bootstrap": "^2.0.0", 31 | "react-dom": "17.0.2", 32 | "react-icons": "^4.2.0", 33 | "sharp": "^0.29.0", 34 | "styled-components": "^5.3.0", 35 | "use-async-effect": "^2.2.3" 36 | }, 37 | "devDependencies": { 38 | "@types/bn.js": "^5.1.0", 39 | "@types/react": "17.0.16", 40 | "eslint": "7.32.0", 41 | "eslint-config-next": "11.0.1", 42 | "next-transpile-modules": "^8.0.0", 43 | "ts-node": "^10.1.0", 44 | "typescript": "4.3.5" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import type { AppProps } from "next/app"; 2 | import { ReactNode } from "react"; 3 | import { SnackbarProvider } from "notistack"; 4 | import dynamic from "next/dynamic"; 5 | import Layout from "../src/components/layout/Layout"; 6 | 7 | require("@solana/wallet-adapter-react-ui/styles.css"); 8 | require("bootstrap/dist/css/bootstrap.min.css"); 9 | require("../styles/globals.css"); 10 | 11 | const WalletConnectionProvider = dynamic<{ children: ReactNode }>( 12 | () => 13 | import("../src/components/WalletConnectionProvider").then( 14 | (WalletConnectionProvider) => WalletConnectionProvider 15 | ), 16 | { 17 | ssr: false, 18 | } 19 | ); 20 | 21 | function MyApp({ Component, pageProps }: AppProps) { 22 | return ( 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | ); 31 | } 32 | 33 | export default MyApp; 34 | -------------------------------------------------------------------------------- /app/pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import Document, { Html, Head, Main, NextScript } from "next/document"; 2 | 3 | class MyDocument extends Document { 4 | render() { 5 | return ( 6 | 7 | 8 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | ); 19 | } 20 | } 21 | 22 | export default MyDocument; 23 | -------------------------------------------------------------------------------- /app/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import Head from "next/head"; 2 | import SwapInterface from "../src/components/swap/SwapInterface"; 3 | import Footer from "../src/components/Footer"; 4 | import styles from "../styles/Home.module.css"; 5 | 6 | const Home: React.FC = () => { 7 | return ( 8 | <> 9 | 10 | MacroSwap 11 | 12 | 13 | 14 | 15 |
16 | 17 |
18 |
19 | 20 | ); 21 | }; 22 | 23 | export default Home; 24 | -------------------------------------------------------------------------------- /app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/regohiro/macroswap/d5aec63cd1f3dd9d2ad7e9b70745c2004b37ab73/app/public/favicon.ico -------------------------------------------------------------------------------- /app/public/macro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/regohiro/macroswap/d5aec63cd1f3dd9d2ad7e9b70745c2004b37ab73/app/public/macro.png -------------------------------------------------------------------------------- /app/public/sol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/regohiro/macroswap/d5aec63cd1f3dd9d2ad7e9b70745c2004b37ab73/app/public/sol.png -------------------------------------------------------------------------------- /app/public/vercel.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/components/ConnectButton/index.tsx: -------------------------------------------------------------------------------- 1 | import { WalletMultiButton } from "@solana/wallet-adapter-react-ui"; 2 | import { useWallet } from "@solana/wallet-adapter-react"; 3 | import React from "react"; 4 | 5 | const ConnectButton = () => { 6 | const { connected } = useWallet(); 7 | 8 | return ( 9 | <> 10 | {connected ? ( 11 | 12 | ) : ( 13 | Connect Wallet 14 | )} 15 | 16 | ); 17 | }; 18 | 19 | export default ConnectButton; 20 | -------------------------------------------------------------------------------- /app/src/components/Footer/Footer.module.css: -------------------------------------------------------------------------------- 1 | .footer { 2 | clear: both; 3 | padding: 0; 4 | vertical-align: middle; 5 | line-height: normal; 6 | margin: 0; 7 | position: fixed; 8 | bottom: 0px; 9 | width: 100%; 10 | color: #b7b7b7; 11 | opacity: 0.5; 12 | padding-bottom: 15px; 13 | } 14 | 15 | #creator { 16 | float: left; 17 | padding-left: 20px; 18 | } 19 | 20 | #address { 21 | float: right; 22 | padding-right: 20px; 23 | } -------------------------------------------------------------------------------- /app/src/components/Footer/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import styles from "./Footer.module.css"; 3 | import { useWallet } from "@solana/wallet-adapter-react"; 4 | 5 | const Footer = () => { 6 | const wallet = useWallet(); 7 | const address = wallet.publicKey?.toString(); 8 | 9 | return ( 10 |
11 | Made by REGO350 12 | {address} 13 |
14 | ); 15 | }; 16 | 17 | export default Footer; 18 | -------------------------------------------------------------------------------- /app/src/components/Notify/index.tsx: -------------------------------------------------------------------------------- 1 | import { Link, makeStyles } from "@material-ui/core"; 2 | import LaunchIcon from "@material-ui/icons/Launch"; 3 | import { useSnackbar, VariantType } from "notistack"; 4 | import { useCallback } from "react"; 5 | 6 | const useStyles = makeStyles({ 7 | notification: { 8 | display: "flex", 9 | alignItems: "center", 10 | }, 11 | link: { 12 | color: "#ffffff", 13 | display: "flex", 14 | alignItems: "center", 15 | marginLeft: 16, 16 | textDecoration: "underline", 17 | "&:hover": { 18 | color: "#000000", 19 | }, 20 | }, 21 | icon: { 22 | fontSize: 20, 23 | marginLeft: 8, 24 | }, 25 | }); 26 | 27 | export function useNotify() { 28 | const styles = useStyles(); 29 | const { enqueueSnackbar } = useSnackbar(); 30 | 31 | return useCallback( 32 | (variant: VariantType, message: string, signature?: string) => { 33 | enqueueSnackbar( 34 | 35 | {message} 36 | {signature && ( 37 | 42 | Transaction 43 | 44 | 45 | )} 46 | , 47 | { variant } 48 | ); 49 | }, 50 | [enqueueSnackbar, styles] 51 | ); 52 | } 53 | -------------------------------------------------------------------------------- /app/src/components/SwapButton/SwapButton.module.css: -------------------------------------------------------------------------------- 1 | .btn { 2 | position: absolute; 3 | width: 90%; 4 | height: 50px; 5 | background-color: #172A42; 6 | color: #6DA8FF; 7 | margin: 0px auto; 8 | bottom: -75px; 9 | left: 50%; 10 | margin-left: -45%; 11 | border-radius: 15px; 12 | } 13 | 14 | .btn:disabled { 15 | background-color: #172A42; 16 | color: #6DA8FF; 17 | } 18 | 19 | .btn:hover { 20 | background-color: #192A40; 21 | color: #6DA8FF; 22 | } -------------------------------------------------------------------------------- /app/src/components/SwapButton/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Button, Spinner } from "react-bootstrap"; 3 | import styles from "./SwapButton.module.css"; 4 | import { useWallet } from "@solana/wallet-adapter-react"; 5 | 6 | interface IProps { 7 | loading: boolean; 8 | payable: boolean; 9 | hasEntered: boolean; 10 | } 11 | 12 | const SwapButton: React.FC = ({ loading, payable, hasEntered }) => { 13 | const { connected } = useWallet(); 14 | 15 | return ( 16 | 45 | ); 46 | }; 47 | 48 | export default SwapButton; 49 | -------------------------------------------------------------------------------- /app/src/components/WalletConnectionProvider/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { 3 | ConnectionProvider, 4 | WalletProvider, 5 | } from "@solana/wallet-adapter-react"; 6 | import { 7 | getLedgerWallet, 8 | getPhantomWallet, 9 | getSlopeWallet, 10 | getSolflareWallet, 11 | getSolletExtensionWallet, 12 | getSolletWallet, 13 | } from "@solana/wallet-adapter-wallets"; 14 | import { WalletModalProvider } from "@solana/wallet-adapter-react-ui"; 15 | require("@solana/wallet-adapter-react-ui/styles.css"); 16 | 17 | const WalletConnectionProvider: React.FC = ({ children }) => { 18 | const endpoint = process.env.NEXT_PUBLIC_RPC_URL || ""; 19 | 20 | const wallets = [ 21 | getPhantomWallet(), 22 | getSlopeWallet(), 23 | getSolflareWallet(), 24 | getLedgerWallet(), 25 | getSolletWallet(), 26 | getSolletExtensionWallet(), 27 | ]; 28 | 29 | return ( 30 | 31 | 32 | {children} 33 | 34 | 35 | ); 36 | }; 37 | 38 | export default WalletConnectionProvider; 39 | -------------------------------------------------------------------------------- /app/src/components/layout/Layout.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import MainNavigation from './MainNavigation' 3 | 4 | const Layout: React.FC = ({children}) => { 5 | return ( 6 | <> 7 | 8 |
{children}
9 | 10 | ) 11 | } 12 | 13 | export default Layout -------------------------------------------------------------------------------- /app/src/components/layout/MainNavigation.module.css: -------------------------------------------------------------------------------- 1 | .header { 2 | width: 100%; 3 | height: 5rem; 4 | background-color: #191b1f; 5 | position: relative; 6 | } 7 | 8 | .logo { 9 | position: absolute; 10 | height: 5rem; 11 | margin-left: 30px; 12 | font-family: 'Arvo', serif; 13 | display: flex; 14 | justify-content: left; 15 | align-items: center; 16 | } 17 | 18 | .button { 19 | position: absolute; 20 | height: 5rem; 21 | right: 0px; 22 | margin-right: 30px; 23 | display: flex; 24 | justify-content: right; 25 | align-items: center; 26 | } 27 | -------------------------------------------------------------------------------- /app/src/components/layout/MainNavigation.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import styles from "./MainNavigation.module.css"; 3 | import ConnectButton from "../ConnectButton"; 4 | 5 | const MainNavigation: React.FC = () => { 6 | return ( 7 | <> 8 |
9 |
10 |

MacroSwap

11 |
12 |
13 | 14 |
15 |
16 | 17 | ); 18 | }; 19 | 20 | export default MainNavigation; 21 | -------------------------------------------------------------------------------- /app/src/components/swap/RateBox.tsx: -------------------------------------------------------------------------------- 1 | import styles from "./SwapInterface.module.css"; 2 | import React from "react"; 3 | import { AiOutlineReload } from "react-icons/ai"; 4 | 5 | interface IProps { 6 | onClickReload: () => void; 7 | rate: number; 8 | } 9 | 10 | const RateBox: React.FC = ({ onClickReload, rate }) => { 11 | 12 | return ( 13 |
14 | Exchange Rate 15 | <> 16 | 17 | 21 | 22 | 23 | 1 SOL = {rate} MACRO 24 | 25 | 26 |
27 | ); 28 | }; 29 | 30 | export default RateBox; 31 | -------------------------------------------------------------------------------- /app/src/components/swap/SolDropdown.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { InputGroup } from "react-bootstrap"; 3 | import styles from "./SwapInterface.module.css"; 4 | import Image from "next/image"; 5 | 6 | const EthDropdown = (): JSX.Element => { 7 | return ( 8 | 9 | Eth 10 |   SOL 11 | 12 | ); 13 | }; 14 | 15 | export default EthDropdown; 16 | -------------------------------------------------------------------------------- /app/src/components/swap/SwapInterface.module.css: -------------------------------------------------------------------------------- 1 | .main { 2 | margin: 0 auto; 3 | margin-top: 150px; 4 | border-radius: 50px; 5 | height: 350px; 6 | width: 500px; 7 | background-color: #191b1f; 8 | position: relative; 9 | } 10 | 11 | .box { 12 | position: absolute; 13 | top: 30px; 14 | width: 100%; 15 | } 16 | 17 | .inputGroup{ 18 | width: 90%; 19 | margin: 0px auto; 20 | } 21 | 22 | .inputGroupText { 23 | background-color: #191B1F; 24 | border-color: #2C2F36; 25 | color: #fff; 26 | width: 27%; 27 | font-size: large; 28 | display: flex; 29 | justify-content: center; 30 | align-items: center; 31 | } 32 | 33 | .dropdownBtn { 34 | width: 27%; 35 | border-color: #2C2F36; 36 | display: flex; 37 | justify-content: center; 38 | align-items: center; 39 | } 40 | 41 | .dropdownMenu { 42 | padding: 0; 43 | min-width: 125px !important; 44 | background-color: #191B2F; 45 | } 46 | 47 | .dropdownItem { 48 | margin: 5px 0; 49 | padding-left: 20px; 50 | } 51 | 52 | .dropdownText{ 53 | color: #fff; 54 | font-size: large; 55 | display: flex; 56 | align-items: center; 57 | } 58 | 59 | .dropdownItem:hover{ 60 | background-color: #2D212E; 61 | } 62 | 63 | .formControl { 64 | background-color: #212429; 65 | border-color: #2C2F36; 66 | border-width: 2px; 67 | height: 70px; 68 | border-radius: 15px; 69 | font-size: x-large; 70 | } 71 | 72 | #topFormControl { 73 | background-color: #212429; 74 | color: #fff 75 | } 76 | 77 | #bottomFormControl { 78 | background-color: #212429; 79 | color: #fff 80 | } 81 | 82 | #bottomFormControl:hover{ 83 | cursor: not-allowed; 84 | } 85 | 86 | .arrowBox { 87 | width: 100%; 88 | display: flex; 89 | justify-content: center; 90 | } 91 | 92 | .arrowBox h2{ 93 | margin: 2px 0px; 94 | } 95 | 96 | .arrowBox h2:hover{ 97 | cursor: pointer; 98 | } 99 | 100 | .rateBox { 101 | width: 100%; 102 | height: 20px; 103 | margin-top: 20px; 104 | color: #788089; 105 | } 106 | 107 | .rateText { 108 | padding-left: 30px; 109 | float: left; 110 | } 111 | 112 | .rateValue { 113 | padding-right: 30px; 114 | float: right; 115 | } 116 | 117 | .reloadBtn { 118 | margin-left: 10px; 119 | margin-bottom: 3px; 120 | font-size: 18px; 121 | } 122 | 123 | .reloadBtn:hover{ 124 | cursor: pointer; 125 | transform: scale(1.1); 126 | } 127 | 128 | .ethLogo { 129 | margin-left: 10px; 130 | } -------------------------------------------------------------------------------- /app/src/components/swap/SwapInterface.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect, useCallback } from "react"; 2 | import { Form, FormControl, InputGroup } from "react-bootstrap"; 3 | import SolDropdown from "./SolDropdown"; 4 | import styles from "./SwapInterface.module.css"; 5 | import TokenDropdown from "./TokenDropdown"; 6 | import SwapButton from "../SwapButton"; 7 | import RateBox from "./RateBox"; 8 | import { useWallet, useConnection, useAnchorWallet } from "@solana/wallet-adapter-react"; 9 | import { useWalletModal } from "@solana/wallet-adapter-react-ui"; 10 | import useAsyncEffect from "use-async-effect"; 11 | import { u64 } from "@solana/spl-token"; 12 | import { toBN } from "../../utils"; 13 | import { getSolBalance } from "../../interactions/sol"; 14 | import { getMacroBalance } from "../../interactions/macro"; 15 | import { buyTokenTx, getRate, sellTokenTx } from "../../interactions/macroswap"; 16 | import { Transaction } from "@solana/web3.js"; 17 | import { getProvider, getReadOnlyProvider } from "../../web3"; 18 | import { useNotify } from "../Notify"; 19 | 20 | type TSwapDirection = "BuyToken" | "SellToken" 21 | 22 | const SwapInterface = (): JSX.Element => { 23 | const [swapDirection, setSwapDirection] = useState("BuyToken"); 24 | const [isLoading, setLoading] = useState(false); 25 | const [isPayable, setPayable] = useState(false); 26 | const [inputValue, setInputValue] = useState(undefined); 27 | const [input, setInput] = useState(0); 28 | const [output, setOutput] = useState(0); 29 | const [solBalance, setSolBalance] = useState(0); 30 | const [macroBalance, setMacroBalance] = useState(new u64(0)); 31 | const [rate, setRate] = useState(0); 32 | 33 | const wallet = useWallet(); 34 | const notify = useNotify(); 35 | const anchorWallet = useAnchorWallet(); 36 | const walletModal = useWalletModal(); 37 | const { connection } = useConnection(); 38 | 39 | const onInputChange = ( 40 | e: React.ChangeEvent 41 | ) => { 42 | const inputValueNumber = Number(e.target.value); 43 | if (inputValueNumber >= 0 && e.target.value) { 44 | setInput(inputValueNumber); 45 | setInputValue(e.target.value.toString()); 46 | } else { 47 | setInput(0); 48 | setInputValue(undefined); 49 | } 50 | } 51 | 52 | const onClickSwapDirection = () => { 53 | switch(swapDirection){ 54 | case "BuyToken": 55 | setSwapDirection("SellToken"); 56 | break; 57 | case "SellToken": 58 | setSwapDirection("BuyToken"); 59 | break; 60 | } 61 | } 62 | 63 | const onClickSubmit = useCallback(async ( 64 | e: React.FormEvent 65 | ) => { 66 | e.preventDefault(); 67 | if(wallet.connected && wallet.publicKey !== null && anchorWallet){ 68 | setLoading(true); 69 | const provider = getProvider(anchorWallet, connection); 70 | let tx: Transaction; 71 | let sig: string = ""; 72 | 73 | switch(swapDirection){ 74 | case "BuyToken": 75 | tx = await buyTokenTx(provider, input, output); 76 | break; 77 | case "SellToken": 78 | tx = await sellTokenTx(provider, input); 79 | break; 80 | } 81 | 82 | try { 83 | sig = await wallet.sendTransaction(tx, connection); 84 | notify('info', 'Transaction sent:', sig); 85 | 86 | await connection.confirmTransaction(sig, 'processed'); 87 | notify('success', 'Transaction successful!', sig); 88 | 89 | } catch(error: any) { 90 | notify('error', `Transaction failed! ${error?.message}`, sig); 91 | } finally { 92 | setLoading(false); 93 | } 94 | }else{ 95 | walletModal.setVisible(true); 96 | } 97 | }, [notify, wallet, anchorWallet, swapDirection, input, output, connection, walletModal]) 98 | 99 | const onClickReload = async () => { 100 | const provider = getReadOnlyProvider(connection); 101 | setRate(await getRate(provider)); 102 | 103 | if(wallet.connected && wallet.publicKey !== null && anchorWallet){ 104 | const provider = getProvider(anchorWallet, connection); 105 | setSolBalance(await getSolBalance(provider, wallet.publicKey)); 106 | setMacroBalance(await getMacroBalance(provider, wallet.publicKey)); 107 | } 108 | } 109 | 110 | useEffect(() => { 111 | switch(swapDirection){ 112 | case "BuyToken": 113 | setOutput(input * rate); 114 | setPayable(solBalance >= input * 10**9); 115 | break; 116 | case "SellToken": 117 | setOutput(input / rate); 118 | setPayable(macroBalance.gte(toBN(input, 9))); 119 | break; 120 | } 121 | }, [input, swapDirection, solBalance, macroBalance, rate]); 122 | 123 | useAsyncEffect(async () => { 124 | await onClickReload(); 125 | }, [wallet.connected]) 126 | 127 | return ( 128 |
129 |
130 | 131 | e.target.blur()} 143 | value={inputValue || ""} 144 | required={wallet.connected ? true : false} 145 | /> 146 | {swapDirection === "BuyToken" ? : } 147 | 148 |
149 |

150 |
151 | 152 | 160 | {swapDirection === "BuyToken" ? : } 161 | 162 | 163 | 168 | 169 |
170 | ); 171 | }; 172 | 173 | export default SwapInterface; 174 | -------------------------------------------------------------------------------- /app/src/components/swap/TokenDropdown.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { InputGroup } from "react-bootstrap"; 3 | import styles from "./SwapInterface.module.css"; 4 | import Image from "next/image"; 5 | 6 | const TokenDropdown = (): JSX.Element => { 7 | return ( 8 | 9 | Eth 10 |  MACRO 11 | 12 | ); 13 | }; 14 | 15 | export default TokenDropdown; -------------------------------------------------------------------------------- /app/src/interactions/common.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@project-serum/anchor"; 2 | import { 3 | ASSOCIATED_TOKEN_PROGRAM_ID, 4 | Token, 5 | TOKEN_PROGRAM_ID, 6 | } from "@solana/spl-token"; 7 | import { PublicKey } from "@solana/web3.js"; 8 | 9 | export const getBasicAccounts = () => { 10 | const poolWsol = new PublicKey(process.env.NEXT_PUBLIC_POOL_WSOL || ""); 11 | const poolMacro = new PublicKey(process.env.NEXT_PUBLIC_POOL_MACRO || ""); 12 | const poolOwner = new PublicKey(process.env.NEXT_PUBLIC_POOL_OWNER || ""); 13 | const macroswapAccount = new PublicKey(process.env.NEXT_PUBLIC_MACROSWAP_ACCOUNT || ""); 14 | const macroMint = new PublicKey(process.env.NEXT_PUBLIC_MACRO_MINT || ""); 15 | 16 | return { 17 | poolMacro, poolWsol, poolOwner, macroswapAccount, macroMint 18 | } 19 | } 20 | 21 | export const accountExists = async ( 22 | provider: anchor.Provider, 23 | account: PublicKey, 24 | programId: PublicKey = TOKEN_PROGRAM_ID 25 | ): Promise => { 26 | const info = await provider.connection.getAccountInfo(account); 27 | if(info === null || !info.owner.equals(programId)){ 28 | return false; 29 | }else{ 30 | return true; 31 | } 32 | } 33 | 34 | export const getATA = async ( 35 | user: PublicKey, 36 | mintAccount: PublicKey 37 | ): Promise => { 38 | const tokenAccount = await Token.getAssociatedTokenAddress( 39 | ASSOCIATED_TOKEN_PROGRAM_ID, 40 | TOKEN_PROGRAM_ID, 41 | mintAccount, 42 | user 43 | ); 44 | return tokenAccount; 45 | } 46 | 47 | export const createATA = async ( 48 | user: PublicKey, 49 | mintAccount: PublicKey 50 | ): Promise => { 51 | const tx = new anchor.web3.Transaction(); 52 | const tokenAccount = await getATA(user, mintAccount); 53 | 54 | tx.add( 55 | Token.createAssociatedTokenAccountInstruction( 56 | ASSOCIATED_TOKEN_PROGRAM_ID, 57 | TOKEN_PROGRAM_ID, 58 | mintAccount, 59 | tokenAccount, 60 | user, 61 | user 62 | ) 63 | ); 64 | return tx; 65 | } -------------------------------------------------------------------------------- /app/src/interactions/macro.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@project-serum/anchor"; 2 | import { getTokenAccount } from "@project-serum/common"; 3 | import { u64 } from "@solana/spl-token"; 4 | import { PublicKey } from "@solana/web3.js"; 5 | import { accountExists, getATA } from "./common"; 6 | 7 | export const getMacroBalance = async ( 8 | provider: anchor.Provider, 9 | user: PublicKey 10 | ): Promise => { 11 | const macroMint = new PublicKey(process.env.NEXT_PUBLIC_MACRO_MINT || ""); 12 | const userMacroAddr = await getATA(user, macroMint); 13 | let balance: u64; 14 | 15 | if(await accountExists(provider, userMacroAddr)){ 16 | const tokenAccount = await getTokenAccount(provider, userMacroAddr); 17 | balance = tokenAccount.amount; 18 | }else{ 19 | balance = new u64(0); 20 | } 21 | 22 | console.log("Macro balance: " + balance.toNumber()); 23 | 24 | return balance; 25 | }; 26 | -------------------------------------------------------------------------------- /app/src/interactions/macroswap.ts: -------------------------------------------------------------------------------- 1 | import { Provider, web3 } from "@project-serum/anchor"; 2 | import { NATIVE_MINT, TOKEN_PROGRAM_ID } from "@solana/spl-token"; 3 | import { SystemProgram, Transaction } from "@solana/web3.js"; 4 | import { toBN } from "../utils"; 5 | import { getProgram } from "../web3"; 6 | import { accountExists, createATA, getATA, getBasicAccounts } from "./common"; 7 | import { unwrapTx, wrapTx } from "./sol"; 8 | 9 | export const getRate = async (provider: Provider): Promise => { 10 | const { macroswapAccount } = getBasicAccounts(); 11 | const program = getProgram(provider); 12 | const data = await program.account.macroSwapAccount.fetch(macroswapAccount); 13 | const rate = data.rate.toNumber(); 14 | return rate; 15 | }; 16 | 17 | export const buyTokenTx = async ( 18 | provider: Provider, 19 | value: number, 20 | amount: number 21 | ): Promise => { 22 | const { wallet } = provider; 23 | const { macroMint, poolMacro, poolWsol, poolOwner, macroswapAccount } = 24 | getBasicAccounts(); 25 | 26 | const program = getProgram(provider); 27 | const userWsol = await getATA(wallet.publicKey, NATIVE_MINT); 28 | const userMacro = await getATA(wallet.publicKey, macroMint); 29 | 30 | const tx = new web3.Transaction(); 31 | 32 | if (!(await accountExists(provider, userMacro))) { 33 | tx.add(await createATA(wallet.publicKey, macroMint)); 34 | } 35 | 36 | tx.add(await wrapTx(provider, wallet.publicKey, value * 10 ** 9)); 37 | 38 | tx.add( 39 | program.instruction.buyToken(toBN(amount, 9), { 40 | accounts: { 41 | user: wallet.publicKey, 42 | userWsol, 43 | userMacro, 44 | poolWsol, 45 | poolMacro, 46 | poolOwner, 47 | macroswapAccount, 48 | systemProgram: SystemProgram.programId, 49 | tokenProgram: TOKEN_PROGRAM_ID, 50 | }, 51 | }) 52 | ); 53 | 54 | tx.add(await unwrapTx(wallet.publicKey)); 55 | 56 | return tx; 57 | }; 58 | 59 | export const sellTokenTx = async ( 60 | provider: Provider, 61 | amount: number 62 | ): Promise => { 63 | const { wallet } = provider; 64 | const { macroMint, poolMacro, poolWsol, poolOwner, macroswapAccount } = 65 | getBasicAccounts(); 66 | 67 | const program = getProgram(provider); 68 | const userWsol = await getATA(wallet.publicKey, NATIVE_MINT); 69 | const userMacro = await getATA(wallet.publicKey, macroMint); 70 | 71 | const tx = new web3.Transaction(); 72 | 73 | if (!(await accountExists(provider, userWsol))) { 74 | tx.add(await createATA(wallet.publicKey, NATIVE_MINT)); 75 | } 76 | 77 | tx.add( 78 | program.instruction.sellToken(toBN(amount, 9), { 79 | accounts: { 80 | user: wallet.publicKey, 81 | userWsol, 82 | userMacro, 83 | poolWsol, 84 | poolMacro, 85 | poolOwner, 86 | macroswapAccount, 87 | systemProgram: SystemProgram.programId, 88 | tokenProgram: TOKEN_PROGRAM_ID, 89 | }, 90 | }) 91 | ); 92 | 93 | tx.add(await unwrapTx(wallet.publicKey)); 94 | 95 | return tx; 96 | }; 97 | -------------------------------------------------------------------------------- /app/src/interactions/sol.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@project-serum/anchor"; 2 | import { 3 | NATIVE_MINT, 4 | Token, 5 | TOKEN_PROGRAM_ID, 6 | } from "@solana/spl-token"; 7 | import { PublicKey, SystemProgram } from "@solana/web3.js"; 8 | import { accountExists, createATA, getATA } from "./common"; 9 | 10 | export const getSolBalance = async ( 11 | provider: anchor.Provider, 12 | user: PublicKey 13 | ): Promise => { 14 | const balance = await provider.connection.getBalance(user); 15 | console.log("SOL balance: " + balance); 16 | return balance; 17 | }; 18 | 19 | export const wrapTx = async ( 20 | provider: anchor.Provider, 21 | user: PublicKey, 22 | amount: number 23 | ): Promise => { 24 | const tx = new anchor.web3.Transaction(); 25 | const wsolAccount = await getATA(user, NATIVE_MINT); 26 | 27 | if (!(await accountExists(provider, wsolAccount))) { 28 | tx.add(await createATA(user, NATIVE_MINT)); 29 | } 30 | 31 | tx.add( 32 | SystemProgram.transfer({ 33 | fromPubkey: user, 34 | toPubkey: wsolAccount, 35 | lamports: amount, 36 | }) 37 | ); 38 | 39 | //@ts-ignore (@solana/spl-token bug...) 40 | tx.add(Token.createSyncNativeInstruction(TOKEN_PROGRAM_ID, wsolAccount)); 41 | 42 | return tx; 43 | }; 44 | 45 | export const unwrapTx = async ( 46 | user: PublicKey 47 | ): Promise => { 48 | const tx = new anchor.web3.Transaction(); 49 | const wsolAccount = await getATA(user, NATIVE_MINT); 50 | 51 | tx.add( 52 | Token.createCloseAccountInstruction( 53 | TOKEN_PROGRAM_ID, 54 | wsolAccount, 55 | user, 56 | user, 57 | [] 58 | ) 59 | ); 60 | 61 | return tx; 62 | }; 63 | -------------------------------------------------------------------------------- /app/src/utils/bigNumber.ts: -------------------------------------------------------------------------------- 1 | import { BN } from "@project-serum/anchor"; 2 | 3 | export const toBN = (value: number, decimals = 0): BN => { 4 | const valueNumber = value * 10 ** decimals; 5 | const valueBN = new BN(valueNumber); 6 | return valueBN; 7 | }; 8 | 9 | export const fromBN = (valueBN: BN, decimals = 0): number => { 10 | const valueNumber = valueBN.toNumber() / 10 ** decimals; 11 | return valueNumber; 12 | }; 13 | 14 | export const tenPow9 = toBN(10).pow(toBN(9)); 15 | -------------------------------------------------------------------------------- /app/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./bigNumber"; 2 | -------------------------------------------------------------------------------- /app/src/web3/idl/macroswap.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.0", 3 | "name": "macroswap", 4 | "instructions": [ 5 | { 6 | "name": "initialize", 7 | "accounts": [ 8 | { 9 | "name": "user", 10 | "isMut": true, 11 | "isSigner": true 12 | }, 13 | { 14 | "name": "macroMint", 15 | "isMut": false, 16 | "isSigner": false 17 | }, 18 | { 19 | "name": "poolMacro", 20 | "isMut": true, 21 | "isSigner": false 22 | }, 23 | { 24 | "name": "wsolMint", 25 | "isMut": false, 26 | "isSigner": false 27 | }, 28 | { 29 | "name": "poolWsol", 30 | "isMut": true, 31 | "isSigner": false 32 | }, 33 | { 34 | "name": "macroswapAccount", 35 | "isMut": true, 36 | "isSigner": true 37 | }, 38 | { 39 | "name": "poolOwner", 40 | "isMut": false, 41 | "isSigner": false 42 | }, 43 | { 44 | "name": "systemProgram", 45 | "isMut": false, 46 | "isSigner": false 47 | }, 48 | { 49 | "name": "tokenProgram", 50 | "isMut": false, 51 | "isSigner": false 52 | }, 53 | { 54 | "name": "rent", 55 | "isMut": false, 56 | "isSigner": false 57 | } 58 | ], 59 | "args": [ 60 | { 61 | "name": "bumps", 62 | "type": { 63 | "defined": "PoolBumps" 64 | } 65 | }, 66 | { 67 | "name": "rate", 68 | "type": "u64" 69 | } 70 | ] 71 | }, 72 | { 73 | "name": "buyToken", 74 | "accounts": [ 75 | { 76 | "name": "user", 77 | "isMut": false, 78 | "isSigner": true 79 | }, 80 | { 81 | "name": "userWsol", 82 | "isMut": true, 83 | "isSigner": false 84 | }, 85 | { 86 | "name": "userMacro", 87 | "isMut": true, 88 | "isSigner": false 89 | }, 90 | { 91 | "name": "poolWsol", 92 | "isMut": true, 93 | "isSigner": false 94 | }, 95 | { 96 | "name": "poolMacro", 97 | "isMut": true, 98 | "isSigner": false 99 | }, 100 | { 101 | "name": "macroswapAccount", 102 | "isMut": false, 103 | "isSigner": false 104 | }, 105 | { 106 | "name": "poolOwner", 107 | "isMut": true, 108 | "isSigner": false 109 | }, 110 | { 111 | "name": "systemProgram", 112 | "isMut": false, 113 | "isSigner": false 114 | }, 115 | { 116 | "name": "tokenProgram", 117 | "isMut": false, 118 | "isSigner": false 119 | } 120 | ], 121 | "args": [ 122 | { 123 | "name": "amount", 124 | "type": "u64" 125 | } 126 | ] 127 | }, 128 | { 129 | "name": "sellToken", 130 | "accounts": [ 131 | { 132 | "name": "user", 133 | "isMut": false, 134 | "isSigner": true 135 | }, 136 | { 137 | "name": "userWsol", 138 | "isMut": true, 139 | "isSigner": false 140 | }, 141 | { 142 | "name": "userMacro", 143 | "isMut": true, 144 | "isSigner": false 145 | }, 146 | { 147 | "name": "poolWsol", 148 | "isMut": true, 149 | "isSigner": false 150 | }, 151 | { 152 | "name": "poolMacro", 153 | "isMut": true, 154 | "isSigner": false 155 | }, 156 | { 157 | "name": "macroswapAccount", 158 | "isMut": false, 159 | "isSigner": false 160 | }, 161 | { 162 | "name": "poolOwner", 163 | "isMut": true, 164 | "isSigner": false 165 | }, 166 | { 167 | "name": "systemProgram", 168 | "isMut": false, 169 | "isSigner": false 170 | }, 171 | { 172 | "name": "tokenProgram", 173 | "isMut": false, 174 | "isSigner": false 175 | } 176 | ], 177 | "args": [ 178 | { 179 | "name": "amount", 180 | "type": "u64" 181 | } 182 | ] 183 | }, 184 | { 185 | "name": "updateRate", 186 | "accounts": [ 187 | { 188 | "name": "authority", 189 | "isMut": false, 190 | "isSigner": true 191 | }, 192 | { 193 | "name": "macroswapAccount", 194 | "isMut": true, 195 | "isSigner": false 196 | } 197 | ], 198 | "args": [ 199 | { 200 | "name": "rate", 201 | "type": "u64" 202 | } 203 | ] 204 | } 205 | ], 206 | "accounts": [ 207 | { 208 | "name": "MacroSwapAccount", 209 | "type": { 210 | "kind": "struct", 211 | "fields": [ 212 | { 213 | "name": "rate", 214 | "type": "u64" 215 | }, 216 | { 217 | "name": "authority", 218 | "type": "publicKey" 219 | }, 220 | { 221 | "name": "bumps", 222 | "type": { 223 | "defined": "PoolBumps" 224 | } 225 | }, 226 | { 227 | "name": "macroMint", 228 | "type": "publicKey" 229 | }, 230 | { 231 | "name": "wsolMint", 232 | "type": "publicKey" 233 | }, 234 | { 235 | "name": "poolMacro", 236 | "type": "publicKey" 237 | }, 238 | { 239 | "name": "poolWsol", 240 | "type": "publicKey" 241 | }, 242 | { 243 | "name": "poolOwner", 244 | "type": "publicKey" 245 | } 246 | ] 247 | } 248 | } 249 | ], 250 | "types": [ 251 | { 252 | "name": "PoolBumps", 253 | "type": { 254 | "kind": "struct", 255 | "fields": [ 256 | { 257 | "name": "poolMacro", 258 | "type": "u8" 259 | }, 260 | { 261 | "name": "poolWsol", 262 | "type": "u8" 263 | }, 264 | { 265 | "name": "poolOwner", 266 | "type": "u8" 267 | } 268 | ] 269 | } 270 | } 271 | ], 272 | "events": [ 273 | { 274 | "name": "BuyTokenEvent", 275 | "fields": [ 276 | { 277 | "name": "amount", 278 | "type": "u64", 279 | "index": false 280 | }, 281 | { 282 | "name": "user", 283 | "type": "publicKey", 284 | "index": false 285 | } 286 | ] 287 | }, 288 | { 289 | "name": "SellTokenEvent", 290 | "fields": [ 291 | { 292 | "name": "amount", 293 | "type": "u64", 294 | "index": false 295 | }, 296 | { 297 | "name": "user", 298 | "type": "publicKey", 299 | "index": false 300 | } 301 | ] 302 | } 303 | ], 304 | "errors": [ 305 | { 306 | "code": 300, 307 | "name": "LowWSol", 308 | "msg": "Insufficient WSOL" 309 | }, 310 | { 311 | "code": 301, 312 | "name": "LowMacro", 313 | "msg": "Insufficient Macro tokens" 314 | } 315 | ], 316 | "metadata": { 317 | "address": "BgmP6WcB2xDiSAghqxRxqKDFxxEL3fBDykZLwyL5vroy" 318 | } 319 | } -------------------------------------------------------------------------------- /app/src/web3/idl/macroswap.ts: -------------------------------------------------------------------------------- 1 | export type Macroswap = { 2 | "version": "0.0.0", 3 | "name": "macroswap", 4 | "instructions": [ 5 | { 6 | "name": "initialize", 7 | "accounts": [ 8 | { 9 | "name": "user", 10 | "isMut": true, 11 | "isSigner": true 12 | }, 13 | { 14 | "name": "macroMint", 15 | "isMut": false, 16 | "isSigner": false 17 | }, 18 | { 19 | "name": "poolMacro", 20 | "isMut": true, 21 | "isSigner": false 22 | }, 23 | { 24 | "name": "wsolMint", 25 | "isMut": false, 26 | "isSigner": false 27 | }, 28 | { 29 | "name": "poolWsol", 30 | "isMut": true, 31 | "isSigner": false 32 | }, 33 | { 34 | "name": "macroswapAccount", 35 | "isMut": true, 36 | "isSigner": true 37 | }, 38 | { 39 | "name": "poolOwner", 40 | "isMut": false, 41 | "isSigner": false 42 | }, 43 | { 44 | "name": "systemProgram", 45 | "isMut": false, 46 | "isSigner": false 47 | }, 48 | { 49 | "name": "tokenProgram", 50 | "isMut": false, 51 | "isSigner": false 52 | }, 53 | { 54 | "name": "rent", 55 | "isMut": false, 56 | "isSigner": false 57 | } 58 | ], 59 | "args": [ 60 | { 61 | "name": "bumps", 62 | "type": { 63 | "defined": "PoolBumps" 64 | } 65 | }, 66 | { 67 | "name": "rate", 68 | "type": "u64" 69 | } 70 | ] 71 | }, 72 | { 73 | "name": "buyToken", 74 | "accounts": [ 75 | { 76 | "name": "user", 77 | "isMut": false, 78 | "isSigner": true 79 | }, 80 | { 81 | "name": "userWsol", 82 | "isMut": true, 83 | "isSigner": false 84 | }, 85 | { 86 | "name": "userMacro", 87 | "isMut": true, 88 | "isSigner": false 89 | }, 90 | { 91 | "name": "poolWsol", 92 | "isMut": true, 93 | "isSigner": false 94 | }, 95 | { 96 | "name": "poolMacro", 97 | "isMut": true, 98 | "isSigner": false 99 | }, 100 | { 101 | "name": "macroswapAccount", 102 | "isMut": false, 103 | "isSigner": false 104 | }, 105 | { 106 | "name": "poolOwner", 107 | "isMut": true, 108 | "isSigner": false 109 | }, 110 | { 111 | "name": "systemProgram", 112 | "isMut": false, 113 | "isSigner": false 114 | }, 115 | { 116 | "name": "tokenProgram", 117 | "isMut": false, 118 | "isSigner": false 119 | } 120 | ], 121 | "args": [ 122 | { 123 | "name": "amount", 124 | "type": "u64" 125 | } 126 | ] 127 | }, 128 | { 129 | "name": "sellToken", 130 | "accounts": [ 131 | { 132 | "name": "user", 133 | "isMut": false, 134 | "isSigner": true 135 | }, 136 | { 137 | "name": "userWsol", 138 | "isMut": true, 139 | "isSigner": false 140 | }, 141 | { 142 | "name": "userMacro", 143 | "isMut": true, 144 | "isSigner": false 145 | }, 146 | { 147 | "name": "poolWsol", 148 | "isMut": true, 149 | "isSigner": false 150 | }, 151 | { 152 | "name": "poolMacro", 153 | "isMut": true, 154 | "isSigner": false 155 | }, 156 | { 157 | "name": "macroswapAccount", 158 | "isMut": false, 159 | "isSigner": false 160 | }, 161 | { 162 | "name": "poolOwner", 163 | "isMut": true, 164 | "isSigner": false 165 | }, 166 | { 167 | "name": "systemProgram", 168 | "isMut": false, 169 | "isSigner": false 170 | }, 171 | { 172 | "name": "tokenProgram", 173 | "isMut": false, 174 | "isSigner": false 175 | } 176 | ], 177 | "args": [ 178 | { 179 | "name": "amount", 180 | "type": "u64" 181 | } 182 | ] 183 | }, 184 | { 185 | "name": "updateRate", 186 | "accounts": [ 187 | { 188 | "name": "authority", 189 | "isMut": false, 190 | "isSigner": true 191 | }, 192 | { 193 | "name": "macroswapAccount", 194 | "isMut": true, 195 | "isSigner": false 196 | } 197 | ], 198 | "args": [ 199 | { 200 | "name": "rate", 201 | "type": "u64" 202 | } 203 | ] 204 | } 205 | ], 206 | "accounts": [ 207 | { 208 | "name": "macroSwapAccount", 209 | "type": { 210 | "kind": "struct", 211 | "fields": [ 212 | { 213 | "name": "rate", 214 | "type": "u64" 215 | }, 216 | { 217 | "name": "authority", 218 | "type": "publicKey" 219 | }, 220 | { 221 | "name": "bumps", 222 | "type": { 223 | "defined": "PoolBumps" 224 | } 225 | }, 226 | { 227 | "name": "macroMint", 228 | "type": "publicKey" 229 | }, 230 | { 231 | "name": "wsolMint", 232 | "type": "publicKey" 233 | }, 234 | { 235 | "name": "poolMacro", 236 | "type": "publicKey" 237 | }, 238 | { 239 | "name": "poolWsol", 240 | "type": "publicKey" 241 | }, 242 | { 243 | "name": "poolOwner", 244 | "type": "publicKey" 245 | } 246 | ] 247 | } 248 | } 249 | ], 250 | "types": [ 251 | { 252 | "name": "PoolBumps", 253 | "type": { 254 | "kind": "struct", 255 | "fields": [ 256 | { 257 | "name": "poolMacro", 258 | "type": "u8" 259 | }, 260 | { 261 | "name": "poolWsol", 262 | "type": "u8" 263 | }, 264 | { 265 | "name": "poolOwner", 266 | "type": "u8" 267 | } 268 | ] 269 | } 270 | } 271 | ], 272 | "events": [ 273 | { 274 | "name": "BuyTokenEvent", 275 | "fields": [ 276 | { 277 | "name": "amount", 278 | "type": "u64", 279 | "index": false 280 | }, 281 | { 282 | "name": "user", 283 | "type": "publicKey", 284 | "index": false 285 | } 286 | ] 287 | }, 288 | { 289 | "name": "SellTokenEvent", 290 | "fields": [ 291 | { 292 | "name": "amount", 293 | "type": "u64", 294 | "index": false 295 | }, 296 | { 297 | "name": "user", 298 | "type": "publicKey", 299 | "index": false 300 | } 301 | ] 302 | } 303 | ], 304 | "errors": [ 305 | { 306 | "code": 300, 307 | "name": "LowWSol", 308 | "msg": "Insufficient WSOL" 309 | }, 310 | { 311 | "code": 301, 312 | "name": "LowMacro", 313 | "msg": "Insufficient Macro tokens" 314 | } 315 | ] 316 | }; 317 | 318 | export const IDL: Macroswap = { 319 | "version": "0.0.0", 320 | "name": "macroswap", 321 | "instructions": [ 322 | { 323 | "name": "initialize", 324 | "accounts": [ 325 | { 326 | "name": "user", 327 | "isMut": true, 328 | "isSigner": true 329 | }, 330 | { 331 | "name": "macroMint", 332 | "isMut": false, 333 | "isSigner": false 334 | }, 335 | { 336 | "name": "poolMacro", 337 | "isMut": true, 338 | "isSigner": false 339 | }, 340 | { 341 | "name": "wsolMint", 342 | "isMut": false, 343 | "isSigner": false 344 | }, 345 | { 346 | "name": "poolWsol", 347 | "isMut": true, 348 | "isSigner": false 349 | }, 350 | { 351 | "name": "macroswapAccount", 352 | "isMut": true, 353 | "isSigner": true 354 | }, 355 | { 356 | "name": "poolOwner", 357 | "isMut": false, 358 | "isSigner": false 359 | }, 360 | { 361 | "name": "systemProgram", 362 | "isMut": false, 363 | "isSigner": false 364 | }, 365 | { 366 | "name": "tokenProgram", 367 | "isMut": false, 368 | "isSigner": false 369 | }, 370 | { 371 | "name": "rent", 372 | "isMut": false, 373 | "isSigner": false 374 | } 375 | ], 376 | "args": [ 377 | { 378 | "name": "bumps", 379 | "type": { 380 | "defined": "PoolBumps" 381 | } 382 | }, 383 | { 384 | "name": "rate", 385 | "type": "u64" 386 | } 387 | ] 388 | }, 389 | { 390 | "name": "buyToken", 391 | "accounts": [ 392 | { 393 | "name": "user", 394 | "isMut": false, 395 | "isSigner": true 396 | }, 397 | { 398 | "name": "userWsol", 399 | "isMut": true, 400 | "isSigner": false 401 | }, 402 | { 403 | "name": "userMacro", 404 | "isMut": true, 405 | "isSigner": false 406 | }, 407 | { 408 | "name": "poolWsol", 409 | "isMut": true, 410 | "isSigner": false 411 | }, 412 | { 413 | "name": "poolMacro", 414 | "isMut": true, 415 | "isSigner": false 416 | }, 417 | { 418 | "name": "macroswapAccount", 419 | "isMut": false, 420 | "isSigner": false 421 | }, 422 | { 423 | "name": "poolOwner", 424 | "isMut": true, 425 | "isSigner": false 426 | }, 427 | { 428 | "name": "systemProgram", 429 | "isMut": false, 430 | "isSigner": false 431 | }, 432 | { 433 | "name": "tokenProgram", 434 | "isMut": false, 435 | "isSigner": false 436 | } 437 | ], 438 | "args": [ 439 | { 440 | "name": "amount", 441 | "type": "u64" 442 | } 443 | ] 444 | }, 445 | { 446 | "name": "sellToken", 447 | "accounts": [ 448 | { 449 | "name": "user", 450 | "isMut": false, 451 | "isSigner": true 452 | }, 453 | { 454 | "name": "userWsol", 455 | "isMut": true, 456 | "isSigner": false 457 | }, 458 | { 459 | "name": "userMacro", 460 | "isMut": true, 461 | "isSigner": false 462 | }, 463 | { 464 | "name": "poolWsol", 465 | "isMut": true, 466 | "isSigner": false 467 | }, 468 | { 469 | "name": "poolMacro", 470 | "isMut": true, 471 | "isSigner": false 472 | }, 473 | { 474 | "name": "macroswapAccount", 475 | "isMut": false, 476 | "isSigner": false 477 | }, 478 | { 479 | "name": "poolOwner", 480 | "isMut": true, 481 | "isSigner": false 482 | }, 483 | { 484 | "name": "systemProgram", 485 | "isMut": false, 486 | "isSigner": false 487 | }, 488 | { 489 | "name": "tokenProgram", 490 | "isMut": false, 491 | "isSigner": false 492 | } 493 | ], 494 | "args": [ 495 | { 496 | "name": "amount", 497 | "type": "u64" 498 | } 499 | ] 500 | }, 501 | { 502 | "name": "updateRate", 503 | "accounts": [ 504 | { 505 | "name": "authority", 506 | "isMut": false, 507 | "isSigner": true 508 | }, 509 | { 510 | "name": "macroswapAccount", 511 | "isMut": true, 512 | "isSigner": false 513 | } 514 | ], 515 | "args": [ 516 | { 517 | "name": "rate", 518 | "type": "u64" 519 | } 520 | ] 521 | } 522 | ], 523 | "accounts": [ 524 | { 525 | "name": "macroSwapAccount", 526 | "type": { 527 | "kind": "struct", 528 | "fields": [ 529 | { 530 | "name": "rate", 531 | "type": "u64" 532 | }, 533 | { 534 | "name": "authority", 535 | "type": "publicKey" 536 | }, 537 | { 538 | "name": "bumps", 539 | "type": { 540 | "defined": "PoolBumps" 541 | } 542 | }, 543 | { 544 | "name": "macroMint", 545 | "type": "publicKey" 546 | }, 547 | { 548 | "name": "wsolMint", 549 | "type": "publicKey" 550 | }, 551 | { 552 | "name": "poolMacro", 553 | "type": "publicKey" 554 | }, 555 | { 556 | "name": "poolWsol", 557 | "type": "publicKey" 558 | }, 559 | { 560 | "name": "poolOwner", 561 | "type": "publicKey" 562 | } 563 | ] 564 | } 565 | } 566 | ], 567 | "types": [ 568 | { 569 | "name": "PoolBumps", 570 | "type": { 571 | "kind": "struct", 572 | "fields": [ 573 | { 574 | "name": "poolMacro", 575 | "type": "u8" 576 | }, 577 | { 578 | "name": "poolWsol", 579 | "type": "u8" 580 | }, 581 | { 582 | "name": "poolOwner", 583 | "type": "u8" 584 | } 585 | ] 586 | } 587 | } 588 | ], 589 | "events": [ 590 | { 591 | "name": "BuyTokenEvent", 592 | "fields": [ 593 | { 594 | "name": "amount", 595 | "type": "u64", 596 | "index": false 597 | }, 598 | { 599 | "name": "user", 600 | "type": "publicKey", 601 | "index": false 602 | } 603 | ] 604 | }, 605 | { 606 | "name": "SellTokenEvent", 607 | "fields": [ 608 | { 609 | "name": "amount", 610 | "type": "u64", 611 | "index": false 612 | }, 613 | { 614 | "name": "user", 615 | "type": "publicKey", 616 | "index": false 617 | } 618 | ] 619 | } 620 | ], 621 | "errors": [ 622 | { 623 | "code": 300, 624 | "name": "LowWSol", 625 | "msg": "Insufficient WSOL" 626 | }, 627 | { 628 | "code": 301, 629 | "name": "LowMacro", 630 | "msg": "Insufficient Macro tokens" 631 | } 632 | ] 633 | }; 634 | -------------------------------------------------------------------------------- /app/src/web3/index.ts: -------------------------------------------------------------------------------- 1 | import { Provider, Program, Idl } from "@project-serum/anchor"; 2 | import { AnchorWallet } from "@solana/wallet-adapter-react"; 3 | import { ConfirmOptions, Connection } from "@solana/web3.js"; 4 | import { PublicKey } from "@solana/web3.js"; 5 | // import { IDL } from "./idl/macroswap"; 6 | import idl from "./idl/macroswap.json"; 7 | 8 | export const getProvider = (anchorWallet: AnchorWallet, connection: Connection): Provider => { 9 | const opts: ConfirmOptions = { 10 | preflightCommitment: "processed", 11 | }; 12 | const provider = new Provider(connection, anchorWallet, opts); 13 | return provider; 14 | } 15 | 16 | export const getReadOnlyProvider = (connection: Connection): Provider => { 17 | const wallet = {}; 18 | const provider = getProvider(wallet ,connection); 19 | return provider; 20 | } 21 | 22 | export const getProgram = ( 23 | provider: Provider 24 | ) => { 25 | const programId = new PublicKey(process.env.NEXT_PUBLIC_PROGRAM_ID || ""); 26 | // const program = new Program(IDL, programId, provider); NOT WORKING 27 | const program = new Program(idl as Idl, programId, provider); 28 | return program; 29 | } -------------------------------------------------------------------------------- /app/styles/Home.module.css: -------------------------------------------------------------------------------- 1 | .main { 2 | padding: 5rem 0; 3 | flex: 1; 4 | display: flex; 5 | flex-direction: column; 6 | justify-content: center; 7 | align-items: center; 8 | position: relative; 9 | } 10 | -------------------------------------------------------------------------------- /app/styles/Stats.module.css: -------------------------------------------------------------------------------- 1 | .main { 2 | padding: 5rem 0; 3 | flex: 1; 4 | display: flex; 5 | flex-direction: column; 6 | justify-content: center; 7 | align-items: center; 8 | position: relative; 9 | } 10 | -------------------------------------------------------------------------------- /app/styles/globals.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | padding: 0; 4 | margin: 0; 5 | color: #fff; 6 | background-color: #2d222e; 7 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, 8 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; 9 | } 10 | 11 | a { 12 | color: inherit; 13 | text-decoration: none; 14 | } 15 | 16 | * { 17 | box-sizing: border-box; 18 | } 19 | 20 | input::-webkit-outer-spin-button, 21 | input::-webkit-inner-spin-button { 22 | -webkit-appearance: none; 23 | margin: 0; 24 | } 25 | 26 | input[type="number"] { 27 | -moz-appearance: textfield; 28 | } 29 | -------------------------------------------------------------------------------- /app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "noEmit": true, 10 | "esModuleInterop": true, 11 | "module": "esnext", 12 | "moduleResolution": "node", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "jsx": "preserve" 16 | }, 17 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], 18 | "exclude": ["node_modules"] 19 | } 20 | -------------------------------------------------------------------------------- /migrations/script.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@project-serum/anchor"; 2 | import { Program, Provider } from "@project-serum/anchor"; 3 | import { NATIVE_MINT, Token, TOKEN_PROGRAM_ID } from "@solana/spl-token"; 4 | import { 5 | Keypair, 6 | PublicKey, 7 | SystemProgram, 8 | SYSVAR_RENT_PUBKEY, 9 | } from "@solana/web3.js"; 10 | import { airdrop } from "../tests/utils"; 11 | import { IDL } from "../target/types/macroswap"; 12 | 13 | const main = async () => { 14 | const rpcURL = process.env.RPC_URL || ""; 15 | const provider = Provider.local(rpcURL, { 16 | preflightCommitment: 'max', 17 | skipPreflight: true 18 | }); 19 | 20 | anchor.setProvider(provider); 21 | const { connection } = provider; 22 | 23 | const programId = process.env.PROGRAM_ID || ""; 24 | const program = new Program(IDL, programId, provider); 25 | 26 | const secretKey = new Uint8Array( 27 | process.env.SECRET_KEY.split(",").map((i) => Number(i)) 28 | ); 29 | const mintAuthority = Keypair.fromSecretKey(secretKey); 30 | const payer = Keypair.fromSecretKey(secretKey); 31 | const macroswapAccount = Keypair.generate(); 32 | 33 | await airdrop(provider, payer.publicKey, 2 * 10 ** 9); 34 | 35 | const macroMint = await Token.createMint( 36 | provider.connection, 37 | payer, 38 | mintAuthority.publicKey, 39 | null, 40 | 9, 41 | TOKEN_PROGRAM_ID 42 | ); 43 | 44 | const [poolMacroPda, poolMacroBump] = await PublicKey.findProgramAddress( 45 | [Buffer.from(anchor.utils.bytes.utf8.encode("pool_macro"))], 46 | program.programId 47 | ); 48 | const [poolWsolPda, poolWsolBump] = await PublicKey.findProgramAddress( 49 | [Buffer.from(anchor.utils.bytes.utf8.encode("pool_wsol"))], 50 | program.programId 51 | ); 52 | const [poolOwnerPda, poolOwnerBump] = await PublicKey.findProgramAddress( 53 | [Buffer.from(anchor.utils.bytes.utf8.encode("pool_owner"))], 54 | program.programId 55 | ); 56 | 57 | const poolMacro = poolMacroPda; 58 | const poolWsol = poolWsolPda; 59 | const poolOwner = poolOwnerPda; 60 | const bumps = { 61 | poolMacro: poolMacroBump, 62 | poolWsol: poolWsolBump, 63 | poolOwner: poolOwnerBump, 64 | }; 65 | 66 | const rate = 100; 67 | 68 | const tx = await program.rpc.initialize(bumps, new anchor.BN(rate), { 69 | accounts: { 70 | user: provider.wallet.publicKey, 71 | macroMint: macroMint.publicKey, 72 | poolMacro, 73 | wsolMint: NATIVE_MINT, 74 | poolWsol, 75 | macroswapAccount: macroswapAccount.publicKey, 76 | poolOwner, 77 | systemProgram: SystemProgram.programId, 78 | tokenProgram: TOKEN_PROGRAM_ID, 79 | rent: SYSVAR_RENT_PUBKEY, 80 | }, 81 | signers: [macroswapAccount], 82 | }); 83 | await connection.confirmTransaction(tx, "confirmed"); 84 | 85 | const macroAmount = 1_000_000 * 10 ** 9; 86 | await macroMint.mintTo( 87 | poolMacro, 88 | mintAuthority.publicKey, 89 | [mintAuthority], 90 | macroAmount 91 | ); 92 | 93 | console.log("pool_wsol: " + poolWsol.toString()); 94 | console.log("pool_macro: " + poolMacro.toString()); 95 | console.log("pool_owner: " + poolOwner.toString()); 96 | console.log("macro_mint: " + macroMint.publicKey.toString()); 97 | console.log("macroswap_account: " + macroswapAccount.publicKey.toString()); 98 | }; 99 | 100 | main() 101 | .then(() => process.exit(0)) 102 | .catch((error: Error) => { 103 | console.error(error); 104 | process.exit(1); 105 | }); 106 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "macroswap", 3 | "author": "REGO350", 4 | "version": "1.0.0", 5 | "description": "My first Solana program!", 6 | "license": "MIT", 7 | "scripts": { 8 | "build": "anchor build", 9 | "test": "anchor test", 10 | "script": "ts-node -r dotenv/config", 11 | "start": "solana-test-validator" 12 | }, 13 | "dependencies": { 14 | "@project-serum/anchor": "^0.18.0", 15 | "@project-serum/common": "^0.0.1-beta.3", 16 | "@solana/spl-token": "^0.1.8", 17 | "@solana/web3.js": "^1.30.2" 18 | }, 19 | "devDependencies": { 20 | "@types/chai": "^4.2.22", 21 | "@types/mocha": "^9.0.0", 22 | "bn.js": "^5.2.0", 23 | "chai": "^4.3.4", 24 | "dotenv": "^10.0.0", 25 | "mocha": "^9.0.3", 26 | "ts-mocha": "^8.0.0", 27 | "ts-node": "^10.4.0", 28 | "typescript": "^4.3.5" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /programs/macroswap/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "macroswap" 3 | version = "0.1.0" 4 | description = "Created with Anchor" 5 | edition = "2018" 6 | 7 | [lib] 8 | crate-type = ["cdylib", "lib"] 9 | name = "macroswap" 10 | 11 | [features] 12 | no-entrypoint = [] 13 | no-idl = [] 14 | cpi = ["no-entrypoint"] 15 | default = [] 16 | 17 | [dependencies] 18 | anchor-lang = "0.17.0" 19 | anchor-spl = "0.17.0" 20 | spl-token = "3.2.0" -------------------------------------------------------------------------------- /programs/macroswap/Xargo.toml: -------------------------------------------------------------------------------- 1 | [target.bpfel-unknown-unknown.dependencies.std] 2 | features = [] 3 | -------------------------------------------------------------------------------- /programs/macroswap/src/account.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[account] 4 | pub struct MacroSwapAccount { 5 | pub rate: u64, // 8 6 | pub authority: Pubkey, // 32 7 | 8 | pub bumps: PoolBumps, // 2 9 | pub macro_mint: Pubkey, // 32 10 | pub wsol_mint: Pubkey, // 32 11 | pub pool_macro: Pubkey, // 32 12 | pub pool_wsol: Pubkey, // 32 13 | pub pool_owner: Pubkey // 32 14 | } 15 | 16 | #[derive(AnchorSerialize, AnchorDeserialize, Default, Clone)] 17 | pub struct PoolBumps { 18 | pub pool_macro: u8, // 1 19 | pub pool_wsol: u8, // 1 20 | pub pool_owner: u8 // 1 21 | } 22 | 23 | impl MacroSwapAccount { 24 | pub const LEN: usize = 8 + 32 + 3 + 5 * 32; 25 | } -------------------------------------------------------------------------------- /programs/macroswap/src/context.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | use anchor_spl::token::{Token, TokenAccount, Transfer, Mint}; 3 | use crate::account::*; 4 | 5 | #[derive(Accounts)] 6 | #[instruction(bumps: PoolBumps)] 7 | pub struct Initialize<'info> { 8 | //Program initializer (owner) 9 | #[account(mut)] 10 | pub user: Signer<'info>, 11 | 12 | //Macro token mint account 13 | pub macro_mint: Box>, 14 | //Macro token ATA (pool) 15 | #[account( 16 | init, payer = user, 17 | seeds = [b"pool_macro".as_ref()], bump = bumps.pool_macro, 18 | token::mint = macro_mint, token::authority = pool_owner)] 19 | pub pool_macro: Box>, 20 | 21 | //WSOL token mint account 22 | pub wsol_mint: Box>, 23 | //WSOL token ATA (pool) 24 | #[account( 25 | init, payer = user, 26 | seeds = [b"pool_wsol".as_ref()], bump = bumps.pool_wsol, 27 | token::mint = wsol_mint, token::authority = pool_owner)] 28 | pub pool_wsol: Box>, 29 | 30 | //Account for storing state variables 31 | #[account(init, payer = user, space = 8 + MacroSwapAccount::LEN)] 32 | pub macroswap_account: Box>, 33 | //PDA authority account for pools 34 | #[account(seeds = [b"pool_owner".as_ref()], bump = bumps.pool_owner)] 35 | pub pool_owner: AccountInfo<'info>, 36 | 37 | //System 38 | pub system_program: Program<'info, System>, 39 | pub token_program: Program<'info, Token>, 40 | pub rent: Sysvar<'info, Rent> 41 | } 42 | 43 | #[derive(Accounts)] 44 | pub struct UpdateRate<'info> { 45 | pub authority: Signer<'info>, 46 | 47 | #[account(mut, has_one = authority)] 48 | pub macroswap_account: Box>, 49 | } 50 | 51 | #[derive(Accounts)] 52 | pub struct BuyToken<'info> { 53 | pub user: Signer<'info>, 54 | 55 | #[account(mut, 56 | constraint = user_wsol.owner == user.key(), 57 | constraint = user_wsol.mint == macroswap_account.wsol_mint)] 58 | pub user_wsol: Box>, 59 | #[account(mut, 60 | constraint = user_macro.owner == user.key(), 61 | constraint = user_macro.mint == macroswap_account.macro_mint)] 62 | pub user_macro: Box>, 63 | 64 | #[account(mut, constraint = pool_wsol.key() == macroswap_account.pool_wsol)] 65 | pub pool_wsol: Box>, 66 | #[account(mut, constraint = pool_macro.key() == macroswap_account.pool_macro)] 67 | pub pool_macro: Box>, 68 | 69 | pub macroswap_account: Box>, 70 | #[account(mut, constraint = pool_owner.key() == macroswap_account.pool_owner)] 71 | pub pool_owner: AccountInfo<'info>, 72 | 73 | pub system_program: Program<'info, System>, 74 | pub token_program: Program<'info, Token>, 75 | } 76 | 77 | #[derive(Accounts)] 78 | pub struct SellToken<'info> { 79 | pub user: Signer<'info>, 80 | 81 | #[account(mut, 82 | constraint = user_wsol.owner == user.key(), 83 | constraint = user_wsol.mint == macroswap_account.wsol_mint)] 84 | pub user_wsol: Account<'info, TokenAccount>, 85 | #[account(mut, 86 | constraint = user_macro.owner == user.key(), 87 | constraint = user_macro.mint == macroswap_account.macro_mint)] 88 | pub user_macro: Account<'info, TokenAccount>, 89 | 90 | #[account(mut, constraint = pool_wsol.key() == macroswap_account.pool_wsol)] 91 | pub pool_wsol: Box>, 92 | #[account(mut, constraint = pool_macro.key() == macroswap_account.pool_macro)] 93 | pub pool_macro: Box>, 94 | 95 | pub macroswap_account: Box>, 96 | #[account(mut, constraint = pool_owner.key() == macroswap_account.pool_owner)] 97 | pub pool_owner: AccountInfo<'info>, 98 | 99 | pub system_program: Program<'info, System>, 100 | pub token_program: Program<'info, Token>, 101 | } 102 | 103 | impl<'a, 'b, 'c, 'info> BuyToken<'info> { 104 | pub fn into_transfer_to_pool_wsol_context(&self) -> CpiContext<'a, 'b, 'c, 'info, Transfer<'info>> { 105 | let cpi_accounts = Transfer { 106 | from: self.user_wsol.to_account_info().clone(), 107 | to: self.pool_wsol.to_account_info().clone(), 108 | authority: self.user.to_account_info().clone() 109 | }; 110 | let cpi_program = self.token_program.to_account_info(); 111 | CpiContext::new(cpi_program, cpi_accounts) 112 | } 113 | 114 | pub fn into_transfer_to_user_macro_context(&self) -> CpiContext<'a, 'b, 'c, 'info, Transfer<'info>> { 115 | let cpi_accounts = Transfer { 116 | from: self.pool_macro.to_account_info().clone(), 117 | to: self.user_macro.to_account_info().clone(), 118 | authority: self.pool_owner.to_account_info().clone(), 119 | }; 120 | let cpi_program = self.token_program.to_account_info(); 121 | CpiContext::new(cpi_program, cpi_accounts) 122 | } 123 | } 124 | 125 | impl<'a, 'b, 'c, 'info> SellToken<'info> { 126 | pub fn into_transfer_to_pool_macro_context(&self) -> CpiContext<'a, 'b, 'c, 'info, Transfer<'info>> { 127 | let cpi_accounts = Transfer { 128 | from: self.user_macro.to_account_info().clone(), 129 | to: self.pool_macro.to_account_info().clone(), 130 | authority: self.user.to_account_info().clone() 131 | }; 132 | let cpi_program = self.token_program.to_account_info(); 133 | CpiContext::new(cpi_program, cpi_accounts) 134 | } 135 | 136 | pub fn into_transfer_to_user_wsol_context(&self) -> CpiContext<'a, 'b, 'c, 'info, Transfer<'info>> { 137 | let cpi_accounts = Transfer { 138 | from: self.pool_wsol.to_account_info().clone(), 139 | to: self.user_wsol.to_account_info().clone(), 140 | authority: self.pool_owner.to_account_info().clone() 141 | }; 142 | let cpi_program = self.token_program.to_account_info(); 143 | CpiContext::new(cpi_program, cpi_accounts) 144 | } 145 | } -------------------------------------------------------------------------------- /programs/macroswap/src/error.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[error] 4 | pub enum ErrorCode { 5 | #[msg("Insufficient WSOL")] 6 | LowWSol, 7 | #[msg("Insufficient Macro tokens")] 8 | LowMacro, 9 | } 10 | -------------------------------------------------------------------------------- /programs/macroswap/src/event.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[event] 4 | pub struct BuyTokenEvent { 5 | pub amount: u64, 6 | pub user: Pubkey, 7 | } 8 | 9 | #[event] 10 | pub struct SellTokenEvent { 11 | pub amount: u64, 12 | pub user: Pubkey, 13 | } 14 | -------------------------------------------------------------------------------- /programs/macroswap/src/lib.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | use anchor_spl::token::{self}; 3 | 4 | use account::*; 5 | use context::*; 6 | use error::*; 7 | use event::*; 8 | 9 | mod account; 10 | mod context; 11 | mod error; 12 | mod event; 13 | 14 | declare_id!("FqwbZ8hJwL2uaANW61tXA7JX6KUQq4THhaeUb2AXnMPj"); 15 | 16 | #[program] 17 | pub mod macroswap { 18 | use super::*; 19 | 20 | pub fn initialize(ctx: Context, bumps: PoolBumps, rate: u64) -> ProgramResult { 21 | msg!("INITIALIZE"); 22 | 23 | let macroswap_account = &mut ctx.accounts.macroswap_account; 24 | 25 | macroswap_account.rate = rate; 26 | macroswap_account.authority = *ctx.accounts.user.key; 27 | macroswap_account.bumps = bumps; 28 | macroswap_account.macro_mint = ctx.accounts.macro_mint.key(); 29 | macroswap_account.wsol_mint = ctx.accounts.wsol_mint.key(); 30 | macroswap_account.pool_macro = ctx.accounts.pool_macro.key(); 31 | macroswap_account.pool_wsol = ctx.accounts.pool_wsol.key(); 32 | macroswap_account.pool_owner = ctx.accounts.pool_owner.key(); 33 | 34 | Ok(()) 35 | } 36 | 37 | pub fn buy_token(ctx: Context, amount: u64) -> ProgramResult { 38 | msg!("BUY"); 39 | 40 | let macroswap_account = &ctx.accounts.macroswap_account; 41 | 42 | //Calculate amount of WSOL user is going to pay 43 | let value = amount / macroswap_account.rate; 44 | 45 | if ctx.accounts.user_wsol.amount < value { 46 | return Err(ErrorCode::LowWSol.into()); 47 | } 48 | 49 | //Get PDA signer seed of pool owner 50 | let pda_seeds = &[ 51 | b"pool_owner".as_ref(), 52 | &[macroswap_account.bumps.pool_owner], 53 | ]; 54 | 55 | //Transfer WSOL from user to pool 56 | token::transfer(ctx.accounts.into_transfer_to_pool_wsol_context(), value)?; 57 | 58 | //Transfer Macro from pool to user 59 | token::transfer( 60 | ctx 61 | .accounts 62 | .into_transfer_to_user_macro_context() 63 | .with_signer(&[pda_seeds.as_ref()]), 64 | amount, 65 | )?; 66 | 67 | emit!(BuyTokenEvent { 68 | amount, 69 | user: ctx.accounts.user.key() 70 | }); 71 | 72 | Ok(()) 73 | } 74 | 75 | pub fn sell_token(ctx: Context, amount: u64) -> ProgramResult { 76 | msg!("SELL"); 77 | 78 | let macroswap_account = &ctx.accounts.macroswap_account; 79 | 80 | if ctx.accounts.user_macro.amount < amount { 81 | return Err(ErrorCode::LowMacro.into()); 82 | } 83 | 84 | //Calculate amount of WSOL user is going to receive 85 | let value = amount / macroswap_account.rate; 86 | //Get PDA signer seed of pool owner 87 | let pda_seeds = &[b"pool_owner".as_ref(), &[macroswap_account.bumps.pool_owner]]; 88 | 89 | //Transfer Macro from user to pool 90 | token::transfer(ctx.accounts.into_transfer_to_pool_macro_context(), amount)?; 91 | 92 | //Transfer WSOL from pool to user 93 | token::transfer( 94 | ctx 95 | .accounts 96 | .into_transfer_to_user_wsol_context() 97 | .with_signer(&[pda_seeds.as_ref()]), 98 | value, 99 | )?; 100 | 101 | emit!(SellTokenEvent { 102 | amount, 103 | user: ctx.accounts.user.key() 104 | }); 105 | 106 | Ok(()) 107 | } 108 | 109 | pub fn update_rate(ctx: Context, rate: u64) -> ProgramResult { 110 | msg!("UPDATE"); 111 | 112 | let macroswap_account = &mut ctx.accounts.macroswap_account; 113 | macroswap_account.rate = rate; 114 | 115 | Ok(()) 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /tests/macroswap.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@project-serum/anchor"; 2 | import { Program, BN } from "@project-serum/anchor"; 3 | import { Token, TOKEN_PROGRAM_ID, NATIVE_MINT } from "@solana/spl-token"; 4 | import { 5 | SYSVAR_RENT_PUBKEY, 6 | PublicKey, 7 | Keypair, 8 | SystemProgram, 9 | } from "@solana/web3.js"; 10 | import { expect } from "chai"; 11 | import { airdrop, getBalance, mintWrapTransfer, wrap } from "./utils"; 12 | import { Macroswap } from "../target/types/macroswap"; 13 | 14 | describe("MacroSwap Test", () => { 15 | const provider = anchor.Provider.local(); 16 | const { connection } = provider; 17 | anchor.setProvider(provider); 18 | 19 | //Program 20 | const program = anchor.workspace.Macroswap as Program; 21 | 22 | //Mint accounts 23 | let macroMint: Token = null; 24 | let macroMintAccount: PublicKey = null; 25 | const wsolMintAccount: PublicKey = NATIVE_MINT; 26 | 27 | //Token accounts 28 | let poolMacro: PublicKey = null; 29 | let poolWsol: PublicKey = null; 30 | let poolOwner: PublicKey = null; 31 | 32 | //Admin accounts 33 | const payer = Keypair.generate(); 34 | const mintAuthority = Keypair.generate(); 35 | 36 | //User accounts 37 | const alice = Keypair.generate(); 38 | 39 | //Other accounts / settings 40 | const macroswapAccount = Keypair.generate(); 41 | let bumps: { 42 | poolMacro: number; 43 | poolWsol: number; 44 | poolOwner: number; 45 | } = null; 46 | 47 | const rate = 10; 48 | 49 | before(async () => { 50 | //Airdrop 10SOL (10^10 lamports) to payer 51 | await airdrop(provider, payer.publicKey, 10 ** 10); 52 | 53 | //Create Macro token mint account 54 | macroMint = await Token.createMint( 55 | provider.connection, 56 | payer, 57 | mintAuthority.publicKey, 58 | null, 59 | 9, 60 | TOKEN_PROGRAM_ID 61 | ); 62 | macroMintAccount = macroMint.publicKey; 63 | 64 | //Find PDA and its bump for macro token account (pool) 65 | const [poolMacroPda, poolMacroBump] = await PublicKey.findProgramAddress( 66 | [Buffer.from(anchor.utils.bytes.utf8.encode("pool_macro"))], 67 | program.programId 68 | ); 69 | //Find PDA and its bump for wsol token account (pool) 70 | const [poolWsolPda, poolWsolBump] = await PublicKey.findProgramAddress( 71 | [Buffer.from(anchor.utils.bytes.utf8.encode("pool_wsol"))], 72 | program.programId 73 | ); 74 | //Find PDA and its bump for token accounts authority 75 | const [poolOwnerPda, poolOwnerBump] = await PublicKey.findProgramAddress( 76 | [Buffer.from(anchor.utils.bytes.utf8.encode("pool_owner"))], 77 | program.programId 78 | ); 79 | 80 | poolMacro = poolMacroPda; 81 | poolWsol = poolWsolPda; 82 | poolOwner = poolOwnerPda; 83 | bumps = { 84 | poolMacro: poolMacroBump, 85 | poolWsol: poolWsolBump, 86 | poolOwner: poolOwnerBump, 87 | }; 88 | }); 89 | 90 | describe("Initialization", () => { 91 | it("Initializes MacroSwap program", async () => { 92 | const tx = await program.rpc.initialize(bumps, new BN(rate), { 93 | accounts: { 94 | user: provider.wallet.publicKey, 95 | macroMint: macroMintAccount, 96 | poolMacro, 97 | wsolMint: wsolMintAccount, 98 | poolWsol, 99 | macroswapAccount: macroswapAccount.publicKey, 100 | poolOwner, 101 | systemProgram: SystemProgram.programId, 102 | tokenProgram: TOKEN_PROGRAM_ID, 103 | rent: SYSVAR_RENT_PUBKEY, 104 | }, 105 | signers: [macroswapAccount], 106 | }); 107 | 108 | await connection.confirmTransaction(tx, "confirmed"); 109 | }); 110 | 111 | it("Has the correct setttings", async () => { 112 | const _macroswapAccount = await program.account.macroSwapAccount.fetch(macroswapAccount.publicKey); 113 | expect(_macroswapAccount.rate.toNumber()).to.eq(10); 114 | expect(_macroswapAccount.poolOwner.toBase58()).to.eq(poolOwner.toBase58()); 115 | }); 116 | 117 | it("Funds the program", async () => { 118 | //Fund 1,000,000 macro tokens to program 119 | const macroAmount = 1_000_000 * 10 ** 9; 120 | await macroMint.mintTo( 121 | poolMacro, 122 | mintAuthority.publicKey, 123 | [mintAuthority], 124 | macroAmount 125 | ); 126 | 127 | //Mint 1,000 SOL 128 | const wsolAmount = 1_000 * 10 ** 9; 129 | await mintWrapTransfer(provider, poolWsol, wsolAmount, payer); 130 | 131 | expect(await getBalance(provider, poolMacro)).to.eq(macroAmount); 132 | expect(await getBalance(provider, poolWsol)).to.eq(wsolAmount); 133 | }); 134 | }) 135 | 136 | describe("Basic tests", () => { 137 | const wsolAmount = 1000000000; 138 | const macroAmount = wsolAmount * rate; 139 | 140 | let aliceWsolAccount: PublicKey = null; 141 | let aliceMacroAccount: PublicKey = null; 142 | 143 | it("Alice buys tokens", async () => { 144 | await airdrop(provider, payer.publicKey, wsolAmount); 145 | aliceWsolAccount = await wrap( 146 | provider, 147 | alice.publicKey, 148 | wsolAmount, 149 | payer 150 | ); 151 | aliceMacroAccount = await macroMint.createAccount(alice.publicKey); 152 | 153 | const tx = await program.rpc.buyToken(new BN(macroAmount), { 154 | accounts: { 155 | user: alice.publicKey, 156 | userWsol: aliceWsolAccount, 157 | userMacro: aliceMacroAccount, 158 | poolWsol, 159 | poolMacro, 160 | poolOwner, 161 | macroswapAccount: macroswapAccount.publicKey, 162 | systemProgram: SystemProgram.programId, 163 | tokenProgram: TOKEN_PROGRAM_ID, 164 | }, 165 | signers: [alice], 166 | }); 167 | await connection.confirmTransaction(tx, "confirmed"); 168 | 169 | expect(await getBalance(provider, aliceWsolAccount)).to.eq(0); 170 | expect(await getBalance(provider, aliceMacroAccount)).to.eq(macroAmount); 171 | }); 172 | 173 | it("Alice sells tokens", async () => { 174 | const transferAmount = (new BN(macroAmount)).div(new BN(2)); 175 | const tx = await program.rpc.sellToken(transferAmount, { 176 | accounts: { 177 | user: alice.publicKey, 178 | userWsol: aliceWsolAccount, 179 | userMacro: aliceMacroAccount, 180 | poolWsol, 181 | poolMacro, 182 | poolOwner, 183 | macroswapAccount: macroswapAccount.publicKey, 184 | systemProgram: SystemProgram.programId, 185 | tokenProgram: TOKEN_PROGRAM_ID, 186 | }, 187 | signers: [alice] 188 | }) 189 | await connection.confirmTransaction(tx, "confirmed"); 190 | 191 | expect(await getBalance(provider, aliceWsolAccount)).to.eq(wsolAmount/2); 192 | expect(await getBalance(provider, aliceMacroAccount)).to.eq(macroAmount/2); 193 | }) 194 | 195 | it("Alice unwraps wsol", async () => { 196 | const wsol = new Token(connection, NATIVE_MINT, TOKEN_PROGRAM_ID, payer); 197 | await wsol.closeAccount(aliceWsolAccount, alice.publicKey, alice.publicKey, [alice]); 198 | const balance = await connection.getBalance(alice.publicKey); 199 | 200 | expect(balance).to.gte(wsolAmount/2); 201 | }); 202 | }); 203 | }); 204 | -------------------------------------------------------------------------------- /tests/utils.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@project-serum/anchor"; 2 | import { getTokenAccount } from "@project-serum/common"; 3 | import { Token, TOKEN_PROGRAM_ID } from "@solana/spl-token"; 4 | import { 5 | PublicKey, 6 | sendAndConfirmTransaction, 7 | Transaction, 8 | } from "@solana/web3.js"; 9 | 10 | export const airdrop = async ( 11 | { connection }: anchor.Provider, 12 | payer: PublicKey, 13 | amount: number 14 | ): Promise => { 15 | const tx = await connection.requestAirdrop(payer, amount); 16 | await connection.confirmTransaction(tx, "confirmed"); 17 | }; 18 | 19 | export const wrap = async ( 20 | { connection } : anchor.Provider, 21 | owner: PublicKey, 22 | amount: number, 23 | payer: anchor.web3.Keypair, 24 | ): Promise => { 25 | const wsolTokenAccount = await Token.createWrappedNativeAccount( 26 | connection, 27 | TOKEN_PROGRAM_ID, 28 | owner, 29 | payer, 30 | amount 31 | ); 32 | return wsolTokenAccount; 33 | } 34 | 35 | export const transfer = async ( 36 | { connection } : anchor.Provider, 37 | tokenAccount: PublicKey, 38 | dest: PublicKey, 39 | amount: number, 40 | owner: anchor.web3.Keypair 41 | ): Promise => { 42 | const itx = Token.createTransferInstruction( 43 | TOKEN_PROGRAM_ID, 44 | tokenAccount, 45 | dest, 46 | owner.publicKey, 47 | [], 48 | amount 49 | ); 50 | const tx = new Transaction().add(itx); 51 | await sendAndConfirmTransaction(connection, tx, [owner]); 52 | } 53 | 54 | export const mintWrapTransfer = async ( 55 | provider : anchor.Provider, 56 | dest: PublicKey, 57 | amount: number, 58 | payer: anchor.web3.Keypair 59 | ): Promise => { 60 | //Aidrop 61 | await airdrop(provider, payer.publicKey, amount); 62 | 63 | //Wrap 64 | const wsolTokenAccount = await wrap(provider, payer.publicKey, amount, payer); 65 | 66 | //Transfer 67 | await transfer(provider, wsolTokenAccount, dest, amount, payer); 68 | }; 69 | 70 | export const getBalance = async ( 71 | provider: anchor.Provider, 72 | address: PublicKey 73 | ): Promise => { 74 | const tokenAccount = await getTokenAccount(provider, address); 75 | const balance = tokenAccount.amount.toNumber(); 76 | return balance; 77 | }; 78 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "types": ["mocha", "chai"], 4 | "typeRoots": ["./node_modules/@types"], 5 | "lib": ["es2015"], 6 | "module": "commonjs", 7 | "target": "es6", 8 | "esModuleInterop": true, 9 | "resolveJsonModule": true 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@babel/runtime@^7.10.5", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.5": 6 | version "7.15.4" 7 | resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.4.tgz#fd17d16bfdf878e6dd02d19753a39fa8a8d9c84a" 8 | integrity sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw== 9 | dependencies: 10 | regenerator-runtime "^0.13.4" 11 | 12 | "@cspotcode/source-map-consumer@0.8.0": 13 | version "0.8.0" 14 | resolved "https://registry.yarnpkg.com/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b" 15 | integrity sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg== 16 | 17 | "@cspotcode/source-map-support@0.7.0": 18 | version "0.7.0" 19 | resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz#4789840aa859e46d2f3173727ab707c66bf344f5" 20 | integrity sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA== 21 | dependencies: 22 | "@cspotcode/source-map-consumer" "0.8.0" 23 | 24 | "@ethersproject/bytes@^5.5.0": 25 | version "5.5.0" 26 | resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.5.0.tgz#cb11c526de657e7b45d2e0f0246fb3b9d29a601c" 27 | integrity sha512-ABvc7BHWhZU9PNM/tANm/Qx4ostPGadAuQzWTr3doklZOhDlmcBqclrQe/ZXUIj3K8wC28oYeuRa+A37tX9kog== 28 | dependencies: 29 | "@ethersproject/logger" "^5.5.0" 30 | 31 | "@ethersproject/logger@^5.5.0": 32 | version "5.5.0" 33 | resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.5.0.tgz#0c2caebeff98e10aefa5aef27d7441c7fd18cf5d" 34 | integrity sha512-rIY/6WPm7T8n3qS2vuHTUBPdXHl+rGxWxW5okDfo9J4Z0+gRRZT0msvUdIJkE4/HS29GUMziwGaaKO2bWONBrg== 35 | 36 | "@ethersproject/sha2@^5.5.0": 37 | version "5.5.0" 38 | resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.5.0.tgz#a40a054c61f98fd9eee99af2c3cc6ff57ec24db7" 39 | integrity sha512-B5UBoglbCiHamRVPLA110J+2uqsifpZaTmid2/7W5rbtYVz6gus6/hSDieIU/6gaKIDcOj12WnOdiymEUHIAOA== 40 | dependencies: 41 | "@ethersproject/bytes" "^5.5.0" 42 | "@ethersproject/logger" "^5.5.0" 43 | hash.js "1.1.7" 44 | 45 | "@project-serum/anchor@^0.11.1": 46 | version "0.11.1" 47 | resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.11.1.tgz#155bff2c70652eafdcfd5559c81a83bb19cec9ff" 48 | integrity sha512-oIdm4vTJkUy6GmE6JgqDAuQPKI7XM4TPJkjtoIzp69RZe0iAD9JP2XHx7lV1jLdYXeYHqDXfBt3zcq7W91K6PA== 49 | dependencies: 50 | "@project-serum/borsh" "^0.2.2" 51 | "@solana/web3.js" "^1.17.0" 52 | base64-js "^1.5.1" 53 | bn.js "^5.1.2" 54 | bs58 "^4.0.1" 55 | buffer-layout "^1.2.0" 56 | camelcase "^5.3.1" 57 | crypto-hash "^1.3.0" 58 | eventemitter3 "^4.0.7" 59 | find "^0.3.0" 60 | js-sha256 "^0.9.0" 61 | pako "^2.0.3" 62 | snake-case "^3.0.4" 63 | toml "^3.0.0" 64 | 65 | "@project-serum/anchor@^0.18.0": 66 | version "0.18.0" 67 | resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.18.0.tgz#867144282e59482230f797f73ee9f5634f846061" 68 | integrity sha512-WTm+UB93MoxyCbjnHIibv/uUEoO/5gL4GEtE/aMioLF8Z4i0vCMPnvAN0xpk9VBu3t7ld2DcCE/L+6Z7dwU++w== 69 | dependencies: 70 | "@project-serum/borsh" "^0.2.2" 71 | "@solana/web3.js" "^1.17.0" 72 | base64-js "^1.5.1" 73 | bn.js "^5.1.2" 74 | bs58 "^4.0.1" 75 | buffer-layout "^1.2.0" 76 | camelcase "^5.3.1" 77 | crypto-hash "^1.3.0" 78 | eventemitter3 "^4.0.7" 79 | find "^0.3.0" 80 | js-sha256 "^0.9.0" 81 | pako "^2.0.3" 82 | snake-case "^3.0.4" 83 | toml "^3.0.0" 84 | 85 | "@project-serum/borsh@^0.2.2": 86 | version "0.2.2" 87 | resolved "https://registry.yarnpkg.com/@project-serum/borsh/-/borsh-0.2.2.tgz#63e558f2d6eb6ab79086bf499dea94da3182498f" 88 | integrity sha512-Ms+aWmGVW6bWd3b0+MWwoaYig2QD0F90h0uhr7AzY3dpCb5e2S6RsRW02vFTfa085pY2VLB7nTZNbFECQ1liTg== 89 | dependencies: 90 | bn.js "^5.1.2" 91 | buffer-layout "^1.2.0" 92 | 93 | "@project-serum/common@^0.0.1-beta.3": 94 | version "0.0.1-beta.3" 95 | resolved "https://registry.yarnpkg.com/@project-serum/common/-/common-0.0.1-beta.3.tgz#53586eaff9d9fd7e8938b1e12080c935b8b6ad07" 96 | integrity sha512-gnQE/eUydTtto5okCgLWj1M97R9RRPJqnhKklikYI7jP/pnNhDmngSXC/dmfzED2GXSJEIKNIlxVw1k+E2Aw3w== 97 | dependencies: 98 | "@project-serum/serum" "^0.13.21" 99 | bn.js "^5.1.2" 100 | superstruct "0.8.3" 101 | 102 | "@project-serum/serum@^0.13.21": 103 | version "0.13.60" 104 | resolved "https://registry.yarnpkg.com/@project-serum/serum/-/serum-0.13.60.tgz#abeb3355ebc1895d685250df5965f688502ebcbb" 105 | integrity sha512-fGsp9F0ZAS48YQ2HNy+6CNoifJESFXxVsOLPd9QK1XNV8CTuQoECOnVXxV6s5cKGre8pLNq5hrhi5J6aCGauEQ== 106 | dependencies: 107 | "@project-serum/anchor" "^0.11.1" 108 | "@solana/spl-token" "^0.1.6" 109 | "@solana/web3.js" "^1.21.0" 110 | bn.js "^5.1.2" 111 | buffer-layout "^1.2.0" 112 | 113 | "@solana/buffer-layout@^3.0.0": 114 | version "3.0.0" 115 | resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-3.0.0.tgz#b9353caeb9a1589cb77a1b145bcb1a9a93114326" 116 | integrity sha512-MVdgAKKL39tEs0l8je0hKaXLQFb7Rdfb0Xg2LjFZd8Lfdazkg6xiS98uAZrEKvaoF3i4M95ei9RydkGIDMeo3w== 117 | dependencies: 118 | buffer "~6.0.3" 119 | 120 | "@solana/spl-token@^0.1.6", "@solana/spl-token@^0.1.8": 121 | version "0.1.8" 122 | resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.1.8.tgz#f06e746341ef8d04165e21fc7f555492a2a0faa6" 123 | integrity sha512-LZmYCKcPQDtJgecvWOgT/cnoIQPWjdH+QVyzPcFvyDUiT0DiRjZaam4aqNUyvchLFhzgunv3d9xOoyE34ofdoQ== 124 | dependencies: 125 | "@babel/runtime" "^7.10.5" 126 | "@solana/web3.js" "^1.21.0" 127 | bn.js "^5.1.0" 128 | buffer "6.0.3" 129 | buffer-layout "^1.2.0" 130 | dotenv "10.0.0" 131 | 132 | "@solana/web3.js@^1.17.0", "@solana/web3.js@^1.21.0": 133 | version "1.29.2" 134 | resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.29.2.tgz#05c162f477c226ee3211f8ee8c1c6d4203e08f54" 135 | integrity sha512-gtoHzimv7upsKF2DIO4/vNfIMKN+cxSImBHvsdiMyp9IPqb8sctsHVU/+80xXl0JKXVKeairDv5RvVnesJYrtw== 136 | dependencies: 137 | "@babel/runtime" "^7.12.5" 138 | "@solana/buffer-layout" "^3.0.0" 139 | bn.js "^5.0.0" 140 | borsh "^0.4.0" 141 | bs58 "^4.0.1" 142 | buffer "6.0.1" 143 | cross-fetch "^3.1.4" 144 | crypto-hash "^1.2.2" 145 | jayson "^3.4.4" 146 | js-sha3 "^0.8.0" 147 | rpc-websockets "^7.4.2" 148 | secp256k1 "^4.0.2" 149 | superstruct "^0.14.2" 150 | tweetnacl "^1.0.0" 151 | 152 | "@solana/web3.js@^1.30.2": 153 | version "1.30.2" 154 | resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.30.2.tgz#e85da75e0825dc64f53eb64a1ff0115b27bec135" 155 | integrity sha512-hznCj+rkfvM5taRP3Z+l5lumB7IQnDrB4l55Wpsg4kDU9Zds8pE5YOH5Z9bbF/pUzZJKQjyBjnY/6kScBm3Ugg== 156 | dependencies: 157 | "@babel/runtime" "^7.12.5" 158 | "@ethersproject/sha2" "^5.5.0" 159 | "@solana/buffer-layout" "^3.0.0" 160 | bn.js "^5.0.0" 161 | borsh "^0.4.0" 162 | bs58 "^4.0.1" 163 | buffer "6.0.1" 164 | cross-fetch "^3.1.4" 165 | jayson "^3.4.4" 166 | js-sha3 "^0.8.0" 167 | rpc-websockets "^7.4.2" 168 | secp256k1 "^4.0.2" 169 | superstruct "^0.14.2" 170 | tweetnacl "^1.0.0" 171 | 172 | "@tsconfig/node10@^1.0.7": 173 | version "1.0.8" 174 | resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9" 175 | integrity sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg== 176 | 177 | "@tsconfig/node12@^1.0.7": 178 | version "1.0.9" 179 | resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.9.tgz#62c1f6dee2ebd9aead80dc3afa56810e58e1a04c" 180 | integrity sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw== 181 | 182 | "@tsconfig/node14@^1.0.0": 183 | version "1.0.1" 184 | resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.1.tgz#95f2d167ffb9b8d2068b0b235302fafd4df711f2" 185 | integrity sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg== 186 | 187 | "@tsconfig/node16@^1.0.2": 188 | version "1.0.2" 189 | resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" 190 | integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== 191 | 192 | "@types/bn.js@^4.11.5": 193 | version "4.11.6" 194 | resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" 195 | integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== 196 | dependencies: 197 | "@types/node" "*" 198 | 199 | "@types/chai@^4.2.22": 200 | version "4.2.22" 201 | resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.22.tgz#47020d7e4cf19194d43b5202f35f75bd2ad35ce7" 202 | integrity sha512-tFfcE+DSTzWAgifkjik9AySNqIyNoYwmR+uecPwwD/XRNfvOjmC/FjCxpiUGDkDVDphPfCUecSQVFw+lN3M3kQ== 203 | 204 | "@types/connect@^3.4.33": 205 | version "3.4.35" 206 | resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" 207 | integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== 208 | dependencies: 209 | "@types/node" "*" 210 | 211 | "@types/express-serve-static-core@^4.17.9": 212 | version "4.17.24" 213 | resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.24.tgz#ea41f93bf7e0d59cd5a76665068ed6aab6815c07" 214 | integrity sha512-3UJuW+Qxhzwjq3xhwXm2onQcFHn76frIYVbTu+kn24LFxI+dEhdfISDFovPB8VpEgW8oQCTpRuCe+0zJxB7NEA== 215 | dependencies: 216 | "@types/node" "*" 217 | "@types/qs" "*" 218 | "@types/range-parser" "*" 219 | 220 | "@types/json5@^0.0.29": 221 | version "0.0.29" 222 | resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" 223 | integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= 224 | 225 | "@types/lodash@^4.14.159": 226 | version "4.14.175" 227 | resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.175.tgz#b78dfa959192b01fae0ad90e166478769b215f45" 228 | integrity sha512-XmdEOrKQ8a1Y/yxQFOMbC47G/V2VDO1GvMRnl4O75M4GW/abC5tnfzadQYkqEveqRM1dEJGFFegfPNA2vvx2iw== 229 | 230 | "@types/mocha@^9.0.0": 231 | version "9.0.0" 232 | resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.0.0.tgz#3205bcd15ada9bc681ac20bef64e9e6df88fd297" 233 | integrity sha512-scN0hAWyLVAvLR9AyW7HoFF5sJZglyBsbPuHO4fv7JRvfmPBMfp1ozWqOf/e4wwPNxezBZXRfWzMb6iFLgEVRA== 234 | 235 | "@types/node@*": 236 | version "16.11.0" 237 | resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.0.tgz#4b95f2327bacd1ef8f08d8ceda193039c5d7f52e" 238 | integrity sha512-8MLkBIYQMuhRBQzGN9875bYsOhPnf/0rgXGo66S2FemHkhbn9qtsz9ywV1iCG+vbjigE4WUNVvw37Dx+L0qsPg== 239 | 240 | "@types/node@^12.12.54": 241 | version "12.20.33" 242 | resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.33.tgz#24927446e8b7669d10abacedd16077359678f436" 243 | integrity sha512-5XmYX2GECSa+CxMYaFsr2mrql71Q4EvHjKS+ox/SiwSdaASMoBIWE6UmZqFO+VX1jIcsYLStI4FFoB6V7FeIYw== 244 | 245 | "@types/qs@*": 246 | version "6.9.7" 247 | resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" 248 | integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== 249 | 250 | "@types/range-parser@*": 251 | version "1.2.4" 252 | resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" 253 | integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== 254 | 255 | "@types/ws@^7.4.4": 256 | version "7.4.7" 257 | resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.7.tgz#f7c390a36f7a0679aa69de2d501319f4f8d9b702" 258 | integrity sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww== 259 | dependencies: 260 | "@types/node" "*" 261 | 262 | "@ungap/promise-all-settled@1.1.2": 263 | version "1.1.2" 264 | resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" 265 | integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== 266 | 267 | JSONStream@^1.3.5: 268 | version "1.3.5" 269 | resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" 270 | integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== 271 | dependencies: 272 | jsonparse "^1.2.0" 273 | through ">=2.2.7 <3" 274 | 275 | acorn-walk@^8.1.1: 276 | version "8.2.0" 277 | resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" 278 | integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== 279 | 280 | acorn@^8.4.1: 281 | version "8.5.0" 282 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.5.0.tgz#4512ccb99b3698c752591e9bb4472e38ad43cee2" 283 | integrity sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q== 284 | 285 | ansi-colors@4.1.1: 286 | version "4.1.1" 287 | resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" 288 | integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== 289 | 290 | ansi-regex@^5.0.1: 291 | version "5.0.1" 292 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" 293 | integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== 294 | 295 | ansi-styles@^4.0.0, ansi-styles@^4.1.0: 296 | version "4.3.0" 297 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" 298 | integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== 299 | dependencies: 300 | color-convert "^2.0.1" 301 | 302 | anymatch@~3.1.2: 303 | version "3.1.2" 304 | resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" 305 | integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== 306 | dependencies: 307 | normalize-path "^3.0.0" 308 | picomatch "^2.0.4" 309 | 310 | arg@^4.1.0: 311 | version "4.1.3" 312 | resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" 313 | integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== 314 | 315 | argparse@^2.0.1: 316 | version "2.0.1" 317 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" 318 | integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== 319 | 320 | arrify@^1.0.0: 321 | version "1.0.1" 322 | resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" 323 | integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= 324 | 325 | assertion-error@^1.1.0: 326 | version "1.1.0" 327 | resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" 328 | integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== 329 | 330 | balanced-match@^1.0.0: 331 | version "1.0.2" 332 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" 333 | integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== 334 | 335 | base-x@^3.0.2: 336 | version "3.0.8" 337 | resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.8.tgz#1e1106c2537f0162e8b52474a557ebb09000018d" 338 | integrity sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA== 339 | dependencies: 340 | safe-buffer "^5.0.1" 341 | 342 | base64-js@^1.3.1, base64-js@^1.5.1: 343 | version "1.5.1" 344 | resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" 345 | integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== 346 | 347 | binary-extensions@^2.0.0: 348 | version "2.2.0" 349 | resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" 350 | integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== 351 | 352 | bn.js@^4.11.9: 353 | version "4.12.0" 354 | resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" 355 | integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== 356 | 357 | bn.js@^5.0.0, bn.js@^5.1.0, bn.js@^5.1.2, bn.js@^5.2.0: 358 | version "5.2.0" 359 | resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" 360 | integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== 361 | 362 | borsh@^0.4.0: 363 | version "0.4.0" 364 | resolved "https://registry.yarnpkg.com/borsh/-/borsh-0.4.0.tgz#9dd6defe741627f1315eac2a73df61421f6ddb9f" 365 | integrity sha512-aX6qtLya3K0AkT66CmYWCCDr77qsE9arV05OmdFpmat9qu8Pg9J5tBUPDztAW5fNh/d/MyVG/OYziP52Ndzx1g== 366 | dependencies: 367 | "@types/bn.js" "^4.11.5" 368 | bn.js "^5.0.0" 369 | bs58 "^4.0.0" 370 | text-encoding-utf-8 "^1.0.2" 371 | 372 | brace-expansion@^1.1.7: 373 | version "1.1.11" 374 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 375 | integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== 376 | dependencies: 377 | balanced-match "^1.0.0" 378 | concat-map "0.0.1" 379 | 380 | braces@~3.0.2: 381 | version "3.0.2" 382 | resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" 383 | integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== 384 | dependencies: 385 | fill-range "^7.0.1" 386 | 387 | brorand@^1.1.0: 388 | version "1.1.0" 389 | resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" 390 | integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= 391 | 392 | browser-stdout@1.3.1: 393 | version "1.3.1" 394 | resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" 395 | integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== 396 | 397 | bs58@^4.0.0, bs58@^4.0.1: 398 | version "4.0.1" 399 | resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" 400 | integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= 401 | dependencies: 402 | base-x "^3.0.2" 403 | 404 | buffer-from@^1.0.0, buffer-from@^1.1.0: 405 | version "1.1.2" 406 | resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" 407 | integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== 408 | 409 | buffer-layout@^1.2.0: 410 | version "1.2.2" 411 | resolved "https://registry.yarnpkg.com/buffer-layout/-/buffer-layout-1.2.2.tgz#b9814e7c7235783085f9ca4966a0cfff112259d5" 412 | integrity sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA== 413 | 414 | buffer@6.0.1: 415 | version "6.0.1" 416 | resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.1.tgz#3cbea8c1463e5a0779e30b66d4c88c6ffa182ac2" 417 | integrity sha512-rVAXBwEcEoYtxnHSO5iWyhzV/O1WMtkUYWlfdLS7FjU4PnSJJHEfHXi/uHPI5EwltmOA794gN3bm3/pzuctWjQ== 418 | dependencies: 419 | base64-js "^1.3.1" 420 | ieee754 "^1.2.1" 421 | 422 | buffer@6.0.3, buffer@~6.0.3: 423 | version "6.0.3" 424 | resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" 425 | integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== 426 | dependencies: 427 | base64-js "^1.3.1" 428 | ieee754 "^1.2.1" 429 | 430 | bufferutil@^4.0.1: 431 | version "4.0.5" 432 | resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.5.tgz#da9ea8166911cc276bf677b8aed2d02d31f59028" 433 | integrity sha512-HTm14iMQKK2FjFLRTM5lAVcyaUzOnqbPtesFIvREgXpJHdQm8bWS+GkQgIkfaBYRHuCnea7w8UVNfwiAQhlr9A== 434 | dependencies: 435 | node-gyp-build "^4.3.0" 436 | 437 | camelcase@^5.3.1: 438 | version "5.3.1" 439 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" 440 | integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== 441 | 442 | camelcase@^6.0.0: 443 | version "6.2.0" 444 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" 445 | integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== 446 | 447 | chai@^4.3.4: 448 | version "4.3.4" 449 | resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.4.tgz#b55e655b31e1eac7099be4c08c21964fce2e6c49" 450 | integrity sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA== 451 | dependencies: 452 | assertion-error "^1.1.0" 453 | check-error "^1.0.2" 454 | deep-eql "^3.0.1" 455 | get-func-name "^2.0.0" 456 | pathval "^1.1.1" 457 | type-detect "^4.0.5" 458 | 459 | chalk@^4.1.0: 460 | version "4.1.2" 461 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" 462 | integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== 463 | dependencies: 464 | ansi-styles "^4.1.0" 465 | supports-color "^7.1.0" 466 | 467 | check-error@^1.0.2: 468 | version "1.0.2" 469 | resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" 470 | integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= 471 | 472 | chokidar@3.5.2: 473 | version "3.5.2" 474 | resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" 475 | integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== 476 | dependencies: 477 | anymatch "~3.1.2" 478 | braces "~3.0.2" 479 | glob-parent "~5.1.2" 480 | is-binary-path "~2.1.0" 481 | is-glob "~4.0.1" 482 | normalize-path "~3.0.0" 483 | readdirp "~3.6.0" 484 | optionalDependencies: 485 | fsevents "~2.3.2" 486 | 487 | circular-json@^0.5.9: 488 | version "0.5.9" 489 | resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.5.9.tgz#932763ae88f4f7dead7a0d09c8a51a4743a53b1d" 490 | integrity sha512-4ivwqHpIFJZBuhN3g/pEcdbnGUywkBblloGbkglyloVjjR3uT6tieI89MVOfbP2tHX5sgb01FuLgAOzebNlJNQ== 491 | 492 | cliui@^7.0.2: 493 | version "7.0.4" 494 | resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" 495 | integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== 496 | dependencies: 497 | string-width "^4.2.0" 498 | strip-ansi "^6.0.0" 499 | wrap-ansi "^7.0.0" 500 | 501 | color-convert@^2.0.1: 502 | version "2.0.1" 503 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" 504 | integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== 505 | dependencies: 506 | color-name "~1.1.4" 507 | 508 | color-name@~1.1.4: 509 | version "1.1.4" 510 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" 511 | integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== 512 | 513 | commander@^2.20.3: 514 | version "2.20.3" 515 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" 516 | integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== 517 | 518 | concat-map@0.0.1: 519 | version "0.0.1" 520 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 521 | integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= 522 | 523 | create-require@^1.1.0: 524 | version "1.1.1" 525 | resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" 526 | integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== 527 | 528 | cross-fetch@^3.1.4: 529 | version "3.1.4" 530 | resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.4.tgz#9723f3a3a247bf8b89039f3a380a9244e8fa2f39" 531 | integrity sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ== 532 | dependencies: 533 | node-fetch "2.6.1" 534 | 535 | crypto-hash@^1.2.2, crypto-hash@^1.3.0: 536 | version "1.3.0" 537 | resolved "https://registry.yarnpkg.com/crypto-hash/-/crypto-hash-1.3.0.tgz#b402cb08f4529e9f4f09346c3e275942f845e247" 538 | integrity sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg== 539 | 540 | debug@4.3.2: 541 | version "4.3.2" 542 | resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" 543 | integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== 544 | dependencies: 545 | ms "2.1.2" 546 | 547 | decamelize@^4.0.0: 548 | version "4.0.0" 549 | resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" 550 | integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== 551 | 552 | deep-eql@^3.0.1: 553 | version "3.0.1" 554 | resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" 555 | integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== 556 | dependencies: 557 | type-detect "^4.0.0" 558 | 559 | delay@^5.0.0: 560 | version "5.0.0" 561 | resolved "https://registry.yarnpkg.com/delay/-/delay-5.0.0.tgz#137045ef1b96e5071060dd5be60bf9334436bd1d" 562 | integrity sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw== 563 | 564 | diff@5.0.0: 565 | version "5.0.0" 566 | resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" 567 | integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== 568 | 569 | diff@^3.1.0: 570 | version "3.5.0" 571 | resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" 572 | integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== 573 | 574 | diff@^4.0.1: 575 | version "4.0.2" 576 | resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" 577 | integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== 578 | 579 | dot-case@^3.0.4: 580 | version "3.0.4" 581 | resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" 582 | integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== 583 | dependencies: 584 | no-case "^3.0.4" 585 | tslib "^2.0.3" 586 | 587 | dotenv@10.0.0, dotenv@^10.0.0: 588 | version "10.0.0" 589 | resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" 590 | integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== 591 | 592 | elliptic@^6.5.2: 593 | version "6.5.4" 594 | resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" 595 | integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== 596 | dependencies: 597 | bn.js "^4.11.9" 598 | brorand "^1.1.0" 599 | hash.js "^1.0.0" 600 | hmac-drbg "^1.0.1" 601 | inherits "^2.0.4" 602 | minimalistic-assert "^1.0.1" 603 | minimalistic-crypto-utils "^1.0.1" 604 | 605 | emoji-regex@^8.0.0: 606 | version "8.0.0" 607 | resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" 608 | integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== 609 | 610 | es6-promise@^4.0.3: 611 | version "4.2.8" 612 | resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" 613 | integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== 614 | 615 | es6-promisify@^5.0.0: 616 | version "5.0.0" 617 | resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" 618 | integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= 619 | dependencies: 620 | es6-promise "^4.0.3" 621 | 622 | escalade@^3.1.1: 623 | version "3.1.1" 624 | resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" 625 | integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== 626 | 627 | escape-string-regexp@4.0.0: 628 | version "4.0.0" 629 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" 630 | integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== 631 | 632 | eventemitter3@^4.0.7: 633 | version "4.0.7" 634 | resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" 635 | integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== 636 | 637 | eyes@^0.1.8: 638 | version "0.1.8" 639 | resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" 640 | integrity sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A= 641 | 642 | fill-range@^7.0.1: 643 | version "7.0.1" 644 | resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" 645 | integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== 646 | dependencies: 647 | to-regex-range "^5.0.1" 648 | 649 | find-up@5.0.0: 650 | version "5.0.0" 651 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" 652 | integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== 653 | dependencies: 654 | locate-path "^6.0.0" 655 | path-exists "^4.0.0" 656 | 657 | find@^0.3.0: 658 | version "0.3.0" 659 | resolved "https://registry.yarnpkg.com/find/-/find-0.3.0.tgz#4082e8fc8d8320f1a382b5e4f521b9bc50775cb8" 660 | integrity sha512-iSd+O4OEYV/I36Zl8MdYJO0xD82wH528SaCieTVHhclgiYNe9y+yPKSwK+A7/WsmHL1EZ+pYUJBXWTL5qofksw== 661 | dependencies: 662 | traverse-chain "~0.1.0" 663 | 664 | flat@^5.0.2: 665 | version "5.0.2" 666 | resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" 667 | integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== 668 | 669 | fs.realpath@^1.0.0: 670 | version "1.0.0" 671 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 672 | integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= 673 | 674 | fsevents@~2.3.2: 675 | version "2.3.2" 676 | resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" 677 | integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== 678 | 679 | get-caller-file@^2.0.5: 680 | version "2.0.5" 681 | resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" 682 | integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== 683 | 684 | get-func-name@^2.0.0: 685 | version "2.0.0" 686 | resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" 687 | integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= 688 | 689 | glob-parent@~5.1.2: 690 | version "5.1.2" 691 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" 692 | integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== 693 | dependencies: 694 | is-glob "^4.0.1" 695 | 696 | glob@7.1.7: 697 | version "7.1.7" 698 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" 699 | integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== 700 | dependencies: 701 | fs.realpath "^1.0.0" 702 | inflight "^1.0.4" 703 | inherits "2" 704 | minimatch "^3.0.4" 705 | once "^1.3.0" 706 | path-is-absolute "^1.0.0" 707 | 708 | growl@1.10.5: 709 | version "1.10.5" 710 | resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" 711 | integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== 712 | 713 | has-flag@^4.0.0: 714 | version "4.0.0" 715 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" 716 | integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== 717 | 718 | hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: 719 | version "1.1.7" 720 | resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" 721 | integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== 722 | dependencies: 723 | inherits "^2.0.3" 724 | minimalistic-assert "^1.0.1" 725 | 726 | he@1.2.0: 727 | version "1.2.0" 728 | resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" 729 | integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== 730 | 731 | hmac-drbg@^1.0.1: 732 | version "1.0.1" 733 | resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" 734 | integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= 735 | dependencies: 736 | hash.js "^1.0.3" 737 | minimalistic-assert "^1.0.0" 738 | minimalistic-crypto-utils "^1.0.1" 739 | 740 | ieee754@^1.2.1: 741 | version "1.2.1" 742 | resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" 743 | integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== 744 | 745 | inflight@^1.0.4: 746 | version "1.0.6" 747 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 748 | integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= 749 | dependencies: 750 | once "^1.3.0" 751 | wrappy "1" 752 | 753 | inherits@2, inherits@^2.0.3, inherits@^2.0.4: 754 | version "2.0.4" 755 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" 756 | integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== 757 | 758 | is-binary-path@~2.1.0: 759 | version "2.1.0" 760 | resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" 761 | integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== 762 | dependencies: 763 | binary-extensions "^2.0.0" 764 | 765 | is-extglob@^2.1.1: 766 | version "2.1.1" 767 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" 768 | integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= 769 | 770 | is-fullwidth-code-point@^3.0.0: 771 | version "3.0.0" 772 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" 773 | integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== 774 | 775 | is-glob@^4.0.1, is-glob@~4.0.1: 776 | version "4.0.3" 777 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" 778 | integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== 779 | dependencies: 780 | is-extglob "^2.1.1" 781 | 782 | is-number@^7.0.0: 783 | version "7.0.0" 784 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" 785 | integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== 786 | 787 | is-plain-obj@^2.1.0: 788 | version "2.1.0" 789 | resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" 790 | integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== 791 | 792 | is-unicode-supported@^0.1.0: 793 | version "0.1.0" 794 | resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" 795 | integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== 796 | 797 | isexe@^2.0.0: 798 | version "2.0.0" 799 | resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" 800 | integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= 801 | 802 | isomorphic-ws@^4.0.1: 803 | version "4.0.1" 804 | resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" 805 | integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== 806 | 807 | jayson@^3.4.4: 808 | version "3.6.5" 809 | resolved "https://registry.yarnpkg.com/jayson/-/jayson-3.6.5.tgz#e560bcad4daf098c7391f46ba8efc9d6f34a4102" 810 | integrity sha512-wmOjX+eQcnCDyPF4KORomaIj9wj3h0B5VEbeD0+2VHfTfErB+h1zpR7oBkgCZp36AFjp3+a4CLz6U72BYpFHAw== 811 | dependencies: 812 | "@types/connect" "^3.4.33" 813 | "@types/express-serve-static-core" "^4.17.9" 814 | "@types/lodash" "^4.14.159" 815 | "@types/node" "^12.12.54" 816 | "@types/ws" "^7.4.4" 817 | JSONStream "^1.3.5" 818 | commander "^2.20.3" 819 | delay "^5.0.0" 820 | es6-promisify "^5.0.0" 821 | eyes "^0.1.8" 822 | isomorphic-ws "^4.0.1" 823 | json-stringify-safe "^5.0.1" 824 | lodash "^4.17.20" 825 | uuid "^3.4.0" 826 | ws "^7.4.5" 827 | 828 | js-sha256@^0.9.0: 829 | version "0.9.0" 830 | resolved "https://registry.yarnpkg.com/js-sha256/-/js-sha256-0.9.0.tgz#0b89ac166583e91ef9123644bd3c5334ce9d0966" 831 | integrity sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA== 832 | 833 | js-sha3@^0.8.0: 834 | version "0.8.0" 835 | resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" 836 | integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== 837 | 838 | js-yaml@4.1.0: 839 | version "4.1.0" 840 | resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" 841 | integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== 842 | dependencies: 843 | argparse "^2.0.1" 844 | 845 | json-stringify-safe@^5.0.1: 846 | version "5.0.1" 847 | resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" 848 | integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= 849 | 850 | json5@^1.0.1: 851 | version "1.0.1" 852 | resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" 853 | integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== 854 | dependencies: 855 | minimist "^1.2.0" 856 | 857 | jsonparse@^1.2.0: 858 | version "1.3.1" 859 | resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" 860 | integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= 861 | 862 | kind-of@^6.0.2: 863 | version "6.0.3" 864 | resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" 865 | integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== 866 | 867 | locate-path@^6.0.0: 868 | version "6.0.0" 869 | resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" 870 | integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== 871 | dependencies: 872 | p-locate "^5.0.0" 873 | 874 | lodash@^4.17.20: 875 | version "4.17.21" 876 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" 877 | integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== 878 | 879 | log-symbols@4.1.0: 880 | version "4.1.0" 881 | resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" 882 | integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== 883 | dependencies: 884 | chalk "^4.1.0" 885 | is-unicode-supported "^0.1.0" 886 | 887 | lower-case@^2.0.2: 888 | version "2.0.2" 889 | resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" 890 | integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== 891 | dependencies: 892 | tslib "^2.0.3" 893 | 894 | make-error@^1.1.1: 895 | version "1.3.6" 896 | resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" 897 | integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== 898 | 899 | minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: 900 | version "1.0.1" 901 | resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" 902 | integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== 903 | 904 | minimalistic-crypto-utils@^1.0.1: 905 | version "1.0.1" 906 | resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" 907 | integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= 908 | 909 | minimatch@3.0.4, minimatch@^3.0.4: 910 | version "3.0.4" 911 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 912 | integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== 913 | dependencies: 914 | brace-expansion "^1.1.7" 915 | 916 | minimist@^1.2.0, minimist@^1.2.5: 917 | version "1.2.5" 918 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" 919 | integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== 920 | 921 | mkdirp@^0.5.1: 922 | version "0.5.5" 923 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" 924 | integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== 925 | dependencies: 926 | minimist "^1.2.5" 927 | 928 | mocha@^9.0.3: 929 | version "9.1.3" 930 | resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.1.3.tgz#8a623be6b323810493d8c8f6f7667440fa469fdb" 931 | integrity sha512-Xcpl9FqXOAYqI3j79pEtHBBnQgVXIhpULjGQa7DVb0Po+VzmSIK9kanAiWLHoRR/dbZ2qpdPshuXr8l1VaHCzw== 932 | dependencies: 933 | "@ungap/promise-all-settled" "1.1.2" 934 | ansi-colors "4.1.1" 935 | browser-stdout "1.3.1" 936 | chokidar "3.5.2" 937 | debug "4.3.2" 938 | diff "5.0.0" 939 | escape-string-regexp "4.0.0" 940 | find-up "5.0.0" 941 | glob "7.1.7" 942 | growl "1.10.5" 943 | he "1.2.0" 944 | js-yaml "4.1.0" 945 | log-symbols "4.1.0" 946 | minimatch "3.0.4" 947 | ms "2.1.3" 948 | nanoid "3.1.25" 949 | serialize-javascript "6.0.0" 950 | strip-json-comments "3.1.1" 951 | supports-color "8.1.1" 952 | which "2.0.2" 953 | workerpool "6.1.5" 954 | yargs "16.2.0" 955 | yargs-parser "20.2.4" 956 | yargs-unparser "2.0.0" 957 | 958 | ms@2.1.2: 959 | version "2.1.2" 960 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" 961 | integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== 962 | 963 | ms@2.1.3: 964 | version "2.1.3" 965 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" 966 | integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== 967 | 968 | nanoid@3.1.25: 969 | version "3.1.25" 970 | resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.25.tgz#09ca32747c0e543f0e1814b7d3793477f9c8e152" 971 | integrity sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q== 972 | 973 | no-case@^3.0.4: 974 | version "3.0.4" 975 | resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" 976 | integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== 977 | dependencies: 978 | lower-case "^2.0.2" 979 | tslib "^2.0.3" 980 | 981 | node-addon-api@^2.0.0: 982 | version "2.0.2" 983 | resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" 984 | integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== 985 | 986 | node-fetch@2.6.1: 987 | version "2.6.1" 988 | resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" 989 | integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== 990 | 991 | node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: 992 | version "4.3.0" 993 | resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.3.0.tgz#9f256b03e5826150be39c764bf51e993946d71a3" 994 | integrity sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q== 995 | 996 | normalize-path@^3.0.0, normalize-path@~3.0.0: 997 | version "3.0.0" 998 | resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" 999 | integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== 1000 | 1001 | once@^1.3.0: 1002 | version "1.4.0" 1003 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 1004 | integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= 1005 | dependencies: 1006 | wrappy "1" 1007 | 1008 | p-limit@^3.0.2: 1009 | version "3.1.0" 1010 | resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" 1011 | integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== 1012 | dependencies: 1013 | yocto-queue "^0.1.0" 1014 | 1015 | p-locate@^5.0.0: 1016 | version "5.0.0" 1017 | resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" 1018 | integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== 1019 | dependencies: 1020 | p-limit "^3.0.2" 1021 | 1022 | pako@^2.0.3: 1023 | version "2.0.4" 1024 | resolved "https://registry.yarnpkg.com/pako/-/pako-2.0.4.tgz#6cebc4bbb0b6c73b0d5b8d7e8476e2b2fbea576d" 1025 | integrity sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg== 1026 | 1027 | path-exists@^4.0.0: 1028 | version "4.0.0" 1029 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" 1030 | integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== 1031 | 1032 | path-is-absolute@^1.0.0: 1033 | version "1.0.1" 1034 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 1035 | integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= 1036 | 1037 | pathval@^1.1.1: 1038 | version "1.1.1" 1039 | resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" 1040 | integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== 1041 | 1042 | picomatch@^2.0.4, picomatch@^2.2.1: 1043 | version "2.3.0" 1044 | resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" 1045 | integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== 1046 | 1047 | randombytes@^2.1.0: 1048 | version "2.1.0" 1049 | resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" 1050 | integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== 1051 | dependencies: 1052 | safe-buffer "^5.1.0" 1053 | 1054 | readdirp@~3.6.0: 1055 | version "3.6.0" 1056 | resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" 1057 | integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== 1058 | dependencies: 1059 | picomatch "^2.2.1" 1060 | 1061 | regenerator-runtime@^0.13.4: 1062 | version "0.13.9" 1063 | resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" 1064 | integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== 1065 | 1066 | require-directory@^2.1.1: 1067 | version "2.1.1" 1068 | resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" 1069 | integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= 1070 | 1071 | rpc-websockets@^7.4.2: 1072 | version "7.4.15" 1073 | resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-7.4.15.tgz#1f6b4640231c1d6479b9fda347e418d0b54ddab5" 1074 | integrity sha512-ICuqy1MeGl7z0/kesAShN1Lz0AYvOPLpmv2hzfIV5YNGhmJl+B/osmFoWrvxZcQnn/wyPl4Q29ItTJkXFNc9oA== 1075 | dependencies: 1076 | "@babel/runtime" "^7.11.2" 1077 | circular-json "^0.5.9" 1078 | eventemitter3 "^4.0.7" 1079 | uuid "^8.3.0" 1080 | ws "^7.4.5" 1081 | optionalDependencies: 1082 | bufferutil "^4.0.1" 1083 | utf-8-validate "^5.0.2" 1084 | 1085 | safe-buffer@^5.0.1, safe-buffer@^5.1.0: 1086 | version "5.2.1" 1087 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" 1088 | integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== 1089 | 1090 | secp256k1@^4.0.2: 1091 | version "4.0.2" 1092 | resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.2.tgz#15dd57d0f0b9fdb54ac1fa1694f40e5e9a54f4a1" 1093 | integrity sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg== 1094 | dependencies: 1095 | elliptic "^6.5.2" 1096 | node-addon-api "^2.0.0" 1097 | node-gyp-build "^4.2.0" 1098 | 1099 | serialize-javascript@6.0.0: 1100 | version "6.0.0" 1101 | resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" 1102 | integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== 1103 | dependencies: 1104 | randombytes "^2.1.0" 1105 | 1106 | snake-case@^3.0.4: 1107 | version "3.0.4" 1108 | resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c" 1109 | integrity sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg== 1110 | dependencies: 1111 | dot-case "^3.0.4" 1112 | tslib "^2.0.3" 1113 | 1114 | source-map-support@^0.5.6: 1115 | version "0.5.20" 1116 | resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.20.tgz#12166089f8f5e5e8c56926b377633392dd2cb6c9" 1117 | integrity sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw== 1118 | dependencies: 1119 | buffer-from "^1.0.0" 1120 | source-map "^0.6.0" 1121 | 1122 | source-map@^0.6.0: 1123 | version "0.6.1" 1124 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" 1125 | integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== 1126 | 1127 | string-width@^4.1.0, string-width@^4.2.0: 1128 | version "4.2.3" 1129 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" 1130 | integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== 1131 | dependencies: 1132 | emoji-regex "^8.0.0" 1133 | is-fullwidth-code-point "^3.0.0" 1134 | strip-ansi "^6.0.1" 1135 | 1136 | strip-ansi@^6.0.0, strip-ansi@^6.0.1: 1137 | version "6.0.1" 1138 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" 1139 | integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== 1140 | dependencies: 1141 | ansi-regex "^5.0.1" 1142 | 1143 | strip-bom@^3.0.0: 1144 | version "3.0.0" 1145 | resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" 1146 | integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= 1147 | 1148 | strip-json-comments@3.1.1: 1149 | version "3.1.1" 1150 | resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" 1151 | integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== 1152 | 1153 | superstruct@0.8.3: 1154 | version "0.8.3" 1155 | resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.8.3.tgz#fb4d8901aca3bf9f79afab1bbab7a7f335cc4ef2" 1156 | integrity sha512-LbtbFpktW1FcwxVIJlxdk7bCyBq/GzOx2FSFLRLTUhWIA1gHkYPIl3aXRG5mBdGZtnPNT6t+4eEcLDCMOuBHww== 1157 | dependencies: 1158 | kind-of "^6.0.2" 1159 | tiny-invariant "^1.0.6" 1160 | 1161 | superstruct@^0.14.2: 1162 | version "0.14.2" 1163 | resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.14.2.tgz#0dbcdf3d83676588828f1cf5ed35cda02f59025b" 1164 | integrity sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ== 1165 | 1166 | supports-color@8.1.1: 1167 | version "8.1.1" 1168 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" 1169 | integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== 1170 | dependencies: 1171 | has-flag "^4.0.0" 1172 | 1173 | supports-color@^7.1.0: 1174 | version "7.2.0" 1175 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" 1176 | integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== 1177 | dependencies: 1178 | has-flag "^4.0.0" 1179 | 1180 | text-encoding-utf-8@^1.0.2: 1181 | version "1.0.2" 1182 | resolved "https://registry.yarnpkg.com/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz#585b62197b0ae437e3c7b5d0af27ac1021e10d13" 1183 | integrity sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg== 1184 | 1185 | "through@>=2.2.7 <3": 1186 | version "2.3.8" 1187 | resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" 1188 | integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= 1189 | 1190 | tiny-invariant@^1.0.6: 1191 | version "1.1.0" 1192 | resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.1.0.tgz#634c5f8efdc27714b7f386c35e6760991d230875" 1193 | integrity sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw== 1194 | 1195 | to-regex-range@^5.0.1: 1196 | version "5.0.1" 1197 | resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" 1198 | integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== 1199 | dependencies: 1200 | is-number "^7.0.0" 1201 | 1202 | toml@^3.0.0: 1203 | version "3.0.0" 1204 | resolved "https://registry.yarnpkg.com/toml/-/toml-3.0.0.tgz#342160f1af1904ec9d204d03a5d61222d762c5ee" 1205 | integrity sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w== 1206 | 1207 | traverse-chain@~0.1.0: 1208 | version "0.1.0" 1209 | resolved "https://registry.yarnpkg.com/traverse-chain/-/traverse-chain-0.1.0.tgz#61dbc2d53b69ff6091a12a168fd7d433107e40f1" 1210 | integrity sha1-YdvC1Ttp/2CRoSoWj9fUMxB+QPE= 1211 | 1212 | ts-mocha@^8.0.0: 1213 | version "8.0.0" 1214 | resolved "https://registry.yarnpkg.com/ts-mocha/-/ts-mocha-8.0.0.tgz#962d0fa12eeb6468aa1a6b594bb3bbc818da3ef0" 1215 | integrity sha512-Kou1yxTlubLnD5C3unlCVO7nh0HERTezjoVhVw/M5S1SqoUec0WgllQvPk3vzPMc6by8m6xD1uR1yRf8lnVUbA== 1216 | dependencies: 1217 | ts-node "7.0.1" 1218 | optionalDependencies: 1219 | tsconfig-paths "^3.5.0" 1220 | 1221 | ts-node@7.0.1: 1222 | version "7.0.1" 1223 | resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-7.0.1.tgz#9562dc2d1e6d248d24bc55f773e3f614337d9baf" 1224 | integrity sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw== 1225 | dependencies: 1226 | arrify "^1.0.0" 1227 | buffer-from "^1.1.0" 1228 | diff "^3.1.0" 1229 | make-error "^1.1.1" 1230 | minimist "^1.2.0" 1231 | mkdirp "^0.5.1" 1232 | source-map-support "^0.5.6" 1233 | yn "^2.0.0" 1234 | 1235 | ts-node@^10.4.0: 1236 | version "10.4.0" 1237 | resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.4.0.tgz#680f88945885f4e6cf450e7f0d6223dd404895f7" 1238 | integrity sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A== 1239 | dependencies: 1240 | "@cspotcode/source-map-support" "0.7.0" 1241 | "@tsconfig/node10" "^1.0.7" 1242 | "@tsconfig/node12" "^1.0.7" 1243 | "@tsconfig/node14" "^1.0.0" 1244 | "@tsconfig/node16" "^1.0.2" 1245 | acorn "^8.4.1" 1246 | acorn-walk "^8.1.1" 1247 | arg "^4.1.0" 1248 | create-require "^1.1.0" 1249 | diff "^4.0.1" 1250 | make-error "^1.1.1" 1251 | yn "3.1.1" 1252 | 1253 | tsconfig-paths@^3.5.0: 1254 | version "3.11.0" 1255 | resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz#954c1fe973da6339c78e06b03ce2e48810b65f36" 1256 | integrity sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA== 1257 | dependencies: 1258 | "@types/json5" "^0.0.29" 1259 | json5 "^1.0.1" 1260 | minimist "^1.2.0" 1261 | strip-bom "^3.0.0" 1262 | 1263 | tslib@^2.0.3: 1264 | version "2.3.1" 1265 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" 1266 | integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== 1267 | 1268 | tweetnacl@^1.0.0: 1269 | version "1.0.3" 1270 | resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" 1271 | integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== 1272 | 1273 | type-detect@^4.0.0, type-detect@^4.0.5: 1274 | version "4.0.8" 1275 | resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" 1276 | integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== 1277 | 1278 | typescript@^4.3.5: 1279 | version "4.4.4" 1280 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c" 1281 | integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA== 1282 | 1283 | utf-8-validate@^5.0.2: 1284 | version "5.0.7" 1285 | resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.7.tgz#c15a19a6af1f7ad9ec7ddc425747ca28c3644922" 1286 | integrity sha512-vLt1O5Pp+flcArHGIyKEQq883nBt8nN8tVBcoL0qUXj2XT1n7p70yGIq2VK98I5FdZ1YHc0wk/koOnHjnXWk1Q== 1287 | dependencies: 1288 | node-gyp-build "^4.3.0" 1289 | 1290 | uuid@^3.4.0: 1291 | version "3.4.0" 1292 | resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" 1293 | integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== 1294 | 1295 | uuid@^8.3.0: 1296 | version "8.3.2" 1297 | resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" 1298 | integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== 1299 | 1300 | which@2.0.2: 1301 | version "2.0.2" 1302 | resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" 1303 | integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== 1304 | dependencies: 1305 | isexe "^2.0.0" 1306 | 1307 | workerpool@6.1.5: 1308 | version "6.1.5" 1309 | resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.5.tgz#0f7cf076b6215fd7e1da903ff6f22ddd1886b581" 1310 | integrity sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw== 1311 | 1312 | wrap-ansi@^7.0.0: 1313 | version "7.0.0" 1314 | resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" 1315 | integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== 1316 | dependencies: 1317 | ansi-styles "^4.0.0" 1318 | string-width "^4.1.0" 1319 | strip-ansi "^6.0.0" 1320 | 1321 | wrappy@1: 1322 | version "1.0.2" 1323 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 1324 | integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= 1325 | 1326 | ws@^7.4.5: 1327 | version "7.5.5" 1328 | resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.5.tgz#8b4bc4af518cfabd0473ae4f99144287b33eb881" 1329 | integrity sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w== 1330 | 1331 | y18n@^5.0.5: 1332 | version "5.0.8" 1333 | resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" 1334 | integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== 1335 | 1336 | yargs-parser@20.2.4: 1337 | version "20.2.4" 1338 | resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" 1339 | integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== 1340 | 1341 | yargs-parser@^20.2.2: 1342 | version "20.2.9" 1343 | resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" 1344 | integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== 1345 | 1346 | yargs-unparser@2.0.0: 1347 | version "2.0.0" 1348 | resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" 1349 | integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== 1350 | dependencies: 1351 | camelcase "^6.0.0" 1352 | decamelize "^4.0.0" 1353 | flat "^5.0.2" 1354 | is-plain-obj "^2.1.0" 1355 | 1356 | yargs@16.2.0: 1357 | version "16.2.0" 1358 | resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" 1359 | integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== 1360 | dependencies: 1361 | cliui "^7.0.2" 1362 | escalade "^3.1.1" 1363 | get-caller-file "^2.0.5" 1364 | require-directory "^2.1.1" 1365 | string-width "^4.2.0" 1366 | y18n "^5.0.5" 1367 | yargs-parser "^20.2.2" 1368 | 1369 | yn@3.1.1: 1370 | version "3.1.1" 1371 | resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" 1372 | integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== 1373 | 1374 | yn@^2.0.0: 1375 | version "2.0.0" 1376 | resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" 1377 | integrity sha1-5a2ryKz0CPY4X8dklWhMiOavaJo= 1378 | 1379 | yocto-queue@^0.1.0: 1380 | version "0.1.0" 1381 | resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" 1382 | integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== 1383 | --------------------------------------------------------------------------------