Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Knowledge base/CLI_Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
3. [> Unable to find image 'asia-docker.pkg.dev/supra-devnet/misc/supra-testnet/validator-node:v6.3.0' locally](#ISSUE-SUMMARY-Unable-to-find-image)
4. [> Supra equivalent command for create-resource-account-and-publish-package](#ISSUE-SUMMARY-Supra-equivalent-command-for)
5. [> Not able to locate MOVE.Toml file](#issue-summary-trouble-for-seeing-movetoml-file-at-local-but-only-on-docker-container-files)

![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)

NOTE: Follow the format below to get started with reporting the issues!
- `ISSUE SUMMARY`
- `SOLUTION SUMMARY`
- `SOLUTION SUMMARY`

![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)

Expand All @@ -29,9 +29,9 @@ supra
- Open Docker Desktop and ensure the container is active, or
- Run the following command:

```PowerShell
docker ps
```
```PowerShell
docker ps
```

Ensure the supra_cli container is listed as running.

Expand Down Expand Up @@ -109,4 +109,4 @@ docker run --name supra_cli -v ${PWD}:/supra/configs/<PATH LINK> -e SUPRA_HOME=/

Also for Move.toml issue, the one in the local project folder has to be the same as the Move.toml file in your Docker container.

Click on supra container > files > Supra folder > config > Move workspace > check the move.toml file via code editor and make sure it has the same address and dependencies.
Click on supra container > files > Supra folder > config > Move workspace > check the move.toml file via code editor and make sure it has the same address and dependencies.
52 changes: 26 additions & 26 deletions Knowledge base/Module and Deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ The code snippet in here demonstrate that how can we create tx payload for entry

So we should convert the move function call to rawTransaction object and pass it to the data that defined on your docs, and we ignore the sequence_number like metamask ignore the nonce and the wallet side will process that.

For raw transaction, Process to create a `rawTx` and `serializedRawTx` is almost similar
For raw a transaction, the process to create a `rawTx` and `serializedRawTx` is almost similar

```PowerShell
```TypeScript
// To send serialized transaction
console.log(
await supraClient.sendTxUsingSerializedRawTransaction(
Expand All @@ -38,22 +38,22 @@ For raw transaction, Process to create a `rawTx` and `serializedRawTx` is almost
enableWaitForTransaction: true,
}
)
);
);
```
![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
## ISSUE SUMMARY: sign a message using starkey wallet
### Couldn't find any docs regarding sign a message using starkey wallet, any example code that I can start with?
## ISSUE SUMMARY: Sign a message using StarKey Wallet
### Couldn't find any docs regarding sign a message using Starkey Wallet, any example code that I can start with?

### ➥ SOLUTION SUMMARY:
Please update to Min V 1.1.24, This Version and Above includes the signMessage function.
Here's a code snippet for the help:
Here's a code snippet for the help:

```Javascript
// Javascript
import nacl from "tweetnacl";

const haxString = '0x' + Buffer.from(signMessage, 'utf8').toString('hex')
const response = await supraProvider.signMessage({message:haxString})
const hexString = '0x' + Buffer.from(signMessage, 'utf8').toString('hex')
const response = await supraProvider.signMessage({message:hexString})
console.log('signMessage response :: ', response)
if (response) {
const { publicKey,signature,address } = response
Expand All @@ -71,15 +71,15 @@ console.log('signMessage response :: ', response)

```Typescript
// Typescript
const remove0xPrefix = (hexString: string) => {
return hexString.startsWith("0x") ? hexString.slice(2) : hexString;
}
const remove0xPrefix = (hexString: string) => {
return hexString.startsWith("0x") ? hexString.slice(2) : hexString;
}
```
Demo LINK: https://frontend-web-wallet-connect-demo.vercel.app/supra-dapp

![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
## ISSUE SUMMARY: Error Code 0x1::resource_account: 0x60001
Getting error in deploying the contract to testnet while the contracts are build without any error and error code in output is 0x1::resource_account: 0x60001
Getting error in deploying the contract to testnet while the contracts are built without any error and error code in output is 0x1::resource_account: 0x60001

### ➥ SOLUTION SUMMARY:
This error message typically indicates a problem with resource account management within the Move code. In the context of deploying a contract, it likely means that there's an issue with how your contract interacts with the resource accounts.
Expand All @@ -92,13 +92,13 @@ https://github.com/Entropy-Foundation/aptos-core/blob/b414eadb54e8e8722e58096f96

It means the container resource that stores the mapping of the resource address to signer capability doesn't exist at the address you are passing

Here is a repo that I used to test the create_resource_account_and_publish_package method
Here is a repo that I used to test the create_resource_account_and_publish_package method
https://github.com/nolan-supra/TS-SDK_Create-Resource-Account-And-Publish-Package

![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
## ISSUE SUMMARY: Move compilation failed: supra move tool compile

Move compilation failed while doing `supra move tool compile --package-dir /supra/configs/move_workspace/PROJECT NAME`
Move compilation failed while doing `supra move tool compile --package-dir /supra/configs/move_workspace/PROJECT NAME`

Error message
```PowerShell
Expand All @@ -118,7 +118,7 @@ Add the dependency like this
```
![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
## ISSUE SUMMARY: Call the Modules Deployed on Supra
An example code or like repo to Call the Modules Deployed on Supra.
An example code or like repo to Call the Modules Deployed on Supra.

## ➥ SOLUTION SUMMARY:
All of our deployed framework modules are available in the framework folder of the github repo then api endpoint can be used to see which modules are available.
Expand All @@ -134,7 +134,7 @@ https://rpc-testnet.supra.com/rpc/v1/accounts/{address}/modules/{module_name}
![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
## ISSUE SUMMARY: Digital Assets Dependency for NFT Dapp

### ➥ SOLUTION SUMMARY:
### ➥ SOLUTION SUMMARY:
these digital assets modules are deployed at the 0x4 address

```PowerShell
Expand All @@ -153,12 +153,12 @@ https://rpc-mainnet.supra.com/rpc/v1/accounts/0x4/modules
**src:** https://github.com/Entropy-Foundation/aptos-core/blob/dev/aptos-move/framework/aptos-token-objects/sources/token.move

![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
## ISSUE SUMMARY: Module for Implementation on a custom coin.
## ISSUE SUMMARY: Module for Implementation on a custom coin.

### ➥ SOLUTION SUMMARY:
### ➥ SOLUTION SUMMARY:
A Move Module Made for a liquid swap on supra, Customize and use this to work for your Implementation on a custom coin:

```PowerShell
```Move
module airdrop_deployer::bitcoin_coin {
use std::error;
use std::signer;
Expand Down Expand Up @@ -211,7 +211,7 @@ module airdrop_deployer::bitcoin_coin {
coin::deposit(signer::address_of(user), coins);
}
}
```
```

More details on what's happening here:

Expand All @@ -222,11 +222,11 @@ More details on what's happening here:
5. The module ensures strict access control and leverages Move's resource model for safe and efficient token management.

![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
## ISSUE SUMMARY: transfer function stating that account isn't registered
## ISSUE SUMMARY: Transfer function stating that account isn't registered
We are creating a token and then registering our account to have a coinstore for that token, it’s still reverting back on transfer function stating that account isn't registered.

### ➥ SOLUTION SUMMARY:
The error `account isn't registered` during the transfer function indicates that the recipient address hasn't been registered with the coin module.
### ➥ SOLUTION SUMMARY:
The error `account isn't registered` during the transfer function indicates that the recipient address hasn't been registered with the coin module.

Before like having token transfer and all ensure the recipient address is explicitly registered using the `register` function and If your token design allows for implicit registration, the `transfer` function could potentially register the recipient if they're not already registered. However, this might have security implications and should be carefully considered.

Expand All @@ -236,10 +236,10 @@ You can check that the `coin module` is accessible to the `transfer` function. E
## ISSUE SUMMARY: Calling Supra Coin
From Supraframework do we have supra coins?

## ➥ SOLUTION SUMMARY:
## ➥ SOLUTION SUMMARY:

Yes,
Use below call for calling Supra coin for the framework
```PowerShell
```Move
use supra_framework::supra_coin;
```
```
12 changes: 6 additions & 6 deletions Knowledge base/Oracles_and_VRF_Errors.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Table of Contents
1. [> If a request fails on callback, is there a time-delay before it is retried?](#issue-summary-if-a-request-fails-on-callback-is-there-a-time-delay-before-it-is-retried)
2. [> Time period For Request tobe permanently dropped](#issue-summary-time-period-for-request-tobe-permanently-dropped)
3. [> Callback due to Insufficient Fund](#issue-summary--callback-due-to-insufficient-fund)
2. [> Time period For Request to be permanently dropped](#issue-summary-time-period-for-request-tobe-permanently-dropped)
3. [> Callback due to Insufficient Funds](#issue-summary--callback-due-to-insufficient-fund)
4. [> Pull Oracles are returning 404](#issue-summary-pull-oracles-are-returning-404)
5. [> Whitelisting Note for dVRF.](#issue-summary-whitelisting-note-for-dvrf)

Expand All @@ -17,22 +17,22 @@ NOTE: Kindly follow the below format to get started with reporting the issues!

### ➥ SOLUTION SUMMARY:
Depends on the type of failure. There can be a lot of reasons for the failure.
If the client has insufficient balance then its going to get failed after 3 retries from each primary and backup. So we send multiple emails alerts before the client balance reaches minBalance.
If the client has insufficient balance then its going to get failed after 3 retries from each primary and backup. So we send multiple emails alerts before the client balance reaches minBalance.
If the delay is because of txn not getting confirmed yet and still in the mempool (because of the gas price) then we do retry twice with a span of 3 mins from each primary and backup.
If the failure is because of some revert actions present in the client contract then we provide proper events to tranck them.

NOTE:: Backup node works 15 blocks behind primary

![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
## ISSUE SUMMARY: Time period For Request tobe permanently dropped
Is there a time window where, after a certain amount of retries or some time period, the request is permanently dropped?
## ISSUE SUMMARY: Time period For Request to be permanently dropped
Is there a time window where, after a certain amount of retries or some time period, the request is permanently dropped?

### ➥ SOLUTION SUMMARY:
No specific time window in this version that will be available in the next version.

![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)

## ISSUE SUMMARY: Callback due to Insufficient Fund
## ISSUE SUMMARY: Callback due to Insufficient Funds
If Chainlink ever fails its callback (due to insufficient funds or whatever the case may be), we're able to rescue funds from the game contract itself, knowing that after 24 hours, that specific request will never try to callback again. I was wondering if we had any guarantees in this way for Supra, so we know how to handle an event of something going wrong.

### ➥ SOLUTION SUMMARY:
Expand Down
4 changes: 2 additions & 2 deletions Knowledge base/Other_Configuration_Errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ NOTE: Kindly follow the below format to get started with reporting the issues!

## ISSUE SUMMARY: Extract an address using a private key

For some reason, when I try to extract an address using a private key, for example, with ethereum, everything works correctly in testnet, but when I take the supra private key, I get a different address, not the one indicated in the application, they even differ in length, it is still very problematic with it, maybe the library is not suitable and maybe they have some kind of library for working with supra.
For some reason, when I try to extract an address using a private key, for example, with Ethereum, everything works correctly in testnet, but when I take the supra private key, I get a different address, not the one indicated in the application, they even differ in length, it is still very problematic with it, maybe the library is not suitable and maybe they have some kind of library for working with supra.

### ➥ SOLUTION SUMMARY:
### ➥ SOLUTION SUMMARY:
The discrepancy you're encountering between Ethereum and Supra address derivation likely from fundamental differences in both chain's underlying cryptographic algorithms and address formats, you wanna look at the library again, eth addresses are 160bit, Supra has 256.
Loading