如何访问数组的变量?

时间:2021-07-18 08:38:50

标签: solidity truffle

我的合同中有以下变量。

@Echo Off 

Set "SRC=E:\automovesystem\TEMP"
Set "DST=E:\automovesystem\PRPL"

SetLocal EnableDelayedExpansion
If Not Exist "%SRC%\" (Exit/B) Else If Not Exist "%DST%\" Exit/B
For /F "Delims=" %%A In ('Where "%SRC%":?????????*.*') Do (Set "FNX=%%~nA"
    If Not Exist "%DST%\!FNX:~5,50!\NOTICE" (MD "%DST%\!FNX:~5,50!\NOTICE" 2>Nul
        If ErrorLevel 1 Echo Unable to create directory %DST%\!FNX:~5,50!\NOTICE)
    If Exist "%DST%\!FNX:~5,50!\NOTICE" (Move /Y "%%A" "%DST%\!FNX:~5,50!\NOTICE">Nul 2>&1
        If ErrorLevel 1 Echo Unable to move %%A to %DST%\!FNX:~5,50!\NOTICE))
Timeout -1
Exit/B

买入电话会推送一个新订单,如下所示:

IDLE.py

当我使用 truffle 访问订单时,我得到以下信息:

 20     struct Order {
 21         address investor;
 22         uint amount;
 23         string investorId;
 24         uint timestamp;
 25     }
 26 
 27     Order[] public orders;
 28 

我无法使用点访问值:truffle(develop)> instance.orders(2).investorId 给出未定义。我如何访问这些值?其次,像数量和时间戳这样的 uint 值被显示为 BN 数据结构,而不是显示实际值。如何查看实际值?

0 个答案:

没有答案
相关问题