moralisweb3 / demo-apps Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 2-Clause "Simplified" License
License: BSD 2-Clause "Simplified" License
In this example (https://ethereum-boilerplate.github.io/ethereum-boilerplate/quickstart), I cannot connect, for example, with Trust Wallet
I scan the QR on my phone, do all the necessary confirmations, but there is no authorization on the site.
I have the same problem on my local server.
The authentication function is commented out, and uncommenting it uncovers a compile error:
Argument of type '{ connector: WalletConnect; }' is not assignable to parameter of type 'AuthenticateOptions'. Object literal may only specify known properties, and 'connector' does not exist in type 'AuthenticateOptions'.ts(2345)
user = await Moralis.authenticate({ signingMessage: "Log in", provider: 'walletconnect' }) // Not working
Please add login with more wallets, I tried but I can either can Phantom or Metamask or WalletConnect to work at once, but never all of them at the same time
I have copied the code and replaced the moralis server url and application id. It is still not showing the Token Images in the Dropdown.
How tu use testenet chain in OneInch Plugin?
There is a lot of code missing from the "vanilla boilerplate" which I assume is what has replaced the "moralis-sign-in-boilerplate" here...is there legacy access to that bp?
Steps to repro:
State of doesn't change, but should presumably log me in and show gas fees.
Why not use this approach (until a proper Angular-specific package arrives)?
/assets/js/
angular.json
(projects » architect » build » options » scripts)moralisAppId
+ moralisUrl
to environmentsapp.component.ts
:import { Component } from '@angular/core';
declare const Moralis: any;
export class AppComponent {
constructor() {
Moralis.initialize(environment.moralisAppId);
Moralis.serverURL = environment.moralisUrl;
}
connect(): void {
Moralis.Web3.authenticate().then(function (user:any) {
console.log(user.get('ethAddress'));
});
}
}
app.component.html
: <button (click)="connect()">Connect</button>
Seems a lot easier, less confusing than trying to get a node script to run in Angular 11+ without ejecting Webpack. Let me know what you think 👍
Hi @ErnoW,
I'm a react native developer. But I have no experience with connecting metamask and call smart contract functions yet. I found your code online. It's great to start. But I have some errors. Would be grateful if you can look at this problem and guide me.
https://github.com/MoralisWeb3/demo-apps/tree/main/react-native-boilerplate
I want to get web3 object and run smart contract functions using the following code.
const web3 = await Moralis.Web3.enableWeb3(); const tokenContract = new web3.eth.Contract(contractAbi, contractAddress)
But I got the following error.
Possible Unhandled Promise Rejection (id: 0): TypeError: undefined is not an object (evaluating '_ref.connector') enableViaWalletConnect$@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:358153:29
I think there's an issue with enableViaWalletConnect
function.
https://github.com/MoralisWeb3/demo-apps/blob/main/react-native-boilerplate/frontend/Moralis/enableViaWalletConnect.ts#L9
There's no connector
option in the response of the connect function. I think it's like an NPM version issue.
Thanks.
Where is I morallis-sign-in-boilerplate?
https://github.com/MoralisWeb3/demo-apps/tree/main/react-native-boilerplate#react-native-boilerplate
"create-react-native-dapp to bootstrap the project." link is dead.
I'm getting code | 141
error | "Invalid function: "getProfileForAddress""
when trying to use an AVAX mainnet moralis server with demo-apps/share-pics
It's static HTML with just appId and serverURL, so it's got to be a problem with Moralis.
Wanted to check out the casino-dapp and followed the steps from the readme.
When trying to run the migrate command, I got errors that contracts from open zeppelin could not be found.
Guess its the way the drive is spelled.
I was able to fix it by omitting ../node_modules/
from the import statements and make it look like this:
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
If it still works on other platforms like this, I suggest to also omit ../node_modules/
in this sample.
C:\Code\GitHub\demo-apps\casino-dapp\truffle (main -> origin) ([email protected])
λ truffle console
truffle(ganache)> migrate
Compiling your contracts...
===========================
> Compiling .\contracts\Migrations.sol
> Compiling .\contracts\flipcontract.sol
> Compiling .\node_modules\@openzeppelin\contracts\access\Ownable.sol
> Compiling .\node_modules\@openzeppelin\contracts\math\SafeMath.sol
> Compiling .\node_modules\@openzeppelin\contracts\utils\Context.sol
> Compilation warnings encountered:
/C/Code/GitHub/demo-apps/casino-dapp/truffle/contracts/flipcontract.sol: Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
/C/Code/GitHub/demo-apps/casino-dapp/truffle/contracts/flipcontract.sol:1:1: ParserError: Source "/C/Code/GitHub/demo-apps/casino-dapp/truffle/node_modules/@openzeppelin/contracts/access/Ownable.sol" not found
import "../node_modules/@openzeppelin/contracts/access/Ownable.sol";
^------------------------------------------------------------------^
,/C/Code/GitHub/demo-apps/casino-dapp/truffle/contracts/flipcontract.sol:2:1: ParserError: Source "/C/Code/GitHub/demo-apps/casino-dapp/truffle/node_modules/@openzeppelin/contracts/math/SafeMath.sol" not found
import "../node_modules/@openzeppelin/contracts/math/SafeMath.sol";
^-----------------------------------------------------------------^
Compilation failed. See above.
Hello everyone,
I tried to run your code on my local environment. I work with a Windows machine with VS Code installed.
moe@LAPTOP:~/demo-apps/nextjs_moralis_nft_gating$ yarn dev
yarn run v1.22.15
warning package.json: No license field
$ next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Loaded env from /home/moe/demo-apps/nextjs_moralis_nft_gating/.env.local
error - ./node_modules/@wagmi/connectors/dist/chunk-3AFMPFBA.js:22:0
Module not found: Package path ./lib/utils.js is not exported from package /home/moe/demo-apps/nextjs_moralis_nft_gating/node_modules/ethers (see exports field in /home/moe/demo-apps/nextjs_moralis_nft_gating/node_modules/ethers/package.json)
Import trace for requested module:
./node_modules/@wagmi/connectors/dist/injected.js
./node_modules/@wagmi/core/dist/chunk-BVC4KGLQ.js
./node_modules/@wagmi/core/dist/internal/index.js
./node_modules/wagmi/dist/index.js
./pages/_app.jsx
https://nextjs.org/docs/messages/module-not-found
wait - compiling...
error - ./node_modules/@wagmi/connectors/dist/chunk-3AFMPFBA.js:22:0
Module not found: Package path ./lib/utils.js is not exported from package /home/moe/demo-apps/nextjs_moralis_nft_gating/node_modules/ethers (see exports field in /home/moe/demo-apps/nextjs_moralis_nft_gating/node_modules/ethers/package.json)
Import trace for requested module:
./node_modules/@wagmi/connectors/dist/injected.js
./node_modules/@wagmi/core/dist/chunk-BVC4KGLQ.js
./node_modules/@wagmi/core/dist/index.js
./node_modules/wagmi/dist/index.js
./pages/_app.jsx
https://nextjs.org/docs/messages/module-not-found`
I already tried to install the necessary components with the yarn add all command, but it gives me many warnings:
yarn add v1.22.15
warning package.json: No license field
warning [email protected]: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
info @next/[email protected]: The platform "linux" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
info @next/[email protected]: The platform "linux" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
info @next/[email protected]: The platform "linux" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
info @next/[email protected]: The platform "linux" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The platform "linux" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The platform "linux" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
info @next/[email protected]: The platform "linux" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
info @next/[email protected]: The platform "linux" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
warning [email protected]: The engine "pnpm" appears to be invalid.
[3/4] Linking dependencies...
warning " > [email protected]" has incorrect peer dependency "ethers@>=5.5.1 <6".
warning "wagmi > @wagmi/[email protected]" has incorrect peer dependency "ethers@>=5.5.1 <6".
warning "wagmi > [email protected]" has incorrect peer dependency "typescript@>=4.9.4".
warning "wagmi > @wagmi/core > @wagmi/[email protected]" has incorrect peer dependency "ethers@>=5.5.1 <6".
[4/4] Building fresh packages...
success Saved lockfile.
warning [email protected]: No license field
success Saved 13 new dependencies.
info Direct dependencies
├─ @moralisweb3/[email protected]
├─ [email protected]
└─ [email protected]
info All dependencies
├─ @moralisweb3/[email protected]
├─ @moralisweb3/[email protected]
├─ @moralisweb3/[email protected]
├─ @panva/[email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
Done in 14.64s.
`
Did some of you also face the same problem on Windows and if yes, how did you handle this error?
Thanks in advance for your help.
An unhandled exception occurred: Cannot find module '@angular-devkit/build-angular/package.json'
Require stack:
please help thanks,
The 'request object' in MoralisWeb3/demo-apps/tree/main/django_moralis_auth/web3_auth/views.py is outdated. (See line 32.)
Took quite a while to pinpoint this, but I was getting an authentication error: message expired
while trying to incorporate this into a Django project.
Changing the expiration time to anything beyond the present fixes this, however. Recommend updating this.
There is a broken link to docs on this document.
I've tried boilerplate and vanilla repo but it's not working with ios(have both MM & trust wallet).
Can you provide a working ios auth example?
Hello.
Would you be interested in a svelte boilerplate project? Happy to set one up.
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.