I have successfully deployed an Ethereum ERC20 token using the code on:
https://www.ethereum.org/token
Now came to the stage when we need to verify the contract, which I am unable to.
I have compared input bytecode with bytecode in my Wallet and they are same so I am sure using correct code, also I used pragma solidity 0.4.16 in my code so used v0.4.16+commit.d7661dd9 and optimization=1.
Please help!
Related
I am new in SGX,In DCAP attestation a SGX quote is generated which is going to be used by the client to make sure the code or request is executed inside SGX so my question are:
when attestations occurs, how the client car verify the quote?
where the SGX quote is saved? how client can access it?
In my current application under test using Karate framework, I came across TWO APIs - Token and Extended, which provides the APIGEE token value to access backend services.
API-1: Token API
Input payload (form-data) -
grant-type: authorization_code
code: *8-digit-characters*
redirect_uri: https://../oauth-code-callback
code-verifier:*28-digit-characters*
client_id: *Unique-Client-Key*
Response -
{"access-token":"..."}
API-2: Extended API
Input payload (JSON) -
{"access-token":"..."}
Response -
"APIGEE_Token"
Looking at the input payload in API-1, code and code-verifier are SHA-256 encrypted values generated using typescript. Now, in order to generate the final APIGEE token, I need to generate code and code-verifier values using the same typescript libraries in Karate. Is there any possibility as such? Else, please suggest if there is any alternative approach for my requirement. Thanks in advance!
First, I suggest you check if the tokens can be generated using some standard algorithm, in that case you can re-write them in Java or JS. Examples here: https://stackoverflow.com/search?q=%5Bkarate%5D+jwt
Else here are 2 extra creative solutions:
Karate uses the Graal JS engine, so if you can get the pure-JS equivalent of the routine you need, it may be possible to load it into Karate by reading the .js file. For example read() (or karate.read()) can return a JS function, which you can then invoke within your test flow.
If you have node / npm installed, you can write a command-line program that takes command-line args and returns the data you need. Note that you can even return JSON and use karate.fromString() to parse it. Karate happens to have very good support for OS command-line execution, refer: https://stackoverflow.com/a/62911366/143475 and a similar idea is described here: https://stackoverflow.com/a/51150286/143475
Finally, it may well be worth it to ask your dev-team to stand-up a small REST service that returns these tokens for you in your pre-prod environment. And the moment you have a REST option, guess what Karate is really good at :) The REST is up to you.
probably noob question, but I cannot find RinkebyETH token address on Rinkeby network. I would like to test approve/transferFrom with ETH, but I would need to use IERC20("token address").approve/transferFrom.
I have added Rinkeby network to MetaMask and some tokens, but I cannot find token contract address of those holding tokens in MetaMask.
Can someone point me somewhere :)
Thank you.
ETH is the native token on Rinkeby - it has no address. Since it has no address, and no contract deployed on this address, you cannot invoke contract functions on native ETH.
However, you can use the WETH (Wrapped Ether) token instead, which is an ERC20 token meant to represent ETH and you can invoke regular ERC20 functions (including approve() and transferFrom()) on this token. There might be multiple different tokens named WETH with the same or very similar functionality deployed (and possibly controlled) by different creators. For example Uniswap publishes a link in their docs to this specific WETH token that they're using on Rinkeby: 0xc778417E063141139Fce010982780140Aa0cD5Ab
I am trying to create a Google Assistant for my Raspberry Pi in Kotlin. I implemented a OAuth flow using the so called "device flow" proposed in this IETF draft, since my Raspberry shall later just expose a web interface and does not have any input devices or graphical interfaces.
Google does support this flow (of course) and I obtain a valid access token with user consent in the end. For testing purpose I also tried a default authorization flow that will just forward the user to localhost, as it is normally done but it did not solve the problem.
I tested the access token using this tool and it confirmed validity of scope and token. So the token itself should work.
Scope is: https://www.googleapis.com/auth/assistant-sdk-prototype as documented here
This actually does not point to any valid web resource but is referenced in every documentation.
Then I tried to stream audio data to the assistant SDK endpoint using the gRPC provided java stubs. As took a third party reference implementation as a guide how to authenticate the rpc stub. But neither the reference implementation nor my own one works. They both report
io.grpc.StatusRuntimeException: UNAUTHENTICATED: Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
The stub is authenticated this way:
embeddedAssistantStub.withCallCredentials(
MoreCallCredentials.from(OAuth2Credentials
.newBuilder()
.setAccessToken(
myAccessToken,
myAccessTokenExpirationDate))
.build()))
and the authenticated request is performed like this:
val observer = authenticatedEmbeddedAssistantStub.converse(myStreamObserverImplementation)
observer.onNext(myConfigConverseRequest)
while(more audio data frames available) {
observer.onNext(myAudioFrameConverseRequest)
}
observer.onCompleted()
(I prefixed pseudo variables with "my" for clarity, they can consist of more code in the actual implementation.)
I even contacted the author of this demo implementation. He told me, last time he checked (several months ago) it was working perfectly fine. So I finally ran out of options.
Since the client implementation I took as reference used to work and I do actually authenticate the stub (although the error message suggests the opposite) Probably, either my valid access token with correct scope is not suitable chosen for the assistant API (though I followed the suggestions of google) or the API servers had a change not properly documented in the getting started articles by google.
So: Did anyone ran in the same problem and know how to fix it? I have the project on github. So if anyone needs the broken source code, I can do a temporary commit that produces the error.
Note, to save some works for mods: This issue referres to this and this question, both unresolved and using different languages but describing a similar problem.
Well, seems I was right about my second assumption: The error is server side. Here is the github issue, let's just wait for the fix.
https://github.com/googlesamples/assistant-sdk-python/issues/138
I downloaded the Vidyo SDK for iOS. I followed the all the steps to generate a new token and succeeded on that. But at the time of joining the call it always prompting Unexpected disconnection. Even in the VidyoConnector Mac app also getting same error. Led to conference inability.
What are all the possibilities of hitting this error. Any help much appreciated!
Based on your description, it seems like the token you have generated is invalid. How did you generate it ? Here is a link that provides with token generation scripts samples in multiple languages.
https://support.vidyo.io/hc/en-us/articles/115003127747-Generate-a-Token
Another tip to validate your token - it's a long string that ends with "==" symbol.
Are you using the python script shared at https://static.vidyo.io/4.1.16.8/utils/generateToken.py
The syntax for using our pyton token generation:- python3 generateToken.py --key= --appID= --userName= --expiresInSecs=10000
Make sure that you do not include any special character like # in the user name