8000 GitHub - ashchan/gringotts: UDT Hackathon Team Goblins Codebase
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 12, 2021. It is now read-only.

ashchan/gringotts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gringotts

UDT Hackathon Team Goblins Codebase

Smart Contracts

This dapp leverages 2 smart contracts:

The main contract uses dynamic linking techniques to load the secp contract and runs the signature verification code. Hence you can notice the main contract is quite small (7.9K in current example).

The secp contract is an interesting one: it can work as a dynamic linked library as shown above; it can also be used as a standalone executable contract by itself, in which case it will perform the secp256k1-blake2b-sighash-all validation just like the default lock.

In our test, the dynamic linking only consumes 2375 more cycles than the version where we combine all the logic in one giant contract. In exchange, our current solution enables multiple smart contracts to share the same secp256k1 verification code on chain, the smart contracts, can then focus on and only include dapp specific logic.

About

UDT Hackathon Team Goblins Codebase

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
0