diff --git a/contracts/Anchor.toml b/contracts/Anchor.toml index d448daf48..aa229ed2b 100644 --- a/contracts/Anchor.toml +++ b/contracts/Anchor.toml @@ -1,4 +1,4 @@ -anchor_version = "0.23.0" +anchor_version = "0.25.0" [registry] url = "https://anchor.projectserum.com" diff --git a/contracts/Cargo.lock b/contracts/Cargo.lock index 5dc7d6109..40e5e099d 100644 --- a/contracts/Cargo.lock +++ b/contracts/Cargo.lock @@ -17,7 +17,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.4", + "getrandom 0.2.7", "once_cell", "version_check", ] @@ -33,9 +33,9 @@ dependencies = [ [[package]] name = "anchor-attribute-access-control" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb917e636aa85cbb0d908e948cf7646c78a3e2fb06f396522d01fa55ec93412f" +checksum = "70f6ee9518f50ff4d434471ccf569186022bdd5ef65a21d14da3ea5231af944f" dependencies = [ "anchor-syn", "anyhow", @@ -47,9 +47,9 @@ dependencies = [ [[package]] name = "anchor-attribute-account" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40132c6a9ecf26f6a1d0480824d4e7327bade791d6afe2e003546f58b450e760" +checksum = "32c92bcf5388b52676d990f85bbfd838a8f5672393135063a50dc79b2b837c79" dependencies = [ "anchor-syn", "anyhow", @@ -62,9 +62,9 @@ dependencies = [ [[package]] name = "anchor-attribute-constant" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b229e8eb84adf4c282b45bf03354a265f629cb657323728570d994ca0f8ef0" +checksum = "0844974ac35e8ced62056b0d63777ebcdc5807438b8b189c881e2b647450b70a" dependencies = [ "anchor-syn", "proc-macro2", @@ -73,9 +73,9 @@ dependencies = [ [[package]] name = "anchor-attribute-error" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc0aaf2dae975810ee9f09135cb91b4df66d3834c9bbb789f0930fde2b2a49c" +checksum = "0f7467345e67a6f1d4b862b9763a4160ad89d18c247b8c902807768f7b6e23df" dependencies = [ "anchor-syn", "proc-macro2", @@ -85,9 +85,9 @@ dependencies = [ [[package]] name = "anchor-attribute-event" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aefe4f159ae2ccaa908ad7625639294be02602543c5ea8e7b6c8c6126640a8e" +checksum = "8774e4c1ac71f71a5aea7e4932fb69c30e3b8155c4fa59fd69401195434528a9" dependencies = [ "anchor-syn", "anyhow", @@ -98,9 +98,9 @@ dependencies = [ [[package]] name = "anchor-attribute-interface" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7885efaa71230455a55f2078c130c8168ba58a01271d769a9e3e7753041b023b" +checksum = "90eeb6e1c80f9f94fcef93a52813f6472186200e275e83cb3fac92b801de92f7" dependencies = [ "anchor-syn", "anyhow", @@ -112,9 +112,9 @@ dependencies = [ [[package]] name = "anchor-attribute-program" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962fa82552a2d36ac0a72410a7a63dce16ff84d5921f3195cf1427c89d3848d" +checksum = "ac515a7a5a4fea7fc768b1cec40ddb948e148ea657637c75f94f283212326cb9" dependencies = [ "anchor-syn", "anyhow", @@ -125,9 +125,9 @@ dependencies = [ [[package]] name = "anchor-attribute-state" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbb91124f1e49d5d84b4c812f47442830ddf8e5b25e7e7fbbe8027ea9a55f4e" +checksum = "43dc667b62ff71450f19dcfcc37b0c408fd4ddd89e8650368c2b0984b110603f" dependencies = [ "anchor-syn", "anyhow", @@ -138,9 +138,9 @@ dependencies = [ [[package]] name = "anchor-derive-accounts" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acbc8ab9e4305ae5fdfecc0e40f1254db28747d0bb4a4adf0d63dd09366bac6" +checksum = "7354d583a06701d24800a8ec4c2b0491f62581a331af349205e23421e0b56643" dependencies = [ "anchor-syn", "anyhow", @@ -151,9 +151,9 @@ dependencies = [ [[package]] name = "anchor-lang" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "720b81290f0323ab655380fe80d6aeb678c77500e07e5d75e7693b611895b5a4" +checksum = "ff5f57ec5e12fa6874b27f3d5c1f6f44302d3ad86c1266197ff7611bf6f5d251" dependencies = [ "anchor-attribute-access-control", "anchor-attribute-account", @@ -175,9 +175,9 @@ dependencies = [ [[package]] name = "anchor-spl" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302c7285127b097d90e188eb9a7488ea9099550cceb86f27177d51d67df609b5" +checksum = "d65904c3106851f6d1bb87d504044764819d69c51d2b4346d59d399d8afa7d18" dependencies = [ "anchor-lang", "solana-program", @@ -187,9 +187,9 @@ dependencies = [ [[package]] name = "anchor-syn" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b18fdb2a5bba16db5d2121935284d3fe226cf35ef1c549162abcb2c50c5b7e21" +checksum = "55aa1e680d9471342122ed5b6bc13bf5da473b0f7e4677d41a6954e5cc8ad155" dependencies = [ "anyhow", "bs58 0.3.1", @@ -199,16 +199,16 @@ dependencies = [ "quote", "serde", "serde_json", - "sha2", + "sha2 0.9.9", "syn", "thiserror", ] [[package]] name = "anyhow" -version = "1.0.53" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94a45b455c14666b85fc40a019e8ab9eb75e3a124e05494f5397122bc9eb06e0" +checksum = "bb07d2053ccdbe10e2af2995a2f116c1330396493dc1269f6a91d0ae82e19704" [[package]] name = "arrayref" @@ -218,30 +218,19 @@ checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" [[package]] name = "arrayvec" -version = "0.5.2" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] name = "arrayvec" version = "1.0.0" -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base64" @@ -264,19 +253,33 @@ dependencies = [ "serde", ] +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + [[package]] name = "blake3" -version = "0.3.8" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3" +checksum = "a08e53fc5a564bb15bfe6fae56bd71522205f1f91893f9c0116edad6496c183f" dependencies = [ "arrayref", - "arrayvec 0.5.2", + "arrayvec 0.7.2", "cc", - "cfg-if 0.1.10", + "cfg-if", "constant_time_eq", - "crypto-mac", - "digest 0.9.0", + "digest 0.10.3", ] [[package]] @@ -285,21 +288,23 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding", - "generic-array 0.14.5", + "generic-array", ] [[package]] -name = "block-padding" -version = "0.2.1" +name = "block-buffer" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +dependencies = [ + "generic-array", +] [[package]] name = "borsh" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c9d0958efb8301e1626692ea879cbff622ef45cf731807ec8d488b34be98cb8" +checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" dependencies = [ "borsh-derive", "hashbrown", @@ -307,9 +312,9 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325164710ad57bae6d32455ce3bd384f95768464a927ce145626dc3390a7f9fe" +checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" dependencies = [ "borsh-derive-internal", "borsh-schema-derive-internal", @@ -320,9 +325,9 @@ dependencies = [ [[package]] name = "borsh-derive-internal" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f74159f43b231f4af8c4ce4967fef76e4e59725acf51706ddb9268c94348d15c" +checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" dependencies = [ "proc-macro2", "quote", @@ -331,9 +336,9 @@ dependencies = [ [[package]] name = "borsh-schema-derive-internal" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99b2a77771907a820a860d200d193a0787c79a7890c8e253c462fa0f51ad58b6" +checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" dependencies = [ "proc-macro2", "quote", @@ -352,6 +357,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +[[package]] +name = "bumpalo" +version = "3.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" + [[package]] name = "bv" version = "0.11.1" @@ -364,18 +375,18 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.7.3" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439989e6b8c38d1b6570a384ef1e49c8848128f5a97f3914baef02920842712f" +checksum = "a5377c8865e74a160d21f29c2d40669f53286db6eab59b88540cbb12ffc8b835" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.0.1" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e215f8c2f9f79cb53c8335e687ffd07d5bfcb6fe5fc80723762d0be46e7cc54" +checksum = "cfd2f4180c5721da6335cc9e9061cce522b87a35e51cc57636d28d22a9863c80" dependencies = [ "proc-macro2", "quote", @@ -390,15 +401,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" - -[[package]] -name = "cfg-if" -version = "0.1.10" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" [[package]] name = "cfg-if" @@ -415,6 +420,26 @@ dependencies = [ "solana-program", ] +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "console_log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501a375961cef1a0d44767200e66e4a559283097e91d0730b1d75dfb2f8a1494" +dependencies = [ + "log", + "web-sys", +] + [[package]] name = "constant_time_eq" version = "0.1.5" @@ -423,78 +448,122 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "cpufeatures" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" dependencies = [ "libc", ] +[[package]] +name = "crossbeam-channel" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "045ebe27666471bb549370b4b0b3e51b07f56325befa4284db65fc89c02511b1" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset", + "once_cell", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc" +dependencies = [ + "cfg-if", + "once_cell", +] + [[package]] name = "crunchy" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + [[package]] name = "crypto-mac" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.5", + "generic-array", "subtle", ] [[package]] name = "curve25519-dalek" -version = "2.1.3" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" dependencies = [ "byteorder", - "digest 0.8.1", - "rand_core", + "digest 0.9.0", + "rand_core 0.5.1", "subtle", "zeroize", ] [[package]] name = "digest" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.12.4", + "generic-array", ] [[package]] name = "digest" -version = "0.9.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" dependencies = [ - "generic-array 0.14.5", + "block-buffer 0.10.2", + "crypto-common", + "subtle", ] [[package]] name = "either" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - -[[package]] -name = "env_logger" -version = "0.8.4" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] +checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be" [[package]] name = "feature-probe" @@ -502,15 +571,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" -[[package]] -name = "generic-array" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" -dependencies = [ - "typenum", -] - [[package]] name = "generic-array" version = "0.14.5" @@ -528,20 +588,22 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", + "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] name = "getrandom" -version = "0.2.4" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c" +checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "wasi 0.10.2+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] @@ -571,12 +633,6 @@ dependencies = [ "libc", ] -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - [[package]] name = "hmac" version = "0.8.1" @@ -594,36 +650,55 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.5", + "generic-array", "hmac", ] [[package]] -name = "humantime" -version = "2.1.0" +name = "im" +version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +dependencies = [ + "bitmaps", + "rand_core 0.6.3", + "rand_xoshiro", + "rayon", + "serde", + "sized-chunks", + "typenum", + "version_check", +] [[package]] name = "itertools" -version = "0.9.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" + +[[package]] +name = "js-sys" +version = "0.3.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" +dependencies = [ + "wasm-bindgen", +] [[package]] name = "keccak" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" +checksum = "f9b7d56ba4a8344d6be9729995e6b06f928af29998cdf79fe390cbf6b1fee838" [[package]] name = "lazy_static" @@ -633,15 +708,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.116" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "565dbd88872dbe4cc8a46e527f26483c1d1f7afa6b884a3bd6cd893d4f98da74" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "libsecp256k1" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd1137239ab33b41aa9637a88a28249e5e70c40a42ccc92db7f12cc356c1fcd7" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" dependencies = [ "arrayref", "base64 0.12.3", @@ -652,7 +727,7 @@ dependencies = [ "libsecp256k1-gen-genmult", "rand", "serde", - "sha2", + "sha2 0.9.9", "typenum", ] @@ -685,30 +760,49 @@ dependencies = [ "libsecp256k1-core", ] +[[package]] +name = "lock_api" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +dependencies = [ + "autocfg", + "scopeguard", +] + [[package]] name = "log" -version = "0.4.14" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.1.0" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b70ca2a6103ac8b665dc150b142ef0e4e89df640c9e6cf295d189c3caebe5a" +checksum = "3a79b39c93a7a5a27eeaf9a23b5ff43f1b9e0ad6b1cdd441140ae53c35613fc7" dependencies = [ "libc", ] +[[package]] +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + [[package]] name = "num-derive" version = "0.3.3" @@ -722,29 +816,39 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", ] +[[package]] +name = "num_cpus" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +dependencies = [ + "hermit-abi", + "libc", +] + [[package]] name = "num_enum" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "720d3ea1055e4e4574c0c0b0f8c3fd4f24c4cdaf465948206dea090b57b526ad" +checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d992b768490d7fe0d8586d9b5745f6c49f557da6d81dc982b1d167ad4edbb21" +checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" dependencies = [ - "proc-macro-crate 1.1.0", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn", @@ -766,9 +870,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.9.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" +checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" [[package]] name = "opaque-debug" @@ -776,6 +880,29 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-sys", +] + [[package]] name = "ppv-lite86" version = "0.2.16" @@ -793,9 +920,9 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83" +checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" dependencies = [ "thiserror", "toml", @@ -803,11 +930,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.36" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" +checksum = "c278e965f1d8cf32d6e0e96de3d3e79712178ae67986d9cf9151f51e95aac89b" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -825,9 +952,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.15" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145" +checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" dependencies = [ "proc-macro2", ] @@ -841,7 +968,7 @@ dependencies = [ "getrandom 0.1.16", "libc", "rand_chacha", - "rand_core", + "rand_core 0.5.1", "rand_hc", ] @@ -852,7 +979,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.5.1", ] [[package]] @@ -864,20 +991,68 @@ dependencies = [ "getrandom 0.1.16", ] +[[package]] +name = "rand_core" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" + [[package]] name = "rand_hc" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.3", +] + +[[package]] +name = "rayon" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" +dependencies = [ + "autocfg", + "crossbeam-deque", + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", ] [[package]] name = "regex" -version = "1.5.4" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" dependencies = [ "aho-corasick", "memchr", @@ -886,69 +1061,66 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] name = "rustc_version" -version = "0.2.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ "semver", ] [[package]] name = "rustversion" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" +checksum = "24c8ad4f0c00e1eb5bc7614d236a7f1300e3dbd76b68cac8e06fb00b015ad8d8" [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" [[package]] -name = "semver" -version = "0.9.0" +name = "scopeguard" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] -name = "semver-parser" -version = "0.7.0" +name = "semver" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +checksum = "a2333e6df6d6598f2b1974829f853c2b4c5f4a6e503c10af918081aa6f8564e1" [[package]] name = "serde" -version = "1.0.136" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" +checksum = "fc855a42c7967b7c369eb5860f7164ef1f6f81c20c7cc1141f2a604e18723b03" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" +checksum = "212e73464ebcde48d723aa02eb270ba62eff38a9b732df31f33f1b4e145f3a54" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.136" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" +checksum = "6f2122636b9fe3b81f1cb25099fcf2d3f542cdb1d45940d56c713158884a05da" dependencies = [ "proc-macro2", "quote", @@ -957,9 +1129,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.78" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23c1ba4cf0efd44be32017709280b32d1cea5c3f1275c3b6d9e8bc54f758085" +checksum = "82c2c1fdcd807d1098552c5b9a36e425e42e9fbd7c6a37a8425f390f781f7fa7" dependencies = [ "itoa", "ryu", @@ -972,50 +1144,77 @@ version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer", - "cfg-if 1.0.0", + "block-buffer 0.9.0", + "cfg-if", "cpufeatures", "digest 0.9.0", "opaque-debug", ] +[[package]] +name = "sha2" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.3", +] + [[package]] name = "sha3" -version = "0.9.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +checksum = "881bf8156c87b6301fc5ca6b27f11eeb2761224c7081e69b409d5a1951a70c86" dependencies = [ - "block-buffer", - "digest 0.9.0", + "digest 0.10.3", "keccak", - "opaque-debug", ] +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[package]] +name = "smallvec" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" + [[package]] name = "solana-frozen-abi" -version = "1.8.14" +version = "1.10.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3495c76034ef52472ff4c5cd82f513073b415a7ac962d9a8aefe906a216e6392" +checksum = "49a5d3280421bb53fc12bdba1eaa505153fb4f99a06b5609dae22192652ead3b" dependencies = [ - "bs58 0.3.1", + "bs58 0.4.0", "bv", - "generic-array 0.14.5", + "generic-array", + "im", + "lazy_static", "log", "memmap2", "rustc_version", "serde", + "serde_bytes", "serde_derive", - "sha2", + "sha2 0.10.2", "solana-frozen-abi-macro", - "solana-logger", "thiserror", ] [[package]] name = "solana-frozen-abi-macro" -version = "1.8.14" +version = "1.10.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2193bd0e23b5bc93fce0533248c43b8aa53b27a91298e49d6fd018f51c43138" +checksum = "635c60ac96b1347af272c625465068b908aff919d19f29b5795a44310310494d" dependencies = [ "proc-macro2", "quote", @@ -1023,61 +1222,55 @@ dependencies = [ "syn", ] -[[package]] -name = "solana-logger" -version = "1.8.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4adacba4cc6b9d39899718fff3e312b32496ae44e570dfeff23d8b7ac60ad79" -dependencies = [ - "env_logger", - "lazy_static", - "log", -] - [[package]] name = "solana-program" -version = "1.8.14" +version = "1.10.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f706757ff4b34f0f1fac72204bb2bfbda3c1a939c6c72ae25f1b31635d08bb" +checksum = "eeecf504cee2821b006871f70e7a1f54db15f914cedf259eaf5976fe606470f0" dependencies = [ "base64 0.13.0", "bincode", + "bitflags", "blake3", "borsh", "borsh-derive", - "bs58 0.3.1", + "bs58 0.4.0", "bv", "bytemuck", + "console_error_panic_hook", + "console_log", "curve25519-dalek", - "hex", + "getrandom 0.1.16", "itertools", + "js-sys", "lazy_static", "libsecp256k1", "log", "num-derive", "num-traits", + "parking_lot", "rand", "rustc_version", "rustversion", "serde", "serde_bytes", "serde_derive", - "sha2", + "sha2 0.10.2", "sha3", "solana-frozen-abi", "solana-frozen-abi-macro", - "solana-logger", "solana-sdk-macro", "thiserror", + "wasm-bindgen", ] [[package]] name = "solana-sdk-macro" -version = "1.8.14" +version = "1.10.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11fc226c8458927a632f152e44c80b5eb69e1ea74af444a026a617dd5d691bd9" +checksum = "2b8bcac4394644f21dc013e932a7df9f536fcecef3e5df43fe362b4ec532ce30" dependencies = [ - "bs58 0.3.1", + "bs58 0.4.0", "proc-macro2", "quote", "rustversion", @@ -1086,19 +1279,20 @@ dependencies = [ [[package]] name = "spl-associated-token-account" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "393e2240d521c3dd770806bff25c2c00d761ac962be106e14e22dd912007f428" +checksum = "2b013067447a1396303ddfc294f36e3d260a32f8a16c501c295bcdc7de39b490" dependencies = [ + "borsh", "solana-program", "spl-token", ] [[package]] name = "spl-token" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93bfdd5bd7c869cb565c7d7635c4fafe189b988a0bdef81063cd9585c6b8dc01" +checksum = "0cc67166ef99d10c18cb5e9c208901e6d8255c6513bb1f877977eba48e6cc4fb" dependencies = [ "arrayref", "num-derive", @@ -1131,38 +1325,29 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.86" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b" +checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" dependencies = [ "proc-macro2", "quote", - "unicode-xid", -] - -[[package]] -name = "termcolor" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" -dependencies = [ - "winapi-util", + "unicode-ident", ] [[package]] name = "thiserror" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" dependencies = [ "proc-macro2", "quote", @@ -1171,9 +1356,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" dependencies = [ "serde", ] @@ -1185,16 +1370,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] -name = "unicode-segmentation" -version = "1.8.0" +name = "unicode-ident" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" +checksum = "15c61ba63f9235225a22310255a29b806b907c9b8c964bcbd0a2c70f3f2deea7" [[package]] -name = "unicode-xid" -version = "0.2.2" +name = "unicode-segmentation" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" [[package]] name = "version_check" @@ -1210,49 +1395,125 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "winapi" -version = "0.3.9" +name = "wasm-bindgen" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "cfg-if", + "wasm-bindgen-macro", ] [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +name = "wasm-bindgen-backend" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] [[package]] -name = "winapi-util" -version = "0.1.5" +name = "wasm-bindgen-macro" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602" dependencies = [ - "winapi", + "quote", + "wasm-bindgen-macro-support", ] [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "wasm-bindgen-macro-support" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" + +[[package]] +name = "web-sys" +version = "0.3.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] name = "yansi" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc79f4a1e39857fc00c3f662cbf2651c771f00e9c15fe2abc341806bd46bd71" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] name = "zeroize" -version = "1.5.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4062c749be08d90be727e9c5895371c3a0e49b90ba2b9592dc7afda95cc2b719" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" diff --git a/contracts/crates/chainlink-solana/Cargo.toml b/contracts/crates/chainlink-solana/Cargo.toml index 02e25c9f2..9a43d07b0 100644 --- a/contracts/crates/chainlink-solana/Cargo.toml +++ b/contracts/crates/chainlink-solana/Cargo.toml @@ -15,6 +15,6 @@ name = "chainlink_solana" default = [] [dependencies] -solana-program = "1.8.6" +solana-program = "1.10.25" borsh = "0.9.1" borsh-derive = "0.9.1" \ No newline at end of file diff --git a/contracts/crates/chainlink-solana/README.md b/contracts/crates/chainlink-solana/README.md index 14ed90beb..cb76f6531 100644 --- a/contracts/crates/chainlink-solana/README.md +++ b/contracts/crates/chainlink-solana/README.md @@ -1,3 +1,3 @@ # chainlink-solana -Chainlink client for Solana. \ No newline at end of file +Chainlink client for Solana. diff --git a/contracts/examples/hello-world/Cargo.lock b/contracts/examples/hello-world/Cargo.lock index 7778d7c50..33acc1401 100644 --- a/contracts/examples/hello-world/Cargo.lock +++ b/contracts/examples/hello-world/Cargo.lock @@ -8,7 +8,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.4", + "getrandom 0.2.7", "once_cell", "version_check", ] @@ -24,9 +24,9 @@ dependencies = [ [[package]] name = "anchor-attribute-access-control" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb917e636aa85cbb0d908e948cf7646c78a3e2fb06f396522d01fa55ec93412f" +checksum = "70f6ee9518f50ff4d434471ccf569186022bdd5ef65a21d14da3ea5231af944f" dependencies = [ "anchor-syn", "anyhow", @@ -38,9 +38,9 @@ dependencies = [ [[package]] name = "anchor-attribute-account" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40132c6a9ecf26f6a1d0480824d4e7327bade791d6afe2e003546f58b450e760" +checksum = "32c92bcf5388b52676d990f85bbfd838a8f5672393135063a50dc79b2b837c79" dependencies = [ "anchor-syn", "anyhow", @@ -53,9 +53,9 @@ dependencies = [ [[package]] name = "anchor-attribute-constant" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b229e8eb84adf4c282b45bf03354a265f629cb657323728570d994ca0f8ef0" +checksum = "0844974ac35e8ced62056b0d63777ebcdc5807438b8b189c881e2b647450b70a" dependencies = [ "anchor-syn", "proc-macro2", @@ -64,9 +64,9 @@ dependencies = [ [[package]] name = "anchor-attribute-error" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc0aaf2dae975810ee9f09135cb91b4df66d3834c9bbb789f0930fde2b2a49c" +checksum = "0f7467345e67a6f1d4b862b9763a4160ad89d18c247b8c902807768f7b6e23df" dependencies = [ "anchor-syn", "proc-macro2", @@ -76,9 +76,9 @@ dependencies = [ [[package]] name = "anchor-attribute-event" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aefe4f159ae2ccaa908ad7625639294be02602543c5ea8e7b6c8c6126640a8e" +checksum = "8774e4c1ac71f71a5aea7e4932fb69c30e3b8155c4fa59fd69401195434528a9" dependencies = [ "anchor-syn", "anyhow", @@ -89,9 +89,9 @@ dependencies = [ [[package]] name = "anchor-attribute-interface" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7885efaa71230455a55f2078c130c8168ba58a01271d769a9e3e7753041b023b" +checksum = "90eeb6e1c80f9f94fcef93a52813f6472186200e275e83cb3fac92b801de92f7" dependencies = [ "anchor-syn", "anyhow", @@ -103,9 +103,9 @@ dependencies = [ [[package]] name = "anchor-attribute-program" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962fa82552a2d36ac0a72410a7a63dce16ff84d5921f3195cf1427c89d3848d" +checksum = "ac515a7a5a4fea7fc768b1cec40ddb948e148ea657637c75f94f283212326cb9" dependencies = [ "anchor-syn", "anyhow", @@ -116,9 +116,9 @@ dependencies = [ [[package]] name = "anchor-attribute-state" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbb91124f1e49d5d84b4c812f47442830ddf8e5b25e7e7fbbe8027ea9a55f4e" +checksum = "43dc667b62ff71450f19dcfcc37b0c408fd4ddd89e8650368c2b0984b110603f" dependencies = [ "anchor-syn", "anyhow", @@ -129,9 +129,9 @@ dependencies = [ [[package]] name = "anchor-derive-accounts" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acbc8ab9e4305ae5fdfecc0e40f1254db28747d0bb4a4adf0d63dd09366bac6" +checksum = "7354d583a06701d24800a8ec4c2b0491f62581a331af349205e23421e0b56643" dependencies = [ "anchor-syn", "anyhow", @@ -142,9 +142,9 @@ dependencies = [ [[package]] name = "anchor-lang" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "720b81290f0323ab655380fe80d6aeb678c77500e07e5d75e7693b611895b5a4" +checksum = "ff5f57ec5e12fa6874b27f3d5c1f6f44302d3ad86c1266197ff7611bf6f5d251" dependencies = [ "anchor-attribute-access-control", "anchor-attribute-account", @@ -166,9 +166,9 @@ dependencies = [ [[package]] name = "anchor-syn" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b18fdb2a5bba16db5d2121935284d3fe226cf35ef1c549162abcb2c50c5b7e21" +checksum = "55aa1e680d9471342122ed5b6bc13bf5da473b0f7e4677d41a6954e5cc8ad155" dependencies = [ "anyhow", "bs58 0.3.1", @@ -178,16 +178,16 @@ dependencies = [ "quote", "serde", "serde_json", - "sha2", + "sha2 0.9.9", "syn", "thiserror", ] [[package]] name = "anyhow" -version = "1.0.53" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94a45b455c14666b85fc40a019e8ab9eb75e3a124e05494f5397122bc9eb06e0" +checksum = "bb07d2053ccdbe10e2af2995a2f116c1330396493dc1269f6a91d0ae82e19704" [[package]] name = "arrayref" @@ -197,20 +197,9 @@ checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" [[package]] name = "arrayvec" -version = "0.5.2" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] name = "autocfg" @@ -239,19 +228,33 @@ dependencies = [ "serde", ] +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + [[package]] name = "blake3" -version = "0.3.8" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3" +checksum = "a08e53fc5a564bb15bfe6fae56bd71522205f1f91893f9c0116edad6496c183f" dependencies = [ "arrayref", "arrayvec", "cc", - "cfg-if 0.1.10", + "cfg-if", "constant_time_eq", - "crypto-mac", - "digest 0.9.0", + "digest 0.10.3", ] [[package]] @@ -260,15 +263,17 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding", - "generic-array 0.14.5", + "generic-array", ] [[package]] -name = "block-padding" -version = "0.2.1" +name = "block-buffer" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +dependencies = [ + "generic-array", +] [[package]] name = "borsh" @@ -327,6 +332,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +[[package]] +name = "bumpalo" +version = "3.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" + [[package]] name = "bv" version = "0.11.1" @@ -339,18 +350,18 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.7.3" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439989e6b8c38d1b6570a384ef1e49c8848128f5a97f3914baef02920842712f" +checksum = "a5377c8865e74a160d21f29c2d40669f53286db6eab59b88540cbb12ffc8b835" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.0.1" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e215f8c2f9f79cb53c8335e687ffd07d5bfcb6fe5fc80723762d0be46e7cc54" +checksum = "cfd2f4180c5721da6335cc9e9061cce522b87a35e51cc57636d28d22a9863c80" dependencies = [ "proc-macro2", "quote", @@ -365,15 +376,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.72" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" [[package]] name = "cfg-if" @@ -383,15 +388,35 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chainlink_solana" -version = "0.1.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e5a3c8b6ff2c7b5c668e2e64a5640db6dec6654d7b9e18671e18a8af1d4bd5" +checksum = "a1bc07ff7987366d193e8e1913b4aafcb83f919ad71be8c040b420bcedb6339b" dependencies = [ "borsh", "borsh-derive", "solana-program", ] +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "console_log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501a375961cef1a0d44767200e66e4a559283097e91d0730b1d75dfb2f8a1494" +dependencies = [ + "log", + "web-sys", +] + [[package]] name = "constant_time_eq" version = "0.1.5" @@ -400,78 +425,122 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "cpufeatures" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" dependencies = [ "libc", ] +[[package]] +name = "crossbeam-channel" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "045ebe27666471bb549370b4b0b3e51b07f56325befa4284db65fc89c02511b1" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset", + "once_cell", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc" +dependencies = [ + "cfg-if", + "once_cell", +] + [[package]] name = "crunchy" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + [[package]] name = "crypto-mac" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.5", + "generic-array", "subtle", ] [[package]] name = "curve25519-dalek" -version = "2.1.3" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" dependencies = [ "byteorder", - "digest 0.8.1", - "rand_core", + "digest 0.9.0", + "rand_core 0.5.1", "subtle", "zeroize", ] [[package]] name = "digest" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.12.4", + "generic-array", ] [[package]] name = "digest" -version = "0.9.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" dependencies = [ - "generic-array 0.14.5", + "block-buffer 0.10.2", + "crypto-common", + "subtle", ] [[package]] name = "either" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - -[[package]] -name = "env_logger" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] +checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be" [[package]] name = "feature-probe" @@ -479,15 +548,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" -[[package]] -name = "generic-array" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" -dependencies = [ - "typenum", -] - [[package]] name = "generic-array" version = "0.14.5" @@ -505,20 +565,22 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", + "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] name = "getrandom" -version = "0.2.4" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c" +checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "wasi 0.10.2+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] @@ -556,12 +618,6 @@ dependencies = [ "libc", ] -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - [[package]] name = "hmac" version = "0.8.1" @@ -579,36 +635,55 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.5", + "generic-array", "hmac", ] [[package]] -name = "humantime" -version = "2.1.0" +name = "im" +version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +dependencies = [ + "bitmaps", + "rand_core 0.6.3", + "rand_xoshiro", + "rayon", + "serde", + "sized-chunks", + "typenum", + "version_check", +] [[package]] name = "itertools" -version = "0.9.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" + +[[package]] +name = "js-sys" +version = "0.3.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" +dependencies = [ + "wasm-bindgen", +] [[package]] name = "keccak" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" +checksum = "f9b7d56ba4a8344d6be9729995e6b06f928af29998cdf79fe390cbf6b1fee838" [[package]] name = "lazy_static" @@ -618,15 +693,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.117" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e74d72e0f9b65b5b4ca49a346af3976df0f9c61d550727f349ecd559f251a26c" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "libsecp256k1" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd1137239ab33b41aa9637a88a28249e5e70c40a42ccc92db7f12cc356c1fcd7" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" dependencies = [ "arrayref", "base64 0.12.3", @@ -637,7 +712,7 @@ dependencies = [ "libsecp256k1-gen-genmult", "rand", "serde", - "sha2", + "sha2 0.9.9", "typenum", ] @@ -670,30 +745,49 @@ dependencies = [ "libsecp256k1-core", ] +[[package]] +name = "lock_api" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +dependencies = [ + "autocfg", + "scopeguard", +] + [[package]] name = "log" -version = "0.4.14" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.1.0" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b70ca2a6103ac8b665dc150b142ef0e4e89df640c9e6cf295d189c3caebe5a" +checksum = "3a79b39c93a7a5a27eeaf9a23b5ff43f1b9e0ad6b1cdd441140ae53c35613fc7" dependencies = [ "libc", ] +[[package]] +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + [[package]] name = "num-derive" version = "0.3.3" @@ -707,18 +801,28 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", ] +[[package]] +name = "num_cpus" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +dependencies = [ + "hermit-abi", + "libc", +] + [[package]] name = "once_cell" -version = "1.9.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" +checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" [[package]] name = "opaque-debug" @@ -726,6 +830,29 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-sys", +] + [[package]] name = "ppv-lite86" version = "0.2.16" @@ -743,11 +870,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.36" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" +checksum = "c278e965f1d8cf32d6e0e96de3d3e79712178ae67986d9cf9151f51e95aac89b" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -765,9 +892,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.15" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145" +checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" dependencies = [ "proc-macro2", ] @@ -781,7 +908,7 @@ dependencies = [ "getrandom 0.1.16", "libc", "rand_chacha", - "rand_core", + "rand_core 0.5.1", "rand_hc", ] @@ -792,7 +919,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.5.1", ] [[package]] @@ -804,20 +931,68 @@ dependencies = [ "getrandom 0.1.16", ] +[[package]] +name = "rand_core" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" + [[package]] name = "rand_hc" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.3", +] + +[[package]] +name = "rayon" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" +dependencies = [ + "autocfg", + "crossbeam-deque", + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", ] [[package]] name = "regex" -version = "1.5.4" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" dependencies = [ "aho-corasick", "memchr", @@ -826,69 +1001,66 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] name = "rustc_version" -version = "0.2.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ "semver", ] [[package]] name = "rustversion" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" +checksum = "24c8ad4f0c00e1eb5bc7614d236a7f1300e3dbd76b68cac8e06fb00b015ad8d8" [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" [[package]] -name = "semver" -version = "0.9.0" +name = "scopeguard" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] -name = "semver-parser" -version = "0.7.0" +name = "semver" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +checksum = "a2333e6df6d6598f2b1974829f853c2b4c5f4a6e503c10af918081aa6f8564e1" [[package]] name = "serde" -version = "1.0.136" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" +checksum = "fc855a42c7967b7c369eb5860f7164ef1f6f81c20c7cc1141f2a604e18723b03" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" +checksum = "212e73464ebcde48d723aa02eb270ba62eff38a9b732df31f33f1b4e145f3a54" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.136" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" +checksum = "6f2122636b9fe3b81f1cb25099fcf2d3f542cdb1d45940d56c713158884a05da" dependencies = [ "proc-macro2", "quote", @@ -897,9 +1069,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.78" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23c1ba4cf0efd44be32017709280b32d1cea5c3f1275c3b6d9e8bc54f758085" +checksum = "82c2c1fdcd807d1098552c5b9a36e425e42e9fbd7c6a37a8425f390f781f7fa7" dependencies = [ "itoa", "ryu", @@ -912,50 +1084,77 @@ version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer", - "cfg-if 1.0.0", + "block-buffer 0.9.0", + "cfg-if", "cpufeatures", "digest 0.9.0", "opaque-debug", ] +[[package]] +name = "sha2" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.3", +] + [[package]] name = "sha3" -version = "0.9.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +checksum = "881bf8156c87b6301fc5ca6b27f11eeb2761224c7081e69b409d5a1951a70c86" dependencies = [ - "block-buffer", - "digest 0.9.0", + "digest 0.10.3", "keccak", - "opaque-debug", ] +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[package]] +name = "smallvec" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" + [[package]] name = "solana-frozen-abi" -version = "1.8.16" +version = "1.10.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "425be155319bda665dc3483f0c0267ac0fc89017812d0c5d9816b1c7a26c1532" +checksum = "49a5d3280421bb53fc12bdba1eaa505153fb4f99a06b5609dae22192652ead3b" dependencies = [ - "bs58 0.3.1", + "bs58 0.4.0", "bv", - "generic-array 0.14.5", + "generic-array", + "im", + "lazy_static", "log", "memmap2", "rustc_version", "serde", + "serde_bytes", "serde_derive", - "sha2", + "sha2 0.10.2", "solana-frozen-abi-macro", - "solana-logger", "thiserror", ] [[package]] name = "solana-frozen-abi-macro" -version = "1.8.16" +version = "1.10.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d97737c34380c42c9b3e060cf68d1929ad81fea5a3c00887bb82314b788ba13" +checksum = "635c60ac96b1347af272c625465068b908aff919d19f29b5795a44310310494d" dependencies = [ "proc-macro2", "quote", @@ -963,61 +1162,55 @@ dependencies = [ "syn", ] -[[package]] -name = "solana-logger" -version = "1.8.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659d836ac49f5a53481ead26f4ea78b688a91dedcbe6c51454169491e1648ceb" -dependencies = [ - "env_logger", - "lazy_static", - "log", -] - [[package]] name = "solana-program" -version = "1.8.16" +version = "1.10.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b2b6d99b5c662975ead69a60ead75b820f2eaa42eb4512c79a919e91807d43" +checksum = "eeecf504cee2821b006871f70e7a1f54db15f914cedf259eaf5976fe606470f0" dependencies = [ "base64 0.13.0", "bincode", + "bitflags", "blake3", "borsh", "borsh-derive", - "bs58 0.3.1", + "bs58 0.4.0", "bv", "bytemuck", + "console_error_panic_hook", + "console_log", "curve25519-dalek", - "hex", + "getrandom 0.1.16", "itertools", + "js-sys", "lazy_static", "libsecp256k1", "log", "num-derive", "num-traits", + "parking_lot", "rand", "rustc_version", "rustversion", "serde", "serde_bytes", "serde_derive", - "sha2", + "sha2 0.10.2", "sha3", "solana-frozen-abi", "solana-frozen-abi-macro", - "solana-logger", "solana-sdk-macro", "thiserror", + "wasm-bindgen", ] [[package]] name = "solana-sdk-macro" -version = "1.8.16" +version = "1.10.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a122a01e936f3b69064f0800e0488617833fc6a4dd86294cf7cc75f34511d6b5" +checksum = "2b8bcac4394644f21dc013e932a7df9f536fcecef3e5df43fe362b4ec532ce30" dependencies = [ - "bs58 0.3.1", + "bs58 0.4.0", "proc-macro2", "quote", "rustversion", @@ -1032,38 +1225,29 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.86" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b" +checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" dependencies = [ "proc-macro2", "quote", - "unicode-xid", -] - -[[package]] -name = "termcolor" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" -dependencies = [ - "winapi-util", + "unicode-ident", ] [[package]] name = "thiserror" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" dependencies = [ "proc-macro2", "quote", @@ -1072,9 +1256,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" dependencies = [ "serde", ] @@ -1086,16 +1270,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] -name = "unicode-segmentation" -version = "1.9.0" +name = "unicode-ident" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" +checksum = "15c61ba63f9235225a22310255a29b806b907c9b8c964bcbd0a2c70f3f2deea7" [[package]] -name = "unicode-xid" -version = "0.2.2" +name = "unicode-segmentation" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" [[package]] name = "version_check" @@ -1111,49 +1295,125 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "winapi" -version = "0.3.9" +name = "wasm-bindgen" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "cfg-if", + "wasm-bindgen-macro", ] [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +name = "wasm-bindgen-backend" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] [[package]] -name = "winapi-util" -version = "0.1.5" +name = "wasm-bindgen-macro" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602" dependencies = [ - "winapi", + "quote", + "wasm-bindgen-macro-support", ] [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "wasm-bindgen-macro-support" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" + +[[package]] +name = "web-sys" +version = "0.3.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] name = "yansi" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc79f4a1e39857fc00c3f662cbf2651c771f00e9c15fe2abc341806bd46bd71" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] name = "zeroize" -version = "1.5.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c88870063c39ee00ec285a2f8d6a966e5b6fb2becc4e8dac77ed0d370ed6006" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" diff --git a/contracts/examples/hello-world/client.js b/contracts/examples/hello-world/client.js index 83cb43447..ac9b224c7 100644 --- a/contracts/examples/hello-world/client.js +++ b/contracts/examples/hello-world/client.js @@ -5,7 +5,7 @@ const CHAINLINK_PROGRAM_ID = "HEvSKofvBgfaexv23kMabbYqxasxU3mQ4ibBMEmJWHny"; // USDT/USD const CHAINLINK_FEED = "CwBg8pxL73LvuJ781cWBGF1e64G2z7AbZ22J2g8Lp35a"; -const provider = anchor.Provider.env(); +const provider = anchor.AnchorProvider.env(); // Configure the cluster. anchor.setProvider(provider); @@ -27,7 +27,7 @@ async function main() { let tx = await program.rpc.execute({ accounts: { chainlinkFeed: CHAINLINK_FEED, - chainlinkProgram: CHAINLINK_PROGRAM_ID + chainlinkProgram: CHAINLINK_PROGRAM_ID, }, options: { commitment: "confirmed" }, }); @@ -39,4 +39,4 @@ async function main() { } console.log("Running client..."); -main().then(() => console.log("Success")); \ No newline at end of file +main().then(() => console.log("Success")); diff --git a/contracts/examples/hello-world/migrations/deploy.ts b/contracts/examples/hello-world/migrations/deploy.ts index 325cf3d0e..5e3df0dc3 100644 --- a/contracts/examples/hello-world/migrations/deploy.ts +++ b/contracts/examples/hello-world/migrations/deploy.ts @@ -9,4 +9,4 @@ module.exports = async function (provider) { anchor.setProvider(provider); // Add your deploy script here. -} +}; diff --git a/contracts/examples/hello-world/package.json b/contracts/examples/hello-world/package.json index 20d5189ba..c9b1dd37f 100644 --- a/contracts/examples/hello-world/package.json +++ b/contracts/examples/hello-world/package.json @@ -1,12 +1,12 @@ { - "dependencies": { - "@project-serum/anchor": "^0.23.0" - }, - "devDependencies": { - "chai": "^4.3.4", - "mocha": "^9.0.3", - "ts-mocha": "^8.0.0", - "@types/mocha": "^9.0.0", - "typescript": "^4.3.5" - } + "dependencies": { + "@project-serum/anchor": "^0.25.0" + }, + "devDependencies": { + "chai": "^4.3.4", + "mocha": "^9.0.3", + "ts-mocha": "^8.0.0", + "@types/mocha": "^9.0.0", + "typescript": "^4.3.5" + } } diff --git a/contracts/examples/hello-world/programs/hello-world/Cargo.toml b/contracts/examples/hello-world/programs/hello-world/Cargo.toml index e1bc615bd..1fd06a701 100644 --- a/contracts/examples/hello-world/programs/hello-world/Cargo.toml +++ b/contracts/examples/hello-world/programs/hello-world/Cargo.toml @@ -16,5 +16,5 @@ cpi = ["no-entrypoint"] default = [] [dependencies] -anchor-lang = "0.23.0" -chainlink_solana = "0.1.2" +anchor-lang = "0.25.0" +chainlink_solana = "1.0.0" diff --git a/contracts/examples/hello-world/tests/hello-world.ts b/contracts/examples/hello-world/tests/hello-world.ts index 8ab8efccc..3e06f3071 100644 --- a/contracts/examples/hello-world/tests/hello-world.ts +++ b/contracts/examples/hello-world/tests/hello-world.ts @@ -1,25 +1,27 @@ -import * as anchor from '@project-serum/anchor'; -import * as fs from 'fs'; -import { Program, BN } from '@project-serum/anchor'; -import { HelloWorld } from '../target/types/hello_world'; +import * as anchor from "@project-serum/anchor"; +import * as fs from "fs"; +import { Program, BN } from "@project-serum/anchor"; +import { HelloWorld } from "../target/types/hello_world"; const CHAINLINK_PROGRAM_ID = "HEvSKofvBgfaexv23kMabbYqxasxU3mQ4ibBMEmJWHny"; -describe('hello-world', () => { - const provider = anchor.Provider.env(); +describe("hello-world", () => { + const provider = anchor.AnchorProvider.env(); // Configure the client to use the local cluster. anchor.setProvider(provider); const program = anchor.workspace.HelloWorld as Program; - it('Is initialized!', async () => { + const header = 8 + 192; // account discriminator + header + const transmissionSize = 48; + + it("Is initialized!", async () => { const owner = provider.wallet; const store = anchor.web3.Keypair.generate(); const feed = anchor.web3.Keypair.generate(); - const accessController = anchor.web3.Keypair.generate(); - let storeIdl = JSON.parse(fs.readFileSync('../../target/idl/store.json')); + let storeIdl = JSON.parse(fs.readFileSync("../../target/idl/store.json", "utf-8")); const storeProgram = new Program(storeIdl, CHAINLINK_PROGRAM_ID, provider); // Create a feed @@ -27,59 +29,46 @@ describe('hello-world', () => { const decimals = 18; const granularity = 30; const liveLength = 3; - await storeProgram.rpc.createFeed( - description, - decimals, - granularity, - liveLength, - { - accounts: { + const historicalLength = 3; + await storeProgram.methods + .createFeed(description, decimals, granularity, liveLength) + .accounts({ feed: feed.publicKey, authority: owner.publicKey, - }, - signers: [feed], - preInstructions: [ - await storeProgram.account.transmissions.createInstruction(feed, 8+192+6*24), - ], - }); + }) + .signers([feed]) + .preInstructions([ + await storeProgram.account.transmissions.createInstruction( + feed, + header + (liveLength + historicalLength) * transmissionSize + ), + ]).rpc(); - await storeProgram.rpc.setWriter( - owner.publicKey, - { - accounts: { - feed: feed.publicKey, - owner: owner.publicKey, - authority: owner.publicKey, - }, - }); - + await storeProgram.methods.setWriter(owner.publicKey).accounts({ + feed: feed.publicKey, + owner: owner.publicKey, + authority: owner.publicKey, + }).rpc(); - const scale = (new BN(10)).pow(new BN(decimals)); + const scale = new BN(10).pow(new BN(decimals)); // Scale answer to enough decimals - let answer = (new BN(1)).mul(scale); + let answer = new BN(1).mul(scale); let round = { timestamp: new BN(1), answer }; - let tx = await storeProgram.rpc.submit( - round, - { - accounts: { - store: store.publicKey, - feed: feed.publicKey, - authority: owner.publicKey, - }, - }); + let tx = await storeProgram.methods.submit(round).accounts({ + store: store.publicKey, + feed: feed.publicKey, + authority: owner.publicKey, + }).rpc(); await provider.connection.confirmTransaction(tx); // Add your test here. - tx = await program.rpc.execute({ - accounts: { - chainlinkFeed: feed.publicKey, - chainlinkProgram: CHAINLINK_PROGRAM_ID - }, - options: { commitment: "confirmed" }, - }); + tx = await program.methods.execute().accounts({ + chainlinkFeed: feed.publicKey, + chainlinkProgram: CHAINLINK_PROGRAM_ID, + }).rpc({ commitment: "confirmed" }); console.log("Your transaction signature", tx); - let t = await provider.connection.getConfirmedTransaction(tx, "confirmed"); - console.log(t.meta.logMessages) + let t = await provider.connection.getTransaction(tx, { commitment: "confirmed" }); + console.log(t.meta.logMessages); }); }); diff --git a/contracts/examples/hello-world/yarn.lock b/contracts/examples/hello-world/yarn.lock index a916f89f4..0808010d6 100644 --- a/contracts/examples/hello-world/yarn.lock +++ b/contracts/examples/hello-world/yarn.lock @@ -30,10 +30,10 @@ "@ethersproject/logger" "^5.5.0" hash.js "1.1.7" -"@project-serum/anchor@^0.23.0": - version "0.23.0" - resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.23.0.tgz#2b2eb6b51601b073e8db26663aa2d6c2f2841771" - integrity sha512-LV2/ifZOJVFTZ4GbEloXln3iVfCvO1YM8i7BBCrUm4tehP7irMx4nr4/IabHWOzrQcQElsxSP/lb1tBp+2ff8A== +"@project-serum/anchor@^0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.25.0.tgz#88ee4843336005cf5a64c80636ce626f0996f503" + integrity sha512-E6A5Y/ijqpfMJ5psJvbw0kVTzLZFUcOFgs6eSM2M2iWE1lVRF18T6hWZVNl6zqZsoz98jgnNHtVGJMs+ds9A7A== dependencies: "@project-serum/borsh" "^0.2.5" "@solana/web3.js" "^1.36.0" @@ -45,10 +45,10 @@ cross-fetch "^3.1.5" crypto-hash "^1.3.0" eventemitter3 "^4.0.7" - find "^0.3.0" js-sha256 "^0.9.0" pako "^2.0.3" snake-case "^3.0.4" + superstruct "^0.15.4" toml "^3.0.0" "@project-serum/borsh@^0.2.5": @@ -523,13 +523,6 @@ find-up@5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -find@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/find/-/find-0.3.0.tgz#4082e8fc8d8320f1a382b5e4f521b9bc50775cb8" - integrity sha512-iSd+O4OEYV/I36Zl8MdYJO0xD82wH528SaCieTVHhclgiYNe9y+yPKSwK+A7/WsmHL1EZ+pYUJBXWTL5qofksw== - dependencies: - traverse-chain "~0.1.0" - flat@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" @@ -1026,6 +1019,11 @@ superstruct@^0.14.2: resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.14.2.tgz#0dbcdf3d83676588828f1cf5ed35cda02f59025b" integrity sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ== +superstruct@^0.15.4: + version "0.15.5" + resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.15.5.tgz#0f0a8d3ce31313f0d84c6096cd4fa1bfdedc9dab" + integrity sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ== + supports-color@8.1.1: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" @@ -1067,11 +1065,6 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= -traverse-chain@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/traverse-chain/-/traverse-chain-0.1.0.tgz#61dbc2d53b69ff6091a12a168fd7d433107e40f1" - integrity sha1-YdvC1Ttp/2CRoSoWj9fUMxB+QPE= - ts-mocha@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/ts-mocha/-/ts-mocha-8.0.0.tgz#962d0fa12eeb6468aa1a6b594bb3bbc818da3ef0" diff --git a/contracts/generated/ocr2/AcceptProposal.go b/contracts/generated/ocr2/AcceptProposal.go index af4398090..32f0a06d0 100644 --- a/contracts/generated/ocr2/AcceptProposal.go +++ b/contracts/generated/ocr2/AcceptProposal.go @@ -20,20 +20,22 @@ type AcceptProposal struct { // // [2] = [WRITE] receiver // - // [3] = [SIGNER] authority + // [3] = [WRITE] tokenReceiver // - // [4] = [WRITE] tokenVault + // [4] = [SIGNER] authority // - // [5] = [] vaultAuthority + // [5] = [WRITE] tokenVault // - // [6] = [] tokenProgram + // [6] = [] vaultAuthority + // + // [7] = [] tokenProgram ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"` } // NewAcceptProposalInstructionBuilder creates a new `AcceptProposal` instruction builder. func NewAcceptProposalInstructionBuilder() *AcceptProposal { nd := &AcceptProposal{ - AccountMetaSlice: make(ag_solanago.AccountMetaSlice, 7), + AccountMetaSlice: make(ag_solanago.AccountMetaSlice, 8), } return nd } @@ -77,48 +79,59 @@ func (inst *AcceptProposal) GetReceiverAccount() *ag_solanago.AccountMeta { return inst.AccountMetaSlice[2] } +// SetTokenReceiverAccount sets the "tokenReceiver" account. +func (inst *AcceptProposal) SetTokenReceiverAccount(tokenReceiver ag_solanago.PublicKey) *AcceptProposal { + inst.AccountMetaSlice[3] = ag_solanago.Meta(tokenReceiver).WRITE() + return inst +} + +// GetTokenReceiverAccount gets the "tokenReceiver" account. +func (inst *AcceptProposal) GetTokenReceiverAccount() *ag_solanago.AccountMeta { + return inst.AccountMetaSlice[3] +} + // SetAuthorityAccount sets the "authority" account. func (inst *AcceptProposal) SetAuthorityAccount(authority ag_solanago.PublicKey) *AcceptProposal { - inst.AccountMetaSlice[3] = ag_solanago.Meta(authority).SIGNER() + inst.AccountMetaSlice[4] = ag_solanago.Meta(authority).SIGNER() return inst } // GetAuthorityAccount gets the "authority" account. func (inst *AcceptProposal) GetAuthorityAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[3] + return inst.AccountMetaSlice[4] } // SetTokenVaultAccount sets the "tokenVault" account. func (inst *AcceptProposal) SetTokenVaultAccount(tokenVault ag_solanago.PublicKey) *AcceptProposal { - inst.AccountMetaSlice[4] = ag_solanago.Meta(tokenVault).WRITE() + inst.AccountMetaSlice[5] = ag_solanago.Meta(tokenVault).WRITE() return inst } // GetTokenVaultAccount gets the "tokenVault" account. func (inst *AcceptProposal) GetTokenVaultAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[4] + return inst.AccountMetaSlice[5] } // SetVaultAuthorityAccount sets the "vaultAuthority" account. func (inst *AcceptProposal) SetVaultAuthorityAccount(vaultAuthority ag_solanago.PublicKey) *AcceptProposal { - inst.AccountMetaSlice[5] = ag_solanago.Meta(vaultAuthority) + inst.AccountMetaSlice[6] = ag_solanago.Meta(vaultAuthority) return inst } // GetVaultAuthorityAccount gets the "vaultAuthority" account. func (inst *AcceptProposal) GetVaultAuthorityAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[5] + return inst.AccountMetaSlice[6] } // SetTokenProgramAccount sets the "tokenProgram" account. func (inst *AcceptProposal) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *AcceptProposal { - inst.AccountMetaSlice[6] = ag_solanago.Meta(tokenProgram) + inst.AccountMetaSlice[7] = ag_solanago.Meta(tokenProgram) return inst } // GetTokenProgramAccount gets the "tokenProgram" account. func (inst *AcceptProposal) GetTokenProgramAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[6] + return inst.AccountMetaSlice[7] } func (inst AcceptProposal) Build() *Instruction { @@ -158,15 +171,18 @@ func (inst *AcceptProposal) Validate() error { return errors.New("accounts.Receiver is not set") } if inst.AccountMetaSlice[3] == nil { - return errors.New("accounts.Authority is not set") + return errors.New("accounts.TokenReceiver is not set") } if inst.AccountMetaSlice[4] == nil { - return errors.New("accounts.TokenVault is not set") + return errors.New("accounts.Authority is not set") } if inst.AccountMetaSlice[5] == nil { - return errors.New("accounts.VaultAuthority is not set") + return errors.New("accounts.TokenVault is not set") } if inst.AccountMetaSlice[6] == nil { + return errors.New("accounts.VaultAuthority is not set") + } + if inst.AccountMetaSlice[7] == nil { return errors.New("accounts.TokenProgram is not set") } } @@ -187,14 +203,15 @@ func (inst *AcceptProposal) EncodeToTree(parent ag_treeout.Branches) { }) // Accounts of the instruction: - instructionBranch.Child("Accounts[len=7]").ParentFunc(func(accountsBranch ag_treeout.Branches) { + instructionBranch.Child("Accounts[len=8]").ParentFunc(func(accountsBranch ag_treeout.Branches) { accountsBranch.Child(ag_format.Meta(" state", inst.AccountMetaSlice[0])) accountsBranch.Child(ag_format.Meta(" proposal", inst.AccountMetaSlice[1])) accountsBranch.Child(ag_format.Meta(" receiver", inst.AccountMetaSlice[2])) - accountsBranch.Child(ag_format.Meta(" authority", inst.AccountMetaSlice[3])) - accountsBranch.Child(ag_format.Meta(" tokenVault", inst.AccountMetaSlice[4])) - accountsBranch.Child(ag_format.Meta("vaultAuthority", inst.AccountMetaSlice[5])) - accountsBranch.Child(ag_format.Meta(" tokenProgram", inst.AccountMetaSlice[6])) + accountsBranch.Child(ag_format.Meta(" tokenReceiver", inst.AccountMetaSlice[3])) + accountsBranch.Child(ag_format.Meta(" authority", inst.AccountMetaSlice[4])) + accountsBranch.Child(ag_format.Meta(" tokenVault", inst.AccountMetaSlice[5])) + accountsBranch.Child(ag_format.Meta("vaultAuthority", inst.AccountMetaSlice[6])) + accountsBranch.Child(ag_format.Meta(" tokenProgram", inst.AccountMetaSlice[7])) }) }) }) @@ -225,6 +242,7 @@ func NewAcceptProposalInstruction( state ag_solanago.PublicKey, proposal ag_solanago.PublicKey, receiver ag_solanago.PublicKey, + tokenReceiver ag_solanago.PublicKey, authority ag_solanago.PublicKey, tokenVault ag_solanago.PublicKey, vaultAuthority ag_solanago.PublicKey, @@ -234,6 +252,7 @@ func NewAcceptProposalInstruction( SetStateAccount(state). SetProposalAccount(proposal). SetReceiverAccount(receiver). + SetTokenReceiverAccount(tokenReceiver). SetAuthorityAccount(authority). SetTokenVaultAccount(tokenVault). SetVaultAuthorityAccount(vaultAuthority). diff --git a/contracts/generated/ocr2/Close.go b/contracts/generated/ocr2/Close.go index f4dfe5f16..29f8b4781 100644 --- a/contracts/generated/ocr2/Close.go +++ b/contracts/generated/ocr2/Close.go @@ -17,20 +17,22 @@ type Close struct { // // [1] = [WRITE] receiver // - // [2] = [SIGNER] authority + // [2] = [WRITE] tokenReceiver // - // [3] = [WRITE] tokenVault + // [3] = [SIGNER] authority // - // [4] = [] vaultAuthority + // [4] = [WRITE] tokenVault // - // [5] = [] tokenProgram + // [5] = [] vaultAuthority + // + // [6] = [] tokenProgram ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"` } // NewCloseInstructionBuilder creates a new `Close` instruction builder. func NewCloseInstructionBuilder() *Close { nd := &Close{ - AccountMetaSlice: make(ag_solanago.AccountMetaSlice, 6), + AccountMetaSlice: make(ag_solanago.AccountMetaSlice, 7), } return nd } @@ -57,48 +59,59 @@ func (inst *Close) GetReceiverAccount() *ag_solanago.AccountMeta { return inst.AccountMetaSlice[1] } +// SetTokenReceiverAccount sets the "tokenReceiver" account. +func (inst *Close) SetTokenReceiverAccount(tokenReceiver ag_solanago.PublicKey) *Close { + inst.AccountMetaSlice[2] = ag_solanago.Meta(tokenReceiver).WRITE() + return inst +} + +// GetTokenReceiverAccount gets the "tokenReceiver" account. +func (inst *Close) GetTokenReceiverAccount() *ag_solanago.AccountMeta { + return inst.AccountMetaSlice[2] +} + // SetAuthorityAccount sets the "authority" account. func (inst *Close) SetAuthorityAccount(authority ag_solanago.PublicKey) *Close { - inst.AccountMetaSlice[2] = ag_solanago.Meta(authority).SIGNER() + inst.AccountMetaSlice[3] = ag_solanago.Meta(authority).SIGNER() return inst } // GetAuthorityAccount gets the "authority" account. func (inst *Close) GetAuthorityAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[2] + return inst.AccountMetaSlice[3] } // SetTokenVaultAccount sets the "tokenVault" account. func (inst *Close) SetTokenVaultAccount(tokenVault ag_solanago.PublicKey) *Close { - inst.AccountMetaSlice[3] = ag_solanago.Meta(tokenVault).WRITE() + inst.AccountMetaSlice[4] = ag_solanago.Meta(tokenVault).WRITE() return inst } // GetTokenVaultAccount gets the "tokenVault" account. func (inst *Close) GetTokenVaultAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[3] + return inst.AccountMetaSlice[4] } // SetVaultAuthorityAccount sets the "vaultAuthority" account. func (inst *Close) SetVaultAuthorityAccount(vaultAuthority ag_solanago.PublicKey) *Close { - inst.AccountMetaSlice[4] = ag_solanago.Meta(vaultAuthority) + inst.AccountMetaSlice[5] = ag_solanago.Meta(vaultAuthority) return inst } // GetVaultAuthorityAccount gets the "vaultAuthority" account. func (inst *Close) GetVaultAuthorityAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[4] + return inst.AccountMetaSlice[5] } // SetTokenProgramAccount sets the "tokenProgram" account. func (inst *Close) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *Close { - inst.AccountMetaSlice[5] = ag_solanago.Meta(tokenProgram) + inst.AccountMetaSlice[6] = ag_solanago.Meta(tokenProgram) return inst } // GetTokenProgramAccount gets the "tokenProgram" account. func (inst *Close) GetTokenProgramAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[5] + return inst.AccountMetaSlice[6] } func (inst Close) Build() *Instruction { @@ -128,15 +141,18 @@ func (inst *Close) Validate() error { return errors.New("accounts.Receiver is not set") } if inst.AccountMetaSlice[2] == nil { - return errors.New("accounts.Authority is not set") + return errors.New("accounts.TokenReceiver is not set") } if inst.AccountMetaSlice[3] == nil { - return errors.New("accounts.TokenVault is not set") + return errors.New("accounts.Authority is not set") } if inst.AccountMetaSlice[4] == nil { - return errors.New("accounts.VaultAuthority is not set") + return errors.New("accounts.TokenVault is not set") } if inst.AccountMetaSlice[5] == nil { + return errors.New("accounts.VaultAuthority is not set") + } + if inst.AccountMetaSlice[6] == nil { return errors.New("accounts.TokenProgram is not set") } } @@ -155,13 +171,14 @@ func (inst *Close) EncodeToTree(parent ag_treeout.Branches) { instructionBranch.Child("Params[len=0]").ParentFunc(func(paramsBranch ag_treeout.Branches) {}) // Accounts of the instruction: - instructionBranch.Child("Accounts[len=6]").ParentFunc(func(accountsBranch ag_treeout.Branches) { + instructionBranch.Child("Accounts[len=7]").ParentFunc(func(accountsBranch ag_treeout.Branches) { accountsBranch.Child(ag_format.Meta(" state", inst.AccountMetaSlice[0])) accountsBranch.Child(ag_format.Meta(" receiver", inst.AccountMetaSlice[1])) - accountsBranch.Child(ag_format.Meta(" authority", inst.AccountMetaSlice[2])) - accountsBranch.Child(ag_format.Meta(" tokenVault", inst.AccountMetaSlice[3])) - accountsBranch.Child(ag_format.Meta("vaultAuthority", inst.AccountMetaSlice[4])) - accountsBranch.Child(ag_format.Meta(" tokenProgram", inst.AccountMetaSlice[5])) + accountsBranch.Child(ag_format.Meta(" tokenReceiver", inst.AccountMetaSlice[2])) + accountsBranch.Child(ag_format.Meta(" authority", inst.AccountMetaSlice[3])) + accountsBranch.Child(ag_format.Meta(" tokenVault", inst.AccountMetaSlice[4])) + accountsBranch.Child(ag_format.Meta("vaultAuthority", inst.AccountMetaSlice[5])) + accountsBranch.Child(ag_format.Meta(" tokenProgram", inst.AccountMetaSlice[6])) }) }) }) @@ -179,6 +196,7 @@ func NewCloseInstruction( // Accounts: state ag_solanago.PublicKey, receiver ag_solanago.PublicKey, + tokenReceiver ag_solanago.PublicKey, authority ag_solanago.PublicKey, tokenVault ag_solanago.PublicKey, vaultAuthority ag_solanago.PublicKey, @@ -186,6 +204,7 @@ func NewCloseInstruction( return NewCloseInstructionBuilder(). SetStateAccount(state). SetReceiverAccount(receiver). + SetTokenReceiverAccount(tokenReceiver). SetAuthorityAccount(authority). SetTokenVaultAccount(tokenVault). SetVaultAuthorityAccount(vaultAuthority). diff --git a/contracts/generated/ocr2/Initialize.go b/contracts/generated/ocr2/Initialize.go index 472075dd2..e7e573a70 100644 --- a/contracts/generated/ocr2/Initialize.go +++ b/contracts/generated/ocr2/Initialize.go @@ -19,34 +19,24 @@ type Initialize struct { // // [1] = [] feed // - // [2] = [WRITE, SIGNER] payer + // [2] = [SIGNER] owner // - // [3] = [SIGNER] owner + // [3] = [] tokenMint // - // [4] = [] tokenMint + // [4] = [] tokenVault // - // [5] = [WRITE] tokenVault + // [5] = [] vaultAuthority // - // [6] = [] vaultAuthority + // [6] = [] requesterAccessController // - // [7] = [] requesterAccessController - // - // [8] = [] billingAccessController - // - // [9] = [] rent - // - // [10] = [] systemProgram - // - // [11] = [] tokenProgram - // - // [12] = [] associatedTokenProgram + // [7] = [] billingAccessController ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"` } // NewInitializeInstructionBuilder creates a new `Initialize` instruction builder. func NewInitializeInstructionBuilder() *Initialize { nd := &Initialize{ - AccountMetaSlice: make(ag_solanago.AccountMetaSlice, 13), + AccountMetaSlice: make(ag_solanago.AccountMetaSlice, 8), } return nd } @@ -85,125 +75,70 @@ func (inst *Initialize) GetFeedAccount() *ag_solanago.AccountMeta { return inst.AccountMetaSlice[1] } -// SetPayerAccount sets the "payer" account. -func (inst *Initialize) SetPayerAccount(payer ag_solanago.PublicKey) *Initialize { - inst.AccountMetaSlice[2] = ag_solanago.Meta(payer).WRITE().SIGNER() - return inst -} - -// GetPayerAccount gets the "payer" account. -func (inst *Initialize) GetPayerAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[2] -} - // SetOwnerAccount sets the "owner" account. func (inst *Initialize) SetOwnerAccount(owner ag_solanago.PublicKey) *Initialize { - inst.AccountMetaSlice[3] = ag_solanago.Meta(owner).SIGNER() + inst.AccountMetaSlice[2] = ag_solanago.Meta(owner).SIGNER() return inst } // GetOwnerAccount gets the "owner" account. func (inst *Initialize) GetOwnerAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[3] + return inst.AccountMetaSlice[2] } // SetTokenMintAccount sets the "tokenMint" account. func (inst *Initialize) SetTokenMintAccount(tokenMint ag_solanago.PublicKey) *Initialize { - inst.AccountMetaSlice[4] = ag_solanago.Meta(tokenMint) + inst.AccountMetaSlice[3] = ag_solanago.Meta(tokenMint) return inst } // GetTokenMintAccount gets the "tokenMint" account. func (inst *Initialize) GetTokenMintAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[4] + return inst.AccountMetaSlice[3] } // SetTokenVaultAccount sets the "tokenVault" account. func (inst *Initialize) SetTokenVaultAccount(tokenVault ag_solanago.PublicKey) *Initialize { - inst.AccountMetaSlice[5] = ag_solanago.Meta(tokenVault).WRITE() + inst.AccountMetaSlice[4] = ag_solanago.Meta(tokenVault) return inst } // GetTokenVaultAccount gets the "tokenVault" account. func (inst *Initialize) GetTokenVaultAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[5] + return inst.AccountMetaSlice[4] } // SetVaultAuthorityAccount sets the "vaultAuthority" account. func (inst *Initialize) SetVaultAuthorityAccount(vaultAuthority ag_solanago.PublicKey) *Initialize { - inst.AccountMetaSlice[6] = ag_solanago.Meta(vaultAuthority) + inst.AccountMetaSlice[5] = ag_solanago.Meta(vaultAuthority) return inst } // GetVaultAuthorityAccount gets the "vaultAuthority" account. func (inst *Initialize) GetVaultAuthorityAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[6] + return inst.AccountMetaSlice[5] } // SetRequesterAccessControllerAccount sets the "requesterAccessController" account. func (inst *Initialize) SetRequesterAccessControllerAccount(requesterAccessController ag_solanago.PublicKey) *Initialize { - inst.AccountMetaSlice[7] = ag_solanago.Meta(requesterAccessController) + inst.AccountMetaSlice[6] = ag_solanago.Meta(requesterAccessController) return inst } // GetRequesterAccessControllerAccount gets the "requesterAccessController" account. func (inst *Initialize) GetRequesterAccessControllerAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[7] + return inst.AccountMetaSlice[6] } // SetBillingAccessControllerAccount sets the "billingAccessController" account. func (inst *Initialize) SetBillingAccessControllerAccount(billingAccessController ag_solanago.PublicKey) *Initialize { - inst.AccountMetaSlice[8] = ag_solanago.Meta(billingAccessController) + inst.AccountMetaSlice[7] = ag_solanago.Meta(billingAccessController) return inst } // GetBillingAccessControllerAccount gets the "billingAccessController" account. func (inst *Initialize) GetBillingAccessControllerAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[8] -} - -// SetRentAccount sets the "rent" account. -func (inst *Initialize) SetRentAccount(rent ag_solanago.PublicKey) *Initialize { - inst.AccountMetaSlice[9] = ag_solanago.Meta(rent) - return inst -} - -// GetRentAccount gets the "rent" account. -func (inst *Initialize) GetRentAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[9] -} - -// SetSystemProgramAccount sets the "systemProgram" account. -func (inst *Initialize) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *Initialize { - inst.AccountMetaSlice[10] = ag_solanago.Meta(systemProgram) - return inst -} - -// GetSystemProgramAccount gets the "systemProgram" account. -func (inst *Initialize) GetSystemProgramAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[10] -} - -// SetTokenProgramAccount sets the "tokenProgram" account. -func (inst *Initialize) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *Initialize { - inst.AccountMetaSlice[11] = ag_solanago.Meta(tokenProgram) - return inst -} - -// GetTokenProgramAccount gets the "tokenProgram" account. -func (inst *Initialize) GetTokenProgramAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[11] -} - -// SetAssociatedTokenProgramAccount sets the "associatedTokenProgram" account. -func (inst *Initialize) SetAssociatedTokenProgramAccount(associatedTokenProgram ag_solanago.PublicKey) *Initialize { - inst.AccountMetaSlice[12] = ag_solanago.Meta(associatedTokenProgram) - return inst -} - -// GetAssociatedTokenProgramAccount gets the "associatedTokenProgram" account. -func (inst *Initialize) GetAssociatedTokenProgramAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[12] + return inst.AccountMetaSlice[7] } func (inst Initialize) Build() *Instruction { @@ -243,38 +178,23 @@ func (inst *Initialize) Validate() error { return errors.New("accounts.Feed is not set") } if inst.AccountMetaSlice[2] == nil { - return errors.New("accounts.Payer is not set") - } - if inst.AccountMetaSlice[3] == nil { return errors.New("accounts.Owner is not set") } - if inst.AccountMetaSlice[4] == nil { + if inst.AccountMetaSlice[3] == nil { return errors.New("accounts.TokenMint is not set") } - if inst.AccountMetaSlice[5] == nil { + if inst.AccountMetaSlice[4] == nil { return errors.New("accounts.TokenVault is not set") } - if inst.AccountMetaSlice[6] == nil { + if inst.AccountMetaSlice[5] == nil { return errors.New("accounts.VaultAuthority is not set") } - if inst.AccountMetaSlice[7] == nil { + if inst.AccountMetaSlice[6] == nil { return errors.New("accounts.RequesterAccessController is not set") } - if inst.AccountMetaSlice[8] == nil { + if inst.AccountMetaSlice[7] == nil { return errors.New("accounts.BillingAccessController is not set") } - if inst.AccountMetaSlice[9] == nil { - return errors.New("accounts.Rent is not set") - } - if inst.AccountMetaSlice[10] == nil { - return errors.New("accounts.SystemProgram is not set") - } - if inst.AccountMetaSlice[11] == nil { - return errors.New("accounts.TokenProgram is not set") - } - if inst.AccountMetaSlice[12] == nil { - return errors.New("accounts.AssociatedTokenProgram is not set") - } } return nil } @@ -294,20 +214,15 @@ func (inst *Initialize) EncodeToTree(parent ag_treeout.Branches) { }) // Accounts of the instruction: - instructionBranch.Child("Accounts[len=13]").ParentFunc(func(accountsBranch ag_treeout.Branches) { + instructionBranch.Child("Accounts[len=8]").ParentFunc(func(accountsBranch ag_treeout.Branches) { accountsBranch.Child(ag_format.Meta(" state", inst.AccountMetaSlice[0])) accountsBranch.Child(ag_format.Meta(" feed", inst.AccountMetaSlice[1])) - accountsBranch.Child(ag_format.Meta(" payer", inst.AccountMetaSlice[2])) - accountsBranch.Child(ag_format.Meta(" owner", inst.AccountMetaSlice[3])) - accountsBranch.Child(ag_format.Meta(" tokenMint", inst.AccountMetaSlice[4])) - accountsBranch.Child(ag_format.Meta(" tokenVault", inst.AccountMetaSlice[5])) - accountsBranch.Child(ag_format.Meta(" vaultAuthority", inst.AccountMetaSlice[6])) - accountsBranch.Child(ag_format.Meta("requesterAccessController", inst.AccountMetaSlice[7])) - accountsBranch.Child(ag_format.Meta(" billingAccessController", inst.AccountMetaSlice[8])) - accountsBranch.Child(ag_format.Meta(" rent", inst.AccountMetaSlice[9])) - accountsBranch.Child(ag_format.Meta(" systemProgram", inst.AccountMetaSlice[10])) - accountsBranch.Child(ag_format.Meta(" tokenProgram", inst.AccountMetaSlice[11])) - accountsBranch.Child(ag_format.Meta(" associatedTokenProgram", inst.AccountMetaSlice[12])) + accountsBranch.Child(ag_format.Meta(" owner", inst.AccountMetaSlice[2])) + accountsBranch.Child(ag_format.Meta(" tokenMint", inst.AccountMetaSlice[3])) + accountsBranch.Child(ag_format.Meta(" tokenVault", inst.AccountMetaSlice[4])) + accountsBranch.Child(ag_format.Meta(" vaultAuthority", inst.AccountMetaSlice[5])) + accountsBranch.Child(ag_format.Meta("requesterAccessController", inst.AccountMetaSlice[6])) + accountsBranch.Child(ag_format.Meta(" billingAccessController", inst.AccountMetaSlice[7])) }) }) }) @@ -348,31 +263,21 @@ func NewInitializeInstruction( // Accounts: state ag_solanago.PublicKey, feed ag_solanago.PublicKey, - payer ag_solanago.PublicKey, owner ag_solanago.PublicKey, tokenMint ag_solanago.PublicKey, tokenVault ag_solanago.PublicKey, vaultAuthority ag_solanago.PublicKey, requesterAccessController ag_solanago.PublicKey, - billingAccessController ag_solanago.PublicKey, - rent ag_solanago.PublicKey, - systemProgram ag_solanago.PublicKey, - tokenProgram ag_solanago.PublicKey, - associatedTokenProgram ag_solanago.PublicKey) *Initialize { + billingAccessController ag_solanago.PublicKey) *Initialize { return NewInitializeInstructionBuilder(). SetMinAnswer(minAnswer). SetMaxAnswer(maxAnswer). SetStateAccount(state). SetFeedAccount(feed). - SetPayerAccount(payer). SetOwnerAccount(owner). SetTokenMintAccount(tokenMint). SetTokenVaultAccount(tokenVault). SetVaultAuthorityAccount(vaultAuthority). SetRequesterAccessControllerAccount(requesterAccessController). - SetBillingAccessControllerAccount(billingAccessController). - SetRentAccount(rent). - SetSystemProgramAccount(systemProgram). - SetTokenProgramAccount(tokenProgram). - SetAssociatedTokenProgramAccount(associatedTokenProgram) + SetBillingAccessControllerAccount(billingAccessController) } diff --git a/contracts/generated/ocr2/PayOracles.go b/contracts/generated/ocr2/PayOracles.go index 9a6a69a5f..b7983566e 100644 --- a/contracts/generated/ocr2/PayOracles.go +++ b/contracts/generated/ocr2/PayOracles.go @@ -19,18 +19,20 @@ type PayOracles struct { // // [2] = [] accessController // - // [3] = [WRITE] tokenVault + // [3] = [WRITE] tokenReceiver // - // [4] = [] vaultAuthority + // [4] = [WRITE] tokenVault // - // [5] = [] tokenProgram + // [5] = [] vaultAuthority + // + // [6] = [] tokenProgram ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"` } // NewPayOraclesInstructionBuilder creates a new `PayOracles` instruction builder. func NewPayOraclesInstructionBuilder() *PayOracles { nd := &PayOracles{ - AccountMetaSlice: make(ag_solanago.AccountMetaSlice, 6), + AccountMetaSlice: make(ag_solanago.AccountMetaSlice, 7), } return nd } @@ -68,37 +70,48 @@ func (inst *PayOracles) GetAccessControllerAccount() *ag_solanago.AccountMeta { return inst.AccountMetaSlice[2] } +// SetTokenReceiverAccount sets the "tokenReceiver" account. +func (inst *PayOracles) SetTokenReceiverAccount(tokenReceiver ag_solanago.PublicKey) *PayOracles { + inst.AccountMetaSlice[3] = ag_solanago.Meta(tokenReceiver).WRITE() + return inst +} + +// GetTokenReceiverAccount gets the "tokenReceiver" account. +func (inst *PayOracles) GetTokenReceiverAccount() *ag_solanago.AccountMeta { + return inst.AccountMetaSlice[3] +} + // SetTokenVaultAccount sets the "tokenVault" account. func (inst *PayOracles) SetTokenVaultAccount(tokenVault ag_solanago.PublicKey) *PayOracles { - inst.AccountMetaSlice[3] = ag_solanago.Meta(tokenVault).WRITE() + inst.AccountMetaSlice[4] = ag_solanago.Meta(tokenVault).WRITE() return inst } // GetTokenVaultAccount gets the "tokenVault" account. func (inst *PayOracles) GetTokenVaultAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[3] + return inst.AccountMetaSlice[4] } // SetVaultAuthorityAccount sets the "vaultAuthority" account. func (inst *PayOracles) SetVaultAuthorityAccount(vaultAuthority ag_solanago.PublicKey) *PayOracles { - inst.AccountMetaSlice[4] = ag_solanago.Meta(vaultAuthority) + inst.AccountMetaSlice[5] = ag_solanago.Meta(vaultAuthority) return inst } // GetVaultAuthorityAccount gets the "vaultAuthority" account. func (inst *PayOracles) GetVaultAuthorityAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[4] + return inst.AccountMetaSlice[5] } // SetTokenProgramAccount sets the "tokenProgram" account. func (inst *PayOracles) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *PayOracles { - inst.AccountMetaSlice[5] = ag_solanago.Meta(tokenProgram) + inst.AccountMetaSlice[6] = ag_solanago.Meta(tokenProgram) return inst } // GetTokenProgramAccount gets the "tokenProgram" account. func (inst *PayOracles) GetTokenProgramAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[5] + return inst.AccountMetaSlice[6] } func (inst PayOracles) Build() *Instruction { @@ -131,12 +144,15 @@ func (inst *PayOracles) Validate() error { return errors.New("accounts.AccessController is not set") } if inst.AccountMetaSlice[3] == nil { - return errors.New("accounts.TokenVault is not set") + return errors.New("accounts.TokenReceiver is not set") } if inst.AccountMetaSlice[4] == nil { - return errors.New("accounts.VaultAuthority is not set") + return errors.New("accounts.TokenVault is not set") } if inst.AccountMetaSlice[5] == nil { + return errors.New("accounts.VaultAuthority is not set") + } + if inst.AccountMetaSlice[6] == nil { return errors.New("accounts.TokenProgram is not set") } } @@ -155,13 +171,14 @@ func (inst *PayOracles) EncodeToTree(parent ag_treeout.Branches) { instructionBranch.Child("Params[len=0]").ParentFunc(func(paramsBranch ag_treeout.Branches) {}) // Accounts of the instruction: - instructionBranch.Child("Accounts[len=6]").ParentFunc(func(accountsBranch ag_treeout.Branches) { + instructionBranch.Child("Accounts[len=7]").ParentFunc(func(accountsBranch ag_treeout.Branches) { accountsBranch.Child(ag_format.Meta(" state", inst.AccountMetaSlice[0])) accountsBranch.Child(ag_format.Meta(" authority", inst.AccountMetaSlice[1])) accountsBranch.Child(ag_format.Meta("accessController", inst.AccountMetaSlice[2])) - accountsBranch.Child(ag_format.Meta(" tokenVault", inst.AccountMetaSlice[3])) - accountsBranch.Child(ag_format.Meta(" vaultAuthority", inst.AccountMetaSlice[4])) - accountsBranch.Child(ag_format.Meta(" tokenProgram", inst.AccountMetaSlice[5])) + accountsBranch.Child(ag_format.Meta(" tokenReceiver", inst.AccountMetaSlice[3])) + accountsBranch.Child(ag_format.Meta(" tokenVault", inst.AccountMetaSlice[4])) + accountsBranch.Child(ag_format.Meta(" vaultAuthority", inst.AccountMetaSlice[5])) + accountsBranch.Child(ag_format.Meta(" tokenProgram", inst.AccountMetaSlice[6])) }) }) }) @@ -180,6 +197,7 @@ func NewPayOraclesInstruction( state ag_solanago.PublicKey, authority ag_solanago.PublicKey, accessController ag_solanago.PublicKey, + tokenReceiver ag_solanago.PublicKey, tokenVault ag_solanago.PublicKey, vaultAuthority ag_solanago.PublicKey, tokenProgram ag_solanago.PublicKey) *PayOracles { @@ -187,6 +205,7 @@ func NewPayOraclesInstruction( SetStateAccount(state). SetAuthorityAccount(authority). SetAccessControllerAccount(accessController). + SetTokenReceiverAccount(tokenReceiver). SetTokenVaultAccount(tokenVault). SetVaultAuthorityAccount(vaultAuthority). SetTokenProgramAccount(tokenProgram) diff --git a/contracts/generated/ocr2/ProposePayees.go b/contracts/generated/ocr2/ProposePayees.go index 9d7f461a6..2f39ec894 100644 --- a/contracts/generated/ocr2/ProposePayees.go +++ b/contracts/generated/ocr2/ProposePayees.go @@ -13,7 +13,6 @@ import ( // ProposePayees is the `proposePayees` instruction. type ProposePayees struct { TokenMint *ag_solanago.PublicKey - Payees *[]ag_solanago.PublicKey // [0] = [WRITE] proposal // @@ -35,12 +34,6 @@ func (inst *ProposePayees) SetTokenMint(tokenMint ag_solanago.PublicKey) *Propos return inst } -// SetPayees sets the "payees" parameter. -func (inst *ProposePayees) SetPayees(payees []ag_solanago.PublicKey) *ProposePayees { - inst.Payees = &payees - return inst -} - // SetProposalAccount sets the "proposal" account. func (inst *ProposePayees) SetProposalAccount(proposal ag_solanago.PublicKey) *ProposePayees { inst.AccountMetaSlice[0] = ag_solanago.Meta(proposal).WRITE() @@ -86,9 +79,6 @@ func (inst *ProposePayees) Validate() error { if inst.TokenMint == nil { return errors.New("TokenMint parameter is not set") } - if inst.Payees == nil { - return errors.New("Payees parameter is not set") - } } // Check whether all (required) accounts are set: @@ -112,9 +102,8 @@ func (inst *ProposePayees) EncodeToTree(parent ag_treeout.Branches) { ParentFunc(func(instructionBranch ag_treeout.Branches) { // Parameters of the instruction: - instructionBranch.Child("Params[len=2]").ParentFunc(func(paramsBranch ag_treeout.Branches) { + instructionBranch.Child("Params[len=1]").ParentFunc(func(paramsBranch ag_treeout.Branches) { paramsBranch.Child(ag_format.Param("TokenMint", *inst.TokenMint)) - paramsBranch.Child(ag_format.Param(" Payees", *inst.Payees)) }) // Accounts of the instruction: @@ -132,11 +121,6 @@ func (obj ProposePayees) MarshalWithEncoder(encoder *ag_binary.Encoder) (err err if err != nil { return err } - // Serialize `Payees` param: - err = encoder.Encode(obj.Payees) - if err != nil { - return err - } return nil } func (obj *ProposePayees) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error) { @@ -145,11 +129,6 @@ func (obj *ProposePayees) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err if err != nil { return err } - // Deserialize `Payees`: - err = decoder.Decode(&obj.Payees) - if err != nil { - return err - } return nil } @@ -157,13 +136,11 @@ func (obj *ProposePayees) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err func NewProposePayeesInstruction( // Parameters: tokenMint ag_solanago.PublicKey, - payees []ag_solanago.PublicKey, // Accounts: proposal ag_solanago.PublicKey, authority ag_solanago.PublicKey) *ProposePayees { return NewProposePayeesInstructionBuilder(). SetTokenMint(tokenMint). - SetPayees(payees). SetProposalAccount(proposal). SetAuthorityAccount(authority) } diff --git a/contracts/generated/ocr2/SetBilling.go b/contracts/generated/ocr2/SetBilling.go index 1256c86dc..6cf6fa07e 100644 --- a/contracts/generated/ocr2/SetBilling.go +++ b/contracts/generated/ocr2/SetBilling.go @@ -21,18 +21,20 @@ type SetBilling struct { // // [2] = [] accessController // - // [3] = [WRITE] tokenVault + // [3] = [WRITE] tokenReceiver // - // [4] = [] vaultAuthority + // [4] = [WRITE] tokenVault // - // [5] = [] tokenProgram + // [5] = [] vaultAuthority + // + // [6] = [] tokenProgram ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"` } // NewSetBillingInstructionBuilder creates a new `SetBilling` instruction builder. func NewSetBillingInstructionBuilder() *SetBilling { nd := &SetBilling{ - AccountMetaSlice: make(ag_solanago.AccountMetaSlice, 6), + AccountMetaSlice: make(ag_solanago.AccountMetaSlice, 7), } return nd } @@ -82,37 +84,48 @@ func (inst *SetBilling) GetAccessControllerAccount() *ag_solanago.AccountMeta { return inst.AccountMetaSlice[2] } +// SetTokenReceiverAccount sets the "tokenReceiver" account. +func (inst *SetBilling) SetTokenReceiverAccount(tokenReceiver ag_solanago.PublicKey) *SetBilling { + inst.AccountMetaSlice[3] = ag_solanago.Meta(tokenReceiver).WRITE() + return inst +} + +// GetTokenReceiverAccount gets the "tokenReceiver" account. +func (inst *SetBilling) GetTokenReceiverAccount() *ag_solanago.AccountMeta { + return inst.AccountMetaSlice[3] +} + // SetTokenVaultAccount sets the "tokenVault" account. func (inst *SetBilling) SetTokenVaultAccount(tokenVault ag_solanago.PublicKey) *SetBilling { - inst.AccountMetaSlice[3] = ag_solanago.Meta(tokenVault).WRITE() + inst.AccountMetaSlice[4] = ag_solanago.Meta(tokenVault).WRITE() return inst } // GetTokenVaultAccount gets the "tokenVault" account. func (inst *SetBilling) GetTokenVaultAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[3] + return inst.AccountMetaSlice[4] } // SetVaultAuthorityAccount sets the "vaultAuthority" account. func (inst *SetBilling) SetVaultAuthorityAccount(vaultAuthority ag_solanago.PublicKey) *SetBilling { - inst.AccountMetaSlice[4] = ag_solanago.Meta(vaultAuthority) + inst.AccountMetaSlice[5] = ag_solanago.Meta(vaultAuthority) return inst } // GetVaultAuthorityAccount gets the "vaultAuthority" account. func (inst *SetBilling) GetVaultAuthorityAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[4] + return inst.AccountMetaSlice[5] } // SetTokenProgramAccount sets the "tokenProgram" account. func (inst *SetBilling) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *SetBilling { - inst.AccountMetaSlice[5] = ag_solanago.Meta(tokenProgram) + inst.AccountMetaSlice[6] = ag_solanago.Meta(tokenProgram) return inst } // GetTokenProgramAccount gets the "tokenProgram" account. func (inst *SetBilling) GetTokenProgramAccount() *ag_solanago.AccountMeta { - return inst.AccountMetaSlice[5] + return inst.AccountMetaSlice[6] } func (inst SetBilling) Build() *Instruction { @@ -155,12 +168,15 @@ func (inst *SetBilling) Validate() error { return errors.New("accounts.AccessController is not set") } if inst.AccountMetaSlice[3] == nil { - return errors.New("accounts.TokenVault is not set") + return errors.New("accounts.TokenReceiver is not set") } if inst.AccountMetaSlice[4] == nil { - return errors.New("accounts.VaultAuthority is not set") + return errors.New("accounts.TokenVault is not set") } if inst.AccountMetaSlice[5] == nil { + return errors.New("accounts.VaultAuthority is not set") + } + if inst.AccountMetaSlice[6] == nil { return errors.New("accounts.TokenProgram is not set") } } @@ -182,13 +198,14 @@ func (inst *SetBilling) EncodeToTree(parent ag_treeout.Branches) { }) // Accounts of the instruction: - instructionBranch.Child("Accounts[len=6]").ParentFunc(func(accountsBranch ag_treeout.Branches) { + instructionBranch.Child("Accounts[len=7]").ParentFunc(func(accountsBranch ag_treeout.Branches) { accountsBranch.Child(ag_format.Meta(" state", inst.AccountMetaSlice[0])) accountsBranch.Child(ag_format.Meta(" authority", inst.AccountMetaSlice[1])) accountsBranch.Child(ag_format.Meta("accessController", inst.AccountMetaSlice[2])) - accountsBranch.Child(ag_format.Meta(" tokenVault", inst.AccountMetaSlice[3])) - accountsBranch.Child(ag_format.Meta(" vaultAuthority", inst.AccountMetaSlice[4])) - accountsBranch.Child(ag_format.Meta(" tokenProgram", inst.AccountMetaSlice[5])) + accountsBranch.Child(ag_format.Meta(" tokenReceiver", inst.AccountMetaSlice[3])) + accountsBranch.Child(ag_format.Meta(" tokenVault", inst.AccountMetaSlice[4])) + accountsBranch.Child(ag_format.Meta(" vaultAuthority", inst.AccountMetaSlice[5])) + accountsBranch.Child(ag_format.Meta(" tokenProgram", inst.AccountMetaSlice[6])) }) }) }) @@ -230,6 +247,7 @@ func NewSetBillingInstruction( state ag_solanago.PublicKey, authority ag_solanago.PublicKey, accessController ag_solanago.PublicKey, + tokenReceiver ag_solanago.PublicKey, tokenVault ag_solanago.PublicKey, vaultAuthority ag_solanago.PublicKey, tokenProgram ag_solanago.PublicKey) *SetBilling { @@ -239,6 +257,7 @@ func NewSetBillingInstruction( SetStateAccount(state). SetAuthorityAccount(authority). SetAccessControllerAccount(accessController). + SetTokenReceiverAccount(tokenReceiver). SetTokenVaultAccount(tokenVault). SetVaultAuthorityAccount(vaultAuthority). SetTokenProgramAccount(tokenProgram) diff --git a/contracts/migrate/deploy.js b/contracts/migrate/deploy.js index 501b4567b..ae676c998 100644 --- a/contracts/migrate/deploy.js +++ b/contracts/migrate/deploy.js @@ -12,7 +12,7 @@ const UPGRADEABLE_BPF_LOADER_PROGRAM_ID = new anchor.web3.PublicKey( "BPFLoaderUpgradeab1e11111111111111111111111" ); -const provider = anchor.Provider.env(); +const provider = anchor.AnchorProvider.env(); // Configure the cluster. anchor.setProvider(provider); diff --git a/contracts/package.json b/contracts/package.json index f5e2f369f..5b3d6faa7 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,9 +1,9 @@ { "dependencies": { "@chainlink/solana-sdk": "../ts", - "@project-serum/anchor": "^0.23.0", - "@solana/spl-token": "^0.1.8", - "@solana/web3.js": "1.31.0", + "@project-serum/anchor": "^0.25.0", + "@solana/spl-token": "^0.2.0", + "@solana/web3.js": "^1.50.1", "@types/chai": "^4.2.22", "@types/mocha": "^9.0.0", "@types/node": "^14.14.37", @@ -19,6 +19,7 @@ "typescript": "^4.5.4" }, "scripts": { + "format": "yarn prettier --write .", "test": "yarn upgrade @chainlink/solana-sdk && ts-mocha -t 1000000 tests/*.ts" } } diff --git a/contracts/programs/access-controller/Cargo.toml b/contracts/programs/access-controller/Cargo.toml index cc880fb31..3d6b9e219 100644 --- a/contracts/programs/access-controller/Cargo.toml +++ b/contracts/programs/access-controller/Cargo.toml @@ -15,6 +15,6 @@ cpi = ["no-entrypoint"] default = [] [dependencies] -anchor-lang = "0.23.0" +anchor-lang = "0.25.0" static_assertions = "1.1.0" arrayvec = { version = "1.0.0", path = "../../crates/arrayvec" } diff --git a/contracts/programs/access-controller/src/lib.rs b/contracts/programs/access-controller/src/lib.rs index 2bda02d8c..c02bd37ca 100644 --- a/contracts/programs/access-controller/src/lib.rs +++ b/contracts/programs/access-controller/src/lib.rs @@ -35,12 +35,10 @@ pub mod access_controller { Ok(()) } - #[access_control(owner(&ctx.accounts.state, &ctx.accounts.authority))] pub fn transfer_ownership( ctx: Context, proposed_owner: Pubkey, ) -> Result<()> { - require!(proposed_owner != Pubkey::default(), InvalidInput); let state = &mut *ctx.accounts.state.load_mut()?; state.proposed_owner = proposed_owner; Ok(()) @@ -48,15 +46,10 @@ pub mod access_controller { pub fn accept_ownership(ctx: Context) -> Result<()> { let state = &mut *ctx.accounts.state.load_mut()?; - require!( - ctx.accounts.authority.key == &state.proposed_owner, - Unauthorized - ); state.owner = std::mem::take(&mut state.proposed_owner); Ok(()) } - #[access_control(owner(&ctx.accounts.state, &ctx.accounts.owner))] pub fn add_access(ctx: Context) -> Result<()> { let mut state = ctx.accounts.state.load_mut()?; // if the len reaches array len, we're at capacity @@ -73,7 +66,6 @@ pub mod access_controller { Ok(()) } - #[access_control(owner(&ctx.accounts.state, &ctx.accounts.owner))] pub fn remove_access(ctx: Context) -> Result<()> { let mut state = ctx.accounts.state.load_mut()?; let address = ctx.accounts.address.key(); @@ -93,12 +85,6 @@ pub fn has_access(loader: &AccountLoader, address: &Pubkey) -> Ok(state.access_list.binary_search(address).is_ok()) } -fn owner(state_loader: &AccountLoader, signer: &AccountInfo) -> Result<()> { - let config = state_loader.load()?; - require!(signer.key.eq(&config.owner), Unauthorized); - Ok(()) -} - #[error_code] pub enum ErrorCode { #[msg("Unauthorized")] @@ -122,6 +108,7 @@ pub struct Initialize<'info> { pub struct TransferOwnership<'info> { #[account(mut)] pub state: AccountLoader<'info, AccessController>, + #[account(address = state.load()?.owner @ ErrorCode::Unauthorized)] pub authority: Signer<'info>, } @@ -129,6 +116,7 @@ pub struct TransferOwnership<'info> { pub struct AcceptOwnership<'info> { #[account(mut)] pub state: AccountLoader<'info, AccessController>, + #[account(address = state.load()?.proposed_owner @ ErrorCode::Unauthorized)] pub authority: Signer<'info>, } @@ -136,6 +124,7 @@ pub struct AcceptOwnership<'info> { pub struct AddAccess<'info> { #[account(mut, has_one = owner)] pub state: AccountLoader<'info, AccessController>, + #[account(address = state.load()?.owner @ ErrorCode::Unauthorized)] pub owner: Signer<'info>, /// CHECK: We don't impose any limits since this could be any signer. pub address: UncheckedAccount<'info>, @@ -145,6 +134,7 @@ pub struct AddAccess<'info> { pub struct RemoveAccess<'info> { #[account(mut, has_one = owner)] pub state: AccountLoader<'info, AccessController>, + #[account(address = state.load()?.owner @ ErrorCode::Unauthorized)] pub owner: Signer<'info>, /// CHECK: We don't impose any limits since this could be any signer. pub address: UncheckedAccount<'info>, diff --git a/contracts/programs/ocr2/Cargo.toml b/contracts/programs/ocr2/Cargo.toml index 08bd8bccc..8daed40d3 100644 --- a/contracts/programs/ocr2/Cargo.toml +++ b/contracts/programs/ocr2/Cargo.toml @@ -15,8 +15,8 @@ cpi = ["no-entrypoint"] default = [] [dependencies] -anchor-lang = { version = "0.23.0", features = [] } -anchor-spl = "0.23.0" +anchor-lang = { version = "0.25.0", features = [] } +anchor-spl = "0.25.0" static_assertions = "1.1.0" access-controller = { version = "1.0.0", path = "../access-controller", default-features = false, features = ["cpi"] } store = { version = "1.0.0", path = "../store", default-features = false, features = ["cpi"] } diff --git a/contracts/programs/ocr2/src/context.rs b/contracts/programs/ocr2/src/context.rs index 520bde481..e367c4c26 100644 --- a/contracts/programs/ocr2/src/context.rs +++ b/contracts/programs/ocr2/src/context.rs @@ -1,9 +1,8 @@ use anchor_lang::prelude::*; -use anchor_lang::solana_program::sysvar; -use anchor_spl::associated_token::AssociatedToken; use anchor_spl::token::{Mint, Token, TokenAccount, Transfer}; use crate::state::{Proposal, State}; +use crate::ErrorCode; use access_controller::AccessController; use store::{Store, Transmissions}; @@ -15,14 +14,10 @@ pub struct Initialize<'info> { #[account(zero)] pub state: AccountLoader<'info, State>, pub feed: Account<'info, Transmissions>, - #[account(mut)] - pub payer: Signer<'info>, pub owner: Signer<'info>, pub token_mint: Account<'info, Mint>, #[account( - init, - payer = payer, associated_token::mint = token_mint, associated_token::authority = vault_authority, )] @@ -33,21 +28,19 @@ pub struct Initialize<'info> { pub requester_access_controller: AccountLoader<'info, AccessController>, pub billing_access_controller: AccountLoader<'info, AccessController>, - - #[account(address = sysvar::rent::ID)] - pub rent: Sysvar<'info, Rent>, - - pub system_program: Program<'info, System>, - pub token_program: Program<'info, Token>, - pub associated_token_program: Program<'info, AssociatedToken>, } #[derive(Accounts)] pub struct Close<'info> { #[account(mut, close = receiver)] pub state: AccountLoader<'info, State>, + // Receives the SOL deposit #[account(mut)] pub receiver: SystemAccount<'info>, + // Receives the remaining LINK amount + #[account(mut, token::mint = state.load()?.config.token_mint)] + pub token_receiver: Account<'info, TokenAccount>, + #[account(address = state.load()?.config.owner @ ErrorCode::Unauthorized)] pub authority: Signer<'info>, #[account(mut, address = state.load()?.config.token_vault)] @@ -63,6 +56,7 @@ pub struct Close<'info> { pub struct TransferOwnership<'info> { #[account(mut)] pub state: AccountLoader<'info, State>, + #[account(address = state.load()?.config.owner @ ErrorCode::Unauthorized)] pub authority: Signer<'info>, } @@ -70,6 +64,7 @@ pub struct TransferOwnership<'info> { pub struct AcceptOwnership<'info> { #[account(mut)] pub state: AccountLoader<'info, State>, + #[account(address = state.load()?.config.proposed_owner @ ErrorCode::Unauthorized)] pub authority: Signer<'info>, } @@ -86,6 +81,7 @@ pub struct CloseProposal<'info> { pub proposal: AccountLoader<'info, Proposal>, #[account(mut)] pub receiver: SystemAccount<'info>, + #[account(address = proposal.load()?.owner @ ErrorCode::Unauthorized)] pub authority: Signer<'info>, } @@ -93,6 +89,7 @@ pub struct CloseProposal<'info> { pub struct ProposeConfig<'info> { #[account(mut)] pub proposal: AccountLoader<'info, Proposal>, + #[account(address = proposal.load()?.owner @ ErrorCode::Unauthorized)] pub authority: Signer<'info>, } @@ -104,6 +101,10 @@ pub struct AcceptProposal<'info> { pub proposal: AccountLoader<'info, Proposal>, #[account(mut)] pub receiver: SystemAccount<'info>, + // Receives LINK amount from oracles with closed token accounts + #[account(mut, token::mint = state.load()?.config.token_mint)] + pub token_receiver: Account<'info, TokenAccount>, + #[account(address = state.load()?.config.owner @ ErrorCode::Unauthorized)] pub authority: Signer<'info>, #[account(mut, address = state.load()?.config.token_vault)] @@ -153,6 +154,10 @@ pub struct SetBilling<'info> { pub authority: Signer<'info>, pub access_controller: AccountLoader<'info, AccessController>, + // Receives LINK amount from oracles with closed token accounts + #[account(mut, token::mint = state.load()?.config.token_mint)] + pub token_receiver: Account<'info, TokenAccount>, + #[account(mut, address = state.load()?.config.token_vault)] pub token_vault: Account<'info, TokenAccount>, /// CHECK: This is a PDA diff --git a/contracts/programs/ocr2/src/lib.rs b/contracts/programs/ocr2/src/lib.rs index 34e85073d..239e42c54 100644 --- a/contracts/programs/ocr2/src/lib.rs +++ b/contracts/programs/ocr2/src/lib.rs @@ -2,7 +2,7 @@ use anchor_lang::prelude::*; use anchor_spl::token; use arrayref::{array_ref, array_refs}; -use state::{Billing, Proposal, ProposedOracle}; +use state::{Billing, Proposal, ProposedOracle, STATE_VERSION}; declare_id!("cjg3oHmg9uuPsP8D6g29NWvhySJkdYdAo9D25PRbKXJ"); @@ -31,7 +31,7 @@ pub mod ocr2 { use super::*; pub fn initialize(ctx: Context, min_answer: i128, max_answer: i128) -> Result<()> { let mut state = ctx.accounts.state.load_init()?; - state.version = 1; + state.version = STATE_VERSION; state.vault_nonce = *ctx.bumps.get("vault_authority").unwrap(); state.feed = ctx.accounts.feed.key(); @@ -51,27 +51,47 @@ pub mod ocr2 { Ok(()) } - #[access_control(owner(&ctx.accounts.state, &ctx.accounts.authority))] pub fn close<'info>(ctx: Context<'_, '_, '_, 'info, Close<'info>>) -> Result<()> { // Pay out any remaining balances pay_oracles_impl( ctx.accounts.state.clone(), ctx.accounts.token_program.to_account_info(), ctx.accounts.token_vault.to_account_info(), - ctx.accounts.vault_authority.clone(), + ctx.accounts.vault_authority.to_account_info(), ctx.remaining_accounts, + ctx.accounts.token_receiver.to_account_info(), )?; + // Transfer out remaining balance from the token_vault + let balance_gjuels = token::accessor::amount(&ctx.accounts.token_vault.to_account_info())?; + + if balance_gjuels > 0 { + token::transfer( + CpiContext::new( + ctx.accounts.token_program.to_account_info(), + token::Transfer { + from: ctx.accounts.token_vault.to_account_info(), + to: ctx.accounts.token_receiver.to_account_info(), + authority: ctx.accounts.vault_authority.to_account_info(), + }, + ) + .with_signer(&[&[ + b"vault".as_ref(), + ctx.accounts.state.key().as_ref(), + &[ctx.accounts.state.load()?.vault_nonce], + ]]), + balance_gjuels, + )?; + } + // NOTE: Close is handled by anchor on exit due to the `close` attribute Ok(()) } - #[access_control(owner(&ctx.accounts.state, &ctx.accounts.authority))] pub fn transfer_ownership( ctx: Context, proposed_owner: Pubkey, ) -> Result<()> { - require!(proposed_owner != Pubkey::default(), InvalidInput); let mut state = ctx.accounts.state.load_mut()?; state.config.proposed_owner = proposed_owner; Ok(()) @@ -79,10 +99,6 @@ pub mod ocr2 { pub fn accept_ownership(ctx: Context) -> Result<()> { let mut state = ctx.accounts.state.load_mut()?; - require!( - ctx.accounts.authority.key == &state.config.proposed_owner, - Unauthorized - ); state.config.owner = std::mem::take(&mut state.config.proposed_owner); Ok(()) } @@ -93,7 +109,7 @@ pub mod ocr2 { ) -> Result<()> { let mut proposal = ctx.accounts.proposal.load_init()?; - proposal.version = 1; + proposal.version = STATE_VERSION; proposal.owner = ctx.accounts.authority.key(); require!(offchain_config_version != 0, InvalidInput); @@ -101,7 +117,6 @@ pub mod ocr2 { Ok(()) } - #[access_control(proposal_owner(&ctx.accounts.proposal, &ctx.accounts.authority))] pub fn write_offchain_config( ctx: Context, offchain_config: Vec, @@ -110,24 +125,23 @@ pub mod ocr2 { require!(proposal.state != Proposal::FINALIZED, InvalidInput); require!( - offchain_config.len() < proposal.offchain_config.remaining_capacity(), + offchain_config.len() <= proposal.offchain_config.remaining_capacity(), InvalidInput ); proposal.offchain_config.extend(&offchain_config); Ok(()) } - #[access_control(proposal_owner(&ctx.accounts.proposal, &ctx.accounts.authority))] pub fn finalize_proposal(ctx: Context) -> Result<()> { let mut proposal = ctx.accounts.proposal.load_mut()?; require!(proposal.state != Proposal::FINALIZED, InvalidInput); - // Require that at least some data was written via setOffchainConfig + // Require that at least some data was written via write_offchain_config require!(proposal.offchain_config.version > 0, InvalidInput); require!(!proposal.offchain_config.is_empty(), InvalidInput); - // setConfig must have been called + // propose_config must have been called require!(!proposal.oracles.is_empty(), InvalidInput); - // setPayees must have been called + // propose_payees must have been called let valid_payees = proposal .oracles .iter() @@ -139,13 +153,11 @@ pub mod ocr2 { Ok(()) } - #[access_control(proposal_owner(&ctx.accounts.proposal, &ctx.accounts.authority))] - pub fn close_proposal(ctx: Context) -> Result<()> { + pub fn close_proposal(_ctx: Context) -> Result<()> { // NOTE: Close is handled by anchor on exit due to the `close` attribute Ok(()) } - #[access_control(owner(&ctx.accounts.state, &ctx.accounts.authority))] pub fn accept_proposal<'info>( ctx: Context<'_, '_, '_, 'info, AcceptProposal<'info>>, digest: Vec, @@ -159,11 +171,15 @@ pub mod ocr2 { ctx.accounts.token_vault.to_account_info(), ctx.accounts.vault_authority.clone(), ctx.remaining_accounts, + ctx.accounts.token_receiver.to_account_info(), )?; let mut state = ctx.accounts.state.load_mut()?; let proposal = ctx.accounts.proposal.load()?; + // State version should equal proposal version + require!(state.version == proposal.version, InvalidInput); + // Proposal has to be finalized require!(proposal.state == Proposal::FINALIZED, InvalidInput); // Digest has to match @@ -224,7 +240,6 @@ pub mod ocr2 { Ok(()) } - #[access_control(proposal_owner(&ctx.accounts.proposal, &ctx.accounts.authority))] pub fn propose_config( ctx: Context, new_oracles: Vec, @@ -277,33 +292,29 @@ pub mod ocr2 { Ok(()) } - #[access_control(proposal_owner(&ctx.accounts.proposal, &ctx.accounts.authority))] - pub fn propose_payees( - ctx: Context, - token_mint: Pubkey, - payees: Vec, - ) -> Result<()> { + pub fn propose_payees(ctx: Context, token_mint: Pubkey) -> Result<()> { let mut proposal = ctx.accounts.proposal.load_mut()?; require!(proposal.state != Proposal::FINALIZED, InvalidInput); + let payees = ctx.remaining_accounts; + // Need to provide a payee for each oracle require!(proposal.oracles.len() == payees.len(), PayeeOracleMismatch); // Verify that the remaining accounts are valid token accounts. - for account in ctx.remaining_accounts { + for account in payees { let account = Account::<'_, token::TokenAccount>::try_from(account)?; require!(account.mint == token_mint, InvalidTokenAccount); } - for (oracle, payee) in proposal.oracles.iter_mut().zip(payees.into_iter()) { - oracle.payee = payee; + for (oracle, payee) in proposal.oracles.iter_mut().zip(payees.iter()) { + oracle.payee = payee.key(); } proposal.token_mint = token_mint; Ok(()) } - #[access_control(owner(&ctx.accounts.state, &ctx.accounts.authority))] pub fn set_requester_access_controller(ctx: Context) -> Result<()> { let mut state = ctx.accounts.state.load_mut()?; state.config.requester_access_controller = ctx.accounts.access_controller.key(); @@ -334,10 +345,16 @@ pub mod ocr2 { // Use a raw instruction to skip data decoding, but keep using Anchor contexts. let mut bumps = std::collections::BTreeMap::new(); + let mut reallocs = std::collections::BTreeSet::new(); // Deserialize accounts. let mut remaining_accounts: &[AccountInfo] = accounts; - let mut accounts = - Transmit::try_accounts(program_id, &mut remaining_accounts, data, &mut bumps)?; + let mut accounts = Transmit::try_accounts( + program_id, + &mut remaining_accounts, + data, + &mut bumps, + &mut reallocs, + )?; // Construct a context let ctx = Context::new(program_id, &mut accounts, remaining_accounts, bumps); @@ -348,7 +365,6 @@ pub mod ocr2 { accounts.exit(program_id) } - #[access_control(owner(&ctx.accounts.state, &ctx.accounts.authority))] pub fn set_billing_access_controller(ctx: Context) -> Result<()> { let mut state = ctx.accounts.state.load_mut()?; state.config.billing_access_controller = ctx.accounts.access_controller.key(); @@ -368,6 +384,7 @@ pub mod ocr2 { ctx.accounts.token_vault.to_account_info(), ctx.accounts.vault_authority.clone(), ctx.remaining_accounts, + ctx.accounts.token_receiver.to_account_info(), )?; // Then update the config @@ -461,6 +478,7 @@ pub mod ocr2 { ctx.accounts.token_vault.to_account_info(), ctx.accounts.vault_authority.clone(), ctx.remaining_accounts, + ctx.accounts.token_receiver.to_account_info(), ) } @@ -526,6 +544,7 @@ fn pay_oracles_impl<'info>( token_vault: AccountInfo<'info>, vault_authority: AccountInfo<'info>, remaining_accounts: &[AccountInfo<'info>], + token_receiver: AccountInfo<'info>, ) -> Result<()> { let state_id = state.key(); let mut state = state.load_mut()?; @@ -552,11 +571,18 @@ fn pay_oracles_impl<'info>( oracle.payment_gjuels = 0; oracle.from_round_id = latest_round_id; + let to = if payee.owner == &token::ID { + payee.to_account_info() + } else { + // then the token account must be closed + token_receiver.to_account_info() + }; + let cpi = CpiContext::new( token_program.clone(), token::Transfer { from: token_vault.clone(), - to: payee.to_account_info(), + to, authority: vault_authority.clone(), }, ); @@ -576,7 +602,7 @@ fn pay_oracles_impl<'info>( token::transfer( cpi.with_signer(&[&[b"vault".as_ref(), state_id.as_ref(), &[vault_nonce]]]), amount_gjuels, - )?; + )? } Ok(()) @@ -746,7 +772,7 @@ struct Report { } impl Report { - // (uint32, u8, bytes32, int128, uint128) + // (uint32, u8, bytes32, int128, u64) pub const LEN: usize = size_of::() + size_of::() + 32 + size_of::() + size_of::(); @@ -829,19 +855,6 @@ fn calculate_total_link_due_gjuels(config: &Config, oracles: &[Oracle]) -> Resul // -- Access control modifiers -// Only owner access -fn owner(state_loader: &AccountLoader, signer: &AccountInfo) -> Result<()> { - let config = state_loader.load()?.config; - require!(signer.key.eq(&config.owner), Unauthorized); - Ok(()) -} - -fn proposal_owner(proposal_loader: &AccountLoader, signer: &AccountInfo) -> Result<()> { - let proposal = proposal_loader.load()?; - require!(signer.key.eq(&proposal.owner), Unauthorized); - Ok(()) -} - fn has_billing_access( state: &AccountLoader, controller: &AccountLoader, diff --git a/contracts/programs/ocr2/src/state.rs b/contracts/programs/ocr2/src/state.rs index cb524ebf8..5a6911bab 100644 --- a/contracts/programs/ocr2/src/state.rs +++ b/contracts/programs/ocr2/src/state.rs @@ -16,6 +16,10 @@ const_assert!(MAX_ORACLES <= 31); #[constant] pub const DIGEST_SIZE: usize = 32; +pub const ONCHAIN_CONFIG_VERSION: u8 = 1; + +pub const STATE_VERSION: u8 = 1; + #[zero_copy] pub struct Billing { pub observation_payment_gjuels: u32, @@ -146,7 +150,7 @@ impl Config { oracles: &[Oracle], ) -> [u8; DIGEST_SIZE] { // calculate onchain_config from stored config - let mut onchain_config = vec![1]; // version + let mut onchain_config = vec![ONCHAIN_CONFIG_VERSION]; // version // the ocr plugin expects i192 encoded values, so we need to sign extend to make the digest match if self.min_answer.is_negative() { diff --git a/contracts/programs/store/Cargo.toml b/contracts/programs/store/Cargo.toml index 56ca89ba2..5a2d61b85 100644 --- a/contracts/programs/store/Cargo.toml +++ b/contracts/programs/store/Cargo.toml @@ -15,6 +15,6 @@ cpi = ["no-entrypoint"] default = [] [dependencies] -anchor-lang = "0.23.0" +anchor-lang = "0.25.0" access-controller = { version = "1.0.0", path = "../access-controller", default-features = false, features = ["cpi"] } bytemuck = "1.7.2" diff --git a/contracts/programs/store/src/lib.rs b/contracts/programs/store/src/lib.rs index a3e6d61f1..749611caf 100644 --- a/contracts/programs/store/src/lib.rs +++ b/contracts/programs/store/src/lib.rs @@ -70,6 +70,10 @@ pub mod store { // Live length must not exceed total capacity require!(live_length <= space as u32, InvalidInput); + // Both inputs should also be more than zero + require!(live_length > 0, InvalidInput); + require!(granularity > 0, InvalidInput); + feed.version = FEED_VERSION; feed.state = Transmissions::NORMAL; feed.owner = ctx.accounts.authority.key(); @@ -96,7 +100,6 @@ pub mod store { ctx: Context, proposed_owner: Pubkey, ) -> Result<()> { - require!(proposed_owner != Pubkey::default(), InvalidInput); ctx.accounts.feed.proposed_owner = proposed_owner; Ok(()) } @@ -145,12 +148,6 @@ pub mod store { } pub fn submit(ctx: Context, round: NewTransmission) -> Result<()> { - // check if this particular ocr2 cluster is allowed to write to the feed - require!( - ctx.accounts.authority.key == &ctx.accounts.feed.writer, - Unauthorized - ); - let clock = Clock::get()?; let round = Transmission { slot: clock.slot, @@ -190,12 +187,10 @@ pub mod store { Ok(()) } - #[access_control(store_owner(&ctx.accounts.store, &ctx.accounts.authority))] pub fn transfer_store_ownership( ctx: Context, proposed_owner: Pubkey, ) -> Result<()> { - require!(proposed_owner != Pubkey::default(), InvalidInput); let store = &mut *ctx.accounts.store.load_mut()?; store.proposed_owner = proposed_owner; Ok(()) @@ -203,15 +198,10 @@ pub mod store { pub fn accept_store_ownership(ctx: Context) -> Result<()> { let store = &mut *ctx.accounts.store.load_mut()?; - require!( - ctx.accounts.authority.key == &store.proposed_owner, - Unauthorized - ); store.owner = std::mem::take(&mut store.proposed_owner); Ok(()) } - #[access_control(store_owner(&ctx.accounts.store, &ctx.accounts.authority))] pub fn set_lowering_access_controller(ctx: Context) -> Result<()> { let mut store = ctx.accounts.store.load_mut()?; store.lowering_access_controller = ctx.accounts.access_controller.key(); @@ -324,12 +314,6 @@ fn owner<'info>(owner: &UncheckedAccount<'info>, authority: &Signer) -> Result<( Ok(()) } -fn store_owner(store_loader: &AccountLoader, signer: &AccountInfo) -> Result<()> { - let store = store_loader.load()?; - require!(signer.key.eq(&store.owner), Unauthorized); - Ok(()) -} - fn has_lowering_access( owner: &UncheckedAccount, controller: &UncheckedAccount, @@ -516,6 +500,8 @@ pub struct Submit<'info> { /// The OCR2 feed #[account(mut)] pub feed: Account<'info, Transmissions>, + // check if this particular ocr2 cluster is allowed to write to the feed + #[account(address = feed.writer @ ErrorCode::Unauthorized)] pub authority: Signer<'info>, } @@ -533,6 +519,7 @@ pub struct Initialize<'info> { pub struct TransferStoreOwnership<'info> { #[account(mut)] pub store: AccountLoader<'info, State>, + #[account(address = store.load()?.owner @ ErrorCode::Unauthorized)] pub authority: Signer<'info>, } @@ -540,6 +527,7 @@ pub struct TransferStoreOwnership<'info> { pub struct AcceptStoreOwnership<'info> { #[account(mut)] pub store: AccountLoader<'info, State>, + #[account(address = store.load()?.proposed_owner @ ErrorCode::Unauthorized)] pub authority: Signer<'info>, } @@ -547,6 +535,7 @@ pub struct AcceptStoreOwnership<'info> { pub struct SetAccessController<'info> { #[account(mut)] pub store: AccountLoader<'info, State>, + #[account(address = store.load()?.owner @ ErrorCode::Unauthorized)] pub authority: Signer<'info>, pub access_controller: AccountLoader<'info, AccessController>, } diff --git a/contracts/programs/store/src/state.rs b/contracts/programs/store/src/state.rs index d004c664a..f8ad62f18 100644 --- a/contracts/programs/store/src/state.rs +++ b/contracts/programs/store/src/state.rs @@ -111,6 +111,11 @@ impl<'a> Feed<'a> { self.live[self.header.live_cursor as usize] = round; self.header.live_cursor = (self.header.live_cursor + 1) % self.live.len() as u32; + // Skip if historical ringbuffer is disabled + if self.historical.len() == 0 { + return; + } + if self.header.latest_round_id % self.header.granularity as u32 == 0 { // insert into historical data self.historical[self.header.historical_cursor as usize] = round; @@ -126,12 +131,16 @@ impl<'a> Feed<'a> { let len = self.header.live_length; // Handle wraparound - let i = (self.header.live_cursor + len.saturating_sub(1)) % len; + let i = (self.header.live_cursor + len - 1) % len; Some(self.live[i as usize]) } pub fn fetch(&self, round_id: u32) -> Option { + if round_id == 0 { + return None; + } + if self.header.latest_round_id < round_id { return None; } @@ -151,11 +160,13 @@ impl<'a> Feed<'a> { let offset = latest_round_id - round_id; let offset = offset + 1; // + 1 because we're looking for the element before the cursor + // with overflow-checks = true the else branch could abort + #[allow(clippy::unnecessary_lazy_evaluations)] let index = self .header .live_cursor .checked_sub(offset) - .unwrap_or(self.live.len() as u32 - (offset - self.header.live_cursor)); + .unwrap_or_else(|| self.live.len() as u32 - (offset - self.header.live_cursor)); Some(self.live[index as usize]) } else if (historical_start..=historical_end).contains(&round_id) { @@ -164,11 +175,13 @@ impl<'a> Feed<'a> { let offset = (historical_end - round_id) / granularity; let offset = offset + 1; // + 1 because we're looking for the element before the cursor + // with overflow-checks = true the else branch could abort + #[allow(clippy::unnecessary_lazy_evaluations)] let index = self .header .historical_cursor .checked_sub(offset) - .unwrap_or({ + .unwrap_or_else(|| { self.historical.len() as u32 - (offset - self.header.historical_cursor) }); diff --git a/contracts/tests/ocr2.spec.ts b/contracts/tests/ocr2.spec.ts index 62dbd9616..07f285c6e 100644 --- a/contracts/tests/ocr2.spec.ts +++ b/contracts/tests/ocr2.spec.ts @@ -2,17 +2,21 @@ import * as anchor from "@project-serum/anchor"; import { ProgramError, BN } from "@project-serum/anchor"; import * as borsh from "borsh"; import { - SYSVAR_RENT_PUBKEY, + LAMPORTS_PER_SOL, PublicKey, Keypair, - SystemProgram, Transaction, TransactionInstruction, } from "@solana/web3.js"; import { - Token, - ASSOCIATED_TOKEN_PROGRAM_ID, + createMint, + createAccount, + closeAccount, + mintTo, + getAccount, + getOrCreateAssociatedTokenAccount, TOKEN_PROGRAM_ID, + Account, } from "@solana/spl-token"; import { assert } from "chai"; @@ -45,11 +49,17 @@ class Assignable { } class Round extends Assignable {} +const header = 8 + 192; // account discriminator + header +const transmissionSize = 48; + describe("ocr2", async () => { // Configure the client to use the local cluster. - const provider = anchor.Provider.env(); + const provider = anchor.AnchorProvider.env(); anchor.setProvider(provider); + // Generate a new wallet keypair and airdrop SOL + const fromWallet = Keypair.generate(); + const billingAccessController = Keypair.generate(); const requesterAccessController = Keypair.generate(); const store = Keypair.generate(); @@ -66,8 +76,6 @@ describe("ocr2", async () => { const owner = provider.wallet; const mintAuthority = Keypair.generate(); - const placeholder = Keypair.generate().publicKey; - const decimals = 18; const description = "ETH/BTC"; @@ -79,9 +87,10 @@ describe("ocr2", async () => { const program = anchor.workspace.Ocr2; const accessController = anchor.workspace.AccessController; - let token: Token, tokenClient: Token; + let token: PublicKey; let storeAuthority: PublicKey, storeNonce: number; let tokenVault: PublicKey, vaultAuthority: PublicKey, vaultNonce: number; + let recipient: PublicKey, recipientTokenAccount: Account; let oracles = []; const f = 6; @@ -99,8 +108,9 @@ describe("ocr2", async () => { accounts: { feed }, options: { commitment: "confirmed" }, }); - // await provider.connection.confirmTransaction(tx); - let t = await provider.connection.getConfirmedTransaction(tx, "confirmed"); + let t = await provider.connection.getTransaction(tx, { + commitment: "confirmed", + }); // "Program return: " const prefix = "Program return: "; @@ -116,10 +126,11 @@ describe("ocr2", async () => { // transmits a single round let transmit = async ( + feed: PublicKey, epoch: number, round: number, answer: BN, - juels: Buffer = Buffer.from([0, 0, 0, 0, 0, 0, 0, 2]), // juels per lamport (2) + juels: Buffer = Buffer.from([0, 0, 0, 0, 0, 0, 0, 2]) // juels per lamport (2) ): Promise => { let account = await program.account.state.fetch(state.publicKey); @@ -202,7 +213,7 @@ describe("ocr2", async () => { { pubkey: state.publicKey, isWritable: true, isSigner: false }, { pubkey: transmitter.publicKey, isWritable: false, isSigner: true }, { - pubkey: feed.publicKey, + pubkey: feed, isWritable: true, isSigner: false, }, @@ -223,7 +234,7 @@ describe("ocr2", async () => { ); try { - return await provider.send(tx, [transmitter]); + return await provider.sendAndConfirm(tx, [transmitter]); } catch (err) { // Translate IDL error const idlErrors = anchor.parseIdlErrors(program.idl); @@ -236,6 +247,11 @@ describe("ocr2", async () => { }; it("Funds the payer", async () => { + await provider.connection.requestAirdrop( + fromWallet.publicKey, + LAMPORTS_PER_SOL + ); + await provider.connection.confirmTransaction( await provider.connection.requestAirdrop(payer.publicKey, 10000000000), "confirmed" @@ -243,21 +259,28 @@ describe("ocr2", async () => { }); it("Creates the LINK token", async () => { - token = await Token.createMint( + token = await createMint( provider.connection, payer, mintAuthority.publicKey, null, - 9, // SPL tokens use a u64, we can fit enough total supply in 9 decimals. Smallest unit is Gjuels - TOKEN_PROGRAM_ID + 9 // SPL tokens use a u64, we can fit enough total supply in 9 decimals. Smallest unit is Gjuels ); - tokenClient = new Token( + const placeholder = Keypair.generate().publicKey; + recipient = await createAccount( provider.connection, - token.publicKey, - TOKEN_PROGRAM_ID, - // @ts-ignore - program.provider.wallet.payer + fromWallet, + token, + placeholder + ); + // TODO: it complains account is off curve + recipientTokenAccount = await getOrCreateAssociatedTokenAccount( + provider.connection, + fromWallet, + token, + recipient, + true ); }); @@ -312,13 +335,15 @@ describe("ocr2", async () => { ); // Create an associated token account for LINK, owned by the program instance - tokenVault = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - token.publicKey, - vaultAuthority, - true // allowOwnerOffCurve: seems required since a PDA isn't a valid keypair - ); + tokenVault = ( + await getOrCreateAssociatedTokenAccount( + provider.connection, + fromWallet, + token, + vaultAuthority, + true // allowOwnerOffCurve: seems required since a PDA isn't a valid keypair + ) + ).address; }); it("Initializes the OCR2 feed", async () => { @@ -328,43 +353,39 @@ describe("ocr2", async () => { console.log("feed", feed.publicKey.toBase58()); console.log("payer", provider.wallet.publicKey.toBase58()); console.log("owner", owner.publicKey.toBase58()); - console.log("tokenMint", token.publicKey.toBase58()); + console.log("tokenMint", token.toBase58()); console.log("tokenVault", tokenVault.toBase58()); console.log("vaultAuthority", vaultAuthority.toBase58()); - console.log("placeholder", placeholder.toBase58()); const granularity = 30; const liveLength = 3; - await workspace.Store.rpc.createFeed( - description, - decimals, - granularity, - liveLength, - { - accounts: { - feed: feed.publicKey, - authority: owner.publicKey, - }, - signers: [feed], - preInstructions: [ - await workspace.Store.account.transmissions.createInstruction( - feed, - 8 + 192 + 6 * 48 - ), - ], - } - ); + const historicalLength = 3; + await workspace.Store.methods + .createFeed(description, decimals, granularity, liveLength) + .accounts({ + feed: feed.publicKey, + authority: owner.publicKey, + }) + .signers([feed]) + .preInstructions([ + await workspace.Store.account.transmissions.createInstruction( + feed, + header + (liveLength + historicalLength) * transmissionSize + ), + ]) + .rpc(); // Program log: panicked at 'range end index 8 out of range for slice of length 0', store/src/lib.rs:476:10 // Configure threshold for the feed - await workspace.Store.rpc.setValidatorConfig(flaggingThreshold, { - accounts: { + await workspace.Store.methods + .setValidatorConfig(flaggingThreshold) + .accounts({ feed: feed.publicKey, owner: owner.publicKey, authority: owner.publicKey, - }, - signers: [], - }); + }) + .signers([]) + .rpc(); // store authority for our ocr2 config [storeAuthority, storeNonce] = await PublicKey.findProgramAddress( @@ -420,72 +441,38 @@ describe("ocr2", async () => { // } // }); - it("Initializes the OCR2 config", async () => { - await program.rpc.initialize( - new BN(minAnswer), - new BN(maxAnswer), - { - accounts: { - state: state.publicKey, - feed: feed.publicKey, - payer: provider.wallet.publicKey, - owner: owner.publicKey, - tokenMint: token.publicKey, - tokenVault: tokenVault, - vaultAuthority: vaultAuthority, - requesterAccessController: requesterAccessController.publicKey, - billingAccessController: billingAccessController.publicKey, - rent: SYSVAR_RENT_PUBKEY, - systemProgram: SystemProgram.programId, - tokenProgram: TOKEN_PROGRAM_ID, - associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID, - }, - signers: [state], - preInstructions: [ - await program.account.state.createInstruction(state), - // await store.account.transmissions.createInstruction(transmissions, 8+192+8096*24), - // createFeed, - ], - } - ); - - let account = await program.account.state.fetch(state.publicKey); - let config = account.config; - assert.ok(config.minAnswer.toNumber() == minAnswer); - assert.ok(config.maxAnswer.toNumber() == maxAnswer); - // assert.ok(config.decimals == 18); - - console.log(`Generating ${n} oracles...`); - let futures = []; - let generateOracle = async () => { - let secretKey = randomBytes(32); - let transmitter = Keypair.generate(); - return { - signer: { - secretKey, - publicKey: secp256k1.publicKeyCreate(secretKey, false).slice(1), // compressed = false, skip first byte (0x04) - }, - transmitter, - // Initialize a token account - payee: await token.getOrCreateAssociatedAccountInfo( - transmitter.publicKey - ), - }; + let generateOracle = async () => { + let secretKey = randomBytes(32); + let transmitter = Keypair.generate(); + return { + signer: { + secretKey, + publicKey: secp256k1.publicKeyCreate(secretKey, false).slice(1), // compressed = false, skip first byte (0x04) + }, + transmitter, + // Initialize a token account + payee: await getOrCreateAssociatedTokenAccount( + provider.connection, + fromWallet, + token, + transmitter.publicKey + ), }; - for (let i = 0; i < n; i++) { - futures.push(generateOracle()); - } - oracles = await Promise.all(futures); + }; + let configure = async () => { const offchain_config_version = 2; const offchain_config = Buffer.from([4, 5, 6]); // Fund the owner with LINK tokens - await token.mintTo( + await mintTo( + provider.connection, + fromWallet, + token, tokenVault, mintAuthority.publicKey, - [mintAuthority], - 100000000000000 + 100000000000000, + [mintAuthority] ); // TODO: listen for SetConfig event @@ -533,42 +520,61 @@ describe("ocr2", async () => { }); console.log("proposePayees"); - await program.rpc.proposePayees( - token.publicKey, - oracles.map((oracle) => oracle.payee.address), - { - accounts: { - proposal: proposal.publicKey, - authority: owner.publicKey, - }, - } - ); + let payees = oracles.map((oracle) => { + return { + pubkey: oracle.payee.address, + isWritable: true, + isSigner: false, + }; + }); + await program.methods + .proposePayees(token) + .accounts({ + proposal: proposal.publicKey, + authority: owner.publicKey, + }) + .remainingAccounts(payees) + .rpc(); console.log("finalizeProposal"); - await program.rpc.finalizeProposal({ - accounts: { + await program.methods + .finalizeProposal() + .accounts({ proposal: proposal.publicKey, authority: owner.publicKey, - }, - }); + }) + .rpc(); // compute proposal digest - let proposalAccount = await program.account.proposal.fetch(proposal.publicKey); + let proposalAccount = await program.account.proposal.fetch( + proposal.publicKey + ); console.log(proposalAccount); - let proposalOracles = proposalAccount.oracles.xs.slice(0, proposalAccount.oracles.len); - let proposalOC = proposalAccount.offchainConfig.xs.slice(0, proposalAccount.offchainConfig.len); + let proposalOracles = proposalAccount.oracles.xs.slice( + 0, + proposalAccount.oracles.len + ); + let proposalOC = proposalAccount.offchainConfig.xs.slice( + 0, + proposalAccount.offchainConfig.len + ); - let hasher = createHash("sha256").update(Buffer.from([proposalAccount.oracles.len])); + let hasher = createHash("sha256").update( + Buffer.from([proposalAccount.oracles.len]) + ); hasher = proposalOracles.reduce((hasher, oracle) => { return hasher .update(Buffer.from(oracle.signer.key)) .update(oracle.transmitter.toBuffer()) - .update(oracle.payee.toBuffer()) + .update(oracle.payee.toBuffer()); }, hasher); - let offchainConfigHeader = Buffer.alloc(8+4); - offchainConfigHeader.writeBigUInt64BE(BigInt(proposalAccount.offchainConfig.version), 0); + let offchainConfigHeader = Buffer.alloc(8 + 4); + offchainConfigHeader.writeBigUInt64BE( + BigInt(proposalAccount.offchainConfig.version), + 0 + ); offchainConfigHeader.writeUInt32BE(proposalAccount.offchainConfig.len, 8); let digest = hasher @@ -579,9 +585,9 @@ describe("ocr2", async () => { .digest(); // fetch payees - account = await program.account.state.fetch(state.publicKey); + let account = await program.account.state.fetch(state.publicKey); let currentOracles = account.oracles.xs.slice(0, account.oracles.len); - let payees = currentOracles.map((oracle) => { + payees = currentOracles.map((oracle) => { return { pubkey: oracle.payee, isWritable: true, isSigner: false }; }); @@ -592,12 +598,50 @@ describe("ocr2", async () => { proposal: proposal.publicKey, receiver: owner.publicKey, authority: owner.publicKey, + tokenReceiver: recipientTokenAccount.address, tokenVault: tokenVault, vaultAuthority: vaultAuthority, tokenProgram: TOKEN_PROGRAM_ID, }, remainingAccounts: payees, }); + }; + + it("Initializes the OCR2 config", async () => { + await program.methods + .initialize(new BN(minAnswer), new BN(maxAnswer)) + .accounts({ + state: state.publicKey, + feed: feed.publicKey, + owner: owner.publicKey, + tokenMint: token, + tokenVault: tokenVault, + vaultAuthority: vaultAuthority, + requesterAccessController: requesterAccessController.publicKey, + billingAccessController: billingAccessController.publicKey, + }) + .signers([state]) + .preInstructions([ + await program.account.state.createInstruction(state), + // await store.account.transmissions.createInstruction(transmissions, 8+192+8096*24), + // createFeed, + ]) + .rpc(); + + let account = await program.account.state.fetch(state.publicKey); + let config = account.config; + assert.ok(config.minAnswer.toNumber() == minAnswer); + assert.ok(config.maxAnswer.toNumber() == maxAnswer); + // assert.ok(config.decimals == 18); + + console.log(`Generating ${n} oracles...`); + let futures = []; + for (let i = 0; i < n; i++) { + futures.push(generateOracle()); + } + oracles = await Promise.all(futures); + + await configure(); // TODO: validate that payees were paid @@ -623,8 +667,8 @@ describe("ocr2", async () => { // fetch payees account = await program.account.state.fetch(state.publicKey); - currentOracles = account.oracles.xs.slice(0, account.oracles.len); - payees = currentOracles.map((oracle) => { + let currentOracles = account.oracles.xs.slice(0, account.oracles.len); + let payees = currentOracles.map((oracle) => { return { pubkey: oracle.payee, isWritable: true, isSigner: false }; }); @@ -637,6 +681,7 @@ describe("ocr2", async () => { state: state.publicKey, authority: owner.publicKey, accessController: billingAccessController.publicKey, + tokenReceiver: recipientTokenAccount.address, tokenVault: tokenVault, vaultAuthority: vaultAuthority, tokenProgram: TOKEN_PROGRAM_ID, @@ -735,7 +780,7 @@ describe("ocr2", async () => { it("Can't transmit a round if not the writer", async () => { try { - await transmit(1, 1, new BN(1)); + await transmit(feed.publicKey, 1, 1, new BN(1)); } catch { // transmit should fail return; @@ -774,15 +819,10 @@ describe("ocr2", async () => { }); it("Transmits a round", async () => { - await transmit(1, 2, new BN(3)); + await transmit(feed.publicKey, 1, 2, new BN(3)); }); it("Withdraws funds", async () => { - const recipient = await token.createAccount(placeholder); - let recipientTokenAccount = await token.getOrCreateAssociatedAccountInfo( - recipient - ); - await program.rpc.withdrawFunds(new BN(1), { accounts: { state: state.publicKey, @@ -796,10 +836,15 @@ describe("ocr2", async () => { signers: [], }); - recipientTokenAccount = await tokenClient.getOrCreateAssociatedAccountInfo( - recipient + // TODO: it complains account is off curve + recipientTokenAccount = await getOrCreateAssociatedTokenAccount( + provider.connection, + fromWallet, + token, + recipient, + true ); - assert.ok(recipientTokenAccount.amount.toNumber() === 1); + assert.ok(recipientTokenAccount.amount === BigInt(1)); }); const roundSchema = new Map([ @@ -828,12 +873,7 @@ describe("ocr2", async () => { const versionSchema = new Map([ [Round, { kind: "struct", fields: [["version", "u8"]] }], ]); - let data = await query( - feed.publicKey, - Scope.Version, - versionSchema, - Round - ); + let data = await query(feed.publicKey, Scope.Version, versionSchema, Round); assert.ok(data.version == 2); const descriptionSchema = new Map([ @@ -850,7 +890,7 @@ describe("ocr2", async () => { it("Transmit a bunch of rounds to check ringbuffer wraparound", async () => { for (let i = 2; i <= rounds; i++) { - let transmitTx = await transmit(i, i, new BN(i)); + let transmitTx = await transmit(feed.publicKey, i, i, new BN(i)); await provider.connection.confirmTransaction(transmitTx); let t = await provider.connection.getTransaction(transmitTx, { @@ -868,7 +908,7 @@ describe("ocr2", async () => { } }); - it ("Node payouts happen with the correct decimals", async () => { + it("Node payouts happen with the correct decimals", async () => { // fetch payees let account = await program.account.state.fetch(state.publicKey); let currentOracles = account.oracles.xs.slice(0, account.oracles.len); @@ -879,17 +919,43 @@ describe("ocr2", async () => { // + 2 juels per lamport => rounded to 0 // + 1 gjuel // = 1 gjuel - assert.equal(transmissionPayment*rounds, oracle.paymentGjuels.toNumber()) + assert.equal( + transmissionPayment * rounds, + oracle.paymentGjuels.toNumber() + ); transmitter = oracle.payee; } return { pubkey: oracle.payee, isWritable: true, isSigner: false }; }); + // can still pay out oracles even if a token account is closed + + // Close oracle0's token account + let oracle = oracles[0] + let tx = await closeAccount( + provider.connection, + fromWallet, + oracle.payee.address, // account + recipientTokenAccount.address, // destination + oracle.transmitter, // authority + ); + await provider.connection.confirmTransaction(tx); + + // TODO: it complains account is off curve + recipientTokenAccount = await getOrCreateAssociatedTokenAccount( + provider.connection, + fromWallet, + token, + recipient, + true + ); + await program.rpc.payOracles({ accounts: { state: state.publicKey, authority: owner.publicKey, accessController: billingAccessController.publicKey, + tokenReceiver: recipientTokenAccount.address, tokenVault: tokenVault, vaultAuthority: vaultAuthority, tokenProgram: TOKEN_PROGRAM_ID, @@ -897,45 +963,62 @@ describe("ocr2", async () => { remainingAccounts: payees, }); - for (let i = 0; i < payees.length; i++) { - const account = await tokenClient.getAccountInfo(payees[i].pubkey) + // TODO: check remaining amount on tokenRecipient + + // NOTE: we skip payees0 since it's closed + for (let i = 1; i < payees.length; i++) { + const account = await getAccount(provider.connection, payees[i].pubkey); if (payees[i].pubkey.equals(transmitter)) { // transmitter + observation payment - assert.equal((observationPayment+transmissionPayment)*rounds, account.amount.toNumber()) + assert.equal( + BigInt((observationPayment + transmissionPayment) * rounds), + account.amount + ); continue; } // observation payment - assert.equal(observationPayment*rounds, account.amount.toNumber()) + assert.equal(BigInt(observationPayment * rounds), account.amount); } - }); it("Transmit does not fail on juelsPerFeecoin edge cases", async () => { // zero value u64 juelsPerFeecoin - await transmit(rounds+1, rounds+1, new BN(rounds+1), Buffer.from([0, 0, 0, 0, 0, 0, 0, 0])); + await transmit( + feed.publicKey, + rounds + 1, + rounds + 1, + new BN(rounds + 1), + Buffer.from([0, 0, 0, 0, 0, 0, 0, 0]) + ); // max value u64 juelsPerFeecoin - await transmit(rounds+2, rounds+2, new BN(rounds+2), Buffer.from([127, 127, 127, 127, 127, 127, 127, 127])); - }) + await transmit( + feed.publicKey, + rounds + 2, + rounds + 2, + new BN(rounds + 2), + Buffer.from([127, 127, 127, 127, 127, 127, 127, 127]) + ); + }); it("TS client listens and parses state", async () => { - let feed = new OCR2Feed(program, provider); + let stream = new OCR2Feed(program, provider); let listener = null; let success = new Promise((resolve, _reject) => { - listener = feed.onRound(state.publicKey, (event) => { - resolve(event) + listener = stream.onRound(state.publicKey, (event) => { + resolve(event); }); }); - let transmitTx = transmit(100, 1, new BN(16)); - + let transmitTx = transmit(feed.publicKey, 100, 1, new BN(16)); + let event = await success; - assert.ok(event.feed.equals(state.publicKey)) - assert.equal(event.answer.toNumber(), 16) + assert.ok(event.feed.equals(state.publicKey)); + assert.equal(event.answer.toNumber(), 16); - await feed.removeListener(listener); - }) + await stream.removeListener(listener); + }); it("Reclaims rent exempt deposit when closing down a feed", async () => { let beforeBalance = ( @@ -958,6 +1041,8 @@ describe("ocr2", async () => { // Retrieved rent exemption sol. assert.ok(afterBalance > beforeBalance); + // TODO: also verify tokenVault got drained + const closedAccount = await provider.connection.getAccountInfo( feed.publicKey ); @@ -965,10 +1050,6 @@ describe("ocr2", async () => { }); it("Reclaims rent exempt deposit when closing down an aggregator", async () => { - let beforeBalance = ( - await provider.connection.getAccountInfo(provider.wallet.publicKey) - ).lamports; - // fetch payees let account = await program.account.state.fetch(state.publicKey); let currentOracles = account.oracles.xs.slice(0, account.oracles.len); @@ -976,10 +1057,24 @@ describe("ocr2", async () => { return { pubkey: oracle.payee, isWritable: true, isSigner: false }; }); + // TODO: it complains account is off curve + let recipientTokenAccount = await getOrCreateAssociatedTokenAccount( + provider.connection, + fromWallet, + token, + provider.wallet.publicKey, + true + ); + + let beforeBalance = ( + await provider.connection.getAccountInfo(provider.wallet.publicKey) + ).lamports; + await program.rpc.close({ accounts: { state: state.publicKey, receiver: provider.wallet.publicKey, + tokenReceiver: recipientTokenAccount.address, authority: owner.publicKey, tokenVault: tokenVault, vaultAuthority: vaultAuthority, @@ -1005,13 +1100,11 @@ describe("ocr2", async () => { const granularity = 30; const liveLength = 3; - const header = 8 + 192 // account discriminator + header - const transmissionSize = 48 const invalidLengths = [ header - 1, // insufficient for header size header + 6 * transmissionSize - 1, // incorrect size for ring buffer header + 2 * transmissionSize, // live length exceeds total capacity - ] + ]; for (let i = 0; i < invalidLengths.length; i++) { try { const invalidFeed = Keypair.generate(); @@ -1037,8 +1130,90 @@ describe("ocr2", async () => { } catch { continue; // expect error } - assert.fail(`create feed shouldn't have succeeded with account size ${invalidLengths[i]}`); + assert.fail( + `create feed shouldn't have succeeded with account size ${invalidLengths[i]}` + ); } }); + it("Can create a feed with no historical ringbuffer", async () => { + const granularity = 1; + const liveLength = 3; + + const feed = Keypair.generate(); + const length = header + transmissionSize * liveLength; + + // Create the feed account + await workspace.Store.rpc.createFeed( + description, + decimals, + granularity, + liveLength, + { + accounts: { + feed: feed.publicKey, + authority: owner.publicKey, + }, + signers: [feed], + preInstructions: [ + await workspace.Store.account.transmissions.createInstruction( + feed, + length + ), + ], + } + ); + + // Create the aggregator account + await program.methods + .initialize(new BN(minAnswer), new BN(maxAnswer)) + .accounts({ + state: state.publicKey, + feed: feed.publicKey, + owner: owner.publicKey, + tokenMint: token, + tokenVault: tokenVault, + vaultAuthority: vaultAuthority, + requesterAccessController: requesterAccessController.publicKey, + billingAccessController: billingAccessController.publicKey, + }) + .signers([state]) + .preInstructions([await program.account.state.createInstruction(state)]) + .rpc(); + + console.log(`Generating ${n} oracles...`); + let futures = []; + for (let i = 0; i < n; i++) { + futures.push(generateOracle()); + } + oracles = await Promise.all(futures); + + // Configure the aggregator + await configure(); + + // Set feed writer + await workspace.Store.rpc.setWriter(storeAuthority, { + accounts: { + feed: feed.publicKey, + owner: owner.publicKey, + authority: owner.publicKey, + }, + }); + + // submit, then read from the feed to ensure it works fine + let transmitTx = await transmit(feed.publicKey, 1, 1, new BN(100)); + await provider.connection.confirmTransaction(transmitTx); + let t = await provider.connection.getTransaction(transmitTx, { + commitment: "confirmed", + }); + console.log(t.meta.logMessages); + + let round = await query( + feed.publicKey, + Scope.LatestRoundData, + roundSchema, + Round + ); + assert.equal(new BN(round.answer, 10, "le").toNumber(), 100); + }); }); diff --git a/contracts/yarn.lock b/contracts/yarn.lock index ee904b69b..0f7a7d964 100644 --- a/contracts/yarn.lock +++ b/contracts/yarn.lock @@ -2,17 +2,10 @@ # yarn lockfile v1 -"@babel/runtime@^7.10.5": - version "7.16.3" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.3.tgz#b86f0db02a04187a3c17caa77de69840165d42d5" - integrity sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ== - dependencies: - regenerator-runtime "^0.13.4" - "@babel/runtime@^7.12.5", "@babel/runtime@^7.17.2": - version "7.18.3" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.3.tgz#c7b654b57f6f63cf7f8b418ac9ca04408c4579f4" - integrity sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug== + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a" + integrity sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw== dependencies: regenerator-runtime "^0.13.4" @@ -20,7 +13,7 @@ version "0.2.2" dependencies: "@project-serum/anchor" "^0.24.2" - "@solana/web3.js" "1.31.0" + "@solana/web3.js" "^1.50.1" "@ethersproject/bytes@^5.6.1": version "5.6.1" @@ -43,10 +36,22 @@ "@ethersproject/logger" "^5.6.0" hash.js "1.1.7" -"@project-serum/anchor@^0.23.0": - version "0.23.0" - resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.23.0.tgz#2b2eb6b51601b073e8db26663aa2d6c2f2841771" - integrity sha512-LV2/ifZOJVFTZ4GbEloXln3iVfCvO1YM8i7BBCrUm4tehP7irMx4nr4/IabHWOzrQcQElsxSP/lb1tBp+2ff8A== +"@hapi/hoek@^9.0.0": + version "9.3.0" + resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" + integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== + +"@hapi/topo@^5.0.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.1.0.tgz#dc448e332c6c6e37a4dc02fd84ba8d44b9afb012" + integrity sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== + dependencies: + "@hapi/hoek" "^9.0.0" + +"@project-serum/anchor@^0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.24.2.tgz#a3c52a99605c80735f446ca9b3a4885034731004" + integrity sha512-0/718g8/DnEuwAidUwh5wLYphUYXhUbiClkuRNhvNoa+1Y8a4g2tJyxoae+emV+PG/Gikd/QUBNMkIcimiIRTA== dependencies: "@project-serum/borsh" "^0.2.5" "@solana/web3.js" "^1.36.0" @@ -58,16 +63,15 @@ cross-fetch "^3.1.5" crypto-hash "^1.3.0" eventemitter3 "^4.0.7" - find "^0.3.0" js-sha256 "^0.9.0" pako "^2.0.3" snake-case "^3.0.4" toml "^3.0.0" -"@project-serum/anchor@^0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.24.2.tgz#a3c52a99605c80735f446ca9b3a4885034731004" - integrity sha512-0/718g8/DnEuwAidUwh5wLYphUYXhUbiClkuRNhvNoa+1Y8a4g2tJyxoae+emV+PG/Gikd/QUBNMkIcimiIRTA== +"@project-serum/anchor@^0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.25.0.tgz#88ee4843336005cf5a64c80636ce626f0996f503" + integrity sha512-E6A5Y/ijqpfMJ5psJvbw0kVTzLZFUcOFgs6eSM2M2iWE1lVRF18T6hWZVNl6zqZsoz98jgnNHtVGJMs+ds9A7A== dependencies: "@project-serum/borsh" "^0.2.5" "@solana/web3.js" "^1.36.0" @@ -82,6 +86,7 @@ js-sha256 "^0.9.0" pako "^2.0.3" snake-case "^3.0.4" + superstruct "^0.15.4" toml "^3.0.0" "@project-serum/borsh@^0.2.5": @@ -92,12 +97,32 @@ bn.js "^5.1.2" buffer-layout "^1.2.0" -"@solana/buffer-layout@^3.0.0": +"@sideway/address@^4.1.3": + version "4.1.4" + resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" + integrity sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw== + dependencies: + "@hapi/hoek" "^9.0.0" + +"@sideway/formula@^3.0.0": version "3.0.0" - resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-3.0.0.tgz#b9353caeb9a1589cb77a1b145bcb1a9a93114326" - integrity sha512-MVdgAKKL39tEs0l8je0hKaXLQFb7Rdfb0Xg2LjFZd8Lfdazkg6xiS98uAZrEKvaoF3i4M95ei9RydkGIDMeo3w== + resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.0.tgz#fe158aee32e6bd5de85044be615bc08478a0a13c" + integrity sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg== + +"@sideway/pinpoint@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" + integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== + +"@solana/buffer-layout-utils@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz#b45a6cab3293a2eb7597cceb474f229889d875ca" + integrity sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g== dependencies: - buffer "~6.0.3" + "@solana/buffer-layout" "^4.0.0" + "@solana/web3.js" "^1.32.0" + bigint-buffer "^1.1.5" + bignumber.js "^9.0.1" "@solana/buffer-layout@^4.0.0": version "4.0.0" @@ -106,62 +131,20 @@ dependencies: buffer "~6.0.3" -"@solana/spl-token@^0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.1.8.tgz#f06e746341ef8d04165e21fc7f555492a2a0faa6" - integrity sha512-LZmYCKcPQDtJgecvWOgT/cnoIQPWjdH+QVyzPcFvyDUiT0DiRjZaam4aqNUyvchLFhzgunv3d9xOoyE34ofdoQ== - dependencies: - "@babel/runtime" "^7.10.5" - "@solana/web3.js" "^1.21.0" - bn.js "^5.1.0" - buffer "6.0.3" - buffer-layout "^1.2.0" - dotenv "10.0.0" - -"@solana/web3.js@1.31.0": - version "1.31.0" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.31.0.tgz#7a313d4c1a90b77f27ddbfe845a10d6883e06452" - integrity sha512-7nHHx1JNFnrt15e9y8m38I/EJCbaB+bFC3KZVM1+QhybCikFxGMtGA5r7PDC3GEL1R2RZA8yKoLkDKo3vzzqnw== - dependencies: - "@babel/runtime" "^7.12.5" - "@ethersproject/sha2" "^5.5.0" - "@solana/buffer-layout" "^3.0.0" - bn.js "^5.0.0" - borsh "^0.4.0" - bs58 "^4.0.1" - buffer "6.0.1" - cross-fetch "^3.1.4" - jayson "^3.4.4" - js-sha3 "^0.8.0" - rpc-websockets "^7.4.2" - secp256k1 "^4.0.2" - superstruct "^0.14.2" - tweetnacl "^1.0.0" - -"@solana/web3.js@^1.21.0": - version "1.30.2" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.30.2.tgz#e85da75e0825dc64f53eb64a1ff0115b27bec135" - integrity sha512-hznCj+rkfvM5taRP3Z+l5lumB7IQnDrB4l55Wpsg4kDU9Zds8pE5YOH5Z9bbF/pUzZJKQjyBjnY/6kScBm3Ugg== +"@solana/spl-token@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.2.0.tgz#329bb6babb5de0f9c40035ddb1657f01a8347acd" + integrity sha512-RWcn31OXtdqIxmkzQfB2R+WpsJOVS6rKuvpxJFjvik2LyODd+WN58ZP3Rpjpro03fscGAkzlFuP3r42doRJgyQ== dependencies: - "@babel/runtime" "^7.12.5" - "@ethersproject/sha2" "^5.5.0" - "@solana/buffer-layout" "^3.0.0" - bn.js "^5.0.0" - borsh "^0.4.0" - bs58 "^4.0.1" - buffer "6.0.1" - cross-fetch "^3.1.4" - jayson "^3.4.4" - js-sha3 "^0.8.0" - rpc-websockets "^7.4.2" - secp256k1 "^4.0.2" - superstruct "^0.14.2" - tweetnacl "^1.0.0" + "@solana/buffer-layout" "^4.0.0" + "@solana/buffer-layout-utils" "^0.2.0" + "@solana/web3.js" "^1.32.0" + start-server-and-test "^1.14.0" -"@solana/web3.js@^1.36.0": - version "1.44.0" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.44.0.tgz#233f7bd268520a0ce852ff7f92ded150c5fad0f5" - integrity sha512-KHf7o8sM5FlxYGHGroD7IJeCCOmjFITdBIXq4cO5xPFQ8O6Y26FWfYqIXqY1dXI29t240g0m1GYPssCp5UVgZg== +"@solana/web3.js@^1.32.0", "@solana/web3.js@^1.36.0", "@solana/web3.js@^1.50.1": + version "1.50.1" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.50.1.tgz#dae726a06267d1bcd88b1e3cd8ae44c709302dcf" + integrity sha512-1l9N/nS8pJEA2YibNT8wa072718O0/A1eKWE0+pdWC5wDGQgBNxZSLuv7Cq5Dcn46WsZ5J5ZstK89q8J/ZZaQA== dependencies: "@babel/runtime" "^7.12.5" "@ethersproject/sha2" "^5.5.0" @@ -175,18 +158,12 @@ jayson "^3.4.4" js-sha3 "^0.8.0" node-fetch "2" - rpc-websockets "^7.4.2" + react-native-url-polyfill "^1.3.0" + rpc-websockets "^7.5.0" secp256k1 "^4.0.2" superstruct "^0.14.2" tweetnacl "^1.0.0" -"@types/bn.js@^4.11.5": - version "4.11.6" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" - integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== - dependencies: - "@types/node" "*" - "@types/chai@^4.2.22": version "4.3.0" resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.0.tgz#23509ebc1fa32f1b4d50d6a66c4032d5b8eaabdc" @@ -200,9 +177,9 @@ "@types/node" "*" "@types/express-serve-static-core@^4.17.9": - version "4.17.28" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz#c47def9f34ec81dc6328d0b1b5303d1ec98d86b8" - integrity sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig== + version "4.17.30" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.30.tgz#0f2f99617fa8f9696170c46152ccf7500b34ac04" + integrity sha512-gstzbTWro2/nFed1WXtf+TtrpwxH7Ggs4RLYTLbeVgIkUQOI3WG/JKjgeOU1zXDvezllupjrf8OPIdvTbIaVOQ== dependencies: "@types/node" "*" "@types/qs" "*" @@ -224,9 +201,9 @@ integrity sha512-scN0hAWyLVAvLR9AyW7HoFF5sJZglyBsbPuHO4fv7JRvfmPBMfp1ozWqOf/e4wwPNxezBZXRfWzMb6iFLgEVRA== "@types/node@*": - version "17.0.41" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.41.tgz#1607b2fd3da014ae5d4d1b31bc792a39348dfb9b" - integrity sha512-xA6drNNeqb5YyV5fO3OAEsnXLfO7uF0whiOfPTz5AeDo8KeZFmODKnvwPymMNO8qE/an8pVY/O50tig2SQCrGw== + version "18.6.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.2.tgz#ffc5f0f099d27887c8d9067b54e55090fcd54126" + integrity sha512-KcfkBq9H4PI6Vpu5B/KoPeuVDAbmi+2mDBqGPGUgoL7yXQtcWGu2vJWmmRkneWK3Rh0nIAX192Aa87AqKHYChQ== "@types/node@^12.12.54": version "12.20.55" @@ -322,6 +299,13 @@ assertion-error@^1.1.0: resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== +axios@^0.21.1: + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== + dependencies: + follow-redirects "^1.14.0" + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -346,6 +330,11 @@ bigint-buffer@^1.1.5: dependencies: bindings "^1.3.0" +bignumber.js@^9.0.1: + version "9.0.2" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.2.tgz#71c6c6bed38de64e24a65ebe16cfcf23ae693673" + integrity sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw== + binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" @@ -363,6 +352,11 @@ blakejs@^1.1.0: resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.1.1.tgz#bf313053978b2cd4c444a48795710be05c785702" integrity sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg== +bluebird@3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + bn.js@^4.11.9: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" @@ -373,21 +367,11 @@ bn.js@^5.0.0, bn.js@^5.1.2: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== -bn.js@^5.1.0, bn.js@^5.2.0: +bn.js@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== -borsh@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/borsh/-/borsh-0.4.0.tgz#9dd6defe741627f1315eac2a73df61421f6ddb9f" - integrity sha512-aX6qtLya3K0AkT66CmYWCCDr77qsE9arV05OmdFpmat9qu8Pg9J5tBUPDztAW5fNh/d/MyVG/OYziP52Ndzx1g== - dependencies: - "@types/bn.js" "^4.11.5" - bn.js "^5.0.0" - bs58 "^4.0.0" - text-encoding-utf-8 "^1.0.2" - borsh@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/borsh/-/borsh-0.7.0.tgz#6e9560d719d86d90dc589bca60ffc8a6c51fec2a" @@ -473,7 +457,15 @@ buffer@6.0.1: base64-js "^1.3.1" ieee754 "^1.2.1" -buffer@6.0.3, buffer@~6.0.3: +buffer@^5.4.3: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +buffer@~6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== @@ -523,6 +515,11 @@ check-error@^1.0.2: resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= +check-more-types@2.24.0: + version "2.24.0" + resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600" + integrity sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA== + chokidar@3.5.2: version "3.5.2" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" @@ -600,13 +597,22 @@ create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" -cross-fetch@^3.1.4, cross-fetch@^3.1.5: +cross-fetch@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== dependencies: node-fetch "2.6.7" +cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + crypto-hash@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/crypto-hash/-/crypto-hash-1.3.0.tgz#b402cb08f4529e9f4f09346c3e275942f845e247" @@ -654,10 +660,10 @@ dot-case@^3.0.4: no-case "^3.0.4" tslib "^2.0.3" -dotenv@10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" - integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== +duplexer@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" + integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== elliptic@^6.5.2, elliptic@^6.5.4: version "6.5.4" @@ -720,6 +726,19 @@ ethereum-cryptography@^0.1.3: secp256k1 "^4.0.1" setimmediate "^1.0.5" +event-stream@=3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" + integrity sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g== + dependencies: + duplexer "~0.1.1" + from "~0" + map-stream "~0.1.0" + pause-stream "0.0.11" + split "0.3" + stream-combiner "~0.0.4" + through "~2.3.1" + eventemitter3@^4.0.7: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" @@ -733,6 +752,21 @@ evp_bytestokey@^1.0.3: md5.js "^1.3.4" safe-buffer "^5.1.1" +execa@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + eyes@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" @@ -763,18 +797,21 @@ find-up@5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -find@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/find/-/find-0.3.0.tgz#4082e8fc8d8320f1a382b5e4f521b9bc50775cb8" - integrity sha512-iSd+O4OEYV/I36Zl8MdYJO0xD82wH528SaCieTVHhclgiYNe9y+yPKSwK+A7/WsmHL1EZ+pYUJBXWTL5qofksw== - dependencies: - traverse-chain "~0.1.0" - flat@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== +follow-redirects@^1.14.0: + version "1.15.1" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" + integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== + +from@~0: + version "0.1.7" + resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" + integrity sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g== + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -795,6 +832,11 @@ get-func-name@^2.0.0: resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -855,7 +897,12 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -ieee754@^1.2.1: +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -907,6 +954,11 @@ is-plain-obj@^2.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + is-unicode-supported@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" @@ -943,6 +995,17 @@ jayson@^3.4.4: uuid "^8.3.2" ws "^7.4.5" +joi@^17.4.0: + version "17.6.0" + resolved "https://registry.yarnpkg.com/joi/-/joi-17.6.0.tgz#0bb54f2f006c09a96e75ce687957bd04290054b2" + integrity sha512-OX5dG6DTbcr/kbMFj0KGYxuew69HPcAE3K/sZpEV2nP6e/j/C0HV+HNiBPCASxdx5T7DMoa0s8UeHWMnb6n2zw== + dependencies: + "@hapi/hoek" "^9.0.0" + "@hapi/topo" "^5.0.0" + "@sideway/address" "^4.1.3" + "@sideway/formula" "^3.0.0" + "@sideway/pinpoint" "^2.0.0" + js-sha256@^0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/js-sha256/-/js-sha256-0.9.0.tgz#0b89ac166583e91ef9123644bd3c5334ce9d0966" @@ -986,6 +1049,11 @@ keccak@^3.0.0: node-gyp-build "^4.2.0" readable-stream "^3.6.0" +lazy-ass@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/lazy-ass/-/lazy-ass-1.6.0.tgz#7999655e8646c17f089fdd187d150d3324d54513" + integrity sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw== + locate-path@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" @@ -993,7 +1061,7 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" -lodash@^4.17.20: +lodash@^4.17.20, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -1018,6 +1086,11 @@ make-error@^1.1.1: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== +map-stream@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194" + integrity sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g== + md5.js@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" @@ -1027,6 +1100,16 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -1127,15 +1210,22 @@ node-gyp-build@^4.2.0: integrity sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q== node-gyp-build@^4.3.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.4.0.tgz#42e99687ce87ddeaf3a10b99dc06abc11021f3f4" - integrity sha512-amJnQCcgtRVw9SvoebO3BKGESClrfXGCUTX9hSn1OuGQTQBOZmVd0Z0OlecpuRksKvbsUqALE8jls/ErClAPuQ== + version "4.5.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.5.0.tgz#7a64eefa0b21112f89f58379da128ac177f20e40" + integrity sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg== normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -1143,6 +1233,13 @@ once@^1.3.0: dependencies: wrappy "1" +onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + p-limit@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" @@ -1172,11 +1269,23 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + pathval@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== +pause-stream@0.0.11: + version "0.0.11" + resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" + integrity sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A== + dependencies: + through "~2.3" + pbkdf2@^3.0.17: version "3.1.2" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" @@ -1198,6 +1307,18 @@ prettier@^2.5.1: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a" integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg== +ps-tree@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.2.0.tgz#5e7425b89508736cdd4f2224d028f7bb3f722ebd" + integrity sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA== + dependencies: + event-stream "=3.3.4" + +punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -1205,6 +1326,13 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" +react-native-url-polyfill@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/react-native-url-polyfill/-/react-native-url-polyfill-1.3.0.tgz#c1763de0f2a8c22cc3e959b654c8790622b6ef6a" + integrity sha512-w9JfSkvpqqlix9UjDvJjm1EjSt652zVQ6iwCIj1cVVkwXf4jQhQgTNXY6EVTwuAmUjg6BC6k9RHCBynoLFo3IQ== + dependencies: + whatwg-url-without-unicode "8.0.0-3" + readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" @@ -1239,7 +1367,7 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -rpc-websockets@^7.4.2: +rpc-websockets@^7.5.0: version "7.5.0" resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-7.5.0.tgz#bbeb87572e66703ff151e50af1658f98098e2748" integrity sha512-9tIRi1uZGy7YmDjErf1Ax3wtqdSSLIlnmL5OtOzgd5eqPKbsPpwDP5whUDO2LQay3Xp0CcHlcNSGzacNRluBaQ== @@ -1252,6 +1380,13 @@ rpc-websockets@^7.4.2: bufferutil "^4.0.1" utf-8-validate "^5.0.2" +rxjs@^7.1.0: + version "7.5.6" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.6.tgz#0446577557862afd6903517ce7cae79ecb9662bc" + integrity sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw== + dependencies: + tslib "^2.1.0" + safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -1300,6 +1435,23 @@ sha.js@^2.4.0, sha.js@^2.4.8: inherits "^2.0.1" safe-buffer "^5.0.1" +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +signal-exit@^3.0.3: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + snake-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c" @@ -1321,6 +1473,33 @@ source-map@^0.6.0: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== +split@0.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f" + integrity sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA== + dependencies: + through "2" + +start-server-and-test@^1.14.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/start-server-and-test/-/start-server-and-test-1.14.0.tgz#c57f04f73eac15dd51733b551d775b40837fdde3" + integrity sha512-on5ELuxO2K0t8EmNj9MtVlFqwBMxfWOhu4U7uZD1xccVpFlOQKR93CSe0u98iQzfNxRyaNTb/CdadbNllplTsw== + dependencies: + bluebird "3.7.2" + check-more-types "2.24.0" + debug "4.3.2" + execa "5.1.1" + lazy-ass "1.6.0" + ps-tree "1.2.0" + wait-on "6.0.0" + +stream-combiner@~0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" + integrity sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw== + dependencies: + duplexer "~0.1.1" + string-width@^4.1.0, string-width@^4.2.0: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -1349,6 +1528,11 @@ strip-bom@^3.0.0: resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + strip-json-comments@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" @@ -1359,6 +1543,11 @@ superstruct@^0.14.2: resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.14.2.tgz#0dbcdf3d83676588828f1cf5ed35cda02f59025b" integrity sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ== +superstruct@^0.15.4: + version "0.15.5" + resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.15.5.tgz#0f0a8d3ce31313f0d84c6096cd4fa1bfdedc9dab" + integrity sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ== + supports-color@8.1.1: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" @@ -1378,7 +1567,7 @@ text-encoding-utf-8@^1.0.2: resolved "https://registry.yarnpkg.com/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz#585b62197b0ae437e3c7b5d0af27ac1021e10d13" integrity sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg== -"through@>=2.2.7 <3": +through@2, "through@>=2.2.7 <3", through@~2.3, through@~2.3.1: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== @@ -1400,11 +1589,6 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -traverse-chain@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/traverse-chain/-/traverse-chain-0.1.0.tgz#61dbc2d53b69ff6091a12a168fd7d433107e40f1" - integrity sha1-YdvC1Ttp/2CRoSoWj9fUMxB+QPE= - ts-mocha@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/ts-mocha/-/ts-mocha-8.0.0.tgz#962d0fa12eeb6468aa1a6b594bb3bbc818da3ef0" @@ -1438,7 +1622,7 @@ tsconfig-paths@^3.5.0: minimist "^1.2.0" strip-bom "^3.0.0" -tslib@^2.0.3: +tslib@^2.0.3, tslib@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== @@ -1475,20 +1659,45 @@ uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== +wait-on@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-6.0.0.tgz#7e9bf8e3d7fe2daecbb7a570ac8ca41e9311c7e7" + integrity sha512-tnUJr9p5r+bEYXPUdRseolmz5XqJTTj98JgOsfBn7Oz2dxfE2g3zw1jE+Mo8lopM3j3et/Mq1yW7kKX6qw7RVw== + dependencies: + axios "^0.21.1" + joi "^17.4.0" + lodash "^4.17.21" + minimist "^1.2.5" + rxjs "^7.1.0" + webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +webidl-conversions@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" + integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== + +whatwg-url-without-unicode@8.0.0-3: + version "8.0.0-3" + resolved "https://registry.yarnpkg.com/whatwg-url-without-unicode/-/whatwg-url-without-unicode-8.0.0-3.tgz#ab6df4bf6caaa6c85a59f6e82c026151d4bb376b" + integrity sha512-HoKuzZrUlgpz35YO27XgD28uh/WJH4B0+3ttFqRo//lmq+9T/mIOJ6kqmINI9HpUpz1imRC/nR/lxKpJiv0uig== + dependencies: + buffer "^5.4.3" + punycode "^2.1.1" + webidl-conversions "^5.0.0" whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== dependencies: tr46 "~0.0.3" webidl-conversions "^3.0.0" -which@2.0.2: +which@2.0.2, which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== @@ -1515,14 +1724,14 @@ wrappy@1: integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= ws@^7.4.5: - version "7.5.8" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.8.tgz#ac2729881ab9e7cbaf8787fe3469a48c5c7f636a" - integrity sha512-ri1Id1WinAX5Jqn9HejiGb8crfRio0Qgu8+MtL36rlTA6RLsMdWt1Az/19A2Qij6uSHUMphEFaTKa4WG+UNHNw== + version "7.5.9" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" + integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== ws@^8.5.0: - version "8.8.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.8.0.tgz#8e71c75e2f6348dbf8d78005107297056cb77769" - integrity sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ== + version "8.8.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.8.1.tgz#5dbad0feb7ade8ecc99b830c1d77c913d4955ff0" + integrity sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA== y18n@^5.0.5: version "5.0.8" diff --git a/gauntlet/packages/gauntlet-serum-multisig/package.json b/gauntlet/packages/gauntlet-serum-multisig/package.json index 09922cbd3..6ed0551c5 100644 --- a/gauntlet/packages/gauntlet-serum-multisig/package.json +++ b/gauntlet/packages/gauntlet-serum-multisig/package.json @@ -27,7 +27,7 @@ "dependencies": { "@chainlink/gauntlet-core": "0.1.2", "@chainlink/gauntlet-solana": "*", - "@project-serum/anchor": "^0.23.0", - "@solana/web3.js": "^1.31.0" + "@project-serum/anchor": "^0.25.0", + "@solana/web3.js": "^1.50.1" } } diff --git a/gauntlet/packages/gauntlet-serum-multisig/src/commands/multisig.ts b/gauntlet/packages/gauntlet-serum-multisig/src/commands/multisig.ts index 40516f470..17c94b144 100644 --- a/gauntlet/packages/gauntlet-serum-multisig/src/commands/multisig.ts +++ b/gauntlet/packages/gauntlet-serum-multisig/src/commands/multisig.ts @@ -79,7 +79,7 @@ export const wrapCommand = (command) => { const msigState = await this.fetchMultisigState(this.multisigAddress) const proposalState = await this.fetchProposalState(proposal, msigState) - await this.inspectProposalState(msigState, proposalState) + this.inspectProposalState(msigState, proposalState) return { responses: [ { @@ -194,7 +194,7 @@ export const wrapCommand = (command) => { fetchMultisigState = async (address: PublicKey): Promise => { try { - const state = await this.program.account.multisig.fetch(address) + const state = (await this.program.account.multisig.fetch(address)) as any return { threshold: new BN(state.threshold).toNumber(), owners: state.owners.map((owner) => new PublicKey(owner)), @@ -210,7 +210,7 @@ export const wrapCommand = (command) => { multisigState: MultisigState, ): Promise => { try { - const state = await this.program.account.transaction.fetch(proposal) + const state = (await this.program.account.transaction.fetch(proposal)) as any return { id: proposal, data: Buffer.from(state.data), @@ -244,7 +244,7 @@ export const wrapCommand = (command) => { const proposal = Keypair.generate() logger.loading(`Creating Multisig Proposal account at ${proposal.publicKey.toString()}...`) const txSize = 1300 // Space enough - const proposalInstruction = await SystemProgram.createAccount({ + const proposalInstruction = SystemProgram.createAccount({ fromPubkey: this.wallet.publicKey, newAccountPubkey: proposal.publicKey, space: txSize, @@ -263,31 +263,30 @@ export const wrapCommand = (command) => { ): Promise => { logger.loading(`Generating Multisig Proposal CREATION data for ${command.id}`) - const tx = this.program.instruction.createTransaction( - context.rawTx.programId, - context.rawTx.keys, - context.rawTx.data, - { + const tx = await this.program.methods + .createTransaction(context.rawTx.programId, context.rawTx.keys, context.rawTx.data) + .accounts({ accounts: { multisig: this.multisigAddress, transaction: proposal, proposer: signer, }, - }, - ) + }) + .instruction() return [tx] } approveProposal: ProposalAction = async (proposal: PublicKey, signer): Promise => { logger.loading(`Generating Multisig Proposal APPROVAL data for ${command.id}`) - const tx = this.program.instruction.approve({ - accounts: { + const tx = await this.program.methods + .approve() + .accounts({ multisig: this.multisigAddress, transaction: proposal, owner: signer, - }, - }) + }) + .instruction() return [tx] } @@ -306,14 +305,15 @@ export const wrapCommand = (command) => { isSigner: false, }) - const tx = this.program.instruction.executeTransaction({ - accounts: { + const tx = await this.program.methods + .executeTransaction() + .accounts({ multisig: this.multisigAddress, transaction: proposal, multisigSigner: context.multisigSigner, - }, - remainingAccounts, - }) + }) + .remainingAccounts(remainingAccounts) + .instruction() return [tx] } diff --git a/gauntlet/packages/gauntlet-serum-multisig/src/commands/setOwners.ts b/gauntlet/packages/gauntlet-serum-multisig/src/commands/setOwners.ts index 88da41362..f942b2898 100644 --- a/gauntlet/packages/gauntlet-serum-multisig/src/commands/setOwners.ts +++ b/gauntlet/packages/gauntlet-serum-multisig/src/commands/setOwners.ts @@ -23,12 +23,13 @@ export default class SetOwners extends SolanaCommand { logger.info(`Generating data for new owners: ${owners.map((o) => o.toString())}`) - const ix = program.instruction.setOwners(owners, { - accounts: { + const ix = await program.methods + .setOwners(owners) + .accounts({ multisig: multisigAddress, multisigSigner: signer, - }, - }) + }) + .instruction() return [ix] } diff --git a/gauntlet/packages/gauntlet-serum-multisig/src/commands/setThreshold.ts b/gauntlet/packages/gauntlet-serum-multisig/src/commands/setThreshold.ts index e06d12380..477d0fabf 100644 --- a/gauntlet/packages/gauntlet-serum-multisig/src/commands/setThreshold.ts +++ b/gauntlet/packages/gauntlet-serum-multisig/src/commands/setThreshold.ts @@ -24,12 +24,13 @@ export default class SetThreshold extends SolanaCommand { const threshold = new BN(this.flags.threshold) logger.info(`Generating data for new threshold: ${threshold.toNumber()}`) - const ix = program.instruction.changeThreshold(threshold, { - accounts: { + const ix = await program.methods + .changeThreshold(threshold) + .accounts({ multisig: multisigAddress, multisigSigner: signer, - }, - }) + }) + .instruction() return [ix] } diff --git a/gauntlet/packages/gauntlet-solana-contracts/artifacts/schemas/ocr2.json b/gauntlet/packages/gauntlet-solana-contracts/artifacts/schemas/ocr2.json index 3fcd087e2..a497d5053 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/artifacts/schemas/ocr2.json +++ b/gauntlet/packages/gauntlet-solana-contracts/artifacts/schemas/ocr2.json @@ -31,11 +31,6 @@ "isMut": false, "isSigner": false }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, { "name": "owner", "isMut": false, @@ -48,7 +43,7 @@ }, { "name": "tokenVault", - "isMut": true, + "isMut": false, "isSigner": false }, { @@ -65,26 +60,6 @@ "name": "billingAccessController", "isMut": false, "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "associatedTokenProgram", - "isMut": false, - "isSigner": false } ], "args": [ @@ -111,6 +86,11 @@ "isMut": true, "isSigner": false }, + { + "name": "tokenReceiver", + "isMut": true, + "isSigner": false + }, { "name": "authority", "isMut": false, @@ -268,6 +248,11 @@ "isMut": true, "isSigner": false }, + { + "name": "tokenReceiver", + "isMut": true, + "isSigner": false + }, { "name": "authority", "isMut": false, @@ -343,12 +328,6 @@ { "name": "tokenMint", "type": "publicKey" - }, - { - "name": "payees", - "type": { - "vec": "publicKey" - } } ] }, @@ -433,6 +412,11 @@ "isMut": false, "isSigner": false }, + { + "name": "tokenReceiver", + "isMut": true, + "isSigner": false + }, { "name": "tokenVault", "isMut": true, @@ -560,6 +544,11 @@ "isMut": false, "isSigner": false }, + { + "name": "tokenReceiver", + "isMut": true, + "isSigner": false + }, { "name": "tokenVault", "isMut": true, diff --git a/gauntlet/packages/gauntlet-solana-contracts/package.json b/gauntlet/packages/gauntlet-solana-contracts/package.json index 0a51f4831..e091e09a6 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/package.json +++ b/gauntlet/packages/gauntlet-solana-contracts/package.json @@ -29,8 +29,8 @@ "@chainlink/gauntlet-solana": "*", "@chainlink/gauntlet-serum-multisig": "*", "@ethersproject/keccak256": "^5.5.0", - "@solana/spl-token": "^0.1.8", - "@solana/web3.js": "^1.31.0", + "@solana/spl-token": "^0.2.0", + "@solana/web3.js": "^1.50.1", "protobufjs": "^6.11.2" } } diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/abstract/close.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/abstract/close.ts index 5d4cbaa58..d2ae75cd1 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/abstract/close.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/abstract/close.ts @@ -35,14 +35,14 @@ export default abstract class Close extends SolanaCommand { `Preparing instruction to close account from ${this.contractId} contract with address ${state.toString()}`, ) - const ix = program.instruction[closeFunction]({ - accounts: { + const ix = await program.methods[closeFunction]() + .accounts({ receiver: signer, authority: signer, ...extraAccounts, - }, - remainingAccounts, - }) + }) + .remainingAccounts(remainingAccounts) + .instruction() return [ix] } diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/abstract/upgrade.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/abstract/upgrade.ts index 9868842e6..1044dca99 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/abstract/upgrade.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/abstract/upgrade.ts @@ -65,7 +65,7 @@ export const makeUpgradeProgramCommand = (contractId: CONTRACT_LIST): SolanaCons const rawTx = await makeRawUpgradeTransaction(this.wallet.payer.publicKey, contractId, this.flags.buffer) await prompt(`Continue upgrading the ${contractId} program?`) logger.loading('Upgrading program...') - const txhash = await this.provider.send(utils.makeTx(rawTx), [this.wallet.payer]) + const txhash = await this.provider.sendAndConfirm(utils.makeTx(rawTx), [this.wallet.payer]) logger.success(`Program upgraded on tx ${txhash}`) return { responses: [ diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/accessController/read.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/accessController/read.ts index 75fa61e6d..773709d1e 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/accessController/read.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/accessController/read.ts @@ -19,7 +19,7 @@ export default class ReadState extends SolanaCommand { const state = new PublicKey(this.flags.state) // read could be abstract. account.accessController is just the name of the account that can be got form the camelcase(schema.accounts[x].name) - const data = await program.account.accessController.fetch(state) + const data = (await program.account.accessController.fetch(state)) as any console.log(` - Owner: ${new PublicKey(data.owner).toString()} diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/close.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/close.ts index 808c03866..8192ee197 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/close.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/close.ts @@ -1,4 +1,4 @@ -import { TOKEN_PROGRAM_ID } from '@solana/spl-token' +import { getOrCreateAssociatedTokenAccount, TOKEN_PROGRAM_ID } from '@solana/spl-token' import { utils } from '@project-serum/anchor' import { PublicKey } from '@solana/web3.js' import { CONTRACT_LIST, getContract } from '../../../lib/contracts' @@ -21,7 +21,15 @@ export default class extends Close { const program = this.loadProgram(contract.idl, contract.programId.toString()) const address = new PublicKey(this.args[0]) - const { config, oracles } = await program.account.state.fetch(address) + const linkPublicKey = new PublicKey(this.flags.link || process.env.LINK) + const tokenRecipient = await getOrCreateAssociatedTokenAccount( + this.provider.connection, + this.wallet.payer, + linkPublicKey, + this.provider.wallet.publicKey, + true, + ) + const { config, oracles } = (await program.account.state.fetch(address)) as any const [vaultAuthority] = await PublicKey.findProgramAddress( [Buffer.from(utils.bytes.utf8.encode('vault')), address.toBuffer()], program.programId, @@ -32,6 +40,7 @@ export default class extends Close { .map((oracle) => ({ pubkey: oracle.payee, isWritable: true, isSigner: false })) const extraAccounts = { + tokenRecipient: tokenRecipient.address, tokenVault: config.tokenVault, vaultAuthority, tokenProgram: TOKEN_PROGRAM_ID, diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/fund.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/fund.ts index 542b2b897..3a5d85905 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/fund.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/fund.ts @@ -1,7 +1,7 @@ import { Result } from '@chainlink/gauntlet-core' import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana' import { PublicKey } from '@solana/web3.js' -import { ASSOCIATED_TOKEN_PROGRAM_ID, Token, TOKEN_PROGRAM_ID } from '@solana/spl-token' +import { getAssociatedTokenAddress, transfer } from '@solana/spl-token' import { CONTRACT_LIST, getContract } from '../../../lib/contracts' import { logger, BN } from '@chainlink/gauntlet-core/dist/utils' @@ -28,22 +28,22 @@ export default class Fund extends SolanaCommand { const linkPublicKey = new PublicKey(this.flags.link || process.env.LINK) // Resolve the tokenVault from the aggregator state account - const stateAccount = await program.account.state.fetch(state) + const stateAccount = (await program.account.state.fetch(state)) as any const tokenVault = stateAccount.config.tokenVault const tokenMint = stateAccount.config.tokenMint this.require(tokenMint.equals(linkPublicKey), 'LINK does not match aggregator.config.tokenMint') - const token = new Token(this.provider.connection, linkPublicKey, TOKEN_PROGRAM_ID, this.wallet.payer) - - const from = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - token.publicKey, - this.wallet.publicKey, - ) + const from = await getAssociatedTokenAddress(linkPublicKey, this.wallet.publicKey) logger.loading(`Transferring ${amount} tokens to ${state.toString()} token vault ${tokenVault.toString()}...`) - const tx = await token.transfer(from, tokenVault, this.wallet.payer, [], amount.toNumber()) + const tx = await transfer( + this.provider.connection, + this.wallet.payer, + from, + tokenVault, + this.wallet.payer, + amount.toNumber(), + ) return { responses: [ diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/initialize.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/initialize.ts index a601dc0ae..fca5896e1 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/initialize.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/initialize.ts @@ -1,7 +1,7 @@ import { Result } from '@chainlink/gauntlet-core' import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana' -import { Keypair, PublicKey, TransactionInstruction, SystemProgram, SYSVAR_RENT_PUBKEY } from '@solana/web3.js' -import { ASSOCIATED_TOKEN_PROGRAM_ID, Token, TOKEN_PROGRAM_ID } from '@solana/spl-token' +import { Keypair, PublicKey, TransactionInstruction, SystemProgram } from '@solana/web3.js' +import { getOrCreateAssociatedTokenAccount } from '@solana/spl-token' import { CONTRACT_LIST, getContract } from '../../../lib/contracts' import { utils } from '@project-serum/anchor' import { logger, BN, prompt } from '@chainlink/gauntlet-core/dist/utils' @@ -64,42 +64,40 @@ export default class Initialize extends SolanaCommand { const maxAnswer = new BN(input.maxAnswer) const transmissions = new PublicKey(input.transmissions) - const tokenVault = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - linkPublicKey, - vaultAuthority, - true, - ) + const tokenVault = ( + await getOrCreateAssociatedTokenAccount( + this.provider.connection, + this.wallet.payer, + linkPublicKey, + vaultAuthority, + true, + ) + ).address - const tx = program.instruction.initialize(minAnswer, maxAnswer, { - accounts: { + const tx = await program.methods + .initialize(minAnswer, maxAnswer) + .accounts({ state, feed: transmissions, - payer: signer, owner: signer, tokenMint: linkPublicKey, tokenVault, vaultAuthority, requesterAccessController, billingAccessController, - rent: SYSVAR_RENT_PUBKEY, - systemProgram: SystemProgram.programId, - tokenProgram: TOKEN_PROGRAM_ID, - associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID, - }, - }) + }) + .instruction() console.log(` STATE ACCOUNTS: - State: ${state?.toString()} - Transmissions: ${transmissions} - - Payer: ${this.provider.wallet.publicKey} + - Payer: ${this.wallet.publicKey} - Owner: ${signer.toString()} `) const defaultAccountSize = new BN(program.account.state.size) - const feedCreationInstruction = await SystemProgram.createAccount({ + const feedCreationInstruction = SystemProgram.createAccount({ fromPubkey: signer, newAccountPubkey: state, space: defaultAccountSize.toNumber(), diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/inspection/inspect.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/inspection/inspect.ts index cd32a7592..3ba82c1dd 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/inspection/inspect.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/inspection/inspect.ts @@ -82,7 +82,7 @@ export default class OCR2Inspect extends SolanaCommand { makeFeedInspections = async (bufferedInfo: Keypair, input: Input): Promise => { const store = getContract(CONTRACT_LIST.STORE, '') const storeProgram = this.loadProgram(store.idl, store.programId.toString()) - const account = await storeProgram.account.description.fetch(bufferedInfo.publicKey) + const account = (await storeProgram.account.description.fetch(bufferedInfo.publicKey)) as any return [ inspection.makeInspection( // Description comes with some empty bytes @@ -142,7 +142,7 @@ export default class OCR2Inspect extends SolanaCommand { const ocr2program = this.loadProgram(ocr2.idl, ocr2.programId.toString()) const state = new PublicKey(this.args[0]) - const onChainState = await ocr2program.account.state.fetch(state) + const onChainState = (await ocr2program.account.state.fetch(state)) as any // Get balance const balance = await this.provider.connection.getBalance(state) diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/inspection/inspectResponses.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/inspection/inspectResponses.ts index c6e7cefcb..096965bae 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/inspection/inspectResponses.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/inspection/inspectResponses.ts @@ -95,7 +95,7 @@ export default class OCR2InspectResponses extends SolanaCommand { const state = new PublicKey(this.args[0]) const input = this.makeInput(this.flags.input) - const onChainState = await program.account.state.fetch(state) + const onChainState = (await program.account.state.fetch(state)) as any logger.info( `Latest Config: diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposal/acceptProposal.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposal/acceptProposal.ts index 51cc74e93..64b42be96 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposal/acceptProposal.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposal/acceptProposal.ts @@ -3,7 +3,7 @@ import { createHash } from 'crypto' import { logger, prompt, BN } from '@chainlink/gauntlet-core/dist/utils' import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana' import { PublicKey } from '@solana/web3.js' -import { TOKEN_PROGRAM_ID } from '@solana/spl-token' +import { getOrCreateAssociatedTokenAccount, TOKEN_PROGRAM_ID } from '@solana/spl-token' import { utils } from '@project-serum/anchor' import { CONTRACT_LIST, getContract } from '../../../../lib/contracts' import ProposeOffchainConfig, { OffchainConfig } from '../proposeOffchainConfig' @@ -111,7 +111,7 @@ export default class AcceptProposal extends SolanaCommand { makeContractInput = async (input: Input): Promise => { const state = new PublicKey(this.args[0]) - const contractState = await this.program.account.state.fetch(state) + const contractState = (await this.program.account.state.fetch(state)) as any const offchainDigest = this.calculateProposalDigest( await this.makeDigestInput(input, new PublicKey(contractState.config.tokenMint)), ) @@ -209,25 +209,36 @@ export default class AcceptProposal extends SolanaCommand { } makeRawTransaction = async (signer: PublicKey) => { - const tx = this.program.instruction.acceptProposal(this.contractInput.offchainDigest, { - accounts: { + const linkPublicKey = new PublicKey(this.flags.link || process.env.LINK) + const tokenRecipient = await getOrCreateAssociatedTokenAccount( + this.provider.connection, + this.wallet.payer, + linkPublicKey, + this.provider.wallet.publicKey, + true, + ) + + const tx = await this.program.methods + .acceptProposal(this.contractInput.offchainDigest) + .accounts({ state: new PublicKey(this.args[0]), proposal: new PublicKey(this.input.proposalId), receiver: signer, authority: signer, + tokenRecipient: tokenRecipient.address, tokenVault: this.contractInput.tokenVault, vaultAuthority: this.contractInput.vaultAuthority, tokenProgram: TOKEN_PROGRAM_ID, - }, - remainingAccounts: this.contractInput.payees, - }) + }) + .remainingAccounts(this.contractInput.payees) + .instruction() return [tx] } beforeExecute = async () => { - const contractState = await this.program.account.state.fetch(new PublicKey(this.args[0])) - const proposalState = await this.program.account.proposal.fetch(new PublicKey(this.input.proposalId)) + const contractState = (await this.program.account.state.fetch(new PublicKey(this.args[0]))) as any + const proposalState = (await this.program.account.proposal.fetch(new PublicKey(this.input.proposalId))) as any const [contractConfig, proposalConfig] = [contractState, proposalState].map((state) => { const oracles = state.oracles?.xs.slice(0, state.oracles.len.toNumber()) diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposal/createProposal.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposal/createProposal.ts index 310a854ba..c217c50a6 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposal/createProposal.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposal/createProposal.ts @@ -26,12 +26,13 @@ export default class CreateProposal extends SolanaCommand { logger.log('Generating data for creating config proposal') logger.log('Config Proposal state will be at:', proposal.toString()) - const createIx = await program.instruction.createProposal(version, { - accounts: { + const createIx = await program.methods + .createProposal(version) + .accounts({ proposal: proposal, authority: signer, - }, - }) + }) + .instruction() const defaultAccountSize = new BN(program.account.proposal.size) const createAccountIx = SystemProgram.createAccount({ fromPubkey: signer, diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposal/finalizeProposal.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposal/finalizeProposal.ts index f37f82b30..cc446961e 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposal/finalizeProposal.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposal/finalizeProposal.ts @@ -25,12 +25,13 @@ export default class FinalizeProposal extends SolanaCommand { const proposalId = this.flags.proposalId || this.flags.configProposal const proposal = new PublicKey(proposalId) - const finalizeIx = program.instruction.finalizeProposal({ - accounts: { + const finalizeIx = await program.methods + .finalizeProposal() + .accounts({ proposal: proposal, authority: signer, - }, - }) + }) + .instruction() return [finalizeIx] } diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposeConfig.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposeConfig.ts index 43723ccef..a73d54148 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposeConfig.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposeConfig.ts @@ -82,19 +82,20 @@ export default class ProposeConfig extends SolanaCommand { `Oracles max length is ${ORACLES_MAX_LENGTH}, currently ${oracles.length}`, ) - const ix = this.program.instruction.proposeConfig(oracles, f, { - accounts: { + const ix = await this.program.methods + .proposeConfig(oracles, f) + .accounts({ proposal, authority: signer, - }, - }) + }) + .instruction() return [ix] } beforeExecute = async () => { const state = new PublicKey(this.args[0]) - const contractState = await this.program.account.state.fetch(state) + const contractState = (await this.program.account.state.fetch(state)) as any // Prepare contract config const contractOracles = contractState.oracles?.xs.slice(0, contractState.oracles.len.toNumber()) diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposeOffchainConfig.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposeOffchainConfig.ts index 78ce4dcb9..cc0e5afd0 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposeOffchainConfig.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposeOffchainConfig.ts @@ -234,13 +234,16 @@ export default class ProposeOffchainConfig extends SolanaCommand { ) } - const ixs = offchainConfigChunks.map((buffer) => - this.program.instruction.writeOffchainConfig(buffer, { - accounts: { - proposal: proposal, - authority: signer, - }, - }), + const ixs = await Promise.all( + offchainConfigChunks.map((buffer) => + this.program.methods + .writeOffchainConfig(buffer) + .accounts({ + proposal: proposal, + authority: signer, + }) + .instruction(), + ), ) return ixs @@ -257,7 +260,7 @@ export default class ProposeOffchainConfig extends SolanaCommand { beforeExecute = async () => { const state = new PublicKey(this.args[0]) - const contractState = await this.program.account.state.fetch(state) + const contractState = (await this.program.account.state.fetch(state)) as any // Config in contract const contractOffchainConfig = deserializeConfig( diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposePayees.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposePayees.ts index a1c0333b4..bb4419c9c 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposePayees.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/proposePayees.ts @@ -2,7 +2,7 @@ import { Result } from '@chainlink/gauntlet-core' import { logger, prompt } from '@chainlink/gauntlet-core/dist/utils' import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana' import { PublicKey } from '@solana/web3.js' -import { Token, TOKEN_PROGRAM_ID } from '@solana/spl-token' +import { getAccount } from '@solana/spl-token' import { CONTRACT_LIST, getContract } from '../../../lib/contracts' import RDD from '../../../lib/rdd' import { printDiff } from '../../../lib/diff' @@ -80,8 +80,8 @@ export default class ProposePayees extends SolanaCommand { buildCommand = async (flags, args) => { const ocr2 = getContract(CONTRACT_LIST.OCR_2, '') this.program = this.loadProgram(ocr2.idl, ocr2.programId.toString()) - this.input = await this.makeInput(flags.input) - this.contractInput = await this.makeContractInput(this.input) + this.input = this.makeInput(flags.input) + this.contractInput = this.makeContractInput(this.input) return this } @@ -89,16 +89,11 @@ export default class ProposePayees extends SolanaCommand { makeRawTransaction = async (signer: PublicKey) => { const link = new PublicKey(this.flags.link || process.env.LINK) - const token = new Token(this.provider.connection, link, TOKEN_PROGRAM_ID, { - publicKey: signer, - secretKey: Buffer.from([]), - }) - const areValidPayees = ( await Promise.all( Object.entries(this.contractInput.payeeByTransmitter).map(async ([transmitter, payee]) => { try { - const info = await token.getAccountInfo(new PublicKey(payee)) + const info = await getAccount(this.provider.connection, payee) return !!info.address } catch (e) { logger.error(`Payee with address ${payee} does not have a valid Token recipient address`) @@ -116,25 +111,30 @@ export default class ProposePayees extends SolanaCommand { // Set the payees in the same order the oracles are saved in the proposal // The length of the payees need to be same as the oracles saved const proposal = new PublicKey(this.input.proposalId) - const proposalInfo = await this.program.account.proposal.fetch(proposal) - const payees = proposalInfo.oracles.xs - .slice(0, proposalInfo.oracles.len) - .map(({ transmitter }) => this.contractInput.payeeByTransmitter[transmitter.toString()]) + const proposalInfo = (await this.program.account.proposal.fetch(proposal)) as any + const payees = proposalInfo.oracles.xs.slice(0, proposalInfo.oracles.len).map(({ transmitter }) => ({ + pubkey: this.contractInput.payeeByTransmitter[transmitter.toString()], + isWritable: true, + isSigner: false, + })) - const ix = this.program.instruction.proposePayees(token.publicKey, payees, { - accounts: { + const ix = await this.program.methods + .proposePayees(link) + .accounts({ proposal, authority: signer, - }, - }) + }) + .remainingAccounts(payees) + .instruction() + return [ix] } beforeExecute = async () => { const state = new PublicKey(this.args[0]) const proposal = new PublicKey(this.input.proposalId) - const contractState = await this.program.account.state.fetch(state) - const proposalState = await this.program.account.proposal.fetch(proposal) + const contractState = (await this.program.account.state.fetch(state)) as any + const proposalState = (await this.program.account.proposal.fetch(proposal)) as any const payeesInContract = { oracles: contractState.oracles.xs diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/read.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/read.ts index 351e9b93e..a40b7bf0e 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/read.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/read.ts @@ -31,7 +31,7 @@ export default class ReadState extends SolanaCommand { const state = new PublicKey(this.args[0]) // read could be abstract. account.accessController is just the name of the account that can be got form the camelcase(schema.accounts[x].name) - const data = await program.account.state.fetch(state) + const data = (await program.account.state.fetch(state)) as any console.log('OWNER:', new PublicKey(data.config.owner).toString()) console.log('DATA:', data) diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/setBilling.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/setBilling.ts index 93c84be02..fc1cd5f51 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/setBilling.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/setBilling.ts @@ -1,7 +1,7 @@ import { Result } from '@chainlink/gauntlet-core' import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana' import { PublicKey } from '@solana/web3.js' -import { TOKEN_PROGRAM_ID } from '@solana/spl-token' +import { getOrCreateAssociatedTokenAccount, TOKEN_PROGRAM_ID } from '@solana/spl-token' import { utils } from '@project-serum/anchor' import { logger, BN, prompt } from '@chainlink/gauntlet-core/dist/utils' import { CONTRACT_LIST, getContract } from '../../../lib/contracts' @@ -57,7 +57,16 @@ export default class SetBilling extends SolanaCommand { makeRawTransaction = async (signer: PublicKey) => { const state = new PublicKey(this.args[0]) - const info = await this.program.account.state.fetch(state) + const info = (await this.program.account.state.fetch(state)) as any + + const linkPublicKey = new PublicKey(this.flags.link || process.env.LINK) + const tokenRecipient = await getOrCreateAssociatedTokenAccount( + this.provider.connection, + this.wallet.payer, + linkPublicKey, + this.provider.wallet.publicKey, + true, + ) const tokenVault = new PublicKey(info.config.tokenVault) const [vaultAuthority] = await PublicKey.findProgramAddress( [Buffer.from(utils.bytes.utf8.encode('vault')), state.toBuffer()], @@ -68,21 +77,19 @@ export default class SetBilling extends SolanaCommand { .map((oracle) => ({ pubkey: oracle.payee, isWritable: true, isSigner: false })) const billingAC = new PublicKey(info.config.billingAccessController) - const data = this.program.instruction.setBilling( - new BN(this.input.observationPaymentGjuels), - new BN(this.input.transmissionPaymentGjuels), - { - accounts: { - state, - authority: signer, - accessController: billingAC, - tokenVault: tokenVault, - vaultAuthority: vaultAuthority, - tokenProgram: TOKEN_PROGRAM_ID, - }, - remainingAccounts: payees, - }, - ) + const data = await this.program.methods + .setBilling(new BN(this.input.observationPaymentGjuels), new BN(this.input.transmissionPaymentGjuels)) + .accounts({ + state, + authority: signer, + accessController: billingAC, + tokenRecipient: tokenRecipient.address, + tokenVault: tokenVault, + vaultAuthority: vaultAuthority, + tokenProgram: TOKEN_PROGRAM_ID, + }) + .remainingAccounts(payees) + .instruction() return [data] } diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/setBillingAccessController.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/setBillingAccessController.ts index 7fb209c48..4efda01af 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/setBillingAccessController.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/setBillingAccessController.ts @@ -26,7 +26,7 @@ export default class SetBillingAccessController extends SolanaCommand { const state = new PublicKey(this.args[0]) const ac = new PublicKey(this.flags.accessController) - const info = await program.account.state.fetch(state) + const info = (await program.account.state.fetch(state)) as any const oldAC = info.config.billingAccessController logger.log(`Access controller information: diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/setRequesterAccessController.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/setRequesterAccessController.ts index f125b00ba..67cbdaf17 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/setRequesterAccessController.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/setRequesterAccessController.ts @@ -26,7 +26,7 @@ export default class SetRequesterAccessController extends SolanaCommand { const state = new PublicKey(this.args[0]) const ac = new PublicKey(this.flags.accessController) - const info = await program.account.state.fetch(state) + const info = (await program.account.state.fetch(state)) as any const oldAC = info.config.requesterAccessController logger.log(`Access controller information: diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/transmit.dev.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/transmit.dev.ts index 103d1f255..e298b6f66 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/transmit.dev.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/transmit.dev.ts @@ -31,7 +31,7 @@ export default class Transmit extends SolanaCommand { const transmissions = new PublicKey(this.flags.transmissions) const store = new PublicKey(this.flags.store) const round = Number(this.flags.round) || 1 - const info = await program.account.state.fetch(state) + const info = (await program.account.state.fetch(state)) as any const reportContext: any[] = [] reportContext.push(...info.config.latestConfigDigest) @@ -93,7 +93,7 @@ export default class Transmit extends SolanaCommand { let txhash try { - txhash = await this.provider.send(tx, [transmitter]) + txhash = await this.provider.sendAndConfirm(tx, [transmitter]) } catch (err) { // Translate IDL error const idlErrors = parseIdlErrors(program.idl) diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/withdrawFunds.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/withdrawFunds.ts index 161360f0a..4dfb16082 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/withdrawFunds.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/withdrawFunds.ts @@ -59,7 +59,7 @@ export default class WithdrawFunds extends SolanaCommand { makeRawTransaction = async (signer: PublicKey) => { const state = new PublicKey(this.args[0]) - const info = await this.program.account.state.fetch(state) + const info = (await this.program.account.state.fetch(state)) as any const tokenVault = new PublicKey(info.config.tokenVault) const [vaultAuthority] = await PublicKey.findProgramAddress( [Buffer.from(utils.bytes.utf8.encode('vault')), state.toBuffer()], @@ -68,8 +68,9 @@ export default class WithdrawFunds extends SolanaCommand { const billingAC = new PublicKey(info.config.billingAccessController) - const data = this.program.instruction.withdrawFunds(new BN(this.input.amountGjuels), { - accounts: { + const data = await this.program.methods + .withdrawFunds(new BN(this.input.amountGjuels)) + .accounts({ state, authority: signer, accessController: billingAC, @@ -77,8 +78,8 @@ export default class WithdrawFunds extends SolanaCommand { vaultAuthority: vaultAuthority, tokenProgram: TOKEN_PROGRAM_ID, recipient: this.input.recipient, - }, - }) + }) + .instruction() return [data] } diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ownership/acceptOwnership.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ownership/acceptOwnership.ts index 4d3716ca6..a07531b17 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ownership/acceptOwnership.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ownership/acceptOwnership.ts @@ -38,12 +38,13 @@ export const makeAcceptOwnershipCommand = ( const state = new PublicKey(this.args[0]) - const tx = program.instruction.acceptOwnership({ - accounts: { + const tx = await program.methods + .acceptOwnership() + .accounts({ state: state, authority: signer, - }, - }) + }) + .instruction() return [tx] } diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ownership/transferOwnership.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ownership/transferOwnership.ts index 299ad947a..4405bbfbf 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ownership/transferOwnership.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ownership/transferOwnership.ts @@ -39,12 +39,13 @@ export const makeTransferOwnershipCommand = ( const state = new PublicKey(this.args[0]) const proposedOwner = new PublicKey(this.flags.to) - const tx = this.program.instruction.transferOwnership(proposedOwner, { - accounts: { + const tx = await this.program.methods + .transferOwnership(proposedOwner) + .accounts({ state: state, authority: signer, - }, - }) + }) + .instruction() return [tx] } diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/acceptFeedOwnership.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/acceptFeedOwnership.ts index 9d659a787..cef7c8627 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/acceptFeedOwnership.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/acceptFeedOwnership.ts @@ -25,15 +25,16 @@ export default class AcceptFeedOwnership extends SolanaCommand { // Need to resolve feed.proposedOwner. This will either match signer // store with store.owner == signer. If not, the instruction will error - const feedAccount = await program.account.transmissions.fetch(state) + const feedAccount = (await program.account.transmissions.fetch(state)) as any - const tx = program.instruction.acceptFeedOwnership({ - accounts: { + const tx = await program.methods + .acceptFeedOwnership() + .accounts({ feed: state, proposedOwner: feedAccount.proposedOwner, authority: signer, - }, - }) + }) + .instruction() return [tx] } diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/acceptStoreOwnership.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/acceptStoreOwnership.ts index 6f17543d0..0e6267150 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/acceptStoreOwnership.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/acceptStoreOwnership.ts @@ -24,12 +24,13 @@ export default class AcceptStoreOwnership extends SolanaCommand { const state = new PublicKey(this.args[0]) - const tx = program.instruction.acceptStoreOwnership({ - accounts: { + const tx = await program.methods + .acceptStoreOwnership() + .accounts({ store: state, authority: signer, - }, - }) + }) + .instruction() return [tx] } diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/close.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/close.ts index be12f41dd..3a8448b85 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/close.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/close.ts @@ -20,7 +20,7 @@ export default class CloseFeed extends Close { const program = this.loadProgram(contract.idl, contract.programId.toString()) const transmissions = new PublicKey(this.args[0]) - const info = await program.account.transmissions.fetch(transmissions) + const info = (await program.account.transmissions.fetch(transmissions)) as any const extraAccounts = { feed: transmissions, owner: new PublicKey(info.owner), diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/createFeed.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/createFeed.ts index 9c41bd842..1ce91b915 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/createFeed.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/createFeed.ts @@ -73,12 +73,13 @@ export default class CreateFeed extends SolanaCommand { programId: program.programId, }) - const ix = program.instruction.createFeed(description, decimals, granularity, liveLength, { - accounts: { + const ix = await program.methods + .createFeed(description, decimals, granularity, liveLength) + .accounts({ feed, authority: signer, - }, - }) + }) + .instruction() return [transmissionsCreationInstruction, ix] } diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/setLoweringAccessController.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/setLoweringAccessController.ts index b5a4fc546..c0a595939 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/setLoweringAccessController.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/setLoweringAccessController.ts @@ -26,7 +26,7 @@ export default class SetLoweringAccessController extends SolanaCommand { const state = new PublicKey(this.args[0]) const ac = new PublicKey(this.flags.accessController) - const info = await program.account.store.fetch(state) + const info = (await program.account.store.fetch(state)) as any const oldAC = info.loweringAccessController logger.log(`Access controller information: diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/setValidatorConfig.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/setValidatorConfig.ts index e2fd6a5d6..e58b1fecf 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/setValidatorConfig.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/setValidatorConfig.ts @@ -42,15 +42,16 @@ export default class SetValidatorConfig extends SolanaCommand { const feed = new PublicKey(input.feed) // Resolve the current store owner - let feedAccount = await program.account.transmissions.fetch(feed) + let feedAccount = (await program.account.transmissions.fetch(feed)) as any - const tx = program.instruction.setValidatorConfig(threshold, { - accounts: { + const tx = await program.methods + .setValidatorConfig(threshold) + .accounts({ feed: feed, owner: feedAccount.owner, authority: signer, - }, - }) + }) + .instruction() return [tx] } diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/setWriter.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/setWriter.ts index fb46bdcbd..b050516d5 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/setWriter.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/setWriter.ts @@ -52,15 +52,16 @@ export default class SetWriter extends SolanaCommand { ) // Resolve the current store owner - let feedAccount = await storeProgram.account.transmissions.fetch(feedState) + let feedAccount = (await storeProgram.account.transmissions.fetch(feedState)) as any - const tx = storeProgram.instruction.setWriter(storeAuthority, { - accounts: { + const tx = await storeProgram.methods + .setWriter(storeAuthority) + .accounts({ feed: feedState, owner: feedAccount.owner, authority: signer, - }, - }) + }) + .instruction() return [tx] } diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/transferFeedOwnership.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/transferFeedOwnership.ts index 0daecad85..47402b0d5 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/transferFeedOwnership.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/transferFeedOwnership.ts @@ -26,15 +26,16 @@ export default class TransferFeedOwnership extends SolanaCommand { const proposedOwner = new PublicKey(this.flags.to) // Need to resolve feed.owner - const feedAccount = await program.account.transmissions.fetch(state) + const feedAccount = (await program.account.transmissions.fetch(state)) as any - const tx = program.instruction.transferFeedOwnership(proposedOwner, { - accounts: { + const tx = await program.methods + .transferFeedOwnership(proposedOwner) + .accounts({ feed: state, owner: feedAccount.owner, authority: signer, - }, - }) + }) + .instruction() return [tx] } diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/transferStoreOwnership.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/transferStoreOwnership.ts index d43dd3a0f..9cb649c48 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/transferStoreOwnership.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/transferStoreOwnership.ts @@ -28,12 +28,13 @@ export default class TransferStoreOwnership extends SolanaCommand { const state = new PublicKey(this.args[0]) const proposedOwner = new PublicKey(this.flags.to) - const tx = program.instruction.transferStoreOwnership(proposedOwner, { - accounts: { + const tx = await program.methods + .transferStoreOwnership(proposedOwner) + .accounts({ store: state, authority: signer, - }, - }) + }) + .instruction() return [tx] } diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/createAccount.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/createAccount.ts index 90b71c51a..f2e3fb873 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/createAccount.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/createAccount.ts @@ -1,7 +1,7 @@ import { Result } from '@chainlink/gauntlet-core' import { logger, prompt } from '@chainlink/gauntlet-core/dist/utils' import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana' -import { ASSOCIATED_TOKEN_PROGRAM_ID, Token, TOKEN_PROGRAM_ID } from '@solana/spl-token' +import { createAssociatedTokenAccountInstruction, getAssociatedTokenAddress } from '@solana/spl-token' import { PublicKey } from '@solana/web3.js' import { CONTRACT_LIST } from '../../../lib/contracts' import { isValidTokenAccount } from './utils' @@ -22,32 +22,19 @@ export default class CreateAccount extends SolanaCommand { const tokenAddress = new PublicKey(this.args[0]) const newAccountBase = new PublicKey(this.flags.address) - const associatedAcc = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - tokenAddress, - newAccountBase, - true, - ) - - const token = new Token(this.provider.connection, tokenAddress, TOKEN_PROGRAM_ID, { - publicKey: this.wallet.publicKey, - secretKey: Buffer.from([]), - }) + const associatedAcc = await getAssociatedTokenAddress(tokenAddress, newAccountBase, true) - const accountExists = await isValidTokenAccount(token, associatedAcc) + const accountExists = await isValidTokenAccount(this.provider.connection, tokenAddress, associatedAcc) this.require( !accountExists, `A Token Associated Account to address ${newAccountBase.toString()} already exists: ${associatedAcc}`, ) - const ix = Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - tokenAddress, + const ix = createAssociatedTokenAccountInstruction( + this.wallet.publicKey, associatedAcc, newAccountBase, - this.wallet.publicKey, + tokenAddress, ) await prompt(`Continue to create new Token associated account to ${newAccountBase.toString()}`) diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/deploy.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/deploy.ts index 50be63f12..3e342bffe 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/deploy.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/deploy.ts @@ -1,7 +1,7 @@ import { Result } from '@chainlink/gauntlet-core' import { logger, prompt, BN } from '@chainlink/gauntlet-core/dist/utils' import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana' -import { Token, TOKEN_PROGRAM_ID } from '@solana/spl-token' +import { createAssociatedTokenAccount, createMint, mintTo } from '@solana/spl-token' import { TOKEN_DECIMALS } from '../../../lib/constants' import { CONTRACT_LIST } from '../../../lib/contracts' @@ -20,30 +20,34 @@ export default class DeployToken extends SolanaCommand { logger.loading('Creating token...') const decimals = this.flags.decimals || TOKEN_DECIMALS - const token = await Token.createMint( + const token = await createMint( this.provider.connection, this.wallet.payer, mintAuthority.publicKey, this.wallet.payer.publicKey, // Freeze authority decimals, - TOKEN_PROGRAM_ID, ) - const billion = new BN(Math.pow(10, 9)) - const tokenVault = await token.createAssociatedTokenAccount(this.wallet.payer.publicKey) - const mintAmount = billion.mul(new BN(Math.pow(10, decimals))) + const billion = BigInt(Math.pow(10, 9)) + const tokenVault = await createAssociatedTokenAccount( + this.provider.connection, + this.wallet.payer, + token, + this.wallet.payer.publicKey, + ) + const mintAmount = billion * BigInt(Math.pow(10, decimals)) await prompt( `Minting ${billion.toString()} token units, with ${decimals} decimals. Total ${mintAmount.toString()}. Continue?`, ) - await token.mintTo(tokenVault, this.wallet.payer, [], mintAmount) + await mintTo(this.provider.connection, this.wallet.payer, token, tokenVault, mintAuthority, mintAmount) // To disable minting https://github.com/solana-labs/solana-program-library/blob/36e886392b8c6619b275f6681aed6d8aae6e70f9/token/js/client/token.js#L985 logger.info(` TOKEN: - - Address: ${token.publicKey} + - Address: ${token} VAULT: - address: ${tokenVault.toString()} STATE ACCOUNTS: @@ -54,8 +58,8 @@ export default class DeployToken extends SolanaCommand { return { responses: [ { - tx: { ...this.wrapResponse('', token.publicKey.toString()), wait: async () => ({ success: true }) }, - contract: token.publicKey.toString(), + tx: { ...this.wrapResponse('', token.toString()), wait: async () => ({ success: true }) }, + contract: token.toString(), }, ], } as Result diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/read.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/read.ts index 49e2fc8a1..300aa93d5 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/read.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/read.ts @@ -1,6 +1,6 @@ import { Result } from '@chainlink/gauntlet-core' import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana' -import { Token, TOKEN_PROGRAM_ID } from '@solana/spl-token' +import { getMint } from '@solana/spl-token' import { PublicKey } from '@solana/web3.js' import { CONTRACT_LIST } from '../../../lib/contracts' @@ -15,9 +15,7 @@ export default class ReadState extends SolanaCommand { execute = async () => { const address = this.args[0] - const tokenClient = new Token(this.provider.connection, new PublicKey(address), TOKEN_PROGRAM_ID, this.wallet.payer) - - const data = await tokenClient.getMintInfo() + const data = await getMint(this.provider.connection, new PublicKey(address)) console.log(data) diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/transfer.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/transfer.ts index ffb9e7b29..53b2a53e5 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/transfer.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/transfer.ts @@ -1,8 +1,8 @@ import { Result } from '@chainlink/gauntlet-core' -import { logger, BN, prompt } from '@chainlink/gauntlet-core/dist/utils' +import { logger, prompt } from '@chainlink/gauntlet-core/dist/utils' import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana' -import { ASSOCIATED_TOKEN_PROGRAM_ID, Token, TOKEN_PROGRAM_ID } from '@solana/spl-token' -import { PublicKey, TransactionInstruction } from '@solana/web3.js' +import { createTransferInstruction, getAssociatedTokenAddress } from '@solana/spl-token' +import { PublicKey } from '@solana/web3.js' import { TOKEN_DECIMALS } from '../../../lib/constants' import { CONTRACT_LIST } from '../../../lib/contracts' import { isValidTokenAccount } from './utils' @@ -25,37 +25,22 @@ export default class TransferToken extends SolanaCommand { makeRawTransaction = async (signer: PublicKey) => { const address = this.args[0] - const token = new Token(this.provider.connection, new PublicKey(address), TOKEN_PROGRAM_ID, { - publicKey: signer, - secretKey: Buffer.from([]), - }) + const token = new PublicKey(address) - const from = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - token.publicKey, - signer, - true, - ) + const from = await getAssociatedTokenAddress(token, signer, true) const destination = new PublicKey(this.flags.to) - const amount = new BN(this.flags.amount).mul(new BN(10).pow(new BN(TOKEN_DECIMALS))) + const amount = BigInt(this.flags.amount) * BigInt(10) ** BigInt(TOKEN_DECIMALS) this.require( - await isValidTokenAccount(token, destination), + await isValidTokenAccount(this.provider.connection, token, destination), `Destination ${destination.toString()} is not a valid token account`, ) logger.info( `Preparing instruction to send ${amount.toString()} (${this.flags.amount}) Tokens to ${destination.toString()}`, ) - const ix = Token.createTransferInstruction( - TOKEN_PROGRAM_ID, - from, - destination, - signer, - [], - amount.toString() as any, - ) + + const ix = createTransferInstruction(from, destination, signer, amount) return [ { diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/utils.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/utils.ts index a033baf16..b6d78335b 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/utils.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/token/utils.ts @@ -1,10 +1,10 @@ -import { Token } from '@solana/spl-token' -import { PublicKey } from '@solana/web3.js' +import { getAccount } from '@solana/spl-token' +import { Connection, PublicKey } from '@solana/web3.js' -export const isValidTokenAccount = async (token: Token, address: PublicKey) => { +export const isValidTokenAccount = async (connection: Connection, token: PublicKey, address: PublicKey) => { try { - const info = await token.getAccountInfo(address) - return !!info.address + const info = await getAccount(connection, address) + return info.mint == token && !!info.address } catch (e) { return false } diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/lib/utils.ts b/gauntlet/packages/gauntlet-solana-contracts/src/lib/utils.ts index 77aa2caee..4b0ef4285 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/lib/utils.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/lib/utils.ts @@ -1,4 +1,3 @@ -import { Transaction, TransactionCtorFields, TransactionInstruction } from '@solana/web3.js' import * as BufferLayout from '@solana/buffer-layout' export const divideIntoChunks = (arr: Array | Buffer, chunkSize: number): any[][] => { @@ -15,15 +14,15 @@ export const divideIntoChunks = (arr: Array | Buffer, chunkSize: number): a export const encodeInstruction = (data: any): Buffer => { const CHUNK_SIZE = 900 - const dataLayout = BufferLayout.union(BufferLayout.u32('tag'), null, 'tag') + const dataLayout = BufferLayout.union(BufferLayout.u32('tag') as BufferLayout.Layout, null, 'tag') dataLayout.addVariant(0, BufferLayout.struct([]), 'InitializeBuffer') - const write = BufferLayout.struct([ + const write = BufferLayout.struct([ BufferLayout.u32('offset'), BufferLayout.nu64('length'), BufferLayout.seq(BufferLayout.u8('byte'), BufferLayout.offset(BufferLayout.u32(), -8), 'bytes'), ]) dataLayout.addVariant(1, write, 'Write') - const deployWithMaxLen = BufferLayout.struct([BufferLayout.nu64('max_data_len')]) + const deployWithMaxLen = BufferLayout.struct([BufferLayout.nu64('max_data_len')]) dataLayout.addVariant(2, deployWithMaxLen, 'DeployWithMaxDataLen') dataLayout.addVariant(3, BufferLayout.struct([]), 'Upgrade') dataLayout.addVariant(4, BufferLayout.struct([]), 'SetAuthority') diff --git a/gauntlet/packages/gauntlet-solana/package.json b/gauntlet/packages/gauntlet-solana/package.json index dc8e495c2..9162adbd3 100644 --- a/gauntlet/packages/gauntlet-solana/package.json +++ b/gauntlet/packages/gauntlet-solana/package.json @@ -28,8 +28,8 @@ "@chainlink/gauntlet-core": "0.1.2", "@ledgerhq/hw-app-solana": "^6.20.0", "@ledgerhq/hw-transport-node-hid": "^6.20.0", - "@project-serum/anchor": "^0.23.0", + "@project-serum/anchor": "^0.25.0", "@project-serum/borsh": "^0.2.2", - "@solana/web3.js": "^1.31.0" + "@solana/web3.js": "^1.50.1" } } diff --git a/gauntlet/packages/gauntlet-solana/src/commands/internal/solana.ts b/gauntlet/packages/gauntlet-solana/src/commands/internal/solana.ts index 5db2bd403..2837fcaf1 100644 --- a/gauntlet/packages/gauntlet-solana/src/commands/internal/solana.ts +++ b/gauntlet/packages/gauntlet-solana/src/commands/internal/solana.ts @@ -12,14 +12,14 @@ import { } from '@solana/web3.js' import { withProvider, withWallet, withNetwork } from '../middlewares' import { TransactionResponse } from '../types' -import { ProgramError, parseIdlErrors, Idl, Program, Provider } from '@project-serum/anchor' +import { ProgramError, parseIdlErrors, Idl, Program, AnchorProvider } from '@project-serum/anchor' import { SolanaWallet } from '../wallet' import { logger } from '@chainlink/gauntlet-core/dist/utils' import { makeTx } from '../../lib/utils' export default abstract class SolanaCommand extends WriteCommand { wallet: SolanaWallet - provider: Provider + provider: AnchorProvider program: Program abstract execute: () => Promise> @@ -139,7 +139,7 @@ export default abstract class SolanaCommand extends WriteCommand => { try { - return await this.provider.send(tx, signers) + return await this.provider.sendAndConfirm(tx, signers) } catch (err) { // Translate IDL error const idlErrors = parseIdlErrors(idl) diff --git a/gauntlet/packages/gauntlet-solana/src/commands/middlewares.ts b/gauntlet/packages/gauntlet-solana/src/commands/middlewares.ts index fa80f3af3..a5612b0dd 100644 --- a/gauntlet/packages/gauntlet-solana/src/commands/middlewares.ts +++ b/gauntlet/packages/gauntlet-solana/src/commands/middlewares.ts @@ -1,7 +1,7 @@ import { Middleware, Next } from '@chainlink/gauntlet-core' import { boolean } from '@chainlink/gauntlet-core/dist/lib/args' import { assertions, logger } from '@chainlink/gauntlet-core/dist/utils' -import { Provider } from '@project-serum/anchor' +import { AnchorProvider } from '@project-serum/anchor' import { Connection, Keypair } from '@solana/web3.js' import { DEFAULT_DERIVATION_PATH } from '../lib/constants' import SolanaCommand from './internal/solana' @@ -18,7 +18,7 @@ export const withProvider: Middleware = (c: SolanaCommand, next: Next) => { `Invalid NODE_URL (${nodeURL}), please add an http:// or https:// prefix`, ) - c.provider = new Provider(new Connection(nodeURL), c.wallet, {}) + c.provider = new AnchorProvider(new Connection(nodeURL), c.wallet, {}) return next() } diff --git a/gauntlet/packages/gauntlet-solana/src/lib/provider.ts b/gauntlet/packages/gauntlet-solana/src/lib/provider.ts index 1a759a490..02d4a3a67 100644 --- a/gauntlet/packages/gauntlet-solana/src/lib/provider.ts +++ b/gauntlet/packages/gauntlet-solana/src/lib/provider.ts @@ -28,7 +28,9 @@ const parseTxLog = (parser: EventParser, tx: ParsedTransactionWithMeta | null): const addToList = (event: Event) => eventList.push(event) if (tx?.meta?.logMessages) { - parser.parseLogs(tx.meta.logMessages, addToList) + for (const event of parser.parseLogs(tx.meta.logMessages)) { + addToList(event) + } } return eventList diff --git a/gauntlet/yarn.lock b/gauntlet/yarn.lock index 12aa82569..64dcc9671 100644 --- a/gauntlet/yarn.lock +++ b/gauntlet/yarn.lock @@ -270,10 +270,10 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.10.5": - version "7.17.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.2.tgz#66f68591605e59da47523c631416b18508779941" - integrity sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw== +"@babel/runtime@^7.17.2": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a" + integrity sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw== dependencies: regenerator-runtime "^0.13.4" @@ -554,6 +554,18 @@ "@ethersproject/logger" "^5.5.0" hash.js "1.1.7" +"@hapi/hoek@^9.0.0": + version "9.3.0" + resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" + integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== + +"@hapi/topo@^5.0.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.1.0.tgz#dc448e332c6c6e37a4dc02fd84ba8d44b9afb012" + integrity sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== + dependencies: + "@hapi/hoek" "^9.0.0" + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -848,10 +860,10 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@project-serum/anchor@^0.23.0": - version "0.23.0" - resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.23.0.tgz#2b2eb6b51601b073e8db26663aa2d6c2f2841771" - integrity sha512-LV2/ifZOJVFTZ4GbEloXln3iVfCvO1YM8i7BBCrUm4tehP7irMx4nr4/IabHWOzrQcQElsxSP/lb1tBp+2ff8A== +"@project-serum/anchor@^0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.25.0.tgz#88ee4843336005cf5a64c80636ce626f0996f503" + integrity sha512-E6A5Y/ijqpfMJ5psJvbw0kVTzLZFUcOFgs6eSM2M2iWE1lVRF18T6hWZVNl6zqZsoz98jgnNHtVGJMs+ds9A7A== dependencies: "@project-serum/borsh" "^0.2.5" "@solana/web3.js" "^1.36.0" @@ -863,10 +875,10 @@ cross-fetch "^3.1.5" crypto-hash "^1.3.0" eventemitter3 "^4.0.7" - find "^0.3.0" js-sha256 "^0.9.0" pako "^2.0.3" snake-case "^3.0.4" + superstruct "^0.15.4" toml "^3.0.0" "@project-serum/borsh@^0.2.2": @@ -938,6 +950,23 @@ resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= +"@sideway/address@^4.1.3": + version "4.1.4" + resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" + integrity sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw== + dependencies: + "@hapi/hoek" "^9.0.0" + +"@sideway/formula@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.0.tgz#fe158aee32e6bd5de85044be615bc08478a0a13c" + integrity sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg== + +"@sideway/pinpoint@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" + integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== + "@sinonjs/commons@^1.7.0": version "1.8.3" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" @@ -952,6 +981,16 @@ dependencies: "@sinonjs/commons" "^1.7.0" +"@solana/buffer-layout-utils@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz#b45a6cab3293a2eb7597cceb474f229889d875ca" + integrity sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g== + dependencies: + "@solana/buffer-layout" "^4.0.0" + "@solana/web3.js" "^1.32.0" + bigint-buffer "^1.1.5" + bignumber.js "^9.0.1" + "@solana/buffer-layout@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-3.0.0.tgz#b9353caeb9a1589cb77a1b145bcb1a9a93114326" @@ -959,39 +998,47 @@ dependencies: buffer "~6.0.3" -"@solana/spl-token@^0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.1.8.tgz#f06e746341ef8d04165e21fc7f555492a2a0faa6" - integrity sha512-LZmYCKcPQDtJgecvWOgT/cnoIQPWjdH+QVyzPcFvyDUiT0DiRjZaam4aqNUyvchLFhzgunv3d9xOoyE34ofdoQ== +"@solana/buffer-layout@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.0.tgz#75b1b11adc487234821c81dfae3119b73a5fd734" + integrity sha512-lR0EMP2HC3+Mxwd4YcnZb0smnaDw7Bl2IQWZiTevRH5ZZBZn6VRWn3/92E3qdU4SSImJkA6IDHawOHAnx/qUvQ== dependencies: - "@babel/runtime" "^7.10.5" - "@solana/web3.js" "^1.21.0" - bn.js "^5.1.0" - buffer "6.0.3" - buffer-layout "^1.2.0" - dotenv "10.0.0" + buffer "~6.0.3" + +"@solana/spl-token@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.2.0.tgz#329bb6babb5de0f9c40035ddb1657f01a8347acd" + integrity sha512-RWcn31OXtdqIxmkzQfB2R+WpsJOVS6rKuvpxJFjvik2LyODd+WN58ZP3Rpjpro03fscGAkzlFuP3r42doRJgyQ== + dependencies: + "@solana/buffer-layout" "^4.0.0" + "@solana/buffer-layout-utils" "^0.2.0" + "@solana/web3.js" "^1.32.0" + start-server-and-test "^1.14.0" -"@solana/web3.js@^1.21.0": - version "1.31.0" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.31.0.tgz#7a313d4c1a90b77f27ddbfe845a10d6883e06452" - integrity sha512-7nHHx1JNFnrt15e9y8m38I/EJCbaB+bFC3KZVM1+QhybCikFxGMtGA5r7PDC3GEL1R2RZA8yKoLkDKo3vzzqnw== +"@solana/web3.js@^1.32.0", "@solana/web3.js@^1.50.1": + version "1.50.1" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.50.1.tgz#dae726a06267d1bcd88b1e3cd8ae44c709302dcf" + integrity sha512-1l9N/nS8pJEA2YibNT8wa072718O0/A1eKWE0+pdWC5wDGQgBNxZSLuv7Cq5Dcn46WsZ5J5ZstK89q8J/ZZaQA== dependencies: "@babel/runtime" "^7.12.5" "@ethersproject/sha2" "^5.5.0" - "@solana/buffer-layout" "^3.0.0" + "@solana/buffer-layout" "^4.0.0" + bigint-buffer "^1.1.5" bn.js "^5.0.0" - borsh "^0.4.0" + borsh "^0.7.0" bs58 "^4.0.1" buffer "6.0.1" - cross-fetch "^3.1.4" + fast-stable-stringify "^1.0.0" jayson "^3.4.4" js-sha3 "^0.8.0" - rpc-websockets "^7.4.2" + node-fetch "2" + react-native-url-polyfill "^1.3.0" + rpc-websockets "^7.5.0" secp256k1 "^4.0.2" superstruct "^0.14.2" tweetnacl "^1.0.0" -"@solana/web3.js@^1.31.0", "@solana/web3.js@^1.36.0": +"@solana/web3.js@^1.36.0": version "1.36.0" resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.36.0.tgz#79d7d5217b49b80139f4de68953adc5b9a9a264f" integrity sha512-RNT1451iRR7TyW7EJKMCrH/0OXawIe4zVm0DWQASwXlR/u1jmW6FrmH0lujIh7cGTlfOVbH+2ZU9AVUPLBFzwA== @@ -1384,6 +1431,13 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== +axios@^0.21.1: + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== + dependencies: + follow-redirects "^1.14.0" + axios@^0.24.0: version "0.24.0" resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6" @@ -1489,7 +1543,19 @@ better-path-resolve@1.0.0: dependencies: is-windows "^1.0.0" -bindings@^1.5.0: +bigint-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/bigint-buffer/-/bigint-buffer-1.1.5.tgz#d038f31c8e4534c1f8d0015209bf34b4fa6dd442" + integrity sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA== + dependencies: + bindings "^1.3.0" + +bignumber.js@^9.0.1: + version "9.0.2" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.2.tgz#71c6c6bed38de64e24a65ebe16cfcf23ae693673" + integrity sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw== + +bindings@^1.3.0, bindings@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== @@ -1510,12 +1576,17 @@ bl@^4.0.3: inherits "^2.0.4" readable-stream "^3.4.0" +bluebird@3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + bn.js@^4.11.9: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== -bn.js@^5.0.0, bn.js@^5.1.0, bn.js@^5.1.2, bn.js@^5.2.0: +bn.js@^5.0.0, bn.js@^5.1.2, bn.js@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== @@ -1530,6 +1601,15 @@ borsh@^0.4.0: bs58 "^4.0.0" text-encoding-utf-8 "^1.0.2" +borsh@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/borsh/-/borsh-0.7.0.tgz#6e9560d719d86d90dc589bca60ffc8a6c51fec2a" + integrity sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA== + dependencies: + bn.js "^5.2.0" + bs58 "^4.0.0" + text-encoding-utf-8 "^1.0.2" + boxen@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" @@ -1641,15 +1721,7 @@ buffer@6.0.1: base64-js "^1.3.1" ieee754 "^1.2.1" -buffer@6.0.3, buffer@~6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" - integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - -buffer@^5.5.0: +buffer@^5.4.3, buffer@^5.5.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== @@ -1657,6 +1729,14 @@ buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" +buffer@~6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + bufferutil@^4.0.1: version "4.0.5" resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.5.tgz#da9ea8166911cc276bf677b8aed2d02d31f59028" @@ -1755,6 +1835,11 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== +check-more-types@2.24.0: + version "2.24.0" + resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600" + integrity sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA== + chownr@^1.1.1: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" @@ -1938,7 +2023,7 @@ cross-spawn@^6.0.0: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.0: +cross-spawn@^7.0.0, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -2003,7 +2088,7 @@ data-urls@^2.0.0: whatwg-mimetype "^2.3.0" whatwg-url "^8.0.0" -debug@4, debug@^4.1.0, debug@^4.1.1: +debug@4, debug@4.3.2, debug@^4.1.0, debug@^4.1.1: version "4.3.2" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== @@ -2153,10 +2238,10 @@ dot-case@^3.0.4: no-case "^3.0.4" tslib "^2.0.3" -dotenv@10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" - integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== +duplexer@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" + integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== electron-to-chromium@^1.3.896: version "1.3.899" @@ -2261,6 +2346,19 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +event-stream@=3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" + integrity sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g== + dependencies: + duplexer "~0.1.1" + from "~0" + map-stream "~0.1.0" + pause-stream "0.0.11" + split "0.3" + stream-combiner "~0.0.4" + through "~2.3.1" + eventemitter3@^4.0.7: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" @@ -2276,6 +2374,21 @@ exec-sh@^0.3.2: resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.6.tgz#ff264f9e325519a60cb5e273692943483cca63bc" integrity sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w== +execa@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + execa@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" @@ -2421,6 +2534,11 @@ fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= +fast-stable-stringify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz#5c5543462b22aeeefd36d05b34e51c78cb86d313" + integrity sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag== + fastq@^1.6.0: version "1.13.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" @@ -2481,12 +2599,10 @@ find-yarn-workspace-root2@1.2.16: micromatch "^4.0.2" pkg-dir "^4.2.0" -find@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/find/-/find-0.3.0.tgz#4082e8fc8d8320f1a382b5e4f521b9bc50775cb8" - integrity sha512-iSd+O4OEYV/I36Zl8MdYJO0xD82wH528SaCieTVHhclgiYNe9y+yPKSwK+A7/WsmHL1EZ+pYUJBXWTL5qofksw== - dependencies: - traverse-chain "~0.1.0" +follow-redirects@^1.14.0: + version "1.15.1" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" + integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== follow-redirects@^1.14.4: version "1.14.9" @@ -2522,6 +2638,11 @@ from2@^2.3.0: inherits "^2.0.1" readable-stream "^2.0.0" +from@~0: + version "0.1.7" + resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" + integrity sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g== + fs-constants@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" @@ -2618,6 +2739,11 @@ get-stream@^5.0.0: dependencies: pump "^3.0.0" +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -2798,6 +2924,11 @@ human-signals@^1.1.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -3516,6 +3647,17 @@ jest@^26.6.3: import-local "^3.0.2" jest-cli "^26.6.3" +joi@^17.4.0: + version "17.6.0" + resolved "https://registry.yarnpkg.com/joi/-/joi-17.6.0.tgz#0bb54f2f006c09a96e75ce687957bd04290054b2" + integrity sha512-OX5dG6DTbcr/kbMFj0KGYxuew69HPcAE3K/sZpEV2nP6e/j/C0HV+HNiBPCASxdx5T7DMoa0s8UeHWMnb6n2zw== + dependencies: + "@hapi/hoek" "^9.0.0" + "@hapi/topo" "^5.0.0" + "@sideway/address" "^4.1.3" + "@sideway/formula" "^3.0.0" + "@sideway/pinpoint" "^2.0.0" + js-sha256@^0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/js-sha256/-/js-sha256-0.9.0.tgz#0b89ac166583e91ef9123644bd3c5334ce9d0966" @@ -3644,6 +3786,11 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== +lazy-ass@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/lazy-ass/-/lazy-ass-1.6.0.tgz#7999655e8646c17f089fdd187d150d3324d54513" + integrity sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw== + leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -3757,6 +3904,11 @@ map-obj@^4.0.0: resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== +map-stream@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194" + integrity sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g== + map-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" @@ -3979,18 +4131,18 @@ node-addon-api@^4.2.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-4.3.0.tgz#52a1a0b475193e0928e98e0426a0d1254782b77f" integrity sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ== -node-fetch@2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" - integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== - -node-fetch@2.6.7: +node-fetch@2, node-fetch@2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== dependencies: whatwg-url "^5.0.0" +node-fetch@2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + node-fetch@^2.6.1: version "2.6.6" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.6.tgz#1751a7c01834e8e1697758732e9efb6eeadfaf89" @@ -4073,7 +4225,7 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -npm-run-path@^4.0.0: +npm-run-path@^4.0.0, npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== @@ -4135,7 +4287,7 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" -onetime@^5.1.0: +onetime@^5.1.0, onetime@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== @@ -4279,6 +4431,13 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +pause-stream@0.0.11: + version "0.0.11" + resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" + integrity sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A== + dependencies: + through "~2.3" + picocolors@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" @@ -4459,6 +4618,13 @@ protobufjs@^6.11.2: "@types/node" ">=13.7.0" long "^4.0.0" +ps-tree@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.2.0.tgz#5e7425b89508736cdd4f2224d028f7bb3f722ebd" + integrity sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA== + dependencies: + event-stream "=3.3.4" + pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" @@ -4507,6 +4673,13 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== +react-native-url-polyfill@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/react-native-url-polyfill/-/react-native-url-polyfill-1.3.0.tgz#c1763de0f2a8c22cc3e959b654c8790622b6ef6a" + integrity sha512-w9JfSkvpqqlix9UjDvJjm1EjSt652zVQ6iwCIj1cVVkwXf4jQhQgTNXY6EVTwuAmUjg6BC6k9RHCBynoLFo3IQ== + dependencies: + whatwg-url-without-unicode "8.0.0-3" + read-pkg-up@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" @@ -4660,6 +4833,19 @@ rpc-websockets@^7.4.2: bufferutil "^4.0.1" utf-8-validate "^5.0.2" +rpc-websockets@^7.5.0: + version "7.5.0" + resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-7.5.0.tgz#bbeb87572e66703ff151e50af1658f98098e2748" + integrity sha512-9tIRi1uZGy7YmDjErf1Ax3wtqdSSLIlnmL5OtOzgd5eqPKbsPpwDP5whUDO2LQay3Xp0CcHlcNSGzacNRluBaQ== + dependencies: + "@babel/runtime" "^7.17.2" + eventemitter3 "^4.0.7" + uuid "^8.3.2" + ws "^8.5.0" + optionalDependencies: + bufferutil "^4.0.1" + utf-8-validate "^5.0.2" + rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -4679,6 +4865,13 @@ rxjs@6: dependencies: tslib "^1.9.0" +rxjs@^7.1.0: + version "7.5.6" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.6.tgz#0446577557862afd6903517ce7cae79ecb9662bc" + integrity sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw== + dependencies: + tslib "^2.1.0" + safe-buffer@^5.0.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -4798,6 +4991,11 @@ signal-exit@^3.0.0, signal-exit@^3.0.2: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.5.tgz#9e3e8cc0c75a99472b44321033a7702e7738252f" integrity sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ== +signal-exit@^3.0.3: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + simple-concat@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" @@ -4951,6 +5149,13 @@ split-string@^3.0.1, split-string@^3.0.2: dependencies: extend-shallow "^3.0.0" +split@0.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f" + integrity sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA== + dependencies: + through "2" + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -4963,6 +5168,19 @@ stack-utils@^2.0.2: dependencies: escape-string-regexp "^2.0.0" +start-server-and-test@^1.14.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/start-server-and-test/-/start-server-and-test-1.14.0.tgz#c57f04f73eac15dd51733b551d775b40837fdde3" + integrity sha512-on5ELuxO2K0t8EmNj9MtVlFqwBMxfWOhu4U7uZD1xccVpFlOQKR93CSe0u98iQzfNxRyaNTb/CdadbNllplTsw== + dependencies: + bluebird "3.7.2" + check-more-types "2.24.0" + debug "4.3.2" + execa "5.1.1" + lazy-ass "1.6.0" + ps-tree "1.2.0" + wait-on "6.0.0" + static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" @@ -4971,6 +5189,13 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" +stream-combiner@~0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" + integrity sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw== + dependencies: + duplexer "~0.1.1" + stream-meter@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/stream-meter/-/stream-meter-1.0.4.tgz#52af95aa5ea760a2491716704dbff90f73afdd1d" @@ -5091,6 +5316,11 @@ superstruct@^0.14.2: resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.14.2.tgz#0dbcdf3d83676588828f1cf5ed35cda02f59025b" integrity sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ== +superstruct@^0.15.4: + version "0.15.5" + resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.15.5.tgz#0f0a8d3ce31313f0d84c6096cd4fa1bfdedc9dab" + integrity sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ== + supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -5178,7 +5408,7 @@ throat@^5.0.0: resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA== -"through@>=2.2.7 <3": +through@2, "through@>=2.2.7 <3", through@~2.3, through@~2.3.1: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -5258,11 +5488,6 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= -traverse-chain@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/traverse-chain/-/traverse-chain-0.1.0.tgz#61dbc2d53b69ff6091a12a168fd7d433107e40f1" - integrity sha1-YdvC1Ttp/2CRoSoWj9fUMxB+QPE= - trim-newlines@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" @@ -5310,6 +5535,11 @@ tslib@^2.0.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== +tslib@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" + integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== + tty-table@^2.8.10: version "2.8.13" resolved "https://registry.yarnpkg.com/tty-table/-/tty-table-2.8.13.tgz#d484a416381973eaebbdf19c79136b390e5c6d70" @@ -5441,7 +5671,7 @@ uuid@^3.4.0: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^8.3.0: +uuid@^8.3.0, uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== @@ -5477,6 +5707,17 @@ w3c-xmlserializer@^2.0.0: dependencies: xml-name-validator "^3.0.0" +wait-on@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-6.0.0.tgz#7e9bf8e3d7fe2daecbb7a570ac8ca41e9311c7e7" + integrity sha512-tnUJr9p5r+bEYXPUdRseolmz5XqJTTj98JgOsfBn7Oz2dxfE2g3zw1jE+Mo8lopM3j3et/Mq1yW7kKX6qw7RVw== + dependencies: + axios "^0.21.1" + joi "^17.4.0" + lodash "^4.17.21" + minimist "^1.2.5" + rxjs "^7.1.0" + walker@^1.0.7, walker@~1.0.5: version "1.0.8" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" @@ -5518,6 +5759,15 @@ whatwg-mimetype@^2.3.0: resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== +whatwg-url-without-unicode@8.0.0-3: + version "8.0.0-3" + resolved "https://registry.yarnpkg.com/whatwg-url-without-unicode/-/whatwg-url-without-unicode-8.0.0-3.tgz#ab6df4bf6caaa6c85a59f6e82c026151d4bb376b" + integrity sha512-HoKuzZrUlgpz35YO27XgD28uh/WJH4B0+3ttFqRo//lmq+9T/mIOJ6kqmINI9HpUpz1imRC/nR/lxKpJiv0uig== + dependencies: + buffer "^5.4.3" + punycode "^2.1.1" + webidl-conversions "^5.0.0" + whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" @@ -5624,6 +5874,11 @@ ws@^7.4.5, ws@^7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.5.tgz#8b4bc4af518cfabd0473ae4f99144287b33eb881" integrity sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w== +ws@^8.5.0: + version "8.8.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.8.1.tgz#5dbad0feb7ade8ecc99b830c1d77c913d4955ff0" + integrity sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA== + xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" diff --git a/scripts/install-solana-ci.sh b/scripts/install-solana-ci.sh index e01dbc598..34e50ad7b 100755 --- a/scripts/install-solana-ci.sh +++ b/scripts/install-solana-ci.sh @@ -2,5 +2,5 @@ set -euxo pipefail -sh -c "$(curl -sSfL https://release.solana.com/v1.9.12/install)" +sh -c "$(curl -sSfL https://release.solana.com/v1.10.33/install)" echo "PATH=$HOME/.local/share/solana/install/active_release/bin:$PATH" >> $GITHUB_ENV diff --git a/tests/e2e/common/common.go b/tests/e2e/common/common.go index e200f2f5a..037b0c96d 100644 --- a/tests/e2e/common/common.go +++ b/tests/e2e/common/common.go @@ -171,7 +171,7 @@ func OffChainConfigParamsFromNodes(nodes []*client.Chainlink, nkb []NodeKeysBund if faultyNodes == 0 { faultyNodes = 1 } - log.Warn().Int("Nodes", faultyNodes).Msg("Faulty nodes") + log.Debug().Int("Nodes", faultyNodes).Msg("Faulty nodes") return contracts.OffChainAggregatorV2Config{ DeltaProgress: 2 * time.Second, DeltaResend: 5 * time.Second, diff --git a/tests/e2e/solclient/deployer.go b/tests/e2e/solclient/deployer.go index 26d791a64..8c181ed1f 100644 --- a/tests/e2e/solclient/deployer.go +++ b/tests/e2e/solclient/deployer.go @@ -69,7 +69,7 @@ func (c *ContractDeployer) GenerateAuthorities(seeds []string) error { // addMintInstr adds instruction for creating new mint (token) func (c *ContractDeployer) addMintInstr(instr *[]solana.Instruction) error { - accInstr, err := c.Client.CreateAccInstr(c.Accounts.Mint, TokenMintAccountSize, token.ProgramID) + accInstr, err := c.Client.CreateAccInstr(c.Accounts.Mint.PublicKey(), TokenMintAccountSize, token.ProgramID) if err != nil { return err } @@ -86,8 +86,40 @@ func (c *ContractDeployer) addMintInstr(instr *[]solana.Instruction) error { return nil } +func (c *ContractDeployer) SetupAssociatedAccount() (*solana.PublicKey, *solana.PublicKey, error) { + vault := c.Accounts.Authorities["vault"] + payer := c.Client.DefaultWallet + instr := make([]solana.Instruction, 0) + ainstr := associatedtokenaccount.NewCreateInstruction( + c.Client.DefaultWallet.PublicKey(), + vault.PublicKey, + c.Accounts.Mint.PublicKey(), + ).Build() + aaccount := ainstr.Impl.(associatedtokenaccount.Create).AccountMetaSlice[1].PublicKey + instr = append(instr, + ainstr, + ) + c.Accounts.OCRVaultAssociatedPubKey = aaccount + err := c.Client.TXSync( + "Setup associated account", + rpc.CommitmentFinalized, + instr, + func(key solana.PublicKey) *solana.PrivateKey { + if key.Equals(payer.PublicKey()) { + return &payer.PrivateKey + } + return nil + }, + payer.PublicKey(), + ) + if err != nil { + return nil, nil, err + } + return &aaccount, &vault.PublicKey, err +} + // AddNewAssociatedAccInstr adds instruction to create new account associated with some mint (token) -func (c *ContractDeployer) AddNewAssociatedAccInstr(acc *solana.Wallet, ownerPubKey solana.PublicKey, instr *[]solana.Instruction) error { +func (c *ContractDeployer) AddNewAssociatedAccInstr(acc solana.PublicKey, ownerPubKey solana.PublicKey, assocAccount solana.PublicKey, instr *[]solana.Instruction) error { accInstr, err := c.Client.CreateAccInstr(acc, TokenAccountSize, token.ProgramID) if err != nil { return err @@ -95,14 +127,14 @@ func (c *ContractDeployer) AddNewAssociatedAccInstr(acc *solana.Wallet, ownerPub *instr = append(*instr, accInstr, token.NewInitializeAccountInstruction( - acc.PublicKey(), + acc, c.Accounts.Mint.PublicKey(), ownerPubKey, solana.SysVarRentPubkey, ).Build(), associatedtokenaccount.NewCreateInstruction( c.Client.DefaultWallet.PublicKey(), - acc.PublicKey(), + assocAccount, c.Accounts.Mint.PublicKey(), ).Build(), ) @@ -112,7 +144,7 @@ func (c *ContractDeployer) AddNewAssociatedAccInstr(acc *solana.Wallet, ownerPub func (c *ContractDeployer) DeployOCRv2Store(billingAC string) (*Store, error) { programWallet := c.Client.ProgramWallets["store-keypair.json"] payer := c.Client.DefaultWallet - accInstruction, err := c.Client.CreateAccInstr(c.Accounts.Store, StoreAccountSize, programWallet.PublicKey()) + accInstruction, err := c.Client.CreateAccInstr(c.Accounts.Store.PublicKey(), StoreAccountSize, programWallet.PublicKey()) if err != nil { return nil, err } @@ -160,7 +192,7 @@ func (c *ContractDeployer) DeployOCRv2Store(billingAC string) (*Store, error) { func (c *ContractDeployer) CreateFeed(desc string, decimals uint8, granularity int, liveLength int) error { payer := c.Client.DefaultWallet programWallet := c.Client.ProgramWallets["store-keypair.json"] - feedAccInstruction, err := c.Client.CreateAccInstr(c.Accounts.Feed, OCRTransmissionsAccountSize, programWallet.PublicKey()) + feedAccInstruction, err := c.Client.CreateAccInstr(c.Accounts.Feed.PublicKey(), OCRTransmissionsAccountSize, programWallet.PublicKey()) if err != nil { return err } @@ -198,11 +230,11 @@ func (c *ContractDeployer) CreateFeed(desc string, decimals uint8, granularity i return nil } -func (c *ContractDeployer) addMintToAccInstr(instr *[]solana.Instruction, dest *solana.Wallet, amount uint64) error { +func (c *ContractDeployer) addMintToAccInstr(instr *[]solana.Instruction, dest solana.PublicKey, amount uint64) error { *instr = append(*instr, token.NewMintToInstruction( amount, c.Accounts.Mint.PublicKey(), - dest.PublicKey(), + dest, c.Accounts.MintAuthority.PublicKey(), nil, ).Build()) @@ -250,7 +282,7 @@ func (c *ContractDeployer) DeployLinkTokenContract() (*LinkToken, error) { func (c *ContractDeployer) InitOCR2(billingControllerAddr string, requesterControllerAddr string) (*OCRv2, error) { programWallet := c.Client.ProgramWallets["ocr2-keypair.json"] payer := c.Client.DefaultWallet - ocrAccInstruction, err := c.Client.CreateAccInstr(c.Accounts.OCR, OCRAccountSize, programWallet.PublicKey()) + ocrAccInstruction, err := c.Client.CreateAccInstr(c.Accounts.OCR.PublicKey(), OCRAccountSize, programWallet.PublicKey()) if err != nil { return nil, err } @@ -262,42 +294,31 @@ func (c *ContractDeployer) InitOCR2(billingControllerAddr string, requesterContr if err != nil { return nil, err } - vault := c.Accounts.Authorities["vault"] - vaultAssoc, _, err := solana.FindAssociatedTokenAddress(vault.PublicKey, c.Accounts.Mint.PublicKey()) + assocVault, vault, err := c.SetupAssociatedAccount() if err != nil { return nil, err } instr := make([]solana.Instruction, 0) - if err = c.AddNewAssociatedAccInstr(c.Accounts.OCRVault, vault.PublicKey, &instr); err != nil { - return nil, err - } - if err = c.addMintToAccInstr(&instr, c.Accounts.OCRVault, 1e8); err != nil { - return nil, err - } - instr = append(instr, ocrAccInstruction) - instr = append(instr, ocr_2.NewInitializeInstructionBuilder(). - SetMinAnswer(ag_binary.Int128{ - Lo: 1, - Hi: 0, - }). - SetMaxAnswer(ag_binary.Int128{ - Lo: 1000000, - Hi: 0, - }). - SetStateAccount(c.Accounts.OCR.PublicKey()). - SetFeedAccount(c.Accounts.Feed.PublicKey()). - SetPayerAccount(payer.PublicKey()). - SetOwnerAccount(c.Accounts.Owner.PublicKey()). - SetTokenMintAccount(c.Accounts.Mint.PublicKey()). - SetTokenVaultAccount(vaultAssoc). - SetVaultAuthorityAccount(vault.PublicKey). - SetRequesterAccessControllerAccount(racPubKey). - SetBillingAccessControllerAccount(bacPubKey). - SetRentAccount(solana.SysVarRentPubkey). - SetSystemProgramAccount(solana.SystemProgramID). - SetTokenProgramAccount(solana.TokenProgramID). - SetAssociatedTokenProgramAccount(solana.SPLAssociatedTokenAccountProgramID). - Build()) + instr = append(instr, + ocrAccInstruction, + ocr_2.NewInitializeInstructionBuilder(). + SetMinAnswer(ag_binary.Int128{ + Lo: 1, + Hi: 0, + }). + SetMaxAnswer(ag_binary.Int128{ + Lo: 1000000, + Hi: 0, + }). + SetStateAccount(c.Accounts.OCR.PublicKey()). + SetFeedAccount(c.Accounts.Feed.PublicKey()). + SetOwnerAccount(c.Accounts.Owner.PublicKey()). + SetTokenMintAccount(c.Accounts.Mint.PublicKey()). + SetTokenVaultAccount(*assocVault). + SetVaultAuthorityAccount(*vault). + SetRequesterAccessControllerAccount(racPubKey). + SetBillingAccessControllerAccount(bacPubKey). + Build()) err = c.Client.TXSync( "Initializing OCRv2", rpc.CommitmentFinalized, @@ -315,12 +336,6 @@ func (c *ContractDeployer) InitOCR2(billingControllerAddr string, requesterContr if key.Equals(c.Accounts.OCRVault.PublicKey()) { return &c.Accounts.OCRVault.PrivateKey } - if key.Equals(c.Accounts.Mint.PublicKey()) { - return &c.Accounts.Mint.PrivateKey - } - if key.Equals(c.Accounts.MintAuthority.PublicKey()) { - return &c.Accounts.MintAuthority.PrivateKey - } return nil }, payer.PublicKey(), @@ -335,7 +350,7 @@ func (c *ContractDeployer) InitOCR2(billingControllerAddr string, requesterContr Authorities: c.Accounts.Authorities, Owner: c.Accounts.Owner, Proposal: c.Accounts.Proposal, - OCRVaultAssociatedPubKey: vaultAssoc, + OCRVaultAssociatedPubKey: *assocVault, Mint: c.Accounts.Mint, ProgramWallet: programWallet, }, nil @@ -367,7 +382,7 @@ func (c *ContractDeployer) DeployOCRv2AccessController() (*AccessController, err programWallet := c.Client.ProgramWallets["access_controller-keypair.json"] payer := c.Client.DefaultWallet stateAcc := solana.NewWallet() - accInstruction, err := c.Client.CreateAccInstr(stateAcc, AccessControllerStateAccountSize, programWallet.PublicKey()) + accInstruction, err := c.Client.CreateAccInstr(stateAcc.PublicKey(), AccessControllerStateAccountSize, programWallet.PublicKey()) if err != nil { return nil, err } diff --git a/tests/e2e/solclient/ocr2.go b/tests/e2e/solclient/ocr2.go index 97022cfba..81f639f5c 100644 --- a/tests/e2e/solclient/ocr2.go +++ b/tests/e2e/solclient/ocr2.go @@ -71,6 +71,7 @@ func (m *OCRv2) acceptProposal(digest []byte) error { m.State.PublicKey(), m.Proposal.PublicKey(), m.Owner.PublicKey(), + m.OCRVaultAssociatedPubKey, m.Owner.PublicKey(), m.OCRVaultAssociatedPubKey, va.PublicKey, @@ -93,6 +94,47 @@ func (m *OCRv2) acceptProposal(digest []byte) error { ) } +// SetBilling sets default billing to oracles +func (m *OCRv2) SetBilling(observationPayment uint32, transmissionPayment uint32, controllerAddr string) error { + payer := m.Client.DefaultWallet + billingACPubKey, err := solana.PublicKeyFromBase58(controllerAddr) + if err != nil { + return nil + } + va := m.ContractDeployer.Accounts.Authorities["vault"] + err = m.Client.TXSync( + "Set billing", + rpc.CommitmentConfirmed, + []solana.Instruction{ + ocr_2.NewSetBillingInstruction( + observationPayment, + transmissionPayment, + m.State.PublicKey(), + m.Owner.PublicKey(), + m.Owner.PublicKey(), + billingACPubKey, + m.OCRVaultAssociatedPubKey, // token vault + va.PublicKey, // vault authority + solana.TokenProgramID, // token program + ).Build(), + }, + func(key solana.PublicKey) *solana.PrivateKey { + if key.Equals(m.Owner.PublicKey()) { + return &m.Owner.PrivateKey + } + if key.Equals(payer.PublicKey()) { + return &payer.PrivateKey + } + return nil + }, + payer.PublicKey(), + ) + if err != nil { + return err + } + return nil +} + func (m *OCRv2) finalizeOffChainConfig() error { payer := m.Client.DefaultWallet return m.Client.TXSync( @@ -160,7 +202,7 @@ func (m *OCRv2) fetchProposalAccount() (*ocr_2.Proposal, error) { func (m *OCRv2) createProposal(version uint64) error { payer := m.Client.DefaultWallet programWallet := m.Client.ProgramWallets["ocr2-keypair.json"] - proposalAccInstruction, err := m.Client.CreateAccInstr(m.Proposal, OCRProposalAccountSize, programWallet.PublicKey()) + proposalAccInstruction, err := m.Client.CreateAccInstr(m.Proposal.PublicKey(), OCRProposalAccountSize, programWallet.PublicKey()) if err != nil { return err } @@ -251,46 +293,6 @@ func (m *OCRv2) DumpState() error { return nil } -// SetBilling sets default billing to oracles -func (m *OCRv2) SetBilling(observationPayment uint32, transmissionPayment uint32, controllerAddr string) error { - payer := m.Client.DefaultWallet - billingACPubKey, err := solana.PublicKeyFromBase58(controllerAddr) - if err != nil { - return nil - } - va := m.ContractDeployer.Accounts.Authorities["vault"] - err = m.Client.TXSync( - "Set billing", - rpc.CommitmentConfirmed, - []solana.Instruction{ - ocr_2.NewSetBillingInstruction( - observationPayment, - transmissionPayment, - m.State.PublicKey(), - m.Owner.PublicKey(), - billingACPubKey, - m.OCRVaultAssociatedPubKey, // token vault - va.PublicKey, // vault authority - solana.TokenProgramID, // token program - ).Build(), - }, - func(key solana.PublicKey) *solana.PrivateKey { - if key.Equals(m.Owner.PublicKey()) { - return &m.Owner.PrivateKey - } - if key.Equals(payer.PublicKey()) { - return &payer.PrivateKey - } - return nil - }, - payer.PublicKey(), - ) - if err != nil { - return err - } - return nil -} - func (m *OCRv2) GetContractData(ctx context.Context) (*contracts.OffchainAggregatorData, error) { panic("implement me") } @@ -343,20 +345,24 @@ func (m *OCRv2) proposeConfig(ocConfig contracts.OffChainAggregatorV2Config) err } // set one payee for all instr := make([]solana.Instruction, 0) + // TODO: get associated addr payee := solana.NewWallet() - if err := m.ContractDeployer.AddNewAssociatedAccInstr(payee, m.Owner.PublicKey(), &instr); err != nil { + if err := m.ContractDeployer.AddNewAssociatedAccInstr(payee.PublicKey(), m.Owner.PublicKey(), payee.PublicKey(), &instr); err != nil { return err } payees := make([]solana.PublicKey, 0) for i := 0; i < len(oracles); i++ { payees = append(payees, payee.PublicKey()) } - instr = append(instr, ocr_2.NewProposePayeesInstruction( + proposeInstr := ocr_2.NewProposePayeesInstruction( m.Mint.PublicKey(), - payees, m.Proposal.PublicKey(), - m.Owner.PublicKey()).Build(), - ) + m.Owner.PublicKey()) + // Add payees as remaining accounts + for i := 0; i < len(payees); i++ { + proposeInstr.Append(solana.Meta(payees[i])) + } + instr = append(instr, proposeInstr.Build()) return m.Client.TXSync( "Set payees", rpc.CommitmentFinalized, diff --git a/tests/e2e/solclient/solclient.go b/tests/e2e/solclient/solclient.go index 8ec96e94a..9cf23fa7c 100644 --- a/tests/e2e/solclient/solclient.go +++ b/tests/e2e/solclient/solclient.go @@ -3,16 +3,17 @@ package solclient import ( "context" "fmt" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/smartcontractkit/chainlink-testing-framework/blockchain" "io/fs" "math/big" "os" "path/filepath" "time" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/smartcontractkit/chainlink-testing-framework/blockchain" + "github.com/gagliardetto/solana-go" "github.com/gagliardetto/solana-go/programs/system" "github.com/gagliardetto/solana-go/rpc" @@ -115,7 +116,7 @@ func NewClient(cfg *SolNetwork) (*Client, error) { } // CreateAccInstr creates instruction for account creation of particular size -func (c *Client) CreateAccInstr(acc *solana.Wallet, accSize uint64, ownerPubKey solana.PublicKey) (solana.Instruction, error) { +func (c *Client) CreateAccInstr(acc solana.PublicKey, accSize uint64, ownerPubKey solana.PublicKey) (solana.Instruction, error) { payer := c.DefaultWallet rentMin, err := c.RPC.GetMinimumBalanceForRentExemption( context.TODO(), @@ -130,7 +131,7 @@ func (c *Client) CreateAccInstr(acc *solana.Wallet, accSize uint64, ownerPubKey accSize, ownerPubKey, payer.PublicKey(), - acc.PublicKey(), + acc, ).Build(), nil } diff --git a/ts/package.json b/ts/package.json index 0046d8f21..e4c01a411 100644 --- a/ts/package.json +++ b/ts/package.json @@ -28,7 +28,7 @@ }, "dependencies": { "@project-serum/anchor": "^0.24.2", - "@solana/web3.js": "1.31.0" + "@solana/web3.js": "^1.50.1" }, "devDependencies": { "@types/eslint": "^8.2.1", diff --git a/ts/yarn.lock b/ts/yarn.lock index 6fbc7da5a..1f51fff5e 100644 --- a/ts/yarn.lock +++ b/ts/yarn.lock @@ -262,6 +262,13 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.17.2": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a" + integrity sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/template@^7.16.7", "@babel/template@^7.3.3": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.7.tgz#8d126c8701fde4d66b264b3eba3d96f07666d155" @@ -628,13 +635,6 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@solana/buffer-layout@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-3.0.0.tgz#b9353caeb9a1589cb77a1b145bcb1a9a93114326" - integrity sha512-MVdgAKKL39tEs0l8je0hKaXLQFb7Rdfb0Xg2LjFZd8Lfdazkg6xiS98uAZrEKvaoF3i4M95ei9RydkGIDMeo3w== - dependencies: - buffer "~6.0.3" - "@solana/buffer-layout@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.0.tgz#75b1b11adc487234821c81dfae3119b73a5fd734" @@ -642,16 +642,16 @@ dependencies: buffer "~6.0.3" -"@solana/web3.js@1.31.0": - version "1.31.0" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.31.0.tgz#7a313d4c1a90b77f27ddbfe845a10d6883e06452" - integrity sha512-7nHHx1JNFnrt15e9y8m38I/EJCbaB+bFC3KZVM1+QhybCikFxGMtGA5r7PDC3GEL1R2RZA8yKoLkDKo3vzzqnw== +"@solana/web3.js@^1.36.0": + version "1.37.0" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.37.0.tgz#167b5b5d4aedc151237d9230b6142da068b0af34" + integrity sha512-O2iCcgkGdi2FXwVLztPIZHcBuZXdhbVLavMsG+RdEyFGzFD0tQN1rOJ+Xb5eaexjqtgcqRN+Fyg3wAhLcHJbiA== dependencies: "@babel/runtime" "^7.12.5" "@ethersproject/sha2" "^5.5.0" - "@solana/buffer-layout" "^3.0.0" + "@solana/buffer-layout" "^4.0.0" bn.js "^5.0.0" - borsh "^0.4.0" + borsh "^0.7.0" bs58 "^4.0.1" buffer "6.0.1" cross-fetch "^3.1.4" @@ -662,22 +662,25 @@ superstruct "^0.14.2" tweetnacl "^1.0.0" -"@solana/web3.js@^1.36.0": - version "1.37.0" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.37.0.tgz#167b5b5d4aedc151237d9230b6142da068b0af34" - integrity sha512-O2iCcgkGdi2FXwVLztPIZHcBuZXdhbVLavMsG+RdEyFGzFD0tQN1rOJ+Xb5eaexjqtgcqRN+Fyg3wAhLcHJbiA== +"@solana/web3.js@^1.50.1": + version "1.50.1" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.50.1.tgz#dae726a06267d1bcd88b1e3cd8ae44c709302dcf" + integrity sha512-1l9N/nS8pJEA2YibNT8wa072718O0/A1eKWE0+pdWC5wDGQgBNxZSLuv7Cq5Dcn46WsZ5J5ZstK89q8J/ZZaQA== dependencies: "@babel/runtime" "^7.12.5" "@ethersproject/sha2" "^5.5.0" "@solana/buffer-layout" "^4.0.0" + bigint-buffer "^1.1.5" bn.js "^5.0.0" borsh "^0.7.0" bs58 "^4.0.1" buffer "6.0.1" - cross-fetch "^3.1.4" + fast-stable-stringify "^1.0.0" jayson "^3.4.4" js-sha3 "^0.8.0" - rpc-websockets "^7.4.2" + node-fetch "2" + react-native-url-polyfill "^1.3.0" + rpc-websockets "^7.5.0" secp256k1 "^4.0.2" superstruct "^0.14.2" tweetnacl "^1.0.0" @@ -740,13 +743,6 @@ dependencies: "@babel/types" "^7.3.0" -"@types/bn.js@^4.11.5": - version "4.11.6" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" - integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== - dependencies: - "@types/node" "*" - "@types/connect@^3.4.33": version "3.4.35" resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" @@ -1173,6 +1169,20 @@ base64-js@^1.3.1, base64-js@^1.5.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== +bigint-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/bigint-buffer/-/bigint-buffer-1.1.5.tgz#d038f31c8e4534c1f8d0015209bf34b4fa6dd442" + integrity sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA== + dependencies: + bindings "^1.3.0" + +bindings@^1.3.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + bn.js@^4.11.9: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" @@ -1183,16 +1193,6 @@ bn.js@^5.0.0, bn.js@^5.1.2, bn.js@^5.2.0: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== -borsh@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/borsh/-/borsh-0.4.0.tgz#9dd6defe741627f1315eac2a73df61421f6ddb9f" - integrity sha512-aX6qtLya3K0AkT66CmYWCCDr77qsE9arV05OmdFpmat9qu8Pg9J5tBUPDztAW5fNh/d/MyVG/OYziP52Ndzx1g== - dependencies: - "@types/bn.js" "^4.11.5" - bn.js "^5.0.0" - bs58 "^4.0.0" - text-encoding-utf-8 "^1.0.2" - borsh@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/borsh/-/borsh-0.7.0.tgz#6e9560d719d86d90dc589bca60ffc8a6c51fec2a" @@ -1277,6 +1277,14 @@ buffer@6.0.1: base64-js "^1.3.1" ieee754 "^1.2.1" +buffer@^5.4.3: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + buffer@~6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" @@ -1842,6 +1850,11 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= +fast-stable-stringify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz#5c5543462b22aeeefd36d05b34e51c78cb86d313" + integrity sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag== + fastq@^1.6.0: version "1.13.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" @@ -1863,6 +1876,11 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + fill-range@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" @@ -2070,7 +2088,7 @@ iconv-lite@0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -ieee754@^1.2.1: +ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -2925,18 +2943,18 @@ node-addon-api@^2.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== -node-fetch@2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" - integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== - -node-fetch@2.6.7: +node-fetch@2, node-fetch@2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== dependencies: whatwg-url "^5.0.0" +node-fetch@2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.3.0.tgz#9f256b03e5826150be39c764bf51e993946d71a3" @@ -3159,6 +3177,13 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== +react-native-url-polyfill@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/react-native-url-polyfill/-/react-native-url-polyfill-1.3.0.tgz#c1763de0f2a8c22cc3e959b654c8790622b6ef6a" + integrity sha512-w9JfSkvpqqlix9UjDvJjm1EjSt652zVQ6iwCIj1cVVkwXf4jQhQgTNXY6EVTwuAmUjg6BC6k9RHCBynoLFo3IQ== + dependencies: + whatwg-url-without-unicode "8.0.0-3" + regenerator-runtime@^0.13.4: version "0.13.9" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" @@ -3231,6 +3256,19 @@ rpc-websockets@^7.4.2: bufferutil "^4.0.1" utf-8-validate "^5.0.2" +rpc-websockets@^7.5.0: + version "7.5.0" + resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-7.5.0.tgz#bbeb87572e66703ff151e50af1658f98098e2748" + integrity sha512-9tIRi1uZGy7YmDjErf1Ax3wtqdSSLIlnmL5OtOzgd5eqPKbsPpwDP5whUDO2LQay3Xp0CcHlcNSGzacNRluBaQ== + dependencies: + "@babel/runtime" "^7.17.2" + eventemitter3 "^4.0.7" + uuid "^8.3.2" + ws "^8.5.0" + optionalDependencies: + bufferutil "^4.0.1" + utf-8-validate "^5.0.2" + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -3725,6 +3763,15 @@ whatwg-mimetype@^2.3.0: resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== +whatwg-url-without-unicode@8.0.0-3: + version "8.0.0-3" + resolved "https://registry.yarnpkg.com/whatwg-url-without-unicode/-/whatwg-url-without-unicode-8.0.0-3.tgz#ab6df4bf6caaa6c85a59f6e82c026151d4bb376b" + integrity sha512-HoKuzZrUlgpz35YO27XgD28uh/WJH4B0+3ttFqRo//lmq+9T/mIOJ6kqmINI9HpUpz1imRC/nR/lxKpJiv0uig== + dependencies: + buffer "^5.4.3" + punycode "^2.1.1" + webidl-conversions "^5.0.0" + whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" @@ -3788,6 +3835,11 @@ ws@^7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.7.tgz#9e0ac77ee50af70d58326ecff7e85eb3fa375e67" integrity sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A== +ws@^8.5.0: + version "8.8.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.8.1.tgz#5dbad0feb7ade8ecc99b830c1d77c913d4955ff0" + integrity sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA== + xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"