patrickalphac / weather-nft Goto Github PK
View Code? Open in Web Editor NEWchainlink weather nfts
License: MIT License
chainlink weather nfts
License: MIT License
Hi, I'm trying to compile and run the weather nft but when I do a "truffle migrate --network mumbai" it give me this error:
C:\Users\User\weather-nft> truffle migrate --network mumbai
Compiling your contracts...
===========================
> Compiling @chainlink\contracts\src\v0.6\Chainlink.sol
> Compiling @chainlink\contracts\src\v0.6\ChainlinkClient.sol
> Compiling @chainlink\contracts\src\v0.6\LinkTokenReceiver.sol
> Compiling @chainlink\contracts\src\v0.6\interfaces\ChainlinkRequestInterface.sol
> Compiling @chainlink\contracts\src\v0.6\interfaces\ENSInterface.sol
> Compiling @chainlink\contracts\src\v0.6\interfaces\LinkTokenInterface.sol
> Compiling @chainlink\contracts\src\v0.6\interfaces\PointerInterface.sol
> Compiling @chainlink\contracts\src\v0.6\vendor\BufferChainlink.sol
> Compiling @chainlink\contracts\src\v0.6\vendor\CBORChainlink.sol
> Compiling @chainlink\contracts\src\v0.6\vendor\ENSResolver.sol
> Compiling @chainlink\contracts\src\v0.6\vendor\SafeMathChainlink.sol
> Compiling @openzeppelin\contracts\access\Ownable.sol
> Compiling @openzeppelin\contracts\introspection\ERC165.sol
> Compiling @openzeppelin\contracts\introspection\IERC165.sol
> Compiling @openzeppelin\contracts\math\SafeMath.sol
> Compiling @openzeppelin\contracts\token\ERC721\ERC721.sol
> Compiling @openzeppelin\contracts\token\ERC721\IERC721.sol
> Compiling @openzeppelin\contracts\token\ERC721\IERC721Enumerable.sol
> Compiling @openzeppelin\contracts\token\ERC721\IERC721Metadata.sol
> Compiling @openzeppelin\contracts\token\ERC721\IERC721Receiver.sol
> Compiling @openzeppelin\contracts\utils\Address.sol
> Compiling @openzeppelin\contracts\utils\Context.sol
> Compiling @openzeppelin\contracts\utils\EnumerableMap.sol
> Compiling @openzeppelin\contracts\utils\EnumerableSet.sol
> Compiling @openzeppelin\contracts\utils\Strings.sol
> Compiling .\contracts\Consensus2021ChainlinkWeatherNFT.sol
> Compiling .\contracts\Migrations.sol
> Compiling .\contracts\WeatherFeed.sol
> Compiling .\contracts\interfaces\IWeatherFeed.sol
> Compiling .\contracts\test\MockOracle.sol
> Artifacts written to C:\Users\Patofet\weather-nft\build\contracts
> Compiled successfully using:
- solc: 0.6.6+commit.6c089d02.Emscripten.clang
Starting migrations...
======================
> Network name: 'mumbai'
> Network id: 80001
> Block gas limit: 20000000 (0x1312d00)
1_initial_migration.js
======================
Deploying 'Migrations'
----------------------
> transaction hash: 0x7dcc7c14df34621fed03baa0cb2cfeddbb073b7e1307b2ae71426439308e0749
> Blocks: 2 Seconds: 4
> contract address: 0xe1ef5eE0D8e1eF5c95189786EFFAfeaEA0039Fb0
> block number: 21590475
> block timestamp: 1637173719
> account: 0x493a1656B343cE26C25A185909F871656b946d87
> balance: 0.997684645
> gas used: 226753 (0x375c1)
> gas price: 3 gwei
> value sent: 0 ETH
> total cost: 0.000680259 ETH
> Saving migration to chain.
> Saving artifacts
-------------------------------------
> Total cost: 0.000680259 ETH
2_deploy_weather_feed.js
========================
We can deploy stuff... but that's it!
Deploying 'WeatherFeed'
-----------------------
Error: *** Deployment Failed ***
"WeatherFeed" -- invalid address (argument="address", value="", code=INVALID_ARGUMENT, version=address/5.0.5) (argument="_oracle", value="", code=INVALID_ARGUMENT, version=abi/5.0.7).
at C:\Users\Patofet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\deployer\src\deployment.js:365:1
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Migration._deploy (C:\Users\Patofet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\Migration.js:70:1)
at Migration._load (C:\Users\Patofet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\Migration.js:56:1)
at Migration.run (C:\Users\Patofet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\Migration.js:217:1)
at Object.runMigrations (C:\Users\Patofet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\index.js:150:1)
at Object.runFrom (C:\Users\Patofet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\index.js:110:1)
at Object.run (C:\Users\Patofet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\index.js:87:1)
at runMigrations (C:\Users\Patofet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\commands\migrate.js:258:1)
at Object.run (C:\Users\Patofet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\commands\migrate.js:223:1)
at Command.run (C:\Users\Patofet\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\command.js:183:1)
Truffle v5.4.19 (core: 5.4.19)
Node v16.13.0
I'm seeing that the error is in migrations/2_deploy_weather_feed.js line 13 that the 3rd parameter of the constructor is "web3.utils.toHex(networkConfig[deployer.network_id]["weatherJobId"])" it expects an oracle address but web3.utils.toHex doesn't isn't an address, how can I fix it? I'm new to this type of contracts
Hi,
I've ran step 1 to 4 with Mumbai Network with information found in https://blog.chain.link/matic-defi-price-feeds/
* Link token : 0x70d1F773A9f81C852087B77F6Ae6d3032B02D2AB
* Oracle : 0x1cf7D49BE7e0c6AC30dEd720623490B64F572E17
* Job ID : d8fcf41ee8984d3b8b0eae7b74eca7dd
* fee: '1000000000000000000'
* fundAmount: '40000000000000000'
Right now i'm blocked in step 5 fund.js => "invalid opcode: opcode 0xfe not defined"
that's all.
Note : For step 4 (mint.js), log told me "View your NFTs on Opensea! https://opensea.io/assets/matic/0x728D09Ac31d192FeB41eb1bf9B921cC225635Aa1/0" => I've a 404 error.
Could you help ?
Best.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.