kiecodes / nft Goto Github PK
View Code? Open in Web Editor NEWThis repo belongs to the youtube video series "NFT with no clue". https://www.youtube.com/watch?v=GAFh2Z5VtgM
License: MIT License
This repo belongs to the youtube video series "NFT with no clue". https://www.youtube.com/watch?v=GAFh2Z5VtgM
License: MIT License
Hi,
I followed along on the YouTube video to learn how to create Dapps but got an error while running "truffle test" for the Date contract. Out put below
PS C:\DPUMD\FirstTruffle> truffle test
Using network 'test'.
Compiling .\contracts\Date.sol
Compiling .\contracts\Date.sol
Compiling .\contracts\Migrations.sol
ParserError: Expected ',' but got identifier
--> project:/contracts/Date.sol:44:34:
|
44 | require(msg.value == (10 finney), "claiming a date costs 10 finney");
| ^^^^^^
Compilation failed. See above.
Truffle v5.4.3 (core: 5.4.3)
Node v14.17.3
Is there a declaration for "10 finney" missing?
Your correspondence is appreciated
Line 151 has a type error??
TypeError: Operator + not compatible with types int256 and uint256
--> project:/contracts/Date.sol:151:23:
|
151 | year = uint16(int(yoe) + era * 400 + (month <= 2 ? 1 : 0));
| ^^^^^^^^^^^^^^^^^^^^
After about a week turning this over, referencing the fundamentals and documentation, I still don't have a solution for this. The lack of comments in the code notwithstanding, I'd like to know how you made it work. Are the differences between Mac and Windows that substantial?
it looks like the ui is calling a method totalSupply
that is not defined in the Date.sol. What would that function look like?
I've downloaded the latest version of contract. Error reported when compile:
`
Compiling ./contracts/Date.sol
Compiling ./contracts/Migrations.sol
project:/contracts/Date.sol:40:47: ParserError: Expected '{' but got reserved keyword 'override'
function _baseURI() internal view virtual override returns (string memory) {
^------^
Compilation failed. See above.
Truffle v5.4.24 (core: 5.4.24)
Node v16.13.1
`
how to solve this problem?
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.