我正在尝试将 EGLD 值(例如 1.5 EGLD)发送到帐户/智能合约,但在某些情况下似乎只允许 BigUInt 类型。这个值是如何工作的以及我应该如何正确地格式化它?
我尝试使用以下Python代码进行ESDT代币发行交易
from erdpy.accounts import Account, Address
from erdpy.proxy import ElrondProxy
from erdpy.transactions import BunchOfTransactions
from erdpy.transactions import Transaction
from erdpy.wallet import signing
TOKEN_NAME = b"Cowdings"
TOKEN_SYMBOL = b"MOO"
DECIMALS = 18
SUPPLY = 1000 * 10**DECIMALS
def hex_string(s: str) -> str:
assert type(s) == bytes, "Make sure everything is bytes data or utf-8 encoded"
return hexlify(s).decode("ascii")
def hex_int(i: int) -> str:
assert type(i) == int, "Make sure everything is bytes data or utf-8 encoded"
return hex(i)[2:]
proxy = ElrondProxy("https://devnet-gateway.elrond.com")
sender …Run Code Online (Sandbox Code Playgroud) 当我尝试使用以下命令从这里构建乒乓球智能合约时:
erdpy build contract
Run Code Online (Sandbox Code Playgroud)
我没有得到以下预期输出:
INFO:projects.core:WASM file generated: output/ping-pong.wasm
Run Code Online (Sandbox Code Playgroud)
因为文件中出现以下错误sc_results.rs:
Compiling elrond-codec v0.5.3
Compiling elrond-wasm v0.18.2
error[E0432]: unresolved import `core::ops::FromResidual`
--> /Users/<username>/elrondsdk/vendor-rust/registry/src/github.com-1ecc6299db9ec823/elrond-wasm-0.18.2/src/types/io/sc_result.rs:7:30
...
error[E0437]: type Output is not a member of trait `Try`
--> /Users/<username>/elrondsdk/vendor-rust/registry/src/github.com-1ecc6299db9ec823/elrond-wasm-0.18.2/src/types/io/sc_result.rs:62:5
...
error[E0437]: type Residual is not a member of trait `Try`
--> /Users/<username>/elrondsdk/vendor-rust/registry/src/github.com-1ecc6299db9ec823/elrond-wasm-0.18.2/src/types/io/sc_result.rs:63:5
...
error[E0407]: method branch is not a member of trait `Try`
--> /Users/<username>/elrondsdk/vendor-rust/registry/src/github.com-1ecc6299db9ec823/elrond-wasm-0.18.2/src/types/io/sc_result.rs:65:5
...
error[E0407]: method from_output is not a member of trait `Try`
--> /Users/<username>/elrondsdk/vendor-rust/registry/src/github.com-1ecc6299db9ec823/elrond-wasm-0.18.2/src/types/io/sc_result.rs:71:5
...
error aborting …Run Code Online (Sandbox Code Playgroud)