-
Notifications
You must be signed in to change notification settings - Fork 6
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
EVM Fungible Tokens #3
Conversation
|
@@ -0,0 +1 @@ | |||
stable-2020-10-08 |
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.
What's the rationale for this specific toolchain version? Let's document it.
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.
https://github.com/near/near-sdk-rs/blob/master/rust-toolchain
With higher version I can't build a contract with near-sdk-rs.
near_sdk::setup_alloc!(); | ||
|
||
/// Price per 1 byte of storage from mainnet genesis config. | ||
const STORAGE_PRICE_PER_BYTE: Balance = 100_000_000_000_000_000_000; // 1e20yN, 0.0001N |
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.
Is this the original or the adjusted storage price? The 10x fee reduction goes into effect on March 8.
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.
That particular const was related to bridge-token-connector, and it looks correct.
So if we will need to change it feel free to notify me.
@@ -0,0 +1,9 @@ | |||
#!/bin/bash | |||
|
|||
RUSTFLAGS='-C link-arg=-s' cargo build --target wasm32-unknown-unknown --release || exit 1 |
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.
You can just begin the script with set -e
, and then you don't need to add constructs such as || exit 1
.
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.
Got it. It was just copy-pasted from some other NEAR contract.
@@ -0,0 +1,2902 @@ | |||
# This file is automatically @generated by Cargo. |
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.
Any particular reason for committing Cargo.lock
? If not, let's leave it out?
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.
Cargo.lock
provides reproducing process for building in another environment. Also looking at near-sdk-rs
I can see that file. So for me, it looks like some standard way for NEAR repos. If it's not so, pls let me know.
Btw, reminder that storage price has dropped to 1e19.
Also there is now a env::storage_byte_cost() to not have this constant
everywhere (and replace that with runtime host function later)
…On Mon, Mar 8, 2021 at 6:47 AM Evgeny Ukhanov ***@***.***> wrote:
***@***.***LSD* commented on this pull request.
------------------------------
In evm-fungible-token/src/lib.rs
<#3 (comment)>
:
> +use near_sdk::serde_json::json;
+use near_sdk::{
+ env, log, near_bindgen, AccountId, Balance, PanicOnDefault, Promise, PromiseResult,
+};
+
+use deposit_event::EthDepositedEvent;
+pub use prover::{validate_eth_address, EthAddress, Proof};
+
+pub mod deposit_event;
+pub mod prover;
+//pub mod withdraw_event;
+
+near_sdk::setup_alloc!();
+
+/// Price per 1 byte of storage from mainnet genesis config.
+const STORAGE_PRICE_PER_BYTE: Balance = 100_000_000_000_000_000_000; // 1e20yN, 0.0001N
That particular const was related to bridge-token-connector, and it looks
correct.
So if we will need to change it feel free to notify me.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABK27QT2JOTNK63ZZQHO2DTCTPQRANCNFSM4XWLOWLA>
.
--
Best regards,
Illia Polosukhin
|
NEAR EVM SmartContract for ETH Connector
Implementation:
Implement NEAR side of the connector as NEP-141 #1