Git Product home page Git Product logo

Comments (10)

boundless-forest avatar boundless-forest commented on September 26, 2024

I successfully conducted a local testnet test after making some investments. During the test, I deployed a contract using a specific derived account through a government approach. You can see the screenshot below for reference. @hackfisher @AurevoirXavier

The solution I used involved the Utility -> DispatchAs -> MessageTransact Pallet -> message_transact call. Not only did the contract deployment work, but the call to the ERC20 contract also functioned properly.

image

The reason for choosing MessageTransact instead of Ethereum pallet is that the message-transact pallet will automatically fills in some transaction fields, such as gas_price, nonce. This way we can avoid some potential validation failures in the execution phase.

image

from darwinia.

AurevoirXavier avatar AurevoirXavier commented on September 26, 2024

I suggested using utility::dispatch_as initially.

Now, I believe we can develop a new pallet that combines the advantages of both dispatch_as and transact. Or improve and rename the message-transact pallet to make it more general.

from darwinia.

boundless-forest avatar boundless-forest commented on September 26, 2024

Now, I believe we can develop a new pallet that combines the advantages of both dispatch_as and transact. Or improve and rename the message-transact pallet to make it more general.

I don't think it's necessary to add a new pallet to combine these two functionalities. Composity is better than a dedicated entity in this case. The name "message-transact" comes from combining "message" from the LCMP protocol and "transact" from the Ethereum pallet. It also makes sense to me~

from darwinia.

hackfisher avatar hackfisher commented on September 26, 2024

I suggested using utility::dispatch_as initially.

Now, I believe we can develop a new pallet that combines the advantages of both dispatch_as and transact. Or improve and rename the message-transact pallet to make it more general.

If use utility::dispatch_as can we use the following dispatch call as runtime call, what else modification we need to do before making a test?

pub fn transact(
			origin: OriginFor<T>,
			transaction: Transaction,
		) -> DispatchResultWithPostInfo {

https://github.com/paritytech/frontier/blob/aea528198b3b226e0d20cce878551fd4c0e3d5d0/frame/ethereum/src/lib.rs#L284C19-L287

from darwinia.

hackfisher avatar hackfisher commented on September 26, 2024

Please use these two calls to demonstrate the solution for the title based on current runtime.

from darwinia.

hackfisher avatar hackfisher commented on September 26, 2024

For other improvements for the runtime, we can continue the thread with more research and discussion.

from darwinia.

hackfisher avatar hackfisher commented on September 26, 2024

Another question:

Using super permission root frequently for managing assets like ERC20 will look dangerous and cost ineffective.

from darwinia.

boundless-forest avatar boundless-forest commented on September 26, 2024

mocked Crab chain signature:

signature: { 
    v: TransactionRecoveryId(124), 
    r: 0x0cb0d711fcdf2770cfa5e094fb3a33c2c7e17e0337eca4d3b7f82808f81272df, 
    s: 0x5faa5047e1337278c25a5625c65b77710a445bee1f4bd9cdf9c3f7c2a0f1469a 
}

from darwinia.

hujw77 avatar hujw77 commented on September 26, 2024

https://github.com/itering/internal-security-audit/issues/77

from darwinia.

boundless-forest avatar boundless-forest commented on September 26, 2024

mocked Pangolin chain signature:

signature: TransactionSignature { 
    v: TransactionRecoveryId(119), 
    r: 0xb00f64117ca7d3849cfd7688f532123b1cf16c7e11a789a61ca83132e97f17d0, 
    s: 0x02064f241d10d2aa70acb2d7da031d6c0f81cfb850de98b4ed7c447278af3983 
    } 
})

from darwinia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.