Skip to content
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-moonbeam as GLMR evm #76

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
24 changes: 24 additions & 0 deletions packages/kos-proto/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,30 @@ impl MATICOptions {
self.eth.clone()
}
}
#[derive(Deserialize, Serialize, Default, Clone, Debug)]
#[wasm_bindgen]
pub struct GLMROptions {
#[wasm_bindgen(skip)]
pub eth: ETHOptions,
}

#[wasm_bindgen]
impl GLMROptions {
#[wasm_bindgen(constructor)]
pub fn new() -> Self {
Self::default()
}

#[wasm_bindgen(js_name = setETHOptions)]
pub fn set_eth_options(&mut self, options: &ETHOptions) {
self.eth = options.clone();
}

#[wasm_bindgen(js_name = getETHOptions)]
pub fn get_eth_options(&self) -> ETHOptions {
self.eth.clone()
}
}

#[derive(Deserialize, Serialize, Default, Clone, Debug)]
#[wasm_bindgen]
Expand Down
2 changes: 1 addition & 1 deletion packages/kos-sdk/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ macro_rules! createChains {
}
}

createChains!(NONE, KLV, TRX, BTC, ETH, MATIC);
createChains!(NONE, KLV, TRX, BTC, ETH, MATIC, GLMR);

// pub enum Chain {
// NONE, // 0
Expand Down
3 changes: 3 additions & 0 deletions packages/kos-sdk/src/chains/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@ mod default;
mod ethereum;
mod evm20;
mod klever;
mod moonbeam;
mod polygon;
mod tron;

pub use self::bitcoin::BTC;
pub use default::NONE;
pub use ethereum::ETH;
pub use klever::KLV;
pub use moonbeam::GLMR;
pub use polygon::MATIC;
pub use tron::TRX;

pub use ethereum::transaction::Transaction as ETHTransaction;
pub use moonbeam::Transaction as GLMRTransaction;
pub use polygon::Transaction as MATICTransaction;

pub use self::bitcoin::transaction::BTCTransaction;
Loading
Loading