Requesting airdrop of 1 SOL on the devnet - wallet

I have properly setup a Solana wallet on the devnet, using these commands:
curl https://release.solana.com/v1.8.6/solana-install-init-x86_64-pc-windows-msvc.exe --output C:\solana-install-tmp\solana-install-init.exe --create-dirs
C:\solana-install-tmp\solana-install-init.exe v1.8.6
solana-keygen new --outfile C:/Users/Usermame/.config/solana/devnet.json
solana config set --keypair C:/Users/Usermame/.config/solana/devnet.json
solana config get
And it successfully created a Solana wallet. However, when I ran:
solana airdrop 1
It said:
Requesting airdrop of 1 SOL
Error: unable to confirm transaction. This can happen in situations such as transaction expiration and insufficient fee-payer funds
I have successfully airdropped 1 SOL to a Solana wallet on a devnet before, I don't know why this is not working.
Can anyone help me with this please?
Thank you!

Sometimes the devnet runs out of the faucets due to some dev asking for more than required faucets.
Have ran into same problem many times now.
One such instance was highlighted by core-contributor on the community group.
SOLUTION:
Either you can wait for validators to mint new faucets
OR
Ask for faucet in discord. That should do.

As mentioned before, sometimes the devnet is out; however, that is also just a potential message you get when the devnet(or any net) is down as well. You can ask in the server; otherwise, you can try other networks like the test network or deploying locally in the meantime.

Related

DeployedBytecode doesn't match

so I encountered a weird issue with deploying bytecodes via a deployer contract. On 1 of 5 deployed contracts via the same compilation round & deployment flow I ended having a different deployedBytecode (but same bytecode) as with my original truffle compiled source. Therefore I can't get it verified. The issue seems that the address of the deployer contract is part of the deployedBytecode (while on my local file it is the null address). The issue is also only for 1 contract, while all 5 contracts share the same code (especially around the deployer address mentioned inside the contract.
So here i.e. is the deployer contract (+ verified source code):
https://polygonscan.com/address/0xd54716865c58d11e7c39c3cf634d9e919c0c6cce#code
I deployed my contract (SignerVaultV1.sol) via that tx:
https://polygonscan.com/tx/0x4d6e3a002b448e675ba6a2374737d4eaf0e18b163a57a66c09109ba332c8c5e3
The bytecode of it is exactly the same as on my local file, but if the deployedBytecodes are compared, 3 changes can be seen: Diff between online vs offline deployedBytecode (I can't post pics yet^^)
The difference in it is the address of the deployer contract (d54716865c58d11e7c39c3cf634d9e919c0c6cce). But like I said, the deployerContract delivered multiple contracts, all are correct, only this one is having that issue and I cant figure it out why.
I personally would like to get that contract verified without having to redeploy it (and maybe rund into the same issue...) I tried already to alter the source code to match the online deployedBytecode, but it seems also a harsh idea :D
Well after testing different ways, I dont honestly why, but sending a verification request via hardhat got it working... I couldn't manually verify or via truffle, but hardhat seems to know the magic for the last contract :)

No job show up in Runs page while trying to run a Chainlink node locally

I am trying to fulfil requests on my local test chainlink node on rinkeby (following https://docs.chain.link/docs/fulfilling-requests/) but can't see any job runs appear on my operator ui.
The Oracle contract is at 0xA66f738a4688A9E51c2c6FF901CC3B11ce31AE6C
The ATestnetConsumer contract is at 0x977129EE2f404F4327A2A60C5fD9E57890D85FD0
My job toml screenshot below
Have confirmed my .env that it is running the rinkeby wss url from infura and the chain is 4 and the link token contract address is 0x01BE23585060835E02B77ef475b0Cc51aA1e0709
My node wallet has ETH and LINK. Both the contracts have Link too (but no ETH).
I run the setFulfillmentPermission function in remix with my Node wallet address and true
When I execute the requestEthereumPrice function with my oracle address and job id, I can see the LINK being sent by the ATestnetConsumer contract to the Oracle contract but no job run gets created in my local Chainlink node.
Confirming that the job hasn't run, I get the 0 value when I run the currentPrice function on ATestnetConsumer.
Can anyone please point me to where I am going wrong? Thanks in advance!
Finally got it to work. Posting my two findings as I do think the documentation needs an update to account for these.
The external job id in the Jobs screen on the Operator UI has dashes in them. To use them in the ATestnetConsumer contract you need to remove the dashes (so 0e84f38985eb4edb98c2e2a09b589666 and not 0e84f389-85eb-4edb-98c2-e2a09b589666).
The direct request toml doesn't seem to work as is. I had to append allowunrestrictednetworkaccess="true" to the fetch section so it becomes
fetch [type="http" method=GET url="$(decode_cbor.get)" allowunrestrictednetworkaccess="true"]

No Eth for accounts of private network of `truffle develop`?

I'm developing a Solidity program. I started truffle develop
> truffle develop
Truffle Develop started at http://localhost:9545/
Accounts:
(0) 0x627306090abab3a6e1400e9345bc60c78a8bef57
(1) 0xf17f52151ebef6c7334fad080c5704d77216b732
(2) 0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef
(3) 0x821aea9a577a9b44299b9c15c88cf3087f3b5544
(4) 0x0d1d4e623d10f9fba5db95830f7d3839406c6af2
(5) 0x2932b7a2355d6fecc4b5c0b6bd44cc31df247a2e
(6) 0x2191ef87e392377ec08e7c08eb105ef5448eced5
(7) 0x0f4f2ac550a1b4e2280d04c21cea7ebd822934b5
(8) 0x6330a553fc93768f612722bb8c2ec78ac90b3bbc
(9) 0x5aeda56215b167893e80b4fe645ba6d5bab767de
Mnemonic: candy maple cake sugar pudding cream honey rich smooth crumble sweet treat
truffle(develop)> migrate
Using network 'develop'.
Running migration: 1_initial_migration.js
Replacing Migrations...
... 0x3bfa69d31cbe12e43f20204daaf24e764a084ade586c3b417099d2e2deccc8eb
Migrations: 0x8cdaf0cd259887258bc13a92c0a6da92698644c0
Saving successful migration to network...
... 0xd7bc86d31bee32fa3988f1c1eabce403a1b5d570340a3a9cdba53a472ee8c956
Saving artifacts...
Running migration: 2_deploy_contracts.js
Replacing TutorialToken...
... 0x56fb0c0933ee395055db66976427f050e24dadda018b113d8f0cc03dc7229043
TutorialToken: 0x345ca3e014aaf5dca488057592ee47305d9b3e10
Saving successful migration to network...
... 0xf36163615f41ef7ed8f4a8f192149a0bf633fe1a2398ce001bf44c43dc7bdda0
Saving artifacts...
truffle(develop)>
Then I setup MetaMask to connect the Private network of http://localhost:9545/. However, I cannot do any transaction because the MetaMask account has 0 ETH? How to add some test ETH for development?
Update
I realized that the account created by metamask has different addresses than the ten test accounts created by truffle develop. How to import the test account into Metamask?
When you setup Metamask you have to import the existing account (I can't remember the exact wording of the option, but you'll figure it out) and then provide the mnemonic Truffle gave you: candy maple cake sugar pudding cream honey rich smooth crumble sweet treat.
Instead of importing the Truffle test accounts into Metamask, you can start Truffle with a predefined set of test accounts using the --account option. Just specify your private key and the amount of Wei you want to start with.
testrpc --account
"YOUR_PRIVATE_KEY,300000000000000000000"
This will initialize your account with 300 ether. Note that you have to pass in your key, not the address.
You can specify multiple accounts with separate --account options.
Instead of importing testrpc/ganache-cli accounts to metamask, you can start testrpc/ganache-cli giving the metamask's mnemonic seed.
Here's how to do it :
Open metamask
click on the burger menu on the top-right corner of the pop-in
Metamask main pop-in
Choose reveal seed word at the bottom of the settings pop-in
Metamask option bottom pop-in
Enter your password. Seed words should been revealed then. Copy/paste them somewhere safe.
When launching testrpc, here's what you can use :
Here's what i use :
testrpc -m "<seed words>"
if you use ganache-cli, which is the new version of testrpc, that's the same :
ganache-cli -m "<seed words>"
This is what i personally use :
ganache-cli -b 15 --debug -m "<seed words>"
-b 15 means i want 15 second block time. I put this to have some delay as on the main net. When deploying your contracts and making requests you won't have instant answer. If you want you can put decrement this number if you want some delay but not wait too much.
--debug will allow you to have some more information like the assembly instructions made when making a call. It can be useful to know what fails or where the contract instructions stops.
After you run Truffle develop and the console prints out the 10 accounts along with the private keys, copy one of the accounts private keys then go to Metamask > Import Account > Select Type = Private Key then past the copied private key in and then you should see the account with ETH in it.
Note: All 10 accounts should have 100 Eth except the first that used a small amount of Eth to bootstrap the chain.

Truffle MetaCoin example not working as expected

So I have a testrpc running, and two instances of the initial project created with truffle init. And they both connect to the same testrpc.
1.
When I fill in an amount and no address, it will subtract the amount from my current balance. I would expect that same balance to show up at the other instance, which is using the same account[0] ID. But it doesn't, it shows the initial 10000 there, while i would expect the actual balance to be extracted from the testrpc? What am I doing/thinking wrong here?
2.
When I try to transfer MetaCoins from account[0] to account[1] (or rather, enter the id), then modify app.js in one of the instances to account[1], run truffle build and refresh, the balance is still 0.
3.
When I try the above two on the same instance/device, it does work?
I suspect that either I'm misunderstanding some fundamental thing here, or there's a bug somewhere.
Although the testrpc is receiving an eth_sendTransaction in the terminal, when either instance does a transaction..

OpenShift Online API responds with single white space and HTTP 406 "not acceptable" to any request

According to the OpenShift docs, the following should return a result:
curl -X GET https://openshift.redhat.com/broker/rest/api
However, any call to the API actually just returns a single whitespace - including those called with username & password.
I've confirmed the issue from several different machines accross the globe.
What might be the reason?
Inspired by a similar question regarding Twitter, I added .json at the end of the URL and it worked:
curl -X GET https://openshift.redhat.com/broker/rest/api.json
It's kind of disappointing that RedHat never replied to any inquiry regarding this issue.
The issue is logged here: https://bugzilla.redhat.com/show_bug.cgi?id=1324208
You can add yourself to the "cc" if you would like to be notified as the fix gets rolled out to production.
FYI, asking for help on a public forum and giving it only 4 hours for a response from the company seems a bit much. In the future it may be worth it for you to either check for open bugs, or to ask the company directly instead.