-
Notifications
You must be signed in to change notification settings - Fork 0
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
Expose API url variables for ghostnet & mainnet #5
Changes from 4 commits
3663417
d345f1c
ee914fd
f8be644
07360bb
bf392cc
3327be9
2a23b79
960af77
d454a08
5e19c75
587112d
b31ff1a
9150161
3dff258
e8b4c10
0a7ed1f
997e0f5
53d47f8
e42b6e3
cdde4c7
36a91b2
e960a99
f3a7b00
6129ada
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,11 +30,21 @@ export type PermitOperation = { | |
transferHash: string; | ||
}; | ||
|
||
export const GAS_STATION_PUBLIC_API_GHOSTNET = | ||
"https://ghostnet.gas-station-api.marigold.dev/operation"; | ||
export const GAS_STATION_PUBLIC_API_MAINNET = | ||
"https://gas-station-api.marigold.dev/operation"; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should remove the trailing /operation and add it in |
||
export class GasStation { | ||
url: string; | ||
|
||
constructor(settings: Settings) { | ||
this.url = settings.apiURL; | ||
/** | ||
* | ||
* @param settings (optional) object | ||
* - apiURL: the URL of Gas Station API. /!\ For this version, the URL must redirect to the endpoint /operation | ||
*/ | ||
constructor(settings?: Settings) { | ||
this.url = settings?.apiURL || GAS_STATION_PUBLIC_API_GHOSTNET; | ||
} | ||
|
||
async postOperations(sender: string, ops: Array<Operation>) { | ||
|
@@ -62,6 +72,8 @@ export class GasStation { | |
} | ||
} | ||
|
||
const g = new GasStation(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? |
||
|
||
export class PermitContract { | ||
address: string; | ||
tezos: TezosToolkit; | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
I'm not sure why you're not changing the file directly? Is it because we're using a different account for the gas station on Ghostnet and Staging? I'm not sure it's worth it; and even then, we can change the contract to allow several admins.
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.
Or we could just originate a single contract that can have two admins, see aguillon/permit-cameligo#3
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.
Yes it's because the contract has only one admin but we can deploy the contract with several admin and just remove this part after.