- 当调用接口为payable时,在执行函数的逻辑之前,msg.value已经被加到了合约地址的balance上.
 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ;;; package --- Summary | |
| ;;; This ia the personal emacs config of manxiaqu. | |
| ;;; Commentary: | |
| ;;; Code: | |
| (message "Begin loading manxiaqu's custom config file.") | |
| ;; Set package url. | |
| (setq package-archives '(("gnu" . "http://elpa.emacs-china.org/gnu/") | |
| ("melpa-stable" . "http://elpa.emacs-china.org/melpa-stable/"))) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ubuntu@ubuntu-XPS-13-9360:~/flipper$ cargo test --verbose | |
| Compiling proc-macro2 v1.0.12 | |
| Compiling unicode-xid v0.2.0 | |
| Compiling syn v1.0.19 | |
| Compiling serde v1.0.110 | |
| Running `rustc --crate-name build_script_build --edition=2018 /home/ubuntu/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/syn-1.0.19/build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -Cembed-bitcode=no -C debuginfo=2 --cfg 'feature="clone-impls"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="extra-traits"' --cfg 'feature="full"' --cfg 'feature="parsing"' --cfg 'feature="printing"' --cfg 'feature="proc-macro"' --cfg 'feature="quote"' --cfg 'feature="visit"' -C metadata=384ab2613018b9fa -C extra-filename=-384ab2613018b9fa --out-dir /home/ubuntu/flipper/target/debug/build/syn-384ab2613018b9fa -L dependency=/home/ubuntu/flipper/target/debug/deps --cap-lints allow` | |
| Running `rustc --crate-name build_script_build /home/ubuntu/.cargo/registry/src/mirrors.u | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ubuntu@ubuntu-XPS-13-9360:~/flipper$ cargo contract build --verbose | |
| [1/4] Collecting crate metadata | |
| [2/4] Building cargo project | |
| + "rustc" "--print" "sysroot" | |
| + "rustc" "--print" "target-list" | |
| + "/home/ubuntu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo" "rustc" "-p" "alloc" "--release" "--manifest-path" "/tmp/cargo-xbuild.s1BD8UrsqVTC/Cargo.toml" "--target" "wasm32-unknown-unknown" "-v" "--" "-Z" "force-unstable-if-unmarked" | |
| Updating `git://mirrors.ustc.edu.cn/crates.io-index` index | |
| Compiling compiler_builtins v0.1.27 | |
| Compiling core v0.0.0 (/home/ubuntu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore) | |
| Running `rustc --crate-name build_script_build /home/ubuntu/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/compiler_builtins-0.1.27/build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=z -Cembed-bitcode=no -C overflow-checks=on --cfg 'feature="compiler-builtins"' --cfg 'fea | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 1. Blocking waiting for file lock on package cache: 删除.cargo/.package-cache文件,重新运行命令(先检查文件是否为空) | 
OlderNewer