發表文章

目前顯示的是 7月, 2018的文章

[Dapp]發生Attempting to run transaction which calls a contract function, but recipient address 0 xdfbcbf6aa1667c94542fa134f128978be31ba9e5 is not a contract address

當發生 Attempting to run transaction which calls a contract function, but recipient address 0 xdfbcbf6aa1667c94542fa134f128978be31ba9e5 is not a contract address 是因為之前compiler 已經上傳到不同網路,需要把build\contracts 的 *.json 當刪除 然後再重新 truffle compile 然後再 deploy truffle  migrate --reset --network development 就可以解決了

[git]快速用remote 最後的版本

git fetch origin git reset --hard origin/master

[Dapp] truffle migrate --network rinkeby 錯誤 Cannot find module 'ethereumjs-wallet/hdkey'

install npm install ethereumjs-wallet 但是現在 ethereumjs-wallet 有點問題,錯誤如下 Error: Cannot find module 'ethereumjs-wallet/hdkey' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15) at Function.Module._load (internal/modules/cjs/loader.js:520:25) at Module.require (internal/modules/cjs/loader.js:650:17) at require (internal/modules/cjs/helpers.js:20:18) at Object. (/home/robert/Documents/GitHub/ME/ether-band-battles-work/solidity/node_modules/truffle-hdwallet-provider/index.js:2:13) at Module._compile (internal/modules/cjs/loader.js:702:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10) at Module.load (internal/modules/cjs/loader.js:612:32) at tryModuleLoad (internal/modules/cjs/loader.js:551:12) at Function.Module._load (internal/modules/cjs/loader.js:543:3) at Module.require (internal/modules/cjs/loader.js:650:17) at require (internal/modules/cjs/helpers.js:20:18) at Object. (/

[Dapp] npm install truffle-hdwallet-provider 在Windows 除錯方法

在Linux 用的好好的  npm install truffle-hdwallet-provider 或是   npm install zeppelin-solidity 因為合作的關係在千百個不願意還是換到了windows,在Windows 卻發生很多問題 : 以下是確認步驟: 1.記得要先設定git的環境變數 ex: C:\Program Files\Git\cmd 2.發現錯誤 npm ERR! git fetch -a origin (https://github.com/debris/bignumber.js.git) fatal: unable to access 'https://github.com/debris/bignumber.js.git/': Couldn't connect to server 此時先去更新git的版本 3.發現錯物 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok 此時要更新 node-gyp  npm install -g node-gyp@latest 4. 發現錯誤  Can't find Python executable "python", you can set the PYTHON env varia ble. 此時要去安裝python ,但是自己安裝除除非很懂python ,不然這裡推薦一個方法 用管理員身分 執行 利用windows的 powershell 去執行以下這段command npm install --global --production windows-build-tools 所有插件一次安裝到好

[Unity] LIGHT_ATTENUATION 2018 要換成 UNITY_LIGHT_ATTENUATION

2017 版本之前的程式碼 : Code (shader): float attenuation = LIGHT_ATTENUATION(i); 2018 版需要改成如下 Code (shader): UNITY_LIGHT_ATTENUATION(attenuation, i, i.posWorld.xyz); 記住不需要定義  attenuation 變數直接就可以使用了