This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/btcsuite/btcd/txscript" | |
"github.com/btcsuite/btcutil" | |
) | |
func BuildMultiSigRedeemScript() (string, error) { | |
// you can use your wif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/btcsuite/btcd/chaincfg" | |
"github.com/btcsuite/btcd/txscript" | |
"github.com/btcsuite/btcutil" | |
) | |
func BuildMultiSigP2SHAddr() (string, error) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/hex" | |
"github.com/btcsuite/btcd/txscript" | |
) | |
func DisAsembleScript() (string, error) { | |
// you can provide your locking script to dis asemble | |
lockingScript := "a914f63e2cbcc678236f683d267e7bb298ffdcd57b0487" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/hex" | |
"fmt" | |
"github.com/btcsuite/btcd/chaincfg" | |
"github.com/btcsuite/btcd/chaincfg/chainhash" | |
"github.com/btcsuite/btcd/txscript" | |
"github.com/btcsuite/btcd/wire" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.7.0 <0.9.0; | |
contract MultiSend { | |
// to save the owner of the contract in construction | |
address private owner; | |
// to save the amount of ethers in the smart-contract | |
uint total_value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// contracts/SimpleToken.sol | |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
/** | |
* @title SimpleToken | |
* @dev Very simple ERC20 Token example, where all tokens are pre-assigned to the creator. | |
* Note they can later distribute these tokens as they wish using `transfer` and other |