-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add network fees and transfer options config #39
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0dcb385
Add network fees and dropdown config
kimberlybp f8dfa49
Add struct validation for transfer options and network fees
kimberlybp c8d4a53
Update README
kimberlybp 07afdd2
Update pr template, add scripts to view BridgesAll and MinGasPriceAll…
kimberlybp 515a4c5
Add transfer_options and network_fees validation in check_configs
kimberlybp 7f61844
Merge remote-tracking branch 'origin/master' into feat/network-order
kimberlybp d305783
Bump usd up in network_fees order
kimberlybp b17a1b6
Clean up descriptions
kimberlybp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { CarbonSDK } from "carbon-js-sdk"; | ||
import Long from "long"; | ||
const myArgs = process.argv.slice(2); | ||
|
||
|
||
(async () => { | ||
const net = myArgs[0] | ||
let network: CarbonSDK.Network; | ||
switch (net.toLowerCase()) { | ||
case "mainnet": | ||
network = CarbonSDK.Network.MainNet; | ||
break; | ||
case "testnet": | ||
network = CarbonSDK.Network.TestNet; | ||
break; | ||
case "devnet": | ||
network = CarbonSDK.Network.DevNet; | ||
break; | ||
default: | ||
console.log("ERROR: Invalid network keyed"); | ||
process.exit(1); | ||
} | ||
|
||
const sdk = await CarbonSDK.instance({ network }); | ||
const bridges = await sdk.query.coin.BridgeAll({ | ||
pagination: { | ||
key: new Uint8Array(), | ||
limit: new Long(10000), | ||
offset: Long.UZERO, | ||
countTotal: true, | ||
reverse: false, | ||
}, | ||
}) | ||
console.log(bridges) | ||
})().catch(console.error).finally(() => process.exit(0)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { CarbonSDK } from "carbon-js-sdk"; | ||
import Long from "long"; | ||
const myArgs = process.argv.slice(2); | ||
|
||
|
||
(async () => { | ||
const net = myArgs[0] | ||
let network: CarbonSDK.Network; | ||
if (!net || net === "") { | ||
console.log("ERROR: No network keyed"); | ||
process.exit(1); | ||
} | ||
|
||
switch (net.toLowerCase()) { | ||
case "mainnet": | ||
network = CarbonSDK.Network.MainNet; | ||
break; | ||
case "testnet": | ||
network = CarbonSDK.Network.TestNet; | ||
break; | ||
case "devnet": | ||
network = CarbonSDK.Network.DevNet; | ||
break; | ||
default: | ||
console.log("ERROR: Invalid network keyed"); | ||
process.exit(1); | ||
} | ||
|
||
const sdk = await CarbonSDK.instance({ network }); | ||
const feeQueryClient = sdk.query.fee | ||
const gasPrices = await feeQueryClient.MinGasPriceAll({ | ||
pagination: { | ||
limit: new Long(10000), | ||
offset: new Long(0), | ||
key: new Uint8Array(), | ||
countTotal: true, | ||
reverse: false, | ||
}, | ||
}) | ||
|
||
console.log(gasPrices) | ||
})().catch(console.error).finally(() => process.exit(0)); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heyyo, for this PR:
You may need to add struct validation into
config.schema.json
like the rest of the fields.Can check out how it's done here
Do update the
README.md
document with the fields that you added.Do update JSON Data Structure section under
.github/markets/pr_template.md
with the definitions of the 2 new fields.Under
scripts/check_configs.ts
, think it would be good to add code to validate the 2 new fields:transfer_options
BridgeAll
RPC callnetwork_fees
MinGasPriceAll
RPC call