Comments (3)
I found the contract address for the bridge on etherlink side 0xff00000000000000000000000000000000000001
here's a sample script to send 1 tez back to ghostnet. you'll need to wait 2 weeks for the xtz to appear back in your wallet though due to the "cement" period.
const { Web3 } = require('web3');
const WalletProvider = require("@truffle/hdwallet-provider");
const rpc = 'https://node.ghostnet.etherlink.com/';
const privateKey = "<wallet private key>" // input private key
const provider = new WalletProvider(privateKey, rpc);
const web3 = new Web3(provider);
// withdraw method
let abi = [
{
type: 'function',
name: 'withdraw_base58',
constant: false,
payable: true,
inputs: [{ type: 'string', name: 'target' }],
outputs: [],
},
];
const contractAddress = "0xff00000000000000000000000000000000000001"; // bridge address
const c = new web3.eth.Contract(abi, contractAddress);
const sender="0x123"; // sender address on etherlink
const recipient="tz123"; //recipient address on tezos
const withdrawAmt = 1 * 10**18; // amt in tez expressed in wei (etherlink has 18 decimals)
c.methods['withdraw_base58(string)'](recipient)
.send({ from: sender, transactionConfirmationBlocks: 2, value: withdrawAmt, type: 0 })
.on('transactionHash', function(hash){
console.log("hash:",hash);
})
.on('receipt', function(receipt){
console.log("receipt:", receipt)
})
.on('error', function(error, receipt){
console.log("error:", error)
})
.then(function(receipt){
console.log("finished");
process.exit();
}).catch(error => {
console.log(error);
process.exit();
});
from taquito.
According to etherlink bridge repo there seem to have no support to withdraw tez from etherlink back to ghostnet. Created ticket on the repo, this ticket is currently pending depending on etherlink bridge support.
from taquito.
currently not feasible, will look into alternative solutions in the near future
from taquito.
Related Issues (20)
- SPIKE: Comprehensive testing of Michelson Encoder
- USER STORY: add Tezos Foundation teztnet RPCs
- Not working with Angular SSR HOT 1
- Support transferring ghostnet tez to etherlink in test-dapp
- Update README to match most updated information
- Add features to the test dApp related to staking
- Update remaining Taquito references of getActiveAccount()
- Investigate michelson-encoder ticket token changes HOT 1
- Update MichelsonEncoder document, informing users of the breaking changes
- Missing `delayed_operation_hash` on `OperationMetadataBalanceUpdates `
- Unable to run integration-test against private rpc node with node v20 HOT 1
- [RPC] Add a getDelegates endpoint that points to minimal stake params or options
- [Sandbox] Remove Flextesa tests from CI HOT 2
- Missing fields in METADATA_BALANCE_UPDATES_CATEGORY in @taquito 19 HOT 1
- Missing new baker types (Paris protocol) in `FrozenStaker` HOT 1
- Taquito Test Dapp - text changes needed
- Support the `transferTicket` operation in the wallet API
- SPIKE: Lerna/Nx can hide important build problems of individual packages. HOT 1
- Add a security config to prevent pushing to master
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from taquito.