Browse Source

Update all solana dependencies to 1.7.3, fix issues (#1958)

* Update all dependencies to 1.7.3, fix issues

* Remove esm from mocha

* Fix missed token test

* Also update rust version

* token-swap: update tolerance on sim test

* Run `cargo clippy --fix` for needless_borrow errors

* Rerun cargo fmt
Jon Cinque 4 years ago
parent
commit
94107a4bbe
2 changed files with 62 additions and 62 deletions
  1. 2 2
      program/Cargo.toml
  2. 60 60
      program/src/processor.rs

+ 2 - 2
program/Cargo.toml

@@ -16,11 +16,11 @@ arrayref = "0.3.6"
 num-derive = "0.3"
 num-traits = "0.2"
 num_enum = "0.5.1"
-solana-program = "1.6.11"
+solana-program = "1.7.3"
 thiserror = "1.0"
 
 [dev-dependencies]
-solana-sdk = "1.6.11"
+solana-sdk = "1.7.3"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 60 - 60
program/src/processor.rs

@@ -1927,9 +1927,9 @@ mod tests {
         // transfer
         let instruction = transfer(
             &program_id,
-            &account_info.key,
-            &account_info.key,
-            &owner_info.key,
+            account_info.key,
+            account_info.key,
+            owner_info.key,
             &[],
             1000,
         )
@@ -1953,10 +1953,10 @@ mod tests {
         // transfer checked
         let instruction = transfer_checked(
             &program_id,
-            &account_info.key,
-            &mint_info.key,
-            &account_info.key,
-            &owner_info.key,
+            account_info.key,
+            mint_info.key,
+            account_info.key,
+            owner_info.key,
             &[],
             1000,
             2,
@@ -1983,9 +1983,9 @@ mod tests {
         let mut owner_no_sign_info = owner_info.clone();
         let mut instruction = transfer(
             &program_id,
-            &account_info.key,
-            &account_info.key,
-            &owner_no_sign_info.key,
+            account_info.key,
+            account_info.key,
+            owner_no_sign_info.key,
             &[],
             1000,
         )
@@ -2008,10 +2008,10 @@ mod tests {
         // missing signer checked
         let mut instruction = transfer_checked(
             &program_id,
-            &account_info.key,
-            &mint_info.key,
-            &account_info.key,
-            &owner_no_sign_info.key,
+            account_info.key,
+            mint_info.key,
+            account_info.key,
+            owner_no_sign_info.key,
             &[],
             1000,
             2,
@@ -2035,9 +2035,9 @@ mod tests {
         // missing owner
         let instruction = transfer(
             &program_id,
-            &account_info.key,
-            &account_info.key,
-            &owner2_info.key,
+            account_info.key,
+            account_info.key,
+            owner2_info.key,
             &[],
             1000,
         )
@@ -2058,10 +2058,10 @@ mod tests {
         // missing owner checked
         let instruction = transfer_checked(
             &program_id,
-            &account_info.key,
-            &mint_info.key,
-            &account_info.key,
-            &owner2_info.key,
+            account_info.key,
+            mint_info.key,
+            account_info.key,
+            owner2_info.key,
             &[],
             1000,
             2,
@@ -2084,9 +2084,9 @@ mod tests {
         // insufficient funds
         let instruction = transfer(
             &program_id,
-            &account_info.key,
-            &account_info.key,
-            &owner_info.key,
+            account_info.key,
+            account_info.key,
+            owner_info.key,
             &[],
             1001,
         )
@@ -2107,10 +2107,10 @@ mod tests {
         // insufficient funds checked
         let instruction = transfer_checked(
             &program_id,
-            &account_info.key,
-            &mint_info.key,
-            &account_info.key,
-            &owner_info.key,
+            account_info.key,
+            mint_info.key,
+            account_info.key,
+            owner_info.key,
             &[],
             1001,
             2,
@@ -2133,10 +2133,10 @@ mod tests {
         // incorrect decimals
         let instruction = transfer_checked(
             &program_id,
-            &account_info.key,
-            &mint_info.key,
-            &account_info.key,
-            &owner_info.key,
+            account_info.key,
+            mint_info.key,
+            account_info.key,
+            owner_info.key,
             &[],
             1,
             10, // <-- incorrect decimals
@@ -2159,10 +2159,10 @@ mod tests {
         // incorrect mint
         let instruction = transfer_checked(
             &program_id,
-            &account_info.key,
-            &account3_info.key, // <-- incorrect mint
-            &account_info.key,
-            &owner_info.key,
+            account_info.key,
+            account3_info.key, // <-- incorrect mint
+            account_info.key,
+            owner_info.key,
             &[],
             1,
             2,
@@ -2185,9 +2185,9 @@ mod tests {
         // approve delegate
         let instruction = approve(
             &program_id,
-            &account_info.key,
-            &delegate_info.key,
-            &owner_info.key,
+            account_info.key,
+            delegate_info.key,
+            owner_info.key,
             &[],
             100,
         )
@@ -2206,9 +2206,9 @@ mod tests {
         // delegate transfer
         let instruction = transfer(
             &program_id,
-            &account_info.key,
-            &account_info.key,
-            &delegate_info.key,
+            account_info.key,
+            account_info.key,
+            delegate_info.key,
             &[],
             100,
         )
@@ -2233,10 +2233,10 @@ mod tests {
         // delegate transfer checked
         let instruction = transfer_checked(
             &program_id,
-            &account_info.key,
-            &mint_info.key,
-            &account_info.key,
-            &delegate_info.key,
+            account_info.key,
+            mint_info.key,
+            account_info.key,
+            delegate_info.key,
             &[],
             100,
             2,
@@ -2263,9 +2263,9 @@ mod tests {
         // delegate insufficient funds
         let instruction = transfer(
             &program_id,
-            &account_info.key,
-            &account_info.key,
-            &delegate_info.key,
+            account_info.key,
+            account_info.key,
+            delegate_info.key,
             &[],
             101,
         )
@@ -2286,10 +2286,10 @@ mod tests {
         // delegate insufficient funds checked
         let instruction = transfer_checked(
             &program_id,
-            &account_info.key,
-            &mint_info.key,
-            &account_info.key,
-            &delegate_info.key,
+            account_info.key,
+            mint_info.key,
+            account_info.key,
+            delegate_info.key,
             &[],
             101,
             2,
@@ -2312,9 +2312,9 @@ mod tests {
         // owner transfer with delegate assigned
         let instruction = transfer(
             &program_id,
-            &account_info.key,
-            &account_info.key,
-            &owner_info.key,
+            account_info.key,
+            account_info.key,
+            owner_info.key,
             &[],
             1000,
         )
@@ -2338,10 +2338,10 @@ mod tests {
         // owner transfer with delegate assigned checked
         let instruction = transfer_checked(
             &program_id,
-            &account_info.key,
-            &mint_info.key,
-            &account_info.key,
-            &owner_info.key,
+            account_info.key,
+            mint_info.key,
+            account_info.key,
+            owner_info.key,
             &[],
             1000,
             2,