mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-13 14:39:25 +00:00
Compare commits
8 Commits
599b2dec8f
...
dafba81b40
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dafba81b40 | ||
|
|
91f8ec53d9 | ||
|
|
fc9a4a08b8 | ||
|
|
45fadb21ac | ||
|
|
28619fbee1 | ||
|
|
bbe014c3a7 | ||
|
|
fb3fadb3d3 | ||
|
|
f481d20773 |
37
.github/workflows/pages.yml
vendored
37
.github/workflows/pages.yml
vendored
@@ -1,6 +1,7 @@
|
|||||||
# MIT License
|
# MIT License
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 just-the-docs
|
# Copyright (c) 2022 just-the-docs
|
||||||
|
# Copyright (c) 2022-2024 Luke Parker
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -20,31 +21,21 @@
|
|||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
|
|
||||||
# This workflow uses actions that are not certified by GitHub.
|
name: Deploy Rust docs and Jekyll site to Pages
|
||||||
# They are provided by a third-party and are governed by
|
|
||||||
# separate terms of service, privacy policy, and support
|
|
||||||
# documentation.
|
|
||||||
|
|
||||||
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
|
|
||||||
name: Deploy Jekyll site to Pages
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "develop"
|
- "develop"
|
||||||
paths:
|
|
||||||
- "docs/**"
|
|
||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
pages: write
|
pages: write
|
||||||
id-token: write
|
id-token: write
|
||||||
|
|
||||||
# Allow one concurrent deployment
|
# Only allow one concurrent deployment
|
||||||
concurrency:
|
concurrency:
|
||||||
group: "pages"
|
group: "pages"
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@@ -53,9 +44,6 @@ jobs:
|
|||||||
# Build job
|
# Build job
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: docs
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -69,11 +57,24 @@ jobs:
|
|||||||
id: pages
|
id: pages
|
||||||
uses: actions/configure-pages@v3
|
uses: actions/configure-pages@v3
|
||||||
- name: Build with Jekyll
|
- name: Build with Jekyll
|
||||||
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
|
run: cd ${{ github.workspace }}/docs && bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
|
||||||
env:
|
env:
|
||||||
JEKYLL_ENV: production
|
JEKYLL_ENV: production
|
||||||
|
|
||||||
|
- name: Get nightly version to use
|
||||||
|
id: nightly
|
||||||
|
shell: bash
|
||||||
|
run: echo "version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT
|
||||||
|
- name: Build Dependencies
|
||||||
|
uses: ./.github/actions/build-dependencies
|
||||||
|
- name: Buld Rust docs
|
||||||
|
run: |
|
||||||
|
rustup toolchain install ${{ steps.nightly.outputs.version }} --profile minimal -t wasm32-unknown-unknown -c rust-docs
|
||||||
|
RUSTDOCFLAGS="--cfg docsrs" cargo +${{ steps.nightly.outputs.version }} doc --workspace --no-deps --all-features
|
||||||
|
mv target/doc docs/_site/rust
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v1
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: "docs/_site/"
|
path: "docs/_site/"
|
||||||
|
|
||||||
@@ -87,4 +88,4 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
id: deployment
|
id: deployment
|
||||||
uses: actions/deploy-pages@v2
|
uses: actions/deploy-pages@v4
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ rust-version = "1.70"
|
|||||||
all-features = true
|
all-features = true
|
||||||
rustdoc-args = ["--cfg", "docsrs"]
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
|
[package.metadata.cargo-machete]
|
||||||
|
ignored = ["tiny-bip39"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "bip39"
|
name = "bip39"
|
||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|||||||
@@ -918,16 +918,17 @@ impl<D: Db> Network for Ethereum<D> {
|
|||||||
.into(),
|
.into(),
|
||||||
};
|
};
|
||||||
|
|
||||||
use ethereum_serai::alloy::{primitives::Signature, consensus::SignableTransaction};
|
use ethereum_serai::alloy::{
|
||||||
|
primitives::{Parity, Signature},
|
||||||
|
consensus::SignableTransaction,
|
||||||
|
};
|
||||||
let sig = k256::ecdsa::SigningKey::from(k256::elliptic_curve::NonZeroScalar::new(key).unwrap())
|
let sig = k256::ecdsa::SigningKey::from(k256::elliptic_curve::NonZeroScalar::new(key).unwrap())
|
||||||
.sign_prehash_recoverable(tx.signature_hash().as_ref())
|
.sign_prehash_recoverable(tx.signature_hash().as_ref())
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let mut bytes = vec![];
|
let mut bytes = vec![];
|
||||||
tx.encode_with_signature_fields(
|
let parity = Parity::NonEip155(Parity::from(sig.1).y_parity());
|
||||||
&Signature::from(sig).with_chain_id(self.provider.get_chain_id().await.unwrap()),
|
tx.encode_with_signature_fields(&Signature::from(sig).with_parity(parity), &mut bytes);
|
||||||
&mut bytes,
|
|
||||||
);
|
|
||||||
let pending_tx = self.provider.send_raw_transaction(&bytes).await.ok().unwrap();
|
let pending_tx = self.provider.send_raw_transaction(&bytes).await.ok().unwrap();
|
||||||
|
|
||||||
// Mine an epoch containing this TX
|
// Mine an epoch containing this TX
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ impl Wallet {
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use ethereum_serai::{
|
use ethereum_serai::{
|
||||||
alloy::{
|
alloy::{
|
||||||
primitives::{U256, Signature, TxKind},
|
primitives::{U256, Parity, Signature, TxKind},
|
||||||
sol_types::SolCall,
|
sol_types::SolCall,
|
||||||
simple_request_transport::SimpleRequest,
|
simple_request_transport::SimpleRequest,
|
||||||
consensus::{TxLegacy, SignableTransaction},
|
consensus::{TxLegacy, SignableTransaction},
|
||||||
@@ -389,7 +389,8 @@ impl Wallet {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let mut bytes = vec![];
|
let mut bytes = vec![];
|
||||||
tx.encode_with_signature_fields(&Signature::from(sig), &mut bytes);
|
let parity = Parity::NonEip155(Parity::from(sig.1).y_parity());
|
||||||
|
tx.encode_with_signature_fields(&Signature::from(sig).with_parity(parity), &mut bytes);
|
||||||
|
|
||||||
// We drop the bottom 10 decimals
|
// We drop the bottom 10 decimals
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user