Update Anchor v0.4.4

This commit is contained in:
armaniferrante 2021-04-24 17:04:29 -07:00
parent a25623043c
commit b1ff2b28a4
No known key found for this signature in database
GPG Key ID: 58BEF301E91F7828
6 changed files with 100 additions and 47 deletions

View File

@ -5,8 +5,8 @@ rust:
env:
global:
- NODE_VERSION="v14.7.0"
- SOLANA_VERSION="v1.6.3"
- ANCHOR_VERSION="v0.4.1"
- SOLANA_VERSION="v1.6.6"
- ANCHOR_VERSION="v0.4.4"
before_deploy:
- anchor build --verifiable

131
Cargo.lock generated
View File

@ -17,9 +17,9 @@ dependencies = [
[[package]]
name = "anchor-attribute-access-control"
version = "0.4.1"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7471080bcb66af3a7b6a84fafdb3c846de1174f283a5bb1e5da0c19c7529f2f3"
checksum = "0bc1dd0644b68afc0d1debbb97ccb7f5f25f54616c705be67d54e434f2d272e0"
dependencies = [
"anchor-syn",
"anyhow",
@ -31,9 +31,9 @@ dependencies = [
[[package]]
name = "anchor-attribute-account"
version = "0.4.1"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f3d8f692b4d66ae92133b306fdb6222e503d17e64d7b31da70b6c52af7c8c30"
checksum = "4b758125edf97f9d5ba84b58bbd5a71b242847f049e648b6292887ab3541f8d1"
dependencies = [
"anchor-syn",
"anyhow",
@ -44,9 +44,9 @@ dependencies = [
[[package]]
name = "anchor-attribute-error"
version = "0.4.1"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0a1bf8cb11a874020c5854737bcc7ab373b9fedebf65629ca913b26b9a6b499"
checksum = "843a945ad0a288f5706090c20708ae910c1515fc103ab5fb1063f64e4be5a3a4"
dependencies = [
"anchor-syn",
"proc-macro2",
@ -56,9 +56,9 @@ dependencies = [
[[package]]
name = "anchor-attribute-event"
version = "0.4.1"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73df812d01317eaeb1c15cc26415569b90d2a238deea97bb8ced6a0fd5073e3b"
checksum = "a4f823d51a37431cd0a71864550104a1aa62b0f67d62612c90fa2ed0f96d4be1"
dependencies = [
"anchor-syn",
"anyhow",
@ -69,9 +69,9 @@ dependencies = [
[[package]]
name = "anchor-attribute-interface"
version = "0.4.1"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98becd57e2d1cee8882aab853b9ddd7e3800c36e7444078c705d1a3f9c98012f"
checksum = "ca690936e1003978c354020da66b430769bbd17f3b31cae1aa5084a53132fc33"
dependencies = [
"anchor-syn",
"anyhow",
@ -83,9 +83,9 @@ dependencies = [
[[package]]
name = "anchor-attribute-program"
version = "0.4.1"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70f35576c35f921541a102d971ed769876c93a0e6d1451d6af12b6f95cdd1095"
checksum = "af392df4e4b390d2b0438c7fb1fce1f4878a1acfb79791db29a78d5f41d684f8"
dependencies = [
"anchor-syn",
"anyhow",
@ -96,9 +96,9 @@ dependencies = [
[[package]]
name = "anchor-attribute-state"
version = "0.4.1"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "926046aa4c4a33f8e73984c3a5a3f7d4526c34172f20d4ffbb83c3b8f4cfb040"
checksum = "aa2b80913fa00d6df180f22e35a536d2d516dc786177198e40a4f8c6dc28f24b"
dependencies = [
"anchor-syn",
"anyhow",
@ -109,9 +109,9 @@ dependencies = [
[[package]]
name = "anchor-derive-accounts"
version = "0.4.1"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4038365fea1f8aaa641c587a5767b6b61339479d5fac19f8ee3d1eb82d895fc"
checksum = "ecb6f8805e1c705525d7c11a6f48d972d9a5d339bc98fa5e8ae24a7f0a8e4802"
dependencies = [
"anchor-syn",
"anyhow",
@ -122,9 +122,9 @@ dependencies = [
[[package]]
name = "anchor-lang"
version = "0.4.1"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b4c36248d39a5c138d48db1a65e9245698478da3788d8cfebcfb29d0f70fa29"
checksum = "b509f2f53910f0462f3acecb15a9d409ca346c1283214293113824f180ef75f8"
dependencies = [
"anchor-attribute-access-control",
"anchor-attribute-account",
@ -136,15 +136,16 @@ dependencies = [
"anchor-derive-accounts",
"base64",
"borsh",
"bytemuck",
"solana-program",
"thiserror",
]
[[package]]
name = "anchor-spl"
version = "0.4.1"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "441768ee5bdbe592ac3446a886b99bf870f493caa2df9ad942dfd4aa0af88c2b"
checksum = "19fb214ae2f64e3e71989b0c6b345a8a6f919af4b5ca76de6de9034d37195a25"
dependencies = [
"anchor-lang",
"solana-program",
@ -153,9 +154,9 @@ dependencies = [
[[package]]
name = "anchor-syn"
version = "0.4.1"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74ba3d90914f5a45ec20b51c932514d26ffc50203efa78c6bbb418bdc4a5a910"
checksum = "65c19efff3d8def89fe320965d058bcaf05043f389182666859d626675875926"
dependencies = [
"anyhow",
"bs58",
@ -181,6 +182,12 @@ version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544"
[[package]]
name = "arrayvec"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
[[package]]
name = "atty"
version = "0.2.14"
@ -214,6 +221,21 @@ dependencies = [
"serde",
]
[[package]]
name = "blake3"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e9ff35b701f3914bdb8fad3368d822c766ef2858b2583198e41639b936f09d3f"
dependencies = [
"arrayref",
"arrayvec",
"cc",
"cfg-if 0.1.10",
"constant_time_eq",
"crypto-mac",
"digest 0.9.0",
]
[[package]]
name = "block-buffer"
version = "0.9.0"
@ -284,24 +306,58 @@ dependencies = [
"serde",
]
[[package]]
name = "bytemuck"
version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bed57e2090563b83ba8f83366628ce535a7584c9afa4c9fc0612a03925c6df58"
[[package]]
name = "byteorder"
version = "1.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
[[package]]
name = "cc"
version = "1.0.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd"
[[package]]
name = "cfg-if"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "constant_time_eq"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
[[package]]
name = "cpuid-bool"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634"
[[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.4",
"subtle",
]
[[package]]
name = "curve25519-dalek"
version = "2.1.2"
@ -395,7 +451,7 @@ version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
dependencies = [
"cfg-if",
"cfg-if 1.0.0",
"libc",
"wasi",
]
@ -468,7 +524,7 @@ checksum = "03b07a082330a35e43f63177cc01689da34fbffa0105e1246cf0311472cac73a"
[[package]]
name = "lockup"
version = "0.1.0"
version = "0.2.0"
dependencies = [
"anchor-lang",
"anchor-spl",
@ -480,7 +536,7 @@ version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
dependencies = [
"cfg-if",
"cfg-if 1.0.0",
]
[[package]]
@ -646,7 +702,7 @@ checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581"
[[package]]
name = "registry"
version = "0.1.0"
version = "0.2.0"
dependencies = [
"anchor-lang",
"anchor-spl",
@ -736,7 +792,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa827a14b29ab7f44778d14a88d3cb76e949c45083f7dbfa507d0cb699dc12de"
dependencies = [
"block-buffer",
"cfg-if",
"cfg-if 1.0.0",
"cpuid-bool",
"digest 0.9.0",
"opaque-debug",
@ -744,9 +800,9 @@ dependencies = [
[[package]]
name = "solana-frozen-abi"
version = "1.6.4"
version = "1.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f81ac3925c8995d935d3af27390cf7b748a81837a29feb75a00e115f40dae6dc"
checksum = "10272e9486b3cb41b04e899929c521c5c2a037ba6be1651cff68ad3959f4d1f9"
dependencies = [
"bs58",
"bv",
@ -764,9 +820,9 @@ dependencies = [
[[package]]
name = "solana-frozen-abi-macro"
version = "1.6.4"
version = "1.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae448159038e470f3b2dd1ab0d219246211f940a10bf1e656a02cb5c2d897437"
checksum = "82f4b6a34f19cc4b09da1919ff9810c1a499c7e77fc9d26bea022f69dc965edf"
dependencies = [
"lazy_static",
"proc-macro2",
@ -777,9 +833,9 @@ dependencies = [
[[package]]
name = "solana-logger"
version = "1.6.4"
version = "1.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fa7bddd7b89c26c6e3ef4af9b47d6bc8d60888559affb5160f5ade18c0cd058"
checksum = "3c17fa89f2e5fe988cf95a34df411950db4609f68af8df602371d9b7f83cefa7"
dependencies = [
"env_logger",
"lazy_static",
@ -788,11 +844,12 @@ dependencies = [
[[package]]
name = "solana-program"
version = "1.6.4"
version = "1.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "231bf4cd42997b6f34e7c74a1449e8a1e8816fd83662fc3a5a0922da48fc667b"
checksum = "885552ce43e9f2cf13fda274bf2b4ef75c5de6e5e0190f53acb83f84cda739c0"
dependencies = [
"bincode",
"blake3",
"borsh",
"borsh-derive",
"bs58",
@ -820,9 +877,9 @@ dependencies = [
[[package]]
name = "solana-sdk-macro"
version = "1.6.4"
version = "1.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c805f1e32677f8ec0cc0b2f470833a0d5ab0922f068e52be3a4a93b468c9c70"
checksum = "8264149655cbbcfa1dccd0dc9f62eb04d6832ec08540fcb81db6f305a21d3b65"
dependencies = [
"bs58",
"proc-macro2",

View File

@ -13,5 +13,5 @@ no-entrypoint = []
cpi = ["no-entrypoint"]
[dependencies]
anchor-lang = "0.4.1"
anchor-spl = "0.4.1"
anchor-lang = "0.4.4"
anchor-spl = "0.4.4"

View File

@ -1,8 +1,6 @@
//! A relatively advanced example of a lockup program. If you're new to Anchor,
//! it's suggested to start with the other examples.
#![feature(proc_macro_hygiene)]
use anchor_lang::prelude::*;
use anchor_lang::solana_program::instruction::Instruction;
use anchor_lang::solana_program::program;

View File

@ -13,6 +13,6 @@ no-entrypoint = []
cpi = ["no-entrypoint"]
[dependencies]
anchor-lang = "0.4.1"
anchor-spl = "0.4.1"
anchor-lang = "0.4.4"
anchor-spl = "0.4.4"
lockup = { path = "../lockup", features = ["cpi"] }

View File

@ -1,8 +1,6 @@
//! A relatively advanced example of a staking program. If you're new to Anchor,
//! it's suggested to start with the other examples.
#![feature(proc_macro_hygiene)]
use anchor_lang::prelude::*;
use anchor_lang::solana_program::program_option::COption;
use anchor_spl::token::{self, Mint, TokenAccount, Transfer};