无法读取未定义的 Web3.Js Ethereum 的属性 sendAsync

问题描述

我目前在 NodeJS 环境中工作,正在尝试通过 web3 运行合约功能

我目前使用的是 0.2.3 版本,我认为是出于其他依赖性原因。

这是我的代码片段:

 Sub IMF()
    Dim ConnString As String
    Dim wsIMF As Worksheet
    Set wsIMF = Sheets("IMF Exchange rates")
    
    wsIMF.Cells.ClearContents
    ConnString = "TEXT;http://www.imf.org/external/np/fin/data/rms_five.aspx?tsvflag=Y"
        With wsIMF.QueryTables.Add(Connection:=ConnString,Destination:=wsIMF.Range("A1"))
            .Name = _
            " "
            .FieldNames = True
            .RowNumbers = False
            .FillAdjacentFormulas = False
            .PreserveFormatting = True
            .RefreshOnFileOpen = False
            .RefreshStyle = xlInsertDeleteCells
            .SavePassword = False
            .SaveData = True
            .AdjustColumnWidth = False
            .RefreshPeriod = 0
            .TextFilePromptOnRefresh = False
            .TextFilePlatform = 775
            .TextFileStartRow = 1
            .TextFileParseType = xlDelimited
            .TextFileTextQualifier = xlTextQualifierDoubleQuote
            .TextFileConsecutiveDelimiter = False
            .TextFileTabDelimiter = True
            .TextFileSemicolonDelimiter = False
            .TextFileCommaDelimiter = True
            .TextFileSpaceDelimiter = False
            .TextFileColumnDataTypes = Array(1)
            .TextFileDecimalSeparator = ","
            .TextFileTrailingMinusNumbers = True
            .Refresh BackgroundQuery:=False
        End With
    
    End Sub

然而,当我运行它时,我遇到以下问题:

错误错误:未捕获(承诺):类型错误:无法读取属性 未定义类型错误的“sendAsync”:无法读取属性“sendAsync” 未定义的

当我 console.log MyContract 我得到以下信息:

enter image description here

任何帮助将不胜感激。

谢谢 查迪兹

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)